diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-05-03 12:23:58 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-05-03 12:23:58 +0000 |
commit | 243c2eee0a91486ae4210bce7c74a538678b5efc (patch) | |
tree | b3442bc89990d6169f8537a4d087a3a9834c259e /framework | |
parent | aa3a0f6fb2e739cf9895907e0cb7bd8c234c9782 (diff) |
INTEGRATION: CWS binfilter (1.2.24); FILE MERGED
2004/04/19 09:46:30 aw 1.2.24.1: #110098#
Necessary adaptions to framework after resynching binfilter to SRC680m33
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/xml/menudocumenthandler.cxx | 34 | ||||
-rw-r--r-- | framework/source/xml/statusbarconfiguration.cxx | 38 | ||||
-rw-r--r-- | framework/source/xml/toolboxconfiguration.cxx | 56 |
3 files changed, 91 insertions, 37 deletions
diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx index be4748a8b25e..4209e4a40943 100644 --- a/framework/source/xml/menudocumenthandler.cxx +++ b/framework/source/xml/menudocumenthandler.cxx @@ -2,9 +2,9 @@ * * $RCSfile: menudocumenthandler.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: kz $ $Date: 2004-02-25 17:55:02 $ + * last change: $Author: rt $ $Date: 2004-05-03 13:23:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -268,7 +268,12 @@ throw( SAXException, RuntimeException ) // ----------------------------------------------------------------------------- -OReadMenuDocumentHandler::OReadMenuDocumentHandler( const Reference< XIndexContainer >& rMenuBarContainer ) : +// #110897# +OReadMenuDocumentHandler::OReadMenuDocumentHandler( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + const Reference< XIndexContainer >& rMenuBarContainer ) +: // #110897# + mxServiceFactory(xServiceFactory), m_xMenuBarContainer( rMenuBarContainer ), m_xContainerFactory( rMenuBarContainer, UNO_QUERY ), m_nElementDepth( 0 ), @@ -276,6 +281,12 @@ OReadMenuDocumentHandler::OReadMenuDocumentHandler( const Reference< XIndexConta { } +// #110897# +const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& OReadMenuDocumentHandler::getServiceFactory() +{ + // #110897# + return mxServiceFactory; +} OReadMenuDocumentHandler::~OReadMenuDocumentHandler() { @@ -313,7 +324,10 @@ throw( SAXException, RuntimeException ) { ++m_nElementDepth; m_bMenuBarMode = sal_True; - m_xReader = Reference< XDocumentHandler >( new OReadMenuBarHandler( m_xMenuBarContainer, m_xContainerFactory )); + + // #110897# m_xReader = Reference< XDocumentHandler >( new OReadMenuBarHandler( m_xMenuBarContainer, m_xContainerFactory )); + m_xReader = Reference< XDocumentHandler >( new OReadMenuBarHandler( getServiceFactory(), m_xMenuBarContainer, m_xContainerFactory )); + m_xReader->startDocument(); } } @@ -351,9 +365,13 @@ void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName ) // ----------------------------------------------------------------------------- +// #110897# OReadMenuBarHandler::OReadMenuBarHandler( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const Reference< XIndexContainer >& rMenuBarContainer, - const Reference< XSingleComponentFactory >& rFactory ) : + const Reference< XSingleComponentFactory >& rFactory ) +: // #110897# + mxServiceFactory( xServiceFactory ), m_xMenuBarContainer( rMenuBarContainer ), m_xContainerFactory( rFactory ), m_nElementDepth( 0 ), @@ -361,6 +379,12 @@ OReadMenuBarHandler::OReadMenuBarHandler( { } +// #110897# +const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& OReadMenuBarHandler::getServiceFactory() +{ + // #110897# + return mxServiceFactory; +} OReadMenuBarHandler::~OReadMenuBarHandler() { diff --git a/framework/source/xml/statusbarconfiguration.cxx b/framework/source/xml/statusbarconfiguration.cxx index a34df70b6da2..f69dd746fcc3 100644 --- a/framework/source/xml/statusbarconfiguration.cxx +++ b/framework/source/xml/statusbarconfiguration.cxx @@ -63,25 +63,32 @@ namespace framework SV_IMPL_PTRARR( StatusBarDescriptor, StatusBarItemDescriptorPtr); -static Reference< XParser > GetSaxParser() +static Reference< XParser > GetSaxParser( + // #110897# + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory + ) { - Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); - return Reference< XParser >( xServiceManager->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" )), - UNO_QUERY); + //Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); + //return Reference< XParser >( xServiceManager->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" )), UNO_QUERY); + return Reference< XParser >( xServiceFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" )), UNO_QUERY); } -static Reference< XDocumentHandler > GetSaxWriter() +static Reference< XDocumentHandler > GetSaxWriter( + // #110897# + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory + ) { - Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); - return Reference< XDocumentHandler >( xServiceManager->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" )), - UNO_QUERY) ; + //Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); + //return Reference< XDocumentHandler >( xServiceManager->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" )), UNO_QUERY) ; + return Reference< XDocumentHandler >( xServiceFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" )), UNO_QUERY) ; } -sal_Bool StatusBarConfiguration::LoadStatusBar( SvStream& rInStream, StatusBarDescriptor& aItems ) +// #110897# +sal_Bool StatusBarConfiguration::LoadStatusBar( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + SvStream& rInStream, StatusBarDescriptor& aItems ) { - Reference< XParser > xParser( GetSaxParser() ); + Reference< XParser > xParser( GetSaxParser( xServiceFactory ) ); Reference< XInputStream > xInputStream( (::cppu::OWeakObject *)new utl::OInputStreamWrapper( rInStream ), UNO_QUERY ); @@ -120,9 +127,12 @@ sal_Bool StatusBarConfiguration::LoadStatusBar( SvStream& rInStream, StatusBarDe } -sal_Bool StatusBarConfiguration::StoreStatusBar( SvStream& rOutStream, const StatusBarDescriptor& aItems ) +// #110897# +sal_Bool StatusBarConfiguration::StoreStatusBar( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + SvStream& rOutStream, const StatusBarDescriptor& aItems ) { - Reference< XDocumentHandler > xWriter( GetSaxWriter() ); + Reference< XDocumentHandler > xWriter( GetSaxWriter( xServiceFactory ) ); Reference< XOutputStream > xOutputStream( (::cppu::OWeakObject *)new utl::OOutputStreamWrapper( rOutStream ), diff --git a/framework/source/xml/toolboxconfiguration.cxx b/framework/source/xml/toolboxconfiguration.cxx index d258d82b7f1b..96b86faf943d 100644 --- a/framework/source/xml/toolboxconfiguration.cxx +++ b/framework/source/xml/toolboxconfiguration.cxx @@ -68,25 +68,33 @@ namespace framework SV_IMPL_PTRARR( ToolBoxDescriptor, ToolBoxItemDescriptorPtr); SV_IMPL_PTRARR( ToolBoxLayoutDescriptor, ToolBoxLayoutItemDescriptorPtr); -static Reference< XParser > GetSaxParser() +static Reference< XParser > GetSaxParser( + // #110897# + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory + ) { - Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); - return Reference< XParser >( xServiceManager->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" )), - UNO_QUERY); + //Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); + //return Reference< XParser >( xServiceManager->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" )), UNO_QUERY); + return Reference< XParser >( xServiceFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Parser" )), UNO_QUERY); } -static Reference< XDocumentHandler > GetSaxWriter() +static Reference< XDocumentHandler > GetSaxWriter( + // #110897# + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory + ) { - Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); - return Reference< XDocumentHandler >( xServiceManager->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" )), - UNO_QUERY) ; + //Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); + //return Reference< XDocumentHandler >( xServiceManager->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" )), UNO_QUERY) ; + return Reference< XDocumentHandler >( xServiceFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" )), UNO_QUERY) ; } -sal_Bool ToolBoxConfiguration::LoadToolBox( SvStream& rInStream, ToolBoxDescriptor& aItems ) +// #110897# +sal_Bool ToolBoxConfiguration::LoadToolBox( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + SvStream& rInStream, + ToolBoxDescriptor& aItems ) { - Reference< XParser > xParser( GetSaxParser() ); + Reference< XParser > xParser( GetSaxParser( xServiceFactory ) ); Reference< XInputStream > xInputStream( (::cppu::OWeakObject *)new utl::OInputStreamWrapper( rInStream ), UNO_QUERY ); @@ -125,9 +133,13 @@ sal_Bool ToolBoxConfiguration::LoadToolBox( SvStream& rInStream, ToolBoxDescript } -sal_Bool ToolBoxConfiguration::StoreToolBox( SvStream& rOutStream, const ToolBoxDescriptor& aItems ) +// #110897# +sal_Bool ToolBoxConfiguration::StoreToolBox( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + SvStream& rOutStream, + const ToolBoxDescriptor& aItems ) { - Reference< XDocumentHandler > xWriter( GetSaxWriter() ); + Reference< XDocumentHandler > xWriter( GetSaxWriter( xServiceFactory ) ); Reference< XOutputStream > xOutputStream( (::cppu::OWeakObject *)new utl::OOutputStreamWrapper( rOutStream ), @@ -158,9 +170,13 @@ sal_Bool ToolBoxConfiguration::StoreToolBox( SvStream& rOutStream, const ToolBox return sal_False; } -sal_Bool ToolBoxConfiguration::LoadToolBoxLayout( SvStream& rInStream, ToolBoxLayoutDescriptor& aItems ) +// #110897# +sal_Bool ToolBoxConfiguration::LoadToolBoxLayout( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + SvStream& rInStream, + ToolBoxLayoutDescriptor& aItems ) { - Reference< XParser > xParser( GetSaxParser() ); + Reference< XParser > xParser( GetSaxParser( xServiceFactory ) ); Reference< XInputStream > xInputStream( (::cppu::OWeakObject *)new utl::OInputStreamWrapper( rInStream ), UNO_QUERY ); @@ -198,9 +214,13 @@ sal_Bool ToolBoxConfiguration::LoadToolBoxLayout( SvStream& rInStream, ToolBo return sal_False; } -sal_Bool ToolBoxConfiguration::StoreToolBoxLayout( SvStream& rOutStream, ToolBoxLayoutDescriptor& aItems ) +// #110897# +sal_Bool ToolBoxConfiguration::StoreToolBoxLayout( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, + SvStream& rOutStream, + ToolBoxLayoutDescriptor& aItems ) { - Reference< XDocumentHandler > xWriter( GetSaxWriter() ); + Reference< XDocumentHandler > xWriter( GetSaxWriter( xServiceFactory ) ); Reference< XOutputStream > xOutputStream( (::cppu::OWeakObject *)new utl::OOutputStreamWrapper( rOutStream ), |