diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-07-23 08:44:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-07-23 11:37:04 +0200 |
commit | 2b45d55d87ec1414e3a39a759d014d1e256f7975 (patch) | |
tree | 00c531322e88375831332af4f926ff51f1fb7a5d | |
parent | 5d95193f85921863cc127b1a3aec5924ff693592 (diff) |
fdo#46037: no more comphelper/configurationhelper.hxx in sd
Change-Id: If5d1fc3956b82edd0b68b26e14a9b9258ee6c10d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | sd/Library_sdui.mk | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 29 |
2 files changed, 10 insertions, 23 deletions
diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk index 4ac90003e570..53f279d1b850 100644 --- a/sd/Library_sdui.mk +++ b/sd/Library_sdui.mk @@ -28,6 +28,10 @@ endif endif +$(eval $(call gb_Library_use_custom_headers,sdui,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_use_external,sdui,boost_headers)) $(eval $(call gb_Library_use_sdk_api,sdui)) diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 244e236ee468..0f13c7ffbdee 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -9,7 +9,6 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/configurationhelper.hxx> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/drawing/XMasterPagesSupplier.hpp> @@ -24,6 +23,7 @@ #include <unotools/pathoptions.hxx> #include <unotools/useroptions.hxx> #include <unotools/ucbstreamhelper.hxx> +#include <officecfg/Office/Impress.hxx> #include <vcl/msgbox.hxx> #include <svx/unoshape.hxx> @@ -455,18 +455,9 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl) ); // Read configuration OUString sUrl("."); - Reference< XInterface > xCfg; try { - xCfg = ::comphelper::ConfigurationHelper::openConfig( - ::comphelper::getProcessComponentContext(), - OUString("/org.openoffice.Office.Impress/"), - ::comphelper::ConfigurationHelper::E_READONLY); - - ::comphelper::ConfigurationHelper::readRelativeKey( - xCfg, - OUString("Pictures"), - OUString("Path")) >>= sUrl; + sUrl = officecfg::Office::Impress::Pictures::Path::get(); } catch(const Exception&) { @@ -489,18 +480,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl) // Write out configuration try { - xCfg = ::comphelper::ConfigurationHelper::openConfig( - ::comphelper::getProcessComponentContext(), - OUString("/org.openoffice.Office.Impress/"), - ::comphelper::ConfigurationHelper::E_STANDARD); - - ::comphelper::ConfigurationHelper::writeRelativeKey( - xCfg, - OUString("Pictures"), - OUString("Path"), - uno::makeAny(sUrl)); - - ::comphelper::ConfigurationHelper::flush(xCfg); + boost::shared_ptr< comphelper::ConfigurationChanges > batch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Impress::Pictures::Path::set(sUrl, batch); + batch->commit(); } catch(const Exception&) { |