summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-11 15:10:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-11 18:04:58 +0200
commit6ed0b0230efebe6b3c705e74b8583359ebe4bbe2 (patch)
treefd3e152a797281cd4d5101377daa8de7bca69f0c /starmath
parent7fd79956833ed26429f1a55f1fdf0ac50325161d (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 'starmath')
-rw-r--r--starmath/source/document.cxx11
-rw-r--r--starmath/source/mathmlimport.cxx14
-rw-r--r--starmath/source/mathmlimport.hxx1
-rw-r--r--starmath/source/view.cxx2
4 files changed, 5 insertions, 23 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index d64b30fbf09c..644942126c31 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -717,16 +717,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
if( SfxObjectShell::Load( rMedium ))
{
uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage();
- if (
- (
- xStorage->hasByName( "content.xml" ) &&
- xStorage->isStreamElement( "content.xml" )
- ) ||
- (
- xStorage->hasByName( "Content.xml" ) &&
- xStorage->isStreamElement( "Content.xml" )
- )
- )
+ if (xStorage->hasByName("content.xml") && xStorage->isStreamElement("content.xml"))
{
// is this a fabulous math package ?
Reference<css::frame::XModel> xModel(GetModel());
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index e0dab47598b9..6ae00afbb92e 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -195,7 +195,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium &rMedium)
xStatusIndicator->setValue(nSteps++);
auto nWarn = ReadThroughComponent(
- rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
+ rMedium.GetStorage(), xModelComp, "meta.xml",
xContext, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
: "com.sun.star.comp.Math.XMLMetaImporter") );
@@ -206,7 +206,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium &rMedium)
xStatusIndicator->setValue(nSteps++);
nWarn = ReadThroughComponent(
- rMedium.GetStorage(), xModelComp, "settings.xml", nullptr,
+ rMedium.GetStorage(), xModelComp, "settings.xml",
xContext, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisSettingsImporter"
: "com.sun.star.comp.Math.XMLSettingsImporter" ) );
@@ -217,7 +217,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium &rMedium)
xStatusIndicator->setValue(nSteps++);
nError = ReadThroughComponent(
- rMedium.GetStorage(), xModelComp, "content.xml", "Content.xml",
+ rMedium.GetStorage(), xModelComp, "content.xml",
xContext, xInfoSet, "com.sun.star.comp.Math.XMLImporter" );
}
else
@@ -351,7 +351,6 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(
const uno::Reference< embed::XStorage >& xStorage,
const Reference<XComponent>& xModelComponent,
const char* pStreamName,
- const char* pCompatibilityStreamName,
Reference<uno::XComponentContext> const & rxContext,
Reference<beans::XPropertySet> const & rPropSet,
const char* pFilterName )
@@ -361,13 +360,6 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(
// open stream (and set parser input)
OUString sStreamName = OUString::createFromAscii(pStreamName);
- if ( !xStorage->hasByName(sStreamName) || !xStorage->isStreamElement(sStreamName) )
- {
- // stream name not found! Then try the compatibility name.
- // do we even have an alternative name?
- if ( pCompatibilityStreamName )
- sStreamName = OUString::createFromAscii(pCompatibilityStreamName);
- }
// get input stream
try
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index d4266842bfdd..555ea0d2ca2d 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -58,7 +58,6 @@ public:
const css::uno::Reference< css::embed::XStorage >& xStorage,
const css::uno::Reference< css::lang::XComponent >& xModelComponent,
const char* pStreamName,
- const char* pCompatibilityStreamName,
css::uno::Reference< css::uno::XComponentContext > const & rxContext,
css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
const char* pFilterName );
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index be02ccd488c2..19274324ada7 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1329,7 +1329,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
uno::Reference <embed::XStorage> xStorage = rMedium.GetStorage();
if (xStorage.is() && xStorage->getElementNames().hasElements())
{
- if (xStorage->hasByName("content.xml") || xStorage->hasByName("Content.xml"))
+ if (xStorage->hasByName("content.xml"))
{
// is this a fabulous math package ?
Reference<css::frame::XModel> xModel(pDoc->GetModel());