diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-27 11:00:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-28 13:06:18 +0100 |
commit | 7470cc532fe408dc9d8735cde0e2eb5bb62fd69c (patch) | |
tree | 3815c10cbd2473a19915d8057ca1eb19046592bc /reportdesign | |
parent | 56ea15091c69d280310aa8b28bb1e9488eaad756 (diff) |
fdo#46808, Adapt reflection::ProxyFactory UNO service to new style
The service is deprecated, but we still have a handful of in-tree
users, and converting it lets me thread XComponentContext through
a bunch of classes.
Change-Id: Iffdfe537ada6b9e4a89f9b3c8dd82ca85f4bfaba
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index d73a9d931ab3..73349a4f64d9 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp> #include <com/sun/star/chart/XComplexDescriptionAccess.hpp> -#include <com/sun/star/reflection/XProxyFactory.hpp> +#include <com/sun/star/reflection/ProxyFactory.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <comphelper/sequence.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -319,9 +319,7 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any > if ( !m_xDatabaseDataProvider.is() || !m_xDatabaseDataProvider->getActiveConnection().is() ) throw uno::Exception(); - uno::Reference< reflection::XProxyFactory > xProxyFactory( m_xContext->getServiceManager()->createInstanceWithContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory")),m_xContext), - uno::UNO_QUERY); + uno::Reference< reflection::XProxyFactory > xProxyFactory = reflection::ProxyFactory::create( m_xContext ); m_xProxy = xProxyFactory->createProxy(m_xDelegatee.get()); ::comphelper::query_aggregation(m_xProxy,m_xDelegatee); m_xTypeProvider.set(m_xDelegatee,uno::UNO_QUERY); diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 0e61365537fe..2bdc6814fb9b 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -23,7 +23,7 @@ #include <com/sun/star/chart2/data/XDataReceiver.hpp> #include <com/sun/star/chart/XComplexDescriptionAccess.hpp> #include <com/sun/star/chart/ChartDataRowSource.hpp> -#include <com/sun/star/reflection/XProxyFactory.hpp> +#include <com/sun/star/reflection/ProxyFactory.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <comphelper/sequence.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -354,9 +354,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any > m_aArguments = m_xDatabaseDataProvider->detectArguments(NULL); - uno::Reference< reflection::XProxyFactory > xProxyFactory( m_xContext->getServiceManager()->createInstanceWithContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ProxyFactory")),m_xContext), - uno::UNO_QUERY); + uno::Reference< reflection::XProxyFactory > xProxyFactory = reflection::ProxyFactory::create( m_xContext ); m_xProxy = xProxyFactory->createProxy(m_xDelegatee.get()); ::comphelper::query_aggregation(m_xProxy,m_xDelegatee); m_xTypeProvider.set(m_xDelegatee,uno::UNO_QUERY); |