[Libreoffice-commits] core.git: 2 commits - comphelper/source desktop/source include/comphelper include/tools sd/source

Stephan Bergmann sbergman at redhat.com
Tue Oct 22 14:49:22 PDT 2013


 comphelper/source/processfactory/processfactory.cxx      |   11 -----------
 desktop/source/app/check_ext_deps.cxx                    |    5 +++--
 desktop/source/deployment/misc/dp_descriptioninfoset.cxx |    5 ++---
 desktop/source/deployment/misc/dp_misc.cxx               |    2 +-
 include/comphelper/processfactory.hxx                    |    8 --------
 include/tools/solar.h                                    |   14 +++-----------
 sd/source/core/annotations/Annotation.cxx                |    4 ++--
 7 files changed, 11 insertions(+), 38 deletions(-)

New commits:
commit 5040ad523e0e4ad336e2449030516f5a90ea5656
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 22 23:48:51 2013 +0200

    Remove unnecessary component_getProcessComponentContext C wrapper
    
    Change-Id: I9d9f1a542dbbfc461dd27c32b57e4cad5532fab0

diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index a193a6e..32aff0f 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -99,15 +99,4 @@ Reference< XComponentContext > getProcessComponentContext()
 
 } // namespace comphelper
 
-extern "C" {
-uno::XComponentContext * comphelper_getProcessComponentContext()
-{
-    uno::Reference<uno::XComponentContext> xRet;
-    xRet = ::comphelper::getProcessComponentContext();
-    if (xRet.is())
-        xRet->acquire();
-    return xRet.get();
-}
-} // extern "C"
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 4f834d32..23c6b92 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -392,7 +392,8 @@ sal_Bool Desktop::CheckExtensionDependencies()
         return false;
     }
 
-    uno::Reference< uno::XComponentContext > xContext = comphelper_getProcessComponentContext();
+    uno::Reference< uno::XComponentContext > xContext(
+        comphelper::getProcessComponentContext());
 
     bool bDependenciesValid = impl_checkDependencies( xContext );
 
@@ -414,7 +415,7 @@ void Desktop::SynchronizeExtensionRepositories()
 {
     SAL_INFO( "desktop.app", "desktop (jl) ::Desktop::SynchronizeExtensionRepositories");
     uno::Reference< uno::XComponentContext > context(
-        comphelper_getProcessComponentContext());
+        comphelper::getProcessComponentContext());
     uno::Reference< ucb::XCommandEnvironment > silent(
         new SilentCommandEnv(context, this));
     if (m_bCleanedExtensionCache) {
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 53d7e7f..8b00b55 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -324,9 +324,8 @@ namespace dp_misc {
 DescriptionInfoset getDescriptionInfoset(OUString const & sExtensionFolderURL)
 {
     Reference< css::xml::dom::XNode > root;
-    Reference<css::uno::XComponentContext> context =
-        comphelper_getProcessComponentContext();
-    OSL_ASSERT(context.is());
+    Reference<css::uno::XComponentContext> context(
+        comphelper::getProcessComponentContext());
     try {
         root =
             ExtensionDescription(
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 17c4fb2..3dfb355 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -548,7 +548,7 @@ void syncRepositories(
     {
         xExtensionManager =
             deployment::ExtensionManager::get(
-                comphelper_getProcessComponentContext());
+                comphelper::getProcessComponentContext());
 
         if (xExtensionManager.is())
         {
diff --git a/include/comphelper/processfactory.hxx b/include/comphelper/processfactory.hxx
index e6833fc..a7edbb9 100644
--- a/include/comphelper/processfactory.hxx
+++ b/include/comphelper/processfactory.hxx
@@ -71,14 +71,6 @@ getProcessComponentContext();
 
 }
 
-
-extern "C" {
-/// @internal ATTENTION returns ACQUIRED pointer! release it explicitly!
-COMPHELPER_DLLPUBLIC
-::com::sun::star::uno::XComponentContext *
-comphelper_getProcessComponentContext();
-} // extern "C"
-
 #endif // _COMPHELPER_PROCESSFACTORY_HXX_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx
index 3904447..4b2184b 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -162,8 +162,8 @@ protected:
 
 void createAnnotation( Reference< XAnnotation >& xAnnotation, SdPage* pPage )
 {
-    Reference<XComponentContext> xContext (comphelper_getProcessComponentContext());
-    xAnnotation.set( new Annotation(xContext, pPage) );
+    xAnnotation.set(
+        new Annotation(comphelper::getProcessComponentContext(), pPage));
     pPage->addAnnotation(xAnnotation);
 }
 
commit bcc31e249fde6536ab96ffcf2a8e542275efa69b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 22 23:47:53 2013 +0200

    Simplify SVLIBRARY
    
    Change-Id: Ib1c3cdca7652f5621ba79b1e3590a9241021c389

diff --git a/include/tools/solar.h b/include/tools/solar.h
index 2bc9160..42316ef 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -120,20 +120,12 @@ inline void     DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7
 
 #define xub_StrLen      sal_uInt16
 
-#define STRING_CONCAT3( s1, s2, s3 ) \
-    s1 s2 s3
-
-// dll file extensions
-
 #if defined WNT
-#define SVLIBRARY( Base ) \
-    STRING_CONCAT3( Base, "lo", ".dll" )
+#define SVLIBRARY( Base ) Base "lo.dll"
 #elif defined MACOSX
-#define SVLIBRARY( Base ) \
-    STRING_CONCAT3( "lib", Base, "lo.dylib" )
+#define SVLIBRARY( Base ) "lib" Base "lo.dylib"
 #elif defined UNX
-#define SVLIBRARY( Base ) \
-    STRING_CONCAT3( "lib", Base, "lo.so" )
+#define SVLIBRARY( Base ) "lib" Base "lo.so"
 #else
   #error unknown platform
 #endif


More information about the Libreoffice-commits mailing list