diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/recovery/storagexmlstream.cxx | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 83435d826e2c..29a0a2fa5850 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -52,6 +52,7 @@ #include <com/sun/star/ui/XUIConfigurationStorage.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> +#include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/sdb/DatabaseContext.hpp> #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp> @@ -1585,10 +1586,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >& OSL_ENSURE( NULL != pServiceName, "Need component name!" ); // get component - Reference< XActiveDataSource > xSaxWriter; - OSL_VERIFY( m_pImpl->m_aContext.createComponent( "com.sun.star.xml.sax.Writer", xSaxWriter ) ); - if ( !xSaxWriter.is() ) - return; + Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext.getUNOContext() ); // connect XML writer to output stream xSaxWriter->setOutputStream( xOutputStream ); diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx index 14b76e7eedb1..28f3a17ff1b5 100644 --- a/dbaccess/source/core/recovery/storagexmlstream.cxx +++ b/dbaccess/source/core/recovery/storagexmlstream.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/xml/sax/Parser.hpp> +#include <com/sun/star/xml/sax/Writer.hpp> #include <comphelper/componentcontext.hxx> #include <cppuhelper/implbase1.hxx> @@ -52,6 +53,8 @@ namespace dbaccess using ::com::sun::star::embed::XStorage; using ::com::sun::star::xml::sax::XDocumentHandler; using ::com::sun::star::xml::sax::XAttributeList; + using ::com::sun::star::xml::sax::XWriter; + using ::com::sun::star::xml::sax::Writer; using ::com::sun::star::io::XStream; using ::com::sun::star::io::XOutputStream; using ::com::sun::star::io::XActiveDataSource; @@ -80,7 +83,7 @@ namespace dbaccess :StorageOutputStream( i_rContext, i_rParentStorage, i_rStreamName ) ,m_pData( new StorageXMLOutputStream_Data ) { - const Reference< XActiveDataSource > xSaxWriter( i_rContext.createComponent( "com.sun.star.xml.sax.Writer" ), UNO_QUERY_THROW ); + const Reference< XWriter > xSaxWriter = Writer::create( i_rContext.getUNOContext() ); xSaxWriter->setOutputStream( getOutputStream() ); m_pData->xHandler.set( xSaxWriter, UNO_QUERY_THROW ); |