mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
Switch public interfaces from nsIPrintOptions to nsIPrintSettings
Enabling XP Print Dialog for Windows Enabling XP Print Progress Dialog Enabling XP Page Setup Dialog Fixing nsPrintPreviewContext to use nsIPrintPreviewContext Bug 113917 r=dcone sr=attinasi
This commit is contained in:
parent
293bb5ede8
commit
cacb21c7e2
@ -42,6 +42,8 @@
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIPrintSettings;
|
||||
|
||||
// 3d5917da-1dd2-11b2-bc7b-aa83823362e0
|
||||
#define NS_IPRINTING_CONTEXT_IID \
|
||||
{ 0x3d5917da, 0x1dd2, 0x11b2, \
|
||||
@ -59,7 +61,7 @@ public:
|
||||
* printer).
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(PRBool aQuiet) = 0;
|
||||
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet) = 0;
|
||||
|
||||
/**
|
||||
* This will tell if the printmanager is currently open
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "nsIPrintingContext.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "plstr.h"
|
||||
#include "nsDeviceContextSpecMac.h"
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Constructor
|
||||
@ -75,21 +76,23 @@ NS_IMETHODIMP nsDeviceContextSpecFactoryMac :: Init(void)
|
||||
* @update dc 12/02/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecFactoryMac :: CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet)
|
||||
{
|
||||
|
||||
nsresult rv;
|
||||
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
|
||||
nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIPrintingContext> printingContext = do_QueryInterface(devSpec, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = printingContext->Init(aQuiet);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
aNewSpec = devSpec;
|
||||
NS_ADDREF(aNewSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID,&rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIPrintingContext> printingContext = do_QueryInterface(devSpec,&rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = printingContext->Init(aPrintSettings,aQuiet);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
aNewSpec = devSpec;
|
||||
NS_ADDREF(aNewSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
|
||||
NS_IMETHOD Init(void);
|
||||
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user