sd/source/ui/accessibility/AccessibleOutlineView.cxx |    4 ++--
 sd/source/ui/docshell/docshell.cxx                   |    1 +
 sd/source/ui/func/fubullet.cxx                       |    2 +-
 sd/source/ui/inc/OutlineView.hxx                     |    4 ++--
 sd/source/ui/view/drtxtob.cxx                        |    2 +-
 sd/source/ui/view/outlnvs2.cxx                       |    1 +
 sd/source/ui/view/outlnvsh.cxx                       |    1 +
 sd/source/ui/view/outlview.cxx                       |    8 ++++----
 sd/source/ui/view/viewshel.cxx                       |    1 +
 9 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit f843c4b57f82b282cadc8eca2d80ed15d15993eb
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 8 10:52:58 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 9 06:24:07 2023 +0100

    loplugin:fieldcast in sd::OutlineView
    
    Change-Id: I7fd3058f84d2bf2d9e02a50cefe5691038ecb7da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159175
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx 
b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
index 6f5ef764f12e..9d2e82c1b12a 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
@@ -31,7 +31,7 @@
 #include <drawdoc.hxx>
 #include <strings.hrc>
 #include <sdresid.hxx>
-
+#include <Outliner.hxx>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -63,7 +63,7 @@ AccessibleOutlineView::AccessibleOutlineView (
         return;
 
     OutlinerView* pOutlineView = pShellView->GetViewByWindow( pSdWindow );
-    SdrOutliner& rOutliner = pShellView->GetOutliner();
+    SdOutliner& rOutliner = pShellView->GetOutliner();
 
     if( pOutlineView )
     {
diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index 705e293974b2..5ac592f80be3 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -62,6 +62,7 @@
 #include <DrawViewShell.hxx>
 #include <sdpage.hxx>
 #include <docmodel/theme/Theme.hxx>
+#include <Outliner.hxx>
 
 using namespace sd;
 #define ShellClass_DrawDocShell
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 843215c24660..f37770e587d4 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -37,7 +37,7 @@
 #include <svl/ctloptions.hxx>
 #include <svl/stritem.hxx>
 #include <tools/debug.hxx>
-
+#include <Outliner.hxx>
 #include <svx/svxdlg.hxx>
 #include <svx/svxids.hrc>
 
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 06561a6e051e..43dadf038664 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -79,7 +79,7 @@ public:
     virtual void DeleteDeviceFromPaintView(OutputDevice& rDev) override;
 
     OutlinerView*   GetViewByWindow(vcl::Window const * pWin) const;
-    SdrOutliner&    GetOutliner() { return mrOutliner; }
+    SdOutliner&     GetOutliner() { return mrOutliner; }
 
     Paragraph*      GetPrevTitle(const Paragraph* pPara);
     Paragraph*      GetNextTitle(const Paragraph* pPara);
@@ -166,7 +166,7 @@ private:
     void UpdateDocument();
 
     OutlineViewShell&   mrOutlineViewShell;
-    SdrOutliner&        mrOutliner;
+    SdOutliner&         mrOutliner;
     std::unique_ptr<OutlinerView> mpOutlinerViews[MAX_OUTLINERVIEWS];
 
     std::vector<Paragraph*> maOldParaOrder;
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 94864cb56cb9..db2161c247f9 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -56,7 +56,7 @@
 #include <OutlineViewShell.hxx>
 #include <Window.hxx>
 #include <OutlineView.hxx>
-
+#include <Outliner.hxx>
 
 #define ShellClass_TextObjectBar
 using namespace sd;
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 2a890cec1b41..003a4c1f927a 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <OutlineViewShell.hxx>
+#include <Outliner.hxx>
 
 #include <app.hrc>
 #include <svx/hlnkitem.hxx>
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 8bb39efc4bb0..71de36c10206 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <OutlineViewShell.hxx>
+#include <Outliner.hxx>
 
 #include <helpids.h>
 #include <app.hrc>
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index ab994e235813..2f68a6f8d9d2 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1200,7 +1200,7 @@ Paragraph* OutlineView::GetParagraphForPage( ::Outliner 
const & rOutl, SdPage co
 /** selects the paragraph for the given page at the outliner view*/
 void OutlineView::SetActualPage( SdPage const * pActual )
 {
-    if( pActual && 
dynamic_cast<SdOutliner&>(mrOutliner).GetIgnoreCurrentPageChangesLevel()==0 && 
!mbFirstPaint)
+    if( pActual && mrOutliner.GetIgnoreCurrentPageChangesLevel()==0 && 
!mbFirstPaint)
     {
         // if we found a paragraph, select its text at the outliner view
         Paragraph* pPara = GetParagraphForPage( mrOutliner, pActual );
@@ -1364,7 +1364,7 @@ IMPL_LINK(OutlineView, EventMultiplexerListener, 
::sd::tools::EventMultiplexerEv
             break;
 
         case EventMultiplexerEventId::PageOrder:
-            if 
(dynamic_cast<SdOutliner&>(mrOutliner).GetIgnoreCurrentPageChangesLevel()==0)
+            if (mrOutliner.GetIgnoreCurrentPageChangesLevel()==0)
             {
                 if (((mrDoc.GetPageCount()-1)%2) == 0)
                 {
@@ -1384,9 +1384,9 @@ IMPL_LINK(OutlineView, EventMultiplexerListener, 
::sd::tools::EventMultiplexerEv
 void OutlineView::IgnoreCurrentPageChanges (bool bIgnoreChanges)
 {
     if (bIgnoreChanges)
-        
dynamic_cast<SdOutliner&>(mrOutliner).IncreIgnoreCurrentPageChangesLevel();
+        mrOutliner.IncreIgnoreCurrentPageChangesLevel();
     else
-        
dynamic_cast<SdOutliner&>(mrOutliner).DecreIgnoreCurrentPageChangesLevel();
+        mrOutliner.DecreIgnoreCurrentPageChangesLevel();
 }
 
 /** call this method before you do anything that can modify the outliner
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 91fa6a2e4b53..9a1e52539bee 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -26,6 +26,7 @@
 #include <ShellFactory.hxx>
 #include <DrawController.hxx>
 #include <LayerTabBar.hxx>
+#include <Outliner.hxx>
 
 #include <sal/log.hxx>
 #include <sfx2/viewfrm.hxx>

Reply via email to