From 94dd6a449fe3c17f97264dd01bf263eb268ac19d Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 18 Jul 2013 14:51:29 +0100 Subject: fdo#67045 - fix several nasty screen selection issues with presenter console. Also add the ability to select the external screen (whatever it is) to the configuration dialog. Change-Id: I2c81175143ba8fdd7c9aee1dac433742c2a0ba69 Reviewed-on: https://gerrit.libreoffice.org/4971 Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba --- sdext/source/presenter/PresenterScreen.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index f361912f3882..f98694493158 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -448,9 +448,10 @@ void PresenterScreen::SwitchMonitors() } } -// FIXME: really VCL should hold the current 'external' and 'built-in' -// display states, and hide them behind some attractive API, and -// the PresenterConsole should link VCL directly ... +/** + * Return the real VCL screen number to show the presenter console + * on or -1 to not show anything. + */ sal_Int32 PresenterScreen::GetPresenterScreenNumber ( const Reference& rxPresentation) const { @@ -475,6 +476,8 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber ( return -1; } + SAL_INFO("sdext.presenter", "Display number is " << nDisplayNumber); + if (nDisplayNumber > 0) { nScreenNumber = nDisplayNumber - 1; @@ -518,7 +521,7 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber ( // For some reason we can not access the screen number. Use // the default instead. } - + SAL_INFO("sdext.presenter", "Get presenter screen for screen " << nScreenNumber); return GetPresenterScreenFromScreen(nScreenNumber); } @@ -538,6 +541,8 @@ sal_Int32 PresenterScreen::GetPresenterScreenFromScreen( sal_Int32 nPresentation break; default: + SAL_INFO("sdext.presenter", "Warning unexpected, out of bound screen " + "mapped to 0" << nPresentationScreen); // When the full screen presentation is displayed on a screen // other than 0 or 1 then place the presenter on the first // available screen. -- cgit