sd/source/console/PresenterScreen.cxx | 15 ++------------- sd/source/console/PresenterScreen.hxx | 2 -- 2 files changed, 2 insertions(+), 15 deletions(-)
New commits: commit a2ac0b8a271d62224572695dee64a792bb38ef09 Author: Gabor Kelemen <[email protected]> AuthorDate: Sun Jan 18 22:23:42 2026 +0100 Commit: Gabor Kelemen <[email protected]> CommitDate: Sat Jan 31 23:33:31 2026 +0100 Presenter console: simplify configuration access (EnablePresenterScreen) for key officecfg::Office::Impress::Misc::Start::EnablePresenterScreen Change-Id: I635f6ba593ada4fcc4b2f6c4ba66684ddb98f6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198067 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/sd/source/console/PresenterScreen.cxx b/sd/source/console/PresenterScreen.cxx index 33c9e0824c93..c0857096319f 100644 --- a/sd/source/console/PresenterScreen.cxx +++ b/sd/source/console/PresenterScreen.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/document/XEventBroadcaster.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/supportsservice.hxx> +#include <officecfg/Office/Impress.hxx> #include <officecfg/Office/PresenterScreen.hxx> #include <utility> @@ -211,7 +212,7 @@ void SAL_CALL PresenterScreenListener::notifyEvent( const css::document::EventOb if ( Event.EventName == "OnStartPresentation" ) { mpPresenterScreen = new PresenterScreen(mxComponentContext, mxModel); - if(PresenterScreen::isPresenterScreenEnabled(mxComponentContext)) + if ( officecfg::Office::Impress::Misc::Start::EnablePresenterScreen::get() ) mpPresenterScreen->InitializePresenterScreen(); } else if ( Event.EventName == "OnEndPresentation" ) @@ -273,18 +274,6 @@ PresenterScreen::~PresenterScreen() { } -bool PresenterScreen::isPresenterScreenEnabled(const css::uno::Reference<css::uno::XComponentContext>& rxContext) -{ - bool dEnablePresenterScreen=true; - PresenterConfigurationAccess aConfiguration ( - rxContext, - u"/org.openoffice.Office.Impress/"_ustr, - PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode(u"Misc/Start/EnablePresenterScreen"_ustr) - >>= dEnablePresenterScreen; - return dEnablePresenterScreen; -} - bool PresenterScreen::isPresenterScreenFullScreen(const css::uno::Reference<css::uno::XComponentContext>& rxContext) { bool dPresenterScreenFullScreen = true; diff --git a/sd/source/console/PresenterScreen.hxx b/sd/source/console/PresenterScreen.hxx index 7076924c2db5..3869f6384758 100644 --- a/sd/source/console/PresenterScreen.hxx +++ b/sd/source/console/PresenterScreen.hxx @@ -107,8 +107,6 @@ public: virtual void SAL_CALL disposing() override; - static bool isPresenterScreenEnabled( - const css::uno::Reference<css::uno::XComponentContext>& rxContext); static bool isPresenterScreenFullScreen( const css::uno::Reference<css::uno::XComponentContext>& rxContext);
