summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-08-25 17:40:34 +0200
committerVladimir Glazunov <vg@openoffice.org>2010-08-25 17:40:34 +0200
commit32133e51f60ab72baa52f043e210207af27fabb3 (patch)
tree50a9d6df0736d0a82c53d2f6bb8624f2f18b59bd
parent206fd2cc760cad947985e0680b2db6a4edf578f3 (diff)
parent427ee90b689821e68eb19457982fa117cf61d03c (diff)
CWS-TOOLING: integrate CWS vcl114
-rwxr-xr-xsd/source/ui/view/DocumentRenderer.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index b28e7dc496a9..ddbf5cfc4388 100755
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1250,6 +1250,7 @@ public:
return;
bool bIsValueChanged = processProperties( rOptions );
+ bool bIsPaperChanged = false;
// The RenderDevice property is handled specially: its value is
// stored in mpPrinter instead of being retrieved on demand.
@@ -1261,14 +1262,21 @@ public:
VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
mpPrinter = dynamic_cast<Printer*>(pOut);
+ Size aPageSizePixel = mpPrinter ? mpPrinter->GetPaperSizePixel() : Size();
+ if( aPageSizePixel != maPrinterPageSizePixel )
+ {
+ bIsPaperChanged = true;
+ maPrinterPageSizePixel = aPageSizePixel;
+ }
}
if (bIsValueChanged)
{
if ( ! mpOptions )
mpOptions.reset(new PrintOptions(*this, maSlidesPerPage));
- PreparePages();
}
+ if( bIsValueChanged || bIsPaperChanged )
+ PreparePages();
}
@@ -1398,6 +1406,7 @@ private:
ViewShellBase& mrBase;
bool mbIsDisposed;
Printer* mpPrinter;
+ Size maPrinterPageSizePixel;
::boost::scoped_ptr<PrintOptions> mpOptions;
::std::vector< ::boost::shared_ptr< ::sd::PrinterPage> > maPrinterPages;
::boost::scoped_ptr<DrawView> mpPrintView;