Bug 1309272, part 6 - Add page start/end arguments to the PrintTarget::BeginPrinting virtual method and overloads. r=lsalzman

This commit is contained in:
Jonathan Watt 2016-11-29 07:54:30 +00:00
Родитель f8b487cf4e
Коммит d2ce7607c8
8 изменённых файлов: 23 добавлений и 8 удалений

Просмотреть файл

@ -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;