diff options
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 4 | ||||
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 4 | ||||
-rw-r--r-- | basic/source/inc/scriptcont.hxx | 8 | ||||
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 3 | ||||
-rw-r--r-- | compilerplugins/clang/mergeclasses.results | 1 | ||||
-rw-r--r-- | include/basic/basmgr.hxx | 15 |
6 files changed, 13 insertions, 22 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 5d04fc3f78ab..7a2ed5efd20a 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -300,7 +300,7 @@ namespace basic // Dialog container rtl::Reference<SfxDialogLibraryContainer> pDialogCont = new SfxDialogLibraryContainer( Reference< XStorage >() ); - LibraryContainerInfo aInfo( pBasicCont, pDialogCont, static_cast< OldBasicPassword* >( pBasicCont.get() ) ); + LibraryContainerInfo aInfo( pBasicCont, pDialogCont, pBasicCont.get() ); pBasicManager->SetLibraryContainerInfo( aInfo ); // global constants @@ -462,7 +462,7 @@ namespace basic } // knit the containers with the BasicManager - LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, dynamic_cast< OldBasicPassword* >( xBasicLibs.get() ) ); + LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, dynamic_cast< SfxScriptLibraryContainer* >( xBasicLibs.get() ) ); OSL_ENSURE( aInfo.mpOldBasicPassword, "ImplRepository::impl_createManagerForModel: wrong BasicLibraries implementation!" ); _out_rpBasicManager->SetLibraryContainerInfo( aInfo ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index d3a711f4a677..72776dd08153 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -41,6 +41,8 @@ #include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/script/XPersistentLibraryContainer.hpp> +#include <scriptcont.hxx> + #include <memory> #include <vector> @@ -567,7 +569,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo ) copyToLibraryContainer( pLib, maContainerInfo ); if (rpBasLibInfo->HasPassword()) { - OldBasicPassword* pOldBasicPassword = + basic::SfxScriptLibraryContainer* pOldBasicPassword = maContainerInfo.mpOldBasicPassword; if( pOldBasicPassword ) { diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index f80fd81791b0..2d0e8bcf3232 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -29,7 +29,7 @@ namespace basic { -class SfxScriptLibraryContainer final : public SfxLibraryContainer, public OldBasicPassword +class SfxScriptLibraryContainer final : public SfxLibraryContainer { css::uno::Reference< css::container::XNameAccess > mxCodeNameAccess; @@ -75,9 +75,6 @@ class SfxScriptLibraryContainer final : public SfxLibraryContainer, public OldBa virtual void onNewRootStorage() override; - // OldBasicPassword interface - virtual void setLibraryPassword( const OUString& rLibraryName, const OUString& rPassword ) override; - virtual OUString getInfoFileName() const override; virtual OUString getOldInfoFileName() const override; virtual OUString getLibElementFileExtension() const override; @@ -99,6 +96,9 @@ public: // Methods XServiceInfo virtual OUString SAL_CALL getImplementationName( ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; + + // Library password handling for 5.0 documents + void setLibraryPassword( const OUString& rLibraryName, const OUString& rPassword ); }; diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 52413b759d15..eea449ac47fc 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -87,7 +87,6 @@ OUString SfxScriptLibraryContainer::getLibrariesDir() const return sBasic; } -// OldBasicPassword interface void SfxScriptLibraryContainer::setLibraryPassword( const OUString& rLibraryName, const OUString& rPassword ) { try @@ -341,7 +340,7 @@ void SfxScriptLibraryContainer::importFromOldStorage( const OUString& aFile ) auto pBasicManager = std::make_unique<BasicManager> ( *xStorage, aFile ); // Set info - LibraryContainerInfo aInfo( this, nullptr, static_cast< OldBasicPassword* >( this ) ); + LibraryContainerInfo aInfo( this, nullptr, this ); pBasicManager->SetLibraryContainerInfo( aInfo ); } } diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results index 8d05acd9a052..6757b4070506 100644 --- a/compilerplugins/clang/mergeclasses.results +++ b/compilerplugins/clang/mergeclasses.results @@ -93,7 +93,6 @@ merge LotusConverterBase with LotusToSc merge LwpDLVListHead with LwpPropList merge LwpMarker with LwpStoryMarker merge ObservableThread with SwAsyncRetrieveInputStreamThread -merge OldBasicPassword with basic::SfxScriptLibraryContainer merge PPTExBulletProvider with PPTWriter merge PriorityHBox with PriorityMergedHBox merge PropertyAccessorBase with GenericPropertyAccessor diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx index 4f263c41e0cc..1d0fc37c0a85 100644 --- a/include/basic/basmgr.hxx +++ b/include/basic/basmgr.hxx @@ -28,6 +28,7 @@ #include <string_view> #include <vector> +namespace basic { class SfxScriptLibraryContainer; } namespace com::sun::star::script { class XLibraryContainer; } namespace com::sun::star::script { class XPersistentLibraryContainer; } namespace com::sun::star::script { class XStarBasicAccess; } @@ -68,21 +69,11 @@ class BasicLibInfo; namespace basic { class ImplRepository; } -// Library password handling for 5.0 documents -class BASIC_DLLPUBLIC OldBasicPassword -{ -public: - virtual void setLibraryPassword( const OUString& rLibraryName, const OUString& rPassword ) = 0; - -protected: - ~OldBasicPassword() {} -}; - struct LibraryContainerInfo { css::uno::Reference< css::script::XPersistentLibraryContainer > mxScriptCont; css::uno::Reference< css::script::XPersistentLibraryContainer > mxDialogCont; - OldBasicPassword* mpOldBasicPassword; + basic::SfxScriptLibraryContainer* mpOldBasicPassword; LibraryContainerInfo() :mpOldBasicPassword( nullptr ) @@ -93,7 +84,7 @@ struct LibraryContainerInfo ( css::uno::Reference< css::script::XPersistentLibraryContainer > xScriptCont, css::uno::Reference< css::script::XPersistentLibraryContainer > xDialogCont, - OldBasicPassword* pOldBasicPassword + basic::SfxScriptLibraryContainer* pOldBasicPassword ) : mxScriptCont(std::move( xScriptCont )) , mxDialogCont(std::move( xDialogCont )) |