Kaydet (Commit) 31186a1c authored tarafından Arnaud Versini's avatar Arnaud Versini Kaydeden (comit) Noel Grandin

BASIC: Remove useless BasicManagerImpl streams.

Change-Id: Iac5683afd20d8a2b7bc43474580bd1d05ace562b
Reviewed-on: https://gerrit.libreoffice.org/27934Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst f5615df5
......@@ -106,22 +106,16 @@ struct BasicManagerImpl
{
LibraryContainerInfo maContainerInfo;
// Save stream data
SvMemoryStream* mpManagerStream;
std::vector<std::unique_ptr<SvMemoryStream>> maLibStreams;
std::vector<std::unique_ptr<BasicLibInfo>> aLibs;
OUString aBasicLibPath;
BasicManagerImpl()
: mpManagerStream( nullptr )
{}
~BasicManagerImpl();
};
BasicManagerImpl::~BasicManagerImpl()
{
delete mpManagerStream;
}
......@@ -520,25 +514,6 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
// Modified through insert
pStdLib->SetModified( false );
}
// #91626 Save all stream data to save it unmodified if basic isn't modified
// in an 6.0+ office. So also the old basic dialogs can be saved.
tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( szManagerStream, eStreamReadMode );
mpImpl->mpManagerStream = new SvMemoryStream();
xManagerStream->ReadStream( *mpImpl->mpManagerStream );
tools::SvRef<SotStorage> xBasicStorage = rStorage.OpenSotStorage( szBasicStorage, eStorageReadMode, false );
if( xBasicStorage.Is() && !xBasicStorage->GetError() )
{
sal_uInt16 nLibs = GetLibCount();
for( sal_uInt16 nL = 0; nL < nLibs; nL++ )
{
BasicLibInfo& rInfo = *mpImpl->aLibs[nL];
tools::SvRef<SotStorageStream> xBasicStream = xBasicStorage->OpenSotStream( rInfo.GetLibName(), eStreamReadMode );
mpImpl->maLibStreams.push_back(o3tl::make_unique<SvMemoryStream>());
xBasicStream->ReadStream( *mpImpl->maLibStreams.back() );
}
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment