basic/source/classes/sbxmod.cxx      |    2 +-
 basic/source/uno/modsizeexceeded.cxx |   14 ++------------
 include/basic/modsizeexceeded.hxx    |    6 ++++--
 include/basic/sbmod.hxx              |    4 ++--
 4 files changed, 9 insertions(+), 17 deletions(-)

New commits:
commit 8faf693cd11579e5c4d1ff2d017b1bb875d91ec1
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 8 14:55:21 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 10 09:53:01 2023 +0100

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

diff --git a/basic/source/uno/modsizeexceeded.cxx 
b/basic/source/uno/modsizeexceeded.cxx
index 27c795934961..b85f285d820f 100644
--- a/basic/source/uno/modsizeexceeded.cxx
+++ b/basic/source/uno/modsizeexceeded.cxx
@@ -39,18 +39,8 @@ ModuleSizeExceeded::ModuleSizeExceeded(const 
std::vector<OUString>& sModules)
     m_lContinuations = { m_xApprove, m_xAbort };
 }
 
-bool ModuleSizeExceeded::isAbort() const
-{
-    comphelper::OInteractionAbort* pBase
-        = static_cast<comphelper::OInteractionAbort*>(m_xAbort.get());
-    return pBase->wasSelected();
-}
+bool ModuleSizeExceeded::isAbort() const { return m_xAbort->wasSelected(); }
 
-bool ModuleSizeExceeded::isApprove() const
-{
-    comphelper::OInteractionApprove* pBase
-        = static_cast<comphelper::OInteractionApprove*>(m_xApprove.get());
-    return pBase->wasSelected();
-}
+bool ModuleSizeExceeded::isApprove() const { return m_xApprove->wasSelected(); 
}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/basic/modsizeexceeded.hxx 
b/include/basic/modsizeexceeded.hxx
index 8910be30b767..e2a32f954257 100644
--- a/include/basic/modsizeexceeded.hxx
+++ b/include/basic/modsizeexceeded.hxx
@@ -24,6 +24,8 @@
 #include <com/sun/star/task/XInteractionRequest.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <basic/basicdllapi.h>
+#include <comphelper/interaction.hxx>
+#include <rtl/ref.hxx>
 #include <vector>
 
 namespace com::sun::star::task { class XInteractionContinuation; }
@@ -56,8 +58,8 @@ public:
 private:
     css::uno::Any m_aRequest;
     css::uno::Sequence< css::uno::Reference< 
css::task::XInteractionContinuation > > m_lContinuations;
-    css::uno::Reference< css::task::XInteractionContinuation > m_xAbort;
-    css::uno::Reference< css::task::XInteractionContinuation> m_xApprove;
+    rtl::Reference< comphelper::OInteractionAbort > m_xAbort;
+    rtl::Reference< comphelper::OInteractionApprove> m_xApprove;
 };
 
 #endif
commit b875ceabf0bd5572e15afccc2cbedaa783badca0
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Nov 8 14:52:54 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 10 09:52:53 2023 +0100

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

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 15e4719569ba..59eb93f665c4 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2161,7 +2161,7 @@ SbObjModule::~SbObjModule()
 void
 SbObjModule::SetUnoObject( const uno::Any& aObj )
 {
-    SbUnoObject* pUnoObj = dynamic_cast<SbUnoObject*>( pDocObject.get() );
+    SbUnoObject* pUnoObj = pDocObject.get();
     if ( pUnoObj && pUnoObj->getUnoAny() == aObj ) // object is equal, nothing 
to do
         return;
     pDocObject = new SbUnoObject( GetName(), aObj );
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index 10b54217e55b..5c369b441f92 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -39,7 +39,7 @@ typedef std::deque< sal_uInt16 > SbiBreakpoints;
 class SbiImage;
 class SbClassModuleObject;
 class CodeCompleteDataCache;
-
+class SbUnoObject;
 
 class ModuleInitDependencyMap;
 struct ClassModuleRunInitItem;
@@ -69,7 +69,7 @@ protected:
     bool mbVBASupport; // Option VBASupport
     bool mbCompat; // Option Compatible
     sal_Int32 mnType;
-    SbxObjectRef pDocObject; // an impl object ( used by Document Modules )
+    tools::SvRef<SbUnoObject> pDocObject; // an impl object ( used by Document 
Modules )
     bool    bIsProxyModule;
 
     SAL_DLLPRIVATE static void implProcessModuleRunInit( 
ModuleInitDependencyMap& rMap, ClassModuleRunInitItem& rItem );

Reply via email to