sd/source/ui/view/ViewShellBase.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d3d93f51af01ddc4bbb4f8bac86a2909465e08d0
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Aug 27 08:17:04 2024 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Aug 27 09:42:05 2024 +0200

    GetMainViewShell is not trivial
    
    Change-Id: Ida2c1ec4f55c95c2a880a6d7cda46058c877a92a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172410
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 07eee4ec6f40..17d17835245c 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1121,7 +1121,8 @@ void ViewShellBase::NotifyCursor(SfxViewShell* 
pOtherShell) const
 
 ::Color ViewShellBase::GetColorConfigColor(svtools::ColorConfigEntry 
nColorType) const
 {
-    if (DrawViewShell* pCurrentDrawShell = 
dynamic_cast<DrawViewShell*>(GetMainViewShell().get()))
+    auto pViewShell = GetMainViewShell().get();
+    if (DrawViewShell* pCurrentDrawShell = 
dynamic_cast<DrawViewShell*>(pViewShell))
     {
         const SdViewOptions& rViewOptions = 
pCurrentDrawShell->GetViewOptions();
         switch (nColorType)
@@ -1138,7 +1139,7 @@ void ViewShellBase::NotifyCursor(SfxViewShell* 
pOtherShell) const
         }
     }
     // IASS: also need to handle OutlineViewShell
-    else if (nullptr != 
dynamic_cast<OutlineViewShell*>(GetMainViewShell().get()))
+    else if (nullptr != dynamic_cast<OutlineViewShell*>(pViewShell))
     {
         switch (nColorType)
         {

Reply via email to