summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx14
-rw-r--r--sdext/source/presenter/PresenterScreen.hxx2
2 files changed, 15 insertions, 1 deletions
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index 8fe7fcebaf8f..f361912f3882 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -220,7 +220,8 @@ void SAL_CALL PresenterScreenListener::notifyEvent( const css::document::EventOb
if ( Event.EventName == "OnStartPresentation" )
{
mpPresenterScreen = new PresenterScreen(mxComponentContext, mxModel);
- mpPresenterScreen->InitializePresenterScreen();
+ if(mpPresenterScreen->isPresenterScreenEnabled(mxComponentContext))
+ mpPresenterScreen->InitializePresenterScreen();
}
else if ( Event.EventName == "OnEndPresentation" )
{
@@ -286,6 +287,17 @@ PresenterScreen::~PresenterScreen (void)
{
}
+bool PresenterScreen::isPresenterScreenEnabled(const css::uno::Reference<css::uno::XComponentContext>& rxContext)
+{
+ bool dEnablePresenterScreen=true;
+ PresenterConfigurationAccess aConfiguration (
+ rxContext,
+ OUString("/org.openoffice.Office.Impress/"),
+ PresenterConfigurationAccess::READ_ONLY);
+ aConfiguration.GetConfigurationNode("Misc/Start/EnablePresenterScreen")
+ >>= dEnablePresenterScreen;
+ return dEnablePresenterScreen;
+}
void SAL_CALL PresenterScreen::disposing (void)
{
Reference<XConfigurationController> xCC (mxConfigurationControllerWeak);
diff --git a/sdext/source/presenter/PresenterScreen.hxx b/sdext/source/presenter/PresenterScreen.hxx
index 1647f84b99d7..c97447db4315 100644
--- a/sdext/source/presenter/PresenterScreen.hxx
+++ b/sdext/source/presenter/PresenterScreen.hxx
@@ -109,6 +109,8 @@ public:
virtual void SAL_CALL disposing (void);
+ bool isPresenterScreenEnabled(
+ const css::uno::Reference<css::uno::XComponentContext>& rxContext);
/** Make the presenter screen visible.
*/
void InitializePresenterScreen (void);