[Libreoffice-commits] .: ucb/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 30 06:06:28 PST 2012


 ucb/source/ucp/odma/odma_content.cxx      |   16 ++++++----------
 ucb/source/ucp/odma/odma_content.hxx      |    4 ++--
 ucb/source/ucp/odma/odma_datasupplier.cxx |    3 ++-
 ucb/source/ucp/odma/odma_provider.cxx     |    2 +-
 4 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 7369ac227531330b96981359c6e346da1c0e1bd1
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Nov 30 15:56:27 2012 +0200

    fix build on windows in ucb/source/ucp/odma/*
    
    because I messed up the UNO changes in
    commit 58e9686da63f8082c5d3078745a8ed89f0d79b4d.
    
    Change-Id: I0d2a9dc1c33009c963bc13301dafbbc69e15a1da

diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index be1e48f..0789bd6 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -31,7 +31,6 @@
 #include <com/sun/star/ucb/OpenMode.hpp>
 #include <com/sun/star/ucb/XCommandInfo.hpp>
 #include <com/sun/star/ucb/XPersistentPropertySet.hpp>
-#include <comphelper/processfactory.hxx>
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/propertyvalueset.hxx>
 #include <ucbhelper/cancelcommandexecution.hxx>
@@ -66,11 +65,11 @@ using namespace odma;
 //=========================================================================
 //=========================================================================
 
-Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+Content::Content( const uno::Reference< uno::XComponentContext >& rxContext,
                   ContentProvider* pProvider,
                   const uno::Reference< ucb::XContentIdentifier >& Identifier,
                   const ::rtl::Reference<ContentProperties>& _rProps)
-    : ContentImplHelper( rxSMgr, pProvider, Identifier )
+    : ContentImplHelper( rxContext, pProvider, Identifier )
     ,m_aProps(_rProps)
     ,m_pProvider(pProvider)
     ,m_pContent(NULL)
@@ -310,7 +309,7 @@ uno::Any SAL_CALL Content::execute(
             // open as folder - return result set
 
             uno::Reference< ucb::XDynamicResultSet > xSet
-                            = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr),
+                            = new DynamicResultSet( m_xContext,
                                                     this,
                                                     aOpenCommand,
                                                     Environment );
@@ -341,9 +340,7 @@ uno::Any SAL_CALL Content::execute(
             rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
             rtl::OUString sFileURL = openDoc();
             delete m_pContent;
-            m_pContent = new ::ucbhelper::Content
-                                (sFileURL,NULL,
-                                 comphelper::getComponentContext(m_xSMgr));
+            m_pContent = new ::ucbhelper::Content( sFileURL, NULL, m_xContext );
             if(!m_pContent->isDocument())
             {
                 rtl::OUString sErrorMsg("File: ");
@@ -501,8 +498,7 @@ uno::Any SAL_CALL Content::execute(
         sal_Int32 nLastIndex = sFileURL.lastIndexOf( sal_Unicode('/') );
         // Create a new Content object for the "shadow" file
         // corresponding to the opened document from the DMS.
-        ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL,
-                                      comphelper::getComponentContext(m_xSMgr));
+        ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL, m_xContext);
         //  aTransferInfo.NameClash = ucb::NameClash::OVERWRITE;
         aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex );
         // Copy our saved backup copy to the "shadow" file.
@@ -768,7 +764,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
             const uno::Reference< ucb::XCommandEnvironment >& /*xEnv*/ )
 {
     osl::Guard< osl::Mutex > aGuard( m_aMutex );
-    return getPropertyValues( comphelper::getComponentContext(m_xSMgr),
+    return getPropertyValues( m_xContext,
                               rProperties,
                               m_aProps,
                               rtl::Reference<
diff --git a/ucb/source/ucp/odma/odma_content.hxx b/ucb/source/ucp/odma/odma_content.hxx
index 1741d11..2160887 100644
--- a/ucb/source/ucp/odma/odma_content.hxx
+++ b/ucb/source/ucp/odma/odma_content.hxx
@@ -120,7 +120,7 @@ private:
 
 public:
     Content( const ::com::sun::star::uno::Reference<
-                ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+                ::com::sun::star::uno::XComponentContext >& rxContext,
                 ContentProvider* pProvider,
              const ::com::sun::star::uno::Reference<
                 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -172,7 +172,7 @@ public:
     // Called from resultset data supplier.
     static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
     getPropertyValues( const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+                        ::com::sun::star::uno::XComponentContext >& rxContext,
                        const ::com::sun::star::uno::Sequence<
                            ::com::sun::star::beans::Property >& rProperties,
                        const ::rtl::Reference<ContentProperties>& rData,
diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx
index b4ed149..5b2daf9 100644
--- a/ucb/source/ucp/odma/odma_datasupplier.cxx
+++ b/ucb/source/ucp/odma/odma_datasupplier.cxx
@@ -22,6 +22,7 @@
 #include <windows.h>
 #endif
 #include <vector>
+#include <comphelper/processfactory.hxx>
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/providerhelper.hxx>
 #include "odma_datasupplier.hxx"
@@ -408,7 +409,7 @@ Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 nIndex  )
     if ( getResult( nIndex ) )
     {
         Reference< XRow > xRow = Content::getPropertyValues(
-                                    m_pImpl->m_xSMgr,
+                                    comphelper::getComponentContext(m_pImpl->m_xSMgr),
                                     getResultSet()->getProperties(),
                                     m_pImpl->m_aResults[ nIndex ]->rData,
                                     m_pImpl->m_xContent->getProvider(),
diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx
index f907998..61aaf76 100644
--- a/ucb/source/ucp/odma/odma_provider.cxx
+++ b/ucb/source/ucp/odma/odma_provider.cxx
@@ -246,7 +246,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent(
     if(!aProp.is())
         throw ucb::IllegalIdentifierException();
 
-    xContent = new Content( uno::Reference< lang::XMultiServiceFactory >(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, xCanonicId ,aProp);
+    xContent = new Content( m_xContext, this, xCanonicId ,aProp);
     registerNewContent( xContent );
 
     if ( !xContent->getIdentifier().is() )


More information about the Libreoffice-commits mailing list