vcl/source/gdi/print2.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit f85769f61b2d2380750be564c6de47f28be35b8a
Author:     Chris Sherlock <[email protected]>
AuthorDate: Tue May 12 22:43:48 2020 +1000
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Wed May 20 10:55:40 2020 +0200

    vcl: refactor by creating RecordMapModeChanges() function
    
    Change-Id: I5f0b8b9e0d85cdd71dffdc1f9f95d4660a7e0a0e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94394
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index b50d57a6c2d4..dcdce7f793c1 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -736,6 +736,13 @@ int GetActionAfterBackgroundAction(ConnectedComponents& 
rBackgroundComponent, Me
     return nActionNum;
 }
 
+void RecordMapModeChanges(VirtualDevice* pMapModeVDev, sal_uInt32 nDPIX, 
sal_uInt32 nDPIY)
+{
+    pMapModeVDev->SetDPIX(nDPIX);
+    pMapModeVDev->SetDPIY(nDPIY);
+    pMapModeVDev->EnableOutput(false);
+}
+
 } // end anon namespace
 
 bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& 
rInMtf, GDIMetaFile& rOutMtf,
@@ -803,9 +810,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const 
GDIMetaFile& rInMtf,
 
         // create an OutputDevice to record mapmode changes and the like
         ScopedVclPtrInstance< VirtualDevice > aMapModeVDev;
-        aMapModeVDev->mnDPIX = mnDPIX;
-        aMapModeVDev->mnDPIY = mnDPIY;
-        aMapModeVDev->EnableOutput(false);
+        RecordMapModeChanges(aMapModeVDev.get(), mnDPIX, mnDPIY);
 
         // weed out page-filling background objects (if they are
         // uniformly coloured). Keeping them outside the other
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to