diff options
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/document.cxx | 5 | ||||
-rw-r--r-- | starmath/source/mathmlexport.cxx | 6 | ||||
-rw-r--r-- | starmath/source/mathmlimport.cxx | 5 | ||||
-rw-r--r-- | starmath/source/view.cxx | 5 |
4 files changed, 8 insertions, 13 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index da0411cbd974..b8222e2c0a02 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -717,14 +717,13 @@ bool SmDocShell::Load( SfxMedium& rMedium ) if( SfxObjectShell::Load( rMedium )) { uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage(); - uno::Reference < container::XNameAccess > xAccess (xStorage, uno::UNO_QUERY); if ( ( - xAccess->hasByName( "content.xml" ) && + xStorage->hasByName( "content.xml" ) && xStorage->isStreamElement( "content.xml" ) ) || ( - xAccess->hasByName( "Content.xml" ) && + xStorage->hasByName( "Content.xml" ) && xStorage->isStreamElement( "Content.xml" ) ) ) diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index e5523c7ed122..aa850f62f29b 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -95,7 +95,7 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium) uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext()); //Get model - uno::Reference< lang::XComponent > xModelComp(xModel, uno::UNO_QUERY ); + uno::Reference< lang::XComponent > xModelComp = xModel; bool bEmbedded = false; uno::Reference <lang::XUnoTunnel> xTunnel(xModel,uno::UNO_QUERY); @@ -263,10 +263,8 @@ bool SmXMLExportWrapper::WriteThroughComponent( xSaxWriter->setOutputStream( xOutputStream ); // prepare arguments (prepend doc handler to given arguments) - Reference<xml::sax::XDocumentHandler> xDocHandler( xSaxWriter,UNO_QUERY); - Sequence<Any> aArgs( 2 ); - aArgs[0] <<= xDocHandler; + aArgs[0] <<= xSaxWriter; aArgs[1] <<= rPropSet; // get filter component diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 4f9510aaac12..fcc4a6c45bd4 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -100,7 +100,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium &rMedium) uno::Reference<uno::XComponentContext> xContext( comphelper::getProcessComponentContext() ); //Make a model component from our SmModel - uno::Reference< lang::XComponent > xModelComp( xModel, uno::UNO_QUERY ); + uno::Reference< lang::XComponent > xModelComp = xModel; OSL_ENSURE( xModelComp.is(), "XMLReader::Read: got no model" ); // try to get an XStatusIndicator from the Medium @@ -366,8 +366,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent( // open stream (and set parser input) OUString sStreamName = OUString::createFromAscii(pStreamName); - uno::Reference < container::XNameAccess > xAccess( xStorage, uno::UNO_QUERY ); - if ( !xAccess->hasByName(sStreamName) || !xStorage->isStreamElement(sStreamName) ) + if ( !xStorage->hasByName(sStreamName) || !xStorage->isStreamElement(sStreamName) ) { // stream name not found! Then try the compatibility name. // do we even have an alternative name? diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 96874023c9dc..195b4506bd54 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1330,10 +1330,9 @@ void SmViewShell::Insert( SfxMedium& rMedium ) bool bRet = false; uno::Reference <embed::XStorage> xStorage = rMedium.GetStorage(); - uno::Reference <container::XNameAccess> xNameAccess(xStorage, uno::UNO_QUERY); - if (xNameAccess.is() && xNameAccess->getElementNames().hasElements()) + if (xStorage.is() && xStorage->getElementNames().hasElements()) { - if (xNameAccess->hasByName("content.xml") || xNameAccess->hasByName("Content.xml")) + if (xStorage->hasByName("content.xml") || xStorage->hasByName("Content.xml")) { // is this a fabulous math package ? Reference<css::frame::XModel> xModel(pDoc->GetModel()); |