summaryrefslogtreecommitdiff
path: root/fpicker/source/win32/filepicker/VistaFilePicker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker/source/win32/filepicker/VistaFilePicker.cxx')
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 1f204d67eb10..2bf2e2830f2b 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,15 +215,18 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const OUString& sDirectory)
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
- bool bChanged = officecfg::Office::Common::Path::Info::WorkPathChanged::get();
+ const OUString aPackage("org.openoffice.Office.Common/");
+ const OUString aRelPath("Path/Info");
+ const OUString aKey("WorkPathChanged");
- if (bChanged )
+ 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 )
{
- boost::shared_ptr< comphelper::ConfigurationChanges > batch(
- comphelper::ConfigurationChanges::create());
- officecfg::Office::Common::Path::Info::WorkPathChanged::set(
- false, batch);
- batch->commit();
+ ::comphelper::ConfigurationHelper::writeDirectKey(
+ comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, aKey, css::uno::makeAny(false), ::comphelper::ConfigurationHelper::E_STANDARD);
}
RequestRef rRequest(new Request());