summaryrefslogtreecommitdiff
path: root/svx/source/sdr/contact
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-26 14:05:12 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-26 16:19:53 +0100
commit2822b41dfcd26c6eb9f9ffa89672053663bb26f2 (patch)
tree8a448d10d69153612436dc440a206720b1c5be3f /svx/source/sdr/contact
parent45763a761bdbe8ef0b3a4f81225d262b64b9c4b0 (diff)
just fetch SfxViewShell::Current() once, and as const
Change-Id: I3c95622b6de8ff35e53d9879f3de8cf9041887c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'svx/source/sdr/contact')
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 89b6325cf492..79842eb761b0 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -219,8 +219,8 @@ namespace sdr::contact
aNewViewInformation2D.setViewport(aViewRange);
aNewViewInformation2D.setVisualizedPage(GetXDrawPageForSdrPage(GetSdrPage()));
aNewViewInformation2D.setViewTime(fCurrentTime);
- if (SfxViewShell::Current())
- aNewViewInformation2D.setAutoColor(SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR));
+ if (const SfxViewShell* pViewShell = SfxViewShell::Current())
+ aNewViewInformation2D.setAutoColor(pViewShell->GetColorConfigColor(svtools::DOCCOLOR));
updateViewInformation2D(aNewViewInformation2D);
drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence;