diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-11 15:10:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-11 18:04:58 +0200 |
commit | 6ed0b0230efebe6b3c705e74b8583359ebe4bbe2 (patch) | |
tree | fd3e152a797281cd4d5101377daa8de7bca69f0c /sd/source | |
parent | 7fd79956833ed26429f1a55f1fdf0ac50325161d (diff) |
remove archaic Content.xml fallback
there's no evidence that Content.xml (or Meta.xml) was written by any released
version to necessitate the fallback
reportdesign Settings.xml and Style.xml fallbacks appear to be cargocult
influenced by the Content.xml/Meta.xml examples
Change-Id: I51d138344edaffc6d21e17c2d28047ea6316304e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93970
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 30 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpaction.cxx | 3 |
2 files changed, 7 insertions, 26 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index ab365ac60304..9b20d9d7b322 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -312,7 +312,6 @@ ErrCode ReadThroughComponent( const uno::Reference < embed::XStorage >& xStorage, const Reference<XComponent>& xModelComponent, const char* pStreamName, - const char* pCompatibilityStreamName, Reference<uno::XComponentContext> const & rxContext, const char* pFilterName, const Sequence<Any>& rFilterArguments, @@ -335,25 +334,8 @@ ErrCode ReadThroughComponent( if (!bContainsStream ) { - // stream name not found! Then try the compatibility name. - // if no stream can be opened, return immediately with OK signal - - // do we even have an alternative name? - if ( nullptr == pCompatibilityStreamName ) - return ERRCODE_NONE; - - // if so, does the stream exist? - sStreamName = OUString::createFromAscii(pCompatibilityStreamName); - try - { - bContainsStream = xStorage->isStreamElement(sStreamName); - } - catch (const container::NoSuchElementException&) - { - } - - if (! bContainsStream ) - return ERRCODE_NONE; + // stream name not found! return immediately with OK signal + return ERRCODE_NONE; } // set Base URL @@ -626,26 +608,26 @@ bool SdXMLFilter::Import( ErrCode& nError ) // read storage streams // #i103539#: always read meta.xml for generator nWarn = ReadThroughComponent( - xStorage, xModelComp, "meta.xml", "Meta.xml", rxContext, + xStorage, xModelComp, "meta.xml", rxContext, pServices->mpMeta, aEmptyArgs, aName, false ); if( meFilterMode != SdXMLFilterMode::Organizer ) { nWarn2 = ReadThroughComponent( - xStorage, xModelComp, "settings.xml", nullptr, rxContext, + xStorage, xModelComp, "settings.xml", rxContext, pServices->mpSettings, aFilterArgs, aName, false ); } nRet = ReadThroughComponent( - xStorage, xModelComp, "styles.xml", nullptr, rxContext, + xStorage, xModelComp, "styles.xml", rxContext, pServices->mpStyles, aFilterArgs, aName, true ); if( !nRet && (meFilterMode != SdXMLFilterMode::Organizer) ) nRet = ReadThroughComponent( - xStorage, xModelComp, "content.xml", "Content.xml", rxContext, + xStorage, xModelComp, "content.xml", rxContext, pServices->mpContent, aFilterArgs, aName, true ); diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index c3ff4a9c7a3b..891e21b0d418 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -636,8 +636,7 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl, weld::Widget&, void) { try { - if (xStorage->hasByName(pStarDrawXMLContent) || - xStorage->hasByName(pStarDrawOldXMLContent)) + if (xStorage->hasByName(pStarDrawXMLContent)) { if (SdDrawDocument* pBookmarkDoc = mpDoc->OpenBookmarkDoc(aFile)) { |