diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-07-21 16:03:55 +0200 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-07-21 16:03:55 +0200 |
commit | 19b3e9e92895f20020001fb53c3483416a09556e (patch) | |
tree | 7394f6fada9c8e96dec205a00f8b2cfec3a909bf /sd/source/ui/view/DocumentRenderer.cxx | |
parent | 4adb61dc6bb380ff31e145e6a77c92c0b26b42bd (diff) |
vcl114: #i105434# solve a scaling issue
Diffstat (limited to 'sd/source/ui/view/DocumentRenderer.cxx')
-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 0689dc0e3851..0ba6a001311c 100755 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1224,6 +1224,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. @@ -1235,14 +1236,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(); } @@ -1372,6 +1380,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; |