[Libreoffice-commits] core.git: fpicker/source
Julien Nabet
serval2412 at yahoo.fr
Tue Jul 23 14:32:48 PDT 2013
fpicker/source/win32/filepicker/VistaFilePicker.cxx | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
New commits:
commit 7cbf9c9e0a34937783dfa7f78d460dcf70504841
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Jul 23 09:49:31 2013 +0200
fdo#46037: no more comphelper/configurationhelper.hxx in fpicker
Change-Id: I571e0271d9432118d886561e140d689b2d1b8713
Reviewed-on: https://gerrit.libreoffice.org/5042
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 2bf2e28..1f204d6 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -37,12 +37,12 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <cppuhelper/interfacecontainer.h>
-#include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <osl/file.hxx>
#include <tchar.h>
+#include <officecfg/Office/Common.hxx>
#ifdef _MSC_VER
#pragma warning (push, 1)
@@ -215,18 +215,15 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const OUString& sDirectory)
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
- const OUString aPackage("org.openoffice.Office.Common/");
- const OUString aRelPath("Path/Info");
- const OUString aKey("WorkPathChanged");
+ bool bChanged = officecfg::Office::Common::Path::Info::WorkPathChanged::get();
- css::uno::Any aValue = ::comphelper::ConfigurationHelper::readDirectKey(
- comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, aKey, ::comphelper::ConfigurationHelper::E_READONLY);
-
- bool bChanged(false);
- if (( aValue >>= bChanged ) && bChanged )
+ if (bChanged )
{
- ::comphelper::ConfigurationHelper::writeDirectKey(
- comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, aKey, css::uno::makeAny(false), ::comphelper::ConfigurationHelper::E_STANDARD);
+ boost::shared_ptr< comphelper::ConfigurationChanges > batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Path::Info::WorkPathChanged::set(
+ false, batch);
+ batch->commit();
}
RequestRef rRequest(new Request());
More information about the Libreoffice-commits
mailing list