diff options
-rw-r--r-- | sd/source/core/CustomAnimationPreset.cxx | 12 | ||||
-rw-r--r-- | sd/source/core/TransitionPreset.cxx | 13 |
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); |