[Libreoffice-commits] .: comphelper/prj comphelper/source officecfg/Module_officecfg.mk officecfg/prj

Stephan Bergmann sbergmann at kemper.freedesktop.org
Mon Feb 13 13:16:08 PST 2012


 comphelper/prj/build.lst                   |    2 +-
 comphelper/source/misc/mediadescriptor.cxx |   28 +++-------------------------
 officecfg/Module_officecfg.mk              |    3 ++-
 officecfg/prj/build.lst                    |    2 +-
 4 files changed, 7 insertions(+), 28 deletions(-)

New commits:
commit 765c6d9916b1959ff92811e80bf0fc4870e7ab29
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 13 22:15:02 2012 +0100

    Make simplified configuration API available down in comphelper

diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst
index 7dde46c..722ac81 100644
--- a/comphelper/prj/build.lst
+++ b/comphelper/prj/build.lst
@@ -1,2 +1,2 @@
-ph	comphelper	:	cppuhelper ucbhelper offapi salhelper LIBXSLT:libxslt NULL
+ph	comphelper	:	cppuhelper ucbhelper offapi officecfg salhelper LIBXSLT:libxslt NULL
 ch comphelper\prj nmake - all ch_all NULL
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 038e718..d86bb08 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -47,13 +47,12 @@
 #include <com/sun/star/uri/XUriReference.hpp>
 #include <com/sun/star/ucb/PostCommandArgument2.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
-
+#include <officecfg/Office/Common.hxx>
 #include <ucbhelper/interceptedinteraction.hxx>
 #include <ucbhelper/content.hxx>
 #include <ucbhelper/commandenvironment.hxx>
 #include <ucbhelper/activedatasink.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/configurationhelper.hxx>
 
 #include <rtl/ustrbuf.hxx>
 
@@ -445,29 +444,8 @@ sal_Bool MediaDescriptor::addInputStream()
 /*-----------------------------------------------*/
 sal_Bool MediaDescriptor::addInputStreamOwnLock()
 {
-    // Own lock file implementation
-
-    sal_Bool bUseLock = sal_True; // the system file locking is used per default
-    try
-    {
-
-        css::uno::Reference< css::uno::XInterface > xCommonConfig = ::comphelper::ConfigurationHelper::openConfig(
-                            ::comphelper::getProcessServiceFactory(),
-                            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common" ) ),
-                            ::comphelper::ConfigurationHelper::E_STANDARD );
-        if ( !xCommonConfig.is() )
-            throw css::uno::RuntimeException();
-
-        ::comphelper::ConfigurationHelper::readRelativeKey(
-                xCommonConfig,
-                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Misc/" ) ),
-                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseDocumentSystemFileLocking" ) ) ) >>= bUseLock;
-    }
-    catch( const css::uno::Exception& )
-    {
-    }
-
-    return impl_addInputStream( bUseLock );
+    return impl_addInputStream(
+        officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::get());
 }
 
 /*-----------------------------------------------*/
diff --git a/officecfg/Module_officecfg.mk b/officecfg/Module_officecfg.mk
index 7621ecd..382992e 100644
--- a/officecfg/Module_officecfg.mk
+++ b/officecfg/Module_officecfg.mk
@@ -26,7 +26,8 @@ $(eval $(call gb_Module_add_targets,officecfg,\
 	Configuration_officecfg \
 ))
 
-$(eval $(call gb_Module_add_check_targets,officecfg,\
+# The cppheader test depends on comphelper so can only be a subsequentcheck:
+$(eval $(call gb_Module_add_subsequentcheck_targets,officecfg,\
         CppunitTest_officecfg_cppheader_test \
 ))
 
diff --git a/officecfg/prj/build.lst b/officecfg/prj/build.lst
index da5651f..f4a9142 100644
--- a/officecfg/prj/build.lst
+++ b/officecfg/prj/build.lst
@@ -1,2 +1,2 @@
-oc  officecfg   :    TRANSLATIONS:translations comphelper soltools solenv LIBXSLT:libxslt NULL
+oc  officecfg   :    TRANSLATIONS:translations soltools solenv LIBXSLT:libxslt NULL
 oc  officecfg\prj nmake - all oc_prj   NULL


More information about the Libreoffice-commits mailing list