From 6ed0b0230efebe6b3c705e74b8583359ebe4bbe2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 11 May 2020 15:10:58 +0100 Subject: 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 Tested-by: Jenkins --- sd/source/filter/xml/sdxmlwrp.cxx | 30 ++++++------------------------ sd/source/ui/dlg/tpaction.cxx | 3 +-- 2 files changed, 7 insertions(+), 26 deletions(-) (limited to 'sd/source') 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& xModelComponent, const char* pStreamName, - const char* pCompatibilityStreamName, Reference const & rxContext, const char* pFilterName, const Sequence& 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)) { -- cgit