diff options
author | sb <sb@openoffice.org> | 2009-08-05 09:18:12 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-08-05 09:18:12 +0200 |
commit | 8cc805c72c5ba47161a29a321f0502bc545923f4 (patch) | |
tree | fd8f13dbb6b026879a2cd15f8f0f418c7a4ae278 /fpicker/source/win32/filepicker/VistaFilePicker.cxx | |
parent | 12e4406275bcc76322bc5c6f10a86b3159fb9277 (diff) | |
parent | 2cb47c5b89bd896be8cd0a3565d9bdf22b8b3a69 (diff) |
merged in DEV300_m54
Diffstat (limited to 'fpicker/source/win32/filepicker/VistaFilePicker.cxx')
-rw-r--r-- | fpicker/source/win32/filepicker/VistaFilePicker.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index eb26f23952d7..84d17dbbc0b1 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -51,6 +51,7 @@ #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <cppuhelper/interfacecontainer.h> +#include <comphelper/configurationhelper.hxx> #include <osl/diagnose.h> #include <osl/mutex.hxx> #include <osl/file.hxx> @@ -294,9 +295,24 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const ::rtl::OUString& sDirec throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) { + const ::rtl::OUString aPackage( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/")); + const ::rtl::OUString aRelPath( RTL_CONSTASCII_USTRINGPARAM("Path/Info")); + const ::rtl::OUString aKey( RTL_CONSTASCII_USTRINGPARAM("WorkPathChanged")); + + css::uno::Any aValue = ::comphelper::ConfigurationHelper::readDirectKey( + m_xSMGR, aPackage, aRelPath, aKey, ::comphelper::ConfigurationHelper::E_READONLY); + + bool bChanged(false); + if (( aValue >>= bChanged ) && bChanged ) + { + ::comphelper::ConfigurationHelper::writeDirectKey( + m_xSMGR, aPackage, aRelPath, aKey, css::uno::makeAny(false), ::comphelper::ConfigurationHelper::E_STANDARD); + } + RequestRef rRequest(new Request()); rRequest->setRequest (VistaFilePickerImpl::E_SET_DIRECTORY); rRequest->setArgument(PROP_DIRECTORY, sDirectory); + rRequest->setArgument(PROP_FORCE, bChanged); m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } |