summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-07 17:38:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-28 10:59:31 +0100
commit90a27e2eb905c1a4203a4a652315c16a60d8aa26 (patch)
treeee8ea6a1e09ebeebcada0bff433f3bf8f7770bf1
parentd5104498bbcce24d0b8f546b183245373768faa4 (diff)
fdo#46808, use service constructor for ucb::SortedDynamicResultSetFactory
Change-Id: I8eefa129a481e47659d488cbe57f9624d3cdb19e
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx6
-rw-r--r--svtools/source/control/inettbc.cxx8
-rw-r--r--ucb/source/cacher/cacheddynamicresultsetstub.cxx7
-rw-r--r--ucbhelper/source/client/content.cxx10
4 files changed, 13 insertions, 18 deletions
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 86ea5f2b1c9c..703ee24bbca0 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -25,7 +25,7 @@
#include <com/sun/star/ucb/SearchRecursion.hpp>
#include <com/sun/star/ucb/SearchCommandArgument.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
-#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
+#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <tools/urlobj.hxx>
#include "file/FDriver.hxx"
@@ -201,8 +201,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
return xRef;
Reference<XDynamicResultSet> xContent = m_pConnection->getDir();
- Reference < XSortedDynamicResultSetFactory > xSRSFac(
- m_pConnection->getDriver()->getFactory()->createInstance( ::rtl::OUString("com.sun.star.ucb.SortedDynamicResultSetFactory") ), UNO_QUERY );
+ Reference < XSortedDynamicResultSetFactory > xSRSFac =
+ SortedDynamicResultSetFactory::create( comphelper::getComponentContext( m_pConnection->getDriver()->getFactory() ) );
Sequence< NumberedSortingInfo > aSortInfo( 1 );
NumberedSortingInfo* pInfo = aSortInfo.getArray();
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index c3408578419e..6c0ce2a16bf5 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
-#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
+#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <rtl/instance.hxx>
@@ -345,8 +345,6 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
try
{
- uno::Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
-
Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ),
new ::ucbhelper::CommandEnvironment( uno::Reference< XInteractionHandler >(),
uno::Reference< XProgressHandler >() ),
@@ -367,8 +365,8 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude );
uno::Reference < XAnyCompareFactory > xCompare;
- uno::Reference < XSortedDynamicResultSetFactory > xSRSFac(
- xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory") ) ), UNO_QUERY );
+ uno::Reference < XSortedDynamicResultSetFactory > xSRSFac =
+ SortedDynamicResultSetFactory::create( ::comphelper::getProcessComponentContext() );
Sequence< NumberedSortingInfo > aSortInfo( 2 );
NumberedSortingInfo* pInfo = aSortInfo.getArray();
diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
index f85f09d46d5f..9f83f3b144a5 100644
--- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx
+++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
@@ -22,8 +22,9 @@
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <cachedcontentresultsetstub.hxx>
#include <com/sun/star/ucb/ContentResultSetCapability.hpp>
-#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
+#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
#include <osl/diagnose.h>
+#include <comphelper/processfactory.hxx>
using namespace com::sun::star::lang;
using namespace com::sun::star::sdbc;
@@ -202,9 +203,7 @@ void SAL_CALL CachedDynamicResultSetStubFactory
Reference< XSortedDynamicResultSetFactory > xSortFactory;
try
{
- xSortFactory = Reference< XSortedDynamicResultSetFactory >(
- m_xSMgr->createInstance( OUString( "com.sun.star.ucb.SortedDynamicResultSetFactory" ) ),
- UNO_QUERY );
+ xSortFactory = SortedDynamicResultSetFactory::create( comphelper::getComponentContext(m_xSMgr) );
}
catch ( Exception const & )
{
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 95e589ff8d96..a32f3bbade32 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -46,7 +46,7 @@
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/ucb/XContentProviderManager.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
-#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
+#include <com/sun/star/ucb/SortedDynamicResultSetFactory.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -658,13 +658,11 @@ Reference< XResultSet > Content::createSortedCursor(
if( aDynSet.is() )
{
Reference< XDynamicResultSet > aDynResult;
- Reference< XMultiComponentFactory > aServiceManager = m_xImpl->getComponentContext()->getServiceManager();
- if( aServiceManager.is() )
+ if( m_xImpl->getComponentContext().is() )
{
- Reference< XSortedDynamicResultSetFactory > aSortFactory( aServiceManager->createInstanceWithContext(
- "com.sun.star.ucb.SortedDynamicResultSetFactory", m_xImpl->getComponentContext()),
- UNO_QUERY );
+ Reference< XSortedDynamicResultSetFactory > aSortFactory =
+ SortedDynamicResultSetFactory::create( m_xImpl->getComponentContext());
aDynResult = aSortFactory->createSortedDynamicResultSet( aDynSet,
rSortInfo,