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
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))
......
......@@ -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&)
{
......
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