diff options
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/source/ui/view/DocumentRenderer.cxx | 11 |
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; |