diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-21 08:00:26 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-21 05:52:59 +0000 |
commit | 527741d528ef347b28917976efffd366c62341b1 (patch) | |
tree | 2ba66344e73ceb730bbb78118a665824122ef8b4 /include/basic | |
parent | ccd0ef98f76011f108f8ea1d282b96386dba0a6a (diff) |
Related: tdf#153752 Use virtual method to avoid dynamic casts
Change-Id: I97c09d82699621d5a43a525b5f2cf75ff5d131c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/basic')
-rw-r--r-- | include/basic/sbmod.hxx | 3 | ||||
-rw-r--r-- | include/basic/sbxobj.hxx | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx index fac7f9e50121..7ca52276d012 100644 --- a/include/basic/sbmod.hxx +++ b/include/basic/sbmod.hxx @@ -94,6 +94,8 @@ protected: SAL_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; SAL_DLLPRIVATE void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint ); virtual ~SbModule() override; + bool IsOptionCompatible() const override { return mbCompat; } + public: SBX_DECL_PERSIST_NODATA(SBXID_BASICMOD,2); SbModule( const OUString&, bool bVBASupport = false ); @@ -123,7 +125,6 @@ public: SAL_DLLPRIVATE bool HasExeCode(); bool IsVBASupport() const { return mbVBASupport; } SAL_DLLPRIVATE void SetVBASupport( bool bSupport ); - bool IsCompatible() const { return mbCompat; } sal_Int32 GetModuleType() const { return mnType; } void SetModuleType( sal_Int32 nType ) { mnType = nType; } bool isProxyModule() const { return bIsProxyModule; } diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx index 34c117d33853..33ffc98c77d9 100644 --- a/include/basic/sbxobj.hxx +++ b/include/basic/sbxobj.hxx @@ -41,6 +41,8 @@ protected: virtual bool StoreData( SvStream& ) const override; virtual ~SbxObject() override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + virtual bool IsOptionCompatible() const; // Module's Option Compatible + public: SBX_DECL_PERSIST_NODATA(SBXID_OBJECT,1); SbxObject( const OUString& rClassname ); @@ -78,9 +80,6 @@ public: SbxArray* GetObjects() { return pObjs.get(); } // Debugging void Dump( SvStream&, bool bDumpAll ); - -private: - bool IsModuleCompatible() const; // Module's Option Compatible }; #endif // INCLUDED_BASIC_SBXOBJ_HXX |