summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/sdrpaintwindow.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-15 21:35:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-16 09:55:12 +0200
commita193da0a46f9613a3eefe0e35c8fa000b2f19fd3 (patch)
tree6e636caa94ce3f2af418fc71b4bf218359978daf /svx/source/svdraw/sdrpaintwindow.cxx
parenta399853f864ace2d4bd7e9a3a3b3eeb8a2379e4a (diff)
split methods up
Change-Id: Ib6f27574b8a45b29d6887d268f2e291314c796bf Reviewed-on: https://gerrit.libreoffice.org/72382 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/svdraw/sdrpaintwindow.cxx')
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx29
1 files changed, 17 insertions, 12 deletions
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 060437fa77a1..91ca3860e7b0 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -168,6 +168,22 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const vcl::Region& rExpandedRegio
mpPreRenderDevice->EnableMapMode(bMapModeWasEnabledSource);
}
+void SdrPaintView::InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager) const
+{
+ Color aColA(getOptionsDrawinglayer().GetStripeColorA());
+ Color aColB(getOptionsDrawinglayer().GetStripeColorB());
+
+ if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ {
+ aColA = aColB = Application::GetSettings().GetStyleSettings().GetHighlightColor();
+ aColB.Invert();
+ }
+
+ xOverlayManager->setStripeColorA(aColA);
+ xOverlayManager->setStripeColorB(aColB);
+ xOverlayManager->setStripeLengthPixel(getOptionsDrawinglayer().GetStripeLength());
+}
+
rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager(OutputDevice& rOutputDevice) const
{
rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager;
@@ -204,18 +220,7 @@ rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager(
rWindow.Invalidate();
}
- Color aColA(getOptionsDrawinglayer().GetStripeColorA());
- Color aColB(getOptionsDrawinglayer().GetStripeColorB());
-
- if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
- {
- aColA = aColB = Application::GetSettings().GetStyleSettings().GetHighlightColor();
- aColB.Invert();
- }
-
- xOverlayManager->setStripeColorA(aColA);
- xOverlayManager->setStripeColorB(aColB);
- xOverlayManager->setStripeLengthPixel(getOptionsDrawinglayer().GetStripeLength());
+ InitOverlayManager(xOverlayManager);
}
return xOverlayManager;
}