[Libreoffice-commits] core.git: 2 commits - sd/Library_sdui.mk sd/source
Stephan Bergmann
sbergman at redhat.com
Tue Jul 23 02:37:26 PDT 2013
sd/Library_sdui.mk | 4 +++
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 43 ++++------------------------------
2 files changed, 10 insertions(+), 37 deletions(-)
New commits:
commit 82447189ccfc662f86ec00f5001527cc997f5020
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jul 23 11:34:53 2013 +0200
If this configuration access throws exceptions sth very fundamental is broken
...with the LO installation, so it doesn't make much sense to "handle" them
locally.
Change-Id: I02fade858f9b507976bf612ba942be90bf25d51f
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 0f13c7f..c321325 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -454,16 +454,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl)
SFXWB_GRAPHIC | SFXWB_MULTISELECTION
);
// Read configuration
- OUString sUrl(".");
- try
- {
- sUrl = officecfg::Office::Impress::Pictures::Path::get();
- }
- catch(const Exception&)
- {
- OSL_FAIL("Could not find config for Create Photo Album function");
- }
-
+ OUString sUrl(officecfg::Office::Impress::Pictures::Path::get());
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
if (sUrl != "")
@@ -478,17 +469,12 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl)
{
sUrl = aDlg.GetDisplayDirectory();
// Write out configuration
- try
{
boost::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create());
officecfg::Office::Impress::Pictures::Path::set(sUrl, batch);
batch->commit();
}
- catch(const Exception&)
- {
- OSL_FAIL("Could not find config for Create Photo Album function");
- }
for ( sal_Int32 i = 0; i < aFilesArr.getLength(); i++ )
{
commit 2b45d55d87ec1414e3a39a759d014d1e256f7975
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Jul 23 08:44:50 2013 +0200
fdo#46037: no more comphelper/configurationhelper.hxx in sd
Change-Id: If5d1fc3956b82edd0b68b26e14a9b9258ee6c10d
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk
index 4ac9000..53f279d 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 244e236..0f13c7f 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&)
{
More information about the Libreoffice-commits
mailing list