summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-05-12 22:43:48 +1000
committerTomaž Vajngerl <quikee@gmail.com>2020-05-20 10:55:40 +0200
commitf85769f61b2d2380750be564c6de47f28be35b8a (patch)
tree467f4522f65234b24ffbe73f1b7cf2d04b396e84 /vcl
parent34a699f1894f30f68c3243784586617e01e60ab6 (diff)
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 <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/print2.cxx11
1 files changed, 8 insertions, 3 deletions
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