Kaydet (Commit) 75ef95eb authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Fridrich Štrba

fdo#46037: no more comphelper/configurationhelper.hxx in fpicker

Change-Id: I571e0271d9432118d886561e140d689b2d1b8713
Reviewed-on: https://gerrit.libreoffice.org/5042Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst 57ebb84c
......@@ -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))
......
......@@ -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());
......
......@@ -10,7 +10,7 @@
$(eval $(call gb_Library_Library,writerfilter))
$(eval $(call gb_Library_use_custom_headers,writerfilter,\
officecfg/registry \
officecfg/registry \
oox/generated \
writerfilter/source \
))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment