mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1309272, part 6 - Add page start/end arguments to the PrintTarget::BeginPrinting virtual method and overloads. r=lsalzman
This commit is contained in:
parent
f8b487cf4e
commit
d2ce7607c8
@ -481,7 +481,8 @@ nsDeviceContext::BeginDocument(const nsAString& aTitle,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage)
|
||||
{
|
||||
nsresult rv = mPrintTarget->BeginPrinting(aTitle, aPrintToFileName);
|
||||
nsresult rv = mPrintTarget->BeginPrinting(aTitle, aPrintToFileName,
|
||||
aStartPage, aEndPage);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && mDeviceContextSpec) {
|
||||
rv = mDeviceContextSpec->BeginDocument(aTitle, aPrintToFileName,
|
||||
|
@ -30,7 +30,9 @@ public:
|
||||
|
||||
/// Must be matched 1:1 by an EndPrinting/AbortPrinting call.
|
||||
virtual nsresult BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName) {
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage) {
|
||||
return NS_OK;
|
||||
}
|
||||
virtual nsresult EndPrinting() {
|
||||
|
@ -79,7 +79,9 @@ PrintTargetPS::CreateOrNull(nsIOutputStream *aStream,
|
||||
|
||||
nsresult
|
||||
PrintTargetPS::BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName)
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage)
|
||||
{
|
||||
if (mOrientation == PORTRAIT) {
|
||||
cairo_ps_surface_dsc_comment(mCairoSurface, "%%Orientation: Portrait");
|
||||
|
@ -29,7 +29,9 @@ public:
|
||||
PageOrientation aOrientation);
|
||||
|
||||
virtual nsresult BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName) override;
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage) override;
|
||||
virtual nsresult EndPage() override;
|
||||
virtual void Finish() override;
|
||||
|
||||
|
@ -78,7 +78,9 @@ PrintTargetThebes::GetReferenceDrawTarget(DrawEventRecorder* aRecorder)
|
||||
|
||||
nsresult
|
||||
PrintTargetThebes::BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName)
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage)
|
||||
{
|
||||
return mGfxSurface->BeginPrinting(aTitle, aPrintToFileName);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ public:
|
||||
CreateOrNull(gfxASurface* aSurface);
|
||||
|
||||
virtual nsresult BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName) override;
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage) override;
|
||||
virtual nsresult EndPrinting() override;
|
||||
virtual nsresult AbortPrinting() override;
|
||||
virtual nsresult BeginPage() override;
|
||||
|
@ -55,7 +55,9 @@ PrintTargetWindows::CreateOrNull(HDC aDC)
|
||||
|
||||
nsresult
|
||||
PrintTargetWindows::BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName)
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage)
|
||||
{
|
||||
const uint32_t DOC_TITLE_LENGTH = MAX_PATH - 1;
|
||||
|
||||
|
@ -24,7 +24,9 @@ public:
|
||||
CreateOrNull(HDC aDC);
|
||||
|
||||
virtual nsresult BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName) override;
|
||||
const nsAString& aPrintToFileName,
|
||||
int32_t aStartPage,
|
||||
int32_t aEndPage) override;
|
||||
virtual nsresult EndPrinting() override;
|
||||
virtual nsresult AbortPrinting() override;
|
||||
virtual nsresult BeginPage() override;
|
||||
|
Loading…
Reference in New Issue
Block a user