sd/inc/sdmod.hxx | 8 -------- sd/source/ui/app/sdmod.cxx | 43 ------------------------------------------- 2 files changed, 51 deletions(-)
New commits: commit 48e07052be600a5abf8ef4cbec20e1122e703b7e Author: Gabor Kelemen <[email protected]> AuthorDate: Thu Apr 25 16:52:14 2024 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Fri Apr 26 15:16:05 2024 +0200 Drop now unused GetOptionStream class Change-Id: Iddb1fbb437f0f66c551e9231d79511caf1edafb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166635 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 5008fc001f0b..b872ebf0913d 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -51,12 +51,6 @@ namespace com::sun::star::frame { class XFrame; } -enum class SdOptionStreamMode -{ - Load = 0, - Store = 1 -}; - struct SdExtPropertySetInfoCacheCompare { bool operator()(const std::span<SfxItemPropertyMapEntry const>& lhs, const std::span<SfxItemPropertyMapEntry const>& rhs) const @@ -104,7 +98,6 @@ public: void GetState(SfxItemSet&); SdOptions* GetSdOptions(DocumentType eDocType); - SD_DLLPUBLIC rtl::Reference<SotStorageStream> GetOptionStream( std::u16string_view rOptionName, SdOptionStreamMode eMode ); bool GetWaterCan() const { return bWaterCan; } void SetWaterCan( bool bWC ) { bWaterCan = bWC; } @@ -140,7 +133,6 @@ private: SdOptions* pDrawOptions; std::unique_ptr<SvxSearchItem> pSearchItem; std::unique_ptr<SvNumberFormatter> pNumberFormatter; - rtl::Reference<SotStorage> xOptionStorage; bool bWaterCan; std::unique_ptr<SfxErrorHandler> mpErrorHdl; /** This device is used for printer independent layout. It is virtual diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index f1b9a9bbe8a1..f18dd647a209 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -157,49 +157,6 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType) return pOptions; } -/** - * Open and return option stream for internal options; - * if the stream is opened for reading but does not exist, an 'empty' - * RefObject is returned - */ -rtl::Reference<SotStorageStream> SdModule::GetOptionStream( std::u16string_view rOptionName, - SdOptionStreamMode eMode ) -{ - ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); - rtl::Reference<SotStorageStream> xStm; - - if( pDocSh ) - { - DocumentType eType = pDocSh->GetDoc()->GetDocumentType(); - - if( !xOptionStorage.is() ) - { - INetURLObject aURL( SvtPathOptions().GetUserConfigPath() ); - - aURL.Append( u"drawing.cfg" ); - - std::unique_ptr<SvStream> pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE ); - - if( pStm ) - xOptionStorage = new SotStorage( pStm.release(), true ); - } - - OUString aStmName; - - if( DocumentType::Draw == eType ) - aStmName = "Draw_"; - else - aStmName = "Impress_"; - - aStmName += rOptionName; - - if( SdOptionStreamMode::Store == eMode || xOptionStorage->IsContained( aStmName ) ) - xStm = xOptionStorage->OpenSotStream( aStmName ); - } - - return xStm; -} - SvNumberFormatter* SdModule::GetNumberFormatter() { if( !pNumberFormatter )
