Kaydet (Commit) 2b45d55d authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Stephan Bergmann

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

Change-Id: If5d1fc3956b82edd0b68b26e14a9b9258ee6c10d
Signed-off-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 5d95193f
...@@ -28,6 +28,10 @@ endif ...@@ -28,6 +28,10 @@ endif
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_external,sdui,boost_headers))
$(eval $(call gb_Library_use_sdk_api,sdui)) $(eval $(call gb_Library_use_sdk_api,sdui))
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <comphelper/namedvaluecollection.hxx> #include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/configurationhelper.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp> #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
...@@ -24,6 +23,7 @@ ...@@ -24,6 +23,7 @@
#include <unotools/pathoptions.hxx> #include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx> #include <unotools/useroptions.hxx>
#include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbstreamhelper.hxx>
#include <officecfg/Office/Impress.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <svx/unoshape.hxx> #include <svx/unoshape.hxx>
...@@ -455,18 +455,9 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl) ...@@ -455,18 +455,9 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl)
); );
// Read configuration // Read configuration
OUString sUrl("."); OUString sUrl(".");
Reference< XInterface > xCfg;
try try
{ {
xCfg = ::comphelper::ConfigurationHelper::openConfig( sUrl = officecfg::Office::Impress::Pictures::Path::get();
::comphelper::getProcessComponentContext(),
OUString("/org.openoffice.Office.Impress/"),
::comphelper::ConfigurationHelper::E_READONLY);
::comphelper::ConfigurationHelper::readRelativeKey(
xCfg,
OUString("Pictures"),
OUString("Path")) >>= sUrl;
} }
catch(const Exception&) catch(const Exception&)
{ {
...@@ -489,18 +480,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl) ...@@ -489,18 +480,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl)
// Write out configuration // Write out configuration
try try
{ {
xCfg = ::comphelper::ConfigurationHelper::openConfig( boost::shared_ptr< comphelper::ConfigurationChanges > batch(
::comphelper::getProcessComponentContext(), comphelper::ConfigurationChanges::create());
OUString("/org.openoffice.Office.Impress/"), officecfg::Office::Impress::Pictures::Path::set(sUrl, batch);
::comphelper::ConfigurationHelper::E_STANDARD); batch->commit();
::comphelper::ConfigurationHelper::writeRelativeKey(
xCfg,
OUString("Pictures"),
OUString("Path"),
uno::makeAny(sUrl));
::comphelper::ConfigurationHelper::flush(xCfg);
} }
catch(const Exception&) catch(const Exception&)
{ {
......
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