From 2822b41dfcd26c6eb9f9ffa89672053663bb26f2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 26 Jan 2024 14:05:12 +0000 Subject: just fetch SfxViewShell::Current() once, and as const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3c95622b6de8ff35e53d9879f3de8cf9041887c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162604 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svx/source/sdr/contact/objectcontactofpageview.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svx/source/sdr/contact') 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; -- cgit