зеркало из https://github.com/mozilla/gecko-dev.git
check in xprint changes for tajima@eng.sun.com r=erik@netscape.com
all the changes is now #ifdef USE_XPRINT and won't be build by default.
This commit is contained in:
Родитель
504bddf1ef
Коммит
cb50d82d66
|
@ -52,6 +52,9 @@ nsDeviceContextSpecGTK :: ~nsDeviceContextSpecGTK()
|
|||
|
||||
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
|
||||
static NS_DEFINE_IID(kIDeviceContextSpecPSIID, NS_IDEVICE_CONTEXT_SPEC_PS_IID);
|
||||
#ifdef USE_XPRINT
|
||||
static NS_DEFINE_IID(kIDeviceContextSpecXPIID, NS_IDEVICE_CONTEXT_SPEC_XP_IID);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
NS_IMPL_QUERY_INTERFACE(nsDeviceContextSpecGTK, kDeviceContextSpecIID)
|
||||
|
@ -80,6 +83,15 @@ NS_IMETHODIMP nsDeviceContextSpecGTK :: QueryInterface(REFNSIID aIID, void** aIn
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
if (aIID.Equals(kIDeviceContextSpecXPIID))
|
||||
{
|
||||
*aInstancePtr = (void*) (nsIDeviceContextSpecXP*) this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
|
||||
if (aIID.Equals(kISupportsIID))
|
||||
|
@ -114,7 +126,7 @@ NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
|||
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_PROGID, &rv);
|
||||
// NS_WITH_SERVICE(nsIPref, pPrefs, NS_PREF_PROGID, &rv);
|
||||
if(!NS_FAILED(rv) && pPrefs) {
|
||||
if (NS_SUCCEEDED(rv) && pPrefs) {
|
||||
(void) pPrefs->GetBoolPref("print.print_reversed", &reversed);
|
||||
(void) pPrefs->GetBoolPref("print.print_color", &color);
|
||||
(void) pPrefs->GetBoolPref("print.print_landscape", &landscape);
|
||||
|
@ -259,6 +271,22 @@ NS_IMETHODIMP nsDeviceContextSpecGTK :: GetUserCancelled( PRBool &aCancel )
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetPrintMethod(int &aMethod )
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_PROGID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && pPrefs) {
|
||||
PRInt32 method = 0;
|
||||
(void) pPrefs->GetIntPref("print.print_method", &method);
|
||||
aMethod = method;
|
||||
} else {
|
||||
aMethod = 0;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 2/15/98
|
||||
|
|
|
@ -27,10 +27,16 @@
|
|||
#include "nsDeviceContextSpecG.h"
|
||||
#include "nsIDeviceContextSpecPS.h"
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
#include "nsIDeviceContextSpecXPrint.h"
|
||||
#endif
|
||||
#include "nsPrintdGTK.h"
|
||||
|
||||
class nsDeviceContextSpecGTK : public nsIDeviceContextSpec ,
|
||||
public nsIDeviceContextSpecPS
|
||||
#ifdef USE_XPRINT
|
||||
, public nsIDeviceContextSpecXP
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -87,6 +93,9 @@ public:
|
|||
|
||||
NS_IMETHOD GetUserCancelled( PRBool &aCancel );
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
NS_IMETHOD GetPrintMethod(int &aMethod );
|
||||
#endif
|
||||
protected:
|
||||
/**
|
||||
* Destuct a nsDeviceContextSpecMac, this will release the printrecord
|
||||
|
|
Загрузка…
Ссылка в новой задаче