summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-07-23 09:49:31 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-24 00:43:46 +0200
commit75ef95ebc48517d228d369167f89424a72b320bf (patch)
tree3a7adcb08d53cd6f2e219f6a2dc60cca3464539a /fpicker
parent57ebb84c1fdfc868cc01bd4b12e95ca043cda718 (diff)
fdo#46037: no more comphelper/configurationhelper.hxx in fpicker
Change-Id: I571e0271d9432118d886561e140d689b2d1b8713 Reviewed-on: https://gerrit.libreoffice.org/5042 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/Library_fps.mk4
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx22
2 files changed, 15 insertions, 11 deletions
diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index c4b3e0e7c40c..4a1056a1c739 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -10,6 +10,10 @@
$(eval $(call gb_Library_Library,fps))
+$(eval $(call gb_Library_use_custom_headers,fps,\
+ officecfg/registry \
+))
+
$(eval $(call gb_Library_add_nativeres,fps,fps/Fps))
$(eval $(call gb_Library_set_componentfile,fps,fpicker/source/win32/fps))
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 2bf2e2830f2b..b7f7d8332dda 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -37,12 +37,15 @@
#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>
+#ifdef RGB
+#undef RGB
+#endif
+#include <officecfg/Office/Common.hxx>
#ifdef _MSC_VER
#pragma warning (push, 1)
@@ -215,18 +218,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");
-
- css::uno::Any aValue = ::comphelper::ConfigurationHelper::readDirectKey(
- comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, aKey, ::comphelper::ConfigurationHelper::E_READONLY);
+ bool bChanged = officecfg::Office::Common::Path::Info::WorkPathChanged::get();
- 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());