include/svx/svdundo.hxx          |    4 ++--
 svx/source/svdraw/svdundo.cxx    |    4 ++--
 sw/source/uibase/inc/unotxvw.hxx |    6 ++++--
 sw/source/uibase/uno/unotxvw.cxx |    6 ++----
 4 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 8987ca1b4a77b74382a594ccf340da88e58e577c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Nov 7 15:29:30 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Nov 8 15:01:16 2023 +0100

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

diff --git a/sw/source/uibase/inc/unotxvw.hxx b/sw/source/uibase/inc/unotxvw.hxx
index d55c02f78d57..e4f8b1a1483e 100644
--- a/sw/source/uibase/inc/unotxvw.hxx
+++ b/sw/source/uibase/inc/unotxvw.hxx
@@ -48,6 +48,8 @@
 
 class SdrObject;
 class SwView;
+class SwXViewSettings;
+class SwXTextViewCursor;
 
 typedef cppu::ImplInheritanceHelper<
             SfxBaseController,
@@ -70,8 +72,8 @@ class SwXTextView final : public SwXTextView_Base
     const SfxItemPropertySet*   m_pPropSet;   // property map for SwXTextView 
properties
                                         // (not related to mxViewSettings!)
 
-    css::uno::Reference< css::beans::XPropertySet >     mxViewSettings;
-    css::uno::Reference< css::text::XTextViewCursor >   mxTextViewCursor;
+    rtl::Reference< SwXViewSettings >     mxViewSettings;
+    rtl::Reference< SwXTextViewCursor >   mxTextViewCursor;
 
     SdrObject* GetControl(
         const css::uno::Reference< css::awt::XControlModel > & Model,
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index af1a37c207ab..b14419a933f5 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -103,14 +103,12 @@ void SwXTextView::Invalidate()
 {
     if(mxViewSettings.is())
     {
-        comphelper::ChainablePropertySet *pSettings = static_cast < 
comphelper::ChainablePropertySet * > ( mxViewSettings.get() );
-        static_cast < SwXViewSettings* > ( pSettings )->Invalidate();
+        mxViewSettings->Invalidate();
         mxViewSettings.clear();
     }
     if(mxTextViewCursor.is())
     {
-        text::XTextViewCursor* pCursor = mxTextViewCursor.get();
-        static_cast<SwXTextViewCursor*>(pCursor)->Invalidate();
+        mxTextViewCursor->Invalidate();
         mxTextViewCursor.clear();
     }
 
commit 3e321557505b69fe804551528eb658bfcfdcae9e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Nov 7 15:22:41 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Nov 8 15:01:02 2023 +0100

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

diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 36c59ca482a4..95bf3d79ce9a 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -153,8 +153,8 @@ class SVXCORE_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj
     std::optional<SfxItemSet> moRedoSet;
 
     // FIXME: Or should we better remember the StyleSheetNames?
-    rtl::Reference< SfxStyleSheetBase > mxUndoStyleSheet;
-    rtl::Reference< SfxStyleSheetBase > mxRedoStyleSheet;
+    rtl::Reference< SfxStyleSheet > mxUndoStyleSheet;
+    rtl::Reference< SfxStyleSheet > mxRedoStyleSheet;
     bool bStyleSheet;
     bool bHaveToTakeRedoSet;
 
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 51e6268d9fbc..0dcfede6e0cc 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -327,7 +327,7 @@ void SdrUndoAttrObj::Undo()
         if(bStyleSheet)
         {
             mxRedoStyleSheet = mxObj->GetStyleSheet();
-            SfxStyleSheet* pSheet = dynamic_cast< SfxStyleSheet* 
>(mxUndoStyleSheet.get());
+            SfxStyleSheet* pSheet = mxUndoStyleSheet.get();
 
             if(pSheet && mxObj->getSdrModelFromSdrObject().GetStyleSheetPool())
             {
@@ -415,7 +415,7 @@ void SdrUndoAttrObj::Redo()
         if(bStyleSheet)
         {
             mxUndoStyleSheet = mxObj->GetStyleSheet();
-            SfxStyleSheet* pSheet = dynamic_cast< SfxStyleSheet* 
>(mxRedoStyleSheet.get());
+            SfxStyleSheet* pSheet = mxRedoStyleSheet.get();
 
             if(pSheet && mxObj->getSdrModelFromSdrObject().GetStyleSheetPool())
             {

Reply via email to