[Libreoffice-commits] .: connectivity/source svtools/source ucbhelper/source ucb/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 01:59:58 PST 2012


 connectivity/source/drivers/file/FDatabaseMetaData.cxx |    6 +++---
 svtools/source/control/inettbc.cxx                     |    8 +++-----
 ucb/source/cacher/cacheddynamicresultsetstub.cxx       |    7 +++----
 ucbhelper/source/client/content.cxx                    |   10 ++++------
 4 files changed, 13 insertions(+), 18 deletions(-)

New commits:
commit 90a27e2eb905c1a4203a4a652315c16a60d8aa26
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Nov 7 17:38:17 2012 +0200

    fdo#46808, use service constructor for ucb::SortedDynamicResultSetFactory
    
    Change-Id: I8eefa129a481e47659d488cbe57f9624d3cdb19e

diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 86ea5f2..703ee24 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 c340857..6c0ce2a 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 f85f09d..9f83f3b 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 95e589f..a32f3bb 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,


More information about the Libreoffice-commits mailing list