summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-04-26 16:04:09 +0200
committerGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-04-28 17:10:31 +0200
commita83b7cd01cb804d6138b4ca7de0e1d7a8abfe31d (patch)
treeb06e0eb20e321ce88b0f4bf30587af1bdae76717 /sd
parent924d7b64f07a3bd1d9d3195eb3ce923b616bfb45 (diff)
Use less ConfigurationAccess in favor of officecfg
Change-Id: I9bb0165aabb0d5ff2caac33ec948a04d96eb3316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166756 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx12
-rw-r--r--sd/source/core/TransitionPreset.cxx13
2 files changed, 4 insertions, 21 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 1d63b5d217b9..8c4a3dcfc927 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -37,6 +37,7 @@
#include <tools/stream.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <o3tl/string_view.hxx>
+#include <officecfg/Office/Impress.hxx>
#include <vcl/svapp.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -252,17 +253,8 @@ void CustomAnimationPresets::importEffects()
configuration::theDefaultProvider::get( xContext );
// read path to transition effects files from config
- uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence(
- {
- {"nodepath", uno::Any(OUString("/org.openoffice.Office.Impress/Misc"))}
- }));
- Reference<container::XNameAccess> xNameAccess(
- xConfigProvider->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationAccess",
- aArgs ), UNO_QUERY_THROW );
uno::Sequence< OUString > aFiles;
- xNameAccess->getByName( "EffectFiles" ) >>= aFiles;
-
+ aFiles = officecfg::Office::Impress::Misc::EffectFiles::get();
for (const auto& rFile : aFiles)
{
OUString aURL = comphelper::getExpandedUri(xContext, rFile);
diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx
index 03adee6e79ff..b92f9ce5ca18 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -33,6 +33,7 @@
#include <comphelper/propertysequence.hxx>
#include <comphelper/lok.hxx>
#include <unotools/syslocaleoptions.hxx>
+#include <officecfg/Office/Impress.hxx>
#include <officecfg/Office/UI/Effects.hxx>
#include <comphelper/diagnose_ex.hxx>
@@ -329,18 +330,8 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList )
configuration::theDefaultProvider::get( xContext );
// read path to transition effects files from config
- uno::Sequence<uno::Any> aArgs(comphelper::InitAnyPropertySequence(
- {
- {"nodepath", uno::Any(OUString("/org.openoffice.Office.Impress/Misc"))}
- }));
- Reference<container::XNameAccess> xNameAccess(
- xConfigProvider->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationAccess",
- aArgs),
- UNO_QUERY_THROW );
uno::Sequence< OUString > aFiles;
- xNameAccess->getByName("TransitionFiles") >>= aFiles;
-
+ aFiles = officecfg::Office::Impress::Misc::TransitionFiles::get();
for (const auto& rFile : aFiles)
{
OUString aURL = comphelper::getExpandedUri(xContext, rFile);