diff options
author | Daniel Lohmann <LibreOfficeContribution@dldld.de> | 2022-11-14 19:17:14 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-11-17 06:57:40 +0100 |
commit | a15bcda0e21be04bec424172192f2416b7f52422 (patch) | |
tree | 617b015a48b84f26c57abac6e34135532206b15f /sd/source | |
parent | ef0858071faf93ce48237ea3948f50e288eb702b (diff) |
tdf#33495: Allow presenter console in windowed mode
Added an option in the Impress settings window to set the presenter
console into fullscreen/windowed mode. This will then be used the
next time a presentation is started.
Two pictures of how the result looks are given in the bug tracker.
Change-Id: I231f9180301301a9eccf9984ea4dcd529bd7dfce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142359
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/app/optsitem.cxx | 19 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/FullScreenPane.cxx | 23 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/FullScreenPane.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/inc/optsitem.hxx | 39 | ||||
-rw-r--r-- | sd/source/ui/inc/tpoption.hxx | 1 |
6 files changed, 69 insertions, 40 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 5baff32e2df8..fb9aac86d491 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -409,7 +409,8 @@ SdOptionsMisc::SdOptionsMisc( bool bImpress, bool bUseConfig ) : bDoubleClickTextEdit( true ), bClickChangeRotation( false ), bEnableSdremote( false ), - bEnablePresenterScreen( true), + bEnablePresenterScreen( true ), + bPresenterScreenFullScreen( true ), bSolidDragging( true ), bSummationOfParagraphs( false ), bTabBarVisible( true ), @@ -443,7 +444,8 @@ bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const IsDoubleClickTextEdit() == rOpt.IsDoubleClickTextEdit() && IsClickChangeRotation() == rOpt.IsClickChangeRotation() && IsEnableSdremote() == rOpt.IsEnableSdremote() && - IsEnablePresenterScreen() == rOpt.IsEnablePresenterScreen()&& + IsEnablePresenterScreen() == rOpt.IsEnablePresenterScreen() && + IsPresenterScreenFullScreen() == rOpt.IsPresenterScreenFullScreen() && IsSummationOfParagraphs() == rOpt.IsSummationOfParagraphs() && IsTabBarVisible() == rOpt.IsTabBarVisible() && IsSolidDragging() == rOpt.IsSolidDragging() && @@ -500,6 +502,7 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) "PenWidth", "Start/EnableSdremote", "Start/EnablePresenterScreen", + "Start/PresenterScreenFullScreen", "TabBarVisible" }; @@ -562,8 +565,11 @@ bool SdOptionsMisc::ReadData( const Any* pValues ) if( pValues[25].hasValue() ) SetEnablePresenterScreen( *o3tl::doAccess<bool>(pValues[ 25 ]) ); - if( pValues[26].hasValue() ) { - SetTabBarVisible( *o3tl::doAccess<bool>(pValues[ 26 ]) ); + if (pValues[26].hasValue() ) + SetPresenterScreenFullScreen( *o3tl::doAccess<bool>(pValues[ 26 ]) ); + + if( pValues[27].hasValue() ) { + SetTabBarVisible( *o3tl::doAccess<bool>(pValues[ 27 ]) ); } } @@ -606,7 +612,8 @@ bool SdOptionsMisc::WriteData( Any* pValues ) const pValues[ 23 ] <<= GetPresentationPenWidth(); pValues[ 24 ] <<= IsEnableSdremote(); pValues[ 25 ] <<= IsEnablePresenterScreen(); - pValues[ 26 ] <<= IsTabBarVisible(); + pValues[ 26 ] <<= IsPresenterScreenFullScreen(); + pValues[ 27 ] <<= IsTabBarVisible(); } return true; @@ -633,6 +640,7 @@ SdOptionsMiscItem::SdOptionsMiscItem( SdOptions const * pOpts, ::sd::FrameView c maOptionsMisc.SetStartWithTemplate( pOpts->IsStartWithTemplate() ); maOptionsMisc.SetEnableSdremote( pOpts->IsEnableSdremote() ); maOptionsMisc.SetEnablePresenterScreen( pOpts->IsEnablePresenterScreen() ); + maOptionsMisc.SetPresenterScreenFullScreen( pOpts->IsPresenterScreenFullScreen() ); maOptionsMisc.SetSummationOfParagraphs( pOpts->IsSummationOfParagraphs() ); maOptionsMisc.SetTabBarVisible( pOpts->IsTabBarVisible() ); maOptionsMisc.SetShowUndoDeleteWarning( pOpts->IsShowUndoDeleteWarning() ); @@ -710,6 +718,7 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const pOpts->SetClickChangeRotation( maOptionsMisc.IsClickChangeRotation() ); pOpts->SetEnableSdremote( maOptionsMisc.IsEnableSdremote() ); pOpts->SetEnablePresenterScreen( maOptionsMisc.IsEnablePresenterScreen() ); + pOpts->SetPresenterScreenFullScreen( maOptionsMisc.IsPresenterScreenFullScreen() ); pOpts->SetSummationOfParagraphs( maOptionsMisc.IsSummationOfParagraphs() ); pOpts->SetTabBarVisible( maOptionsMisc.IsTabBarVisible() ); diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 8c1408de0b57..3d214f56df72 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -186,6 +186,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, weld::DialogController* , m_xMtrFldTabstop(m_xBuilder->weld_metric_spin_button("metricFields", FieldUnit::MM)) , m_xCbxEnableSdremote(m_xBuilder->weld_check_button("enremotcont")) , m_xCbxEnablePresenterScreen(m_xBuilder->weld_check_button("enprsntcons")) + , m_xCbxPresenterScreenFullScreen(m_xBuilder->weld_check_button("enprsntconsfullscreen")) , m_xCbxCompatibility(m_xBuilder->weld_check_button("cbCompatibility")) , m_xScaleFrame(m_xBuilder->weld_frame("scaleframe")) , m_xCbScale(m_xBuilder->weld_combo_box("scaleBox")) @@ -329,15 +330,16 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs ) { bool bModified = false; - if( m_xCbxStartWithTemplate->get_state_changed_from_saved() || - m_xCbxMarkedHitMovesAlways->get_state_changed_from_saved() || - m_xCbxQuickEdit->get_state_changed_from_saved() || - m_xCbxPickThrough->get_state_changed_from_saved() || - m_xCbxMasterPageCache->get_state_changed_from_saved() || - m_xCbxCopy->get_state_changed_from_saved() || - m_xCbxEnableSdremote->get_state_changed_from_saved() || - m_xCbxEnablePresenterScreen->get_state_changed_from_saved() || - m_xCbxCompatibility->get_state_changed_from_saved() || + if( m_xCbxStartWithTemplate->get_state_changed_from_saved() || + m_xCbxMarkedHitMovesAlways->get_state_changed_from_saved() || + m_xCbxQuickEdit->get_state_changed_from_saved() || + m_xCbxPickThrough->get_state_changed_from_saved() || + m_xCbxMasterPageCache->get_state_changed_from_saved() || + m_xCbxCopy->get_state_changed_from_saved() || + m_xCbxEnableSdremote->get_state_changed_from_saved() || + m_xCbxEnablePresenterScreen->get_state_changed_from_saved() || + m_xCbxPresenterScreenFullScreen->get_state_changed_from_saved() || + m_xCbxCompatibility->get_state_changed_from_saved() || m_xCbxDistort->get_state_changed_from_saved()) { SdOptionsMiscItem aOptsItem; @@ -350,6 +352,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs ) aOptsItem.GetOptionsMisc().SetDragWithCopy( m_xCbxCopy->get_active() ); aOptsItem.GetOptionsMisc().SetEnableSdremote( m_xCbxEnableSdremote->get_active() ); aOptsItem.GetOptionsMisc().SetEnablePresenterScreen( m_xCbxEnablePresenterScreen->get_active() ); + aOptsItem.GetOptionsMisc().SetPresenterScreenFullScreen( m_xCbxPresenterScreenFullScreen->get_active() ); aOptsItem.GetOptionsMisc().SetSummationOfParagraphs( m_xCbxCompatibility->get_active() ); aOptsItem.GetOptionsMisc().SetCrookNoContortion( m_xCbxDistort->get_active() ); rAttrs->Put( aOptsItem ); @@ -399,6 +402,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) m_xCbxCopy->set_active( aOptsItem.GetOptionsMisc().IsDragWithCopy() ); m_xCbxEnableSdremote->set_active( aOptsItem.GetOptionsMisc().IsEnableSdremote() ); m_xCbxEnablePresenterScreen->set_active( aOptsItem.GetOptionsMisc().IsEnablePresenterScreen() ); + m_xCbxPresenterScreenFullScreen->set_active( aOptsItem.GetOptionsMisc().IsPresenterScreenFullScreen() ); m_xCbxCompatibility->set_active( aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() ); m_xCbxDistort->set_active( aOptsItem.GetOptionsMisc().IsCrookNoContortion() ); m_xCbxStartWithTemplate->save_state(); @@ -410,6 +414,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) m_xCbxCopy->save_state(); m_xCbxEnableSdremote->save_state(); m_xCbxEnablePresenterScreen->save_state(); + m_xCbxPresenterScreenFullScreen->save_state(); m_xCbxCompatibility->save_state(); m_xCbxDistort->save_state(); @@ -496,6 +501,7 @@ void SdTpOptionsMisc::SetDrawMode() m_xNewDocumentFrame->hide(); m_xCbxEnableSdremote->hide(); m_xCbxEnablePresenterScreen->hide(); + m_xCbxPresenterScreenFullScreen->hide(); m_xCbxCompatibility->hide(); m_xNewDocLb->hide(); m_xCbScale->show(); diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index dbf34213ff24..39da06144c09 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -40,23 +40,27 @@ FullScreenPane::FullScreenPane ( : FrameWindowPane(rxPaneId,nullptr), mxComponentContext(rxComponentContext) { + sal_Int32 nScreenNumber = 1; + bool bFullScreen = true; + ExtractArguments(rxPaneId, nScreenNumber, bFullScreen); + vcl::Window* pParent = nullptr; - mpWorkWindow.reset(VclPtr<WorkWindow>::Create( + WinBits nStyle = bFullScreen ? 0 : (WB_BORDER | WB_MOVEABLE | WB_SIZEABLE); + mpWorkWindow.reset(VclPtr<WorkWindow>::Create( pParent, - 0)); // For debugging (non-fullscreen) use WB_BORDER | WB_MOVEABLE | WB_SIZEABLE)); + nStyle)); // For debugging (non-fullscreen) use WB_BORDER | WB_MOVEABLE | WB_SIZEABLE)); if ( ! rxPaneId.is()) throw lang::IllegalArgumentException(); - sal_Int32 nScreenNumber = 1; - ExtractArguments(rxPaneId, nScreenNumber); - if (!mpWorkWindow) return; // Create a new top-level window that is displayed full screen. - mpWorkWindow->ShowFullScreenMode(true, nScreenNumber); + if (bFullScreen) + mpWorkWindow->ShowFullScreenMode(bFullScreen, nScreenNumber); + // For debugging (non-fullscreen) use mpWorkWindow->SetScreenNumber(nScreenNumber); mpWorkWindow->SetMenuBarMode(MenuBarMode::Hide); mpWorkWindow->SetBorderStyle(WindowBorderStyle::REMOVEBORDER); @@ -206,7 +210,8 @@ Reference<rendering::XCanvas> FullScreenPane::CreateCanvas() void FullScreenPane::ExtractArguments ( const Reference<XResourceId>& rxPaneId, - sal_Int32& rnScreenNumberReturnValue) + sal_Int32& rnScreenNumberReturnValue, + bool& rbFullScreen) { // Extract arguments from the resource URL. const util::URL aURL = rxPaneId->getFullResourceURL(); @@ -218,6 +223,10 @@ void FullScreenPane::ExtractArguments ( { rnScreenNumberReturnValue = o3tl::toInt32(sValue); } + if (o3tl::starts_with(aToken, u"FullScreen=", &sValue)) + { + rbFullScreen = o3tl::equalsAscii(sValue, "true"); + } } } diff --git a/sd/source/ui/framework/factories/FullScreenPane.hxx b/sd/source/ui/framework/factories/FullScreenPane.hxx index b33804ee5856..138503d02f1a 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.hxx +++ b/sd/source/ui/framework/factories/FullScreenPane.hxx @@ -77,7 +77,8 @@ private: static void ExtractArguments ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId, - sal_Int32& rnScreenNumberReturnValue); + sal_Int32& rnScreenNumberReturnValue, + bool& rbFullScreen); }; } // end of namespace sd::framework diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index 979b90b78425..0b5347f7c639 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -185,25 +185,26 @@ private: sal_Int32 nDefaultObjectSizeWidth; sal_Int32 nDefaultObjectSizeHeight; - bool bStartWithTemplate : 1; // Misc/NewDoc/AutoPilot - bool bMarkedHitMovesAlways : 1; // Misc/ObjectMoveable - bool bMoveOnlyDragging : 1; // Currently, not in use !!! - bool bCrookNoContortion : 1; // Misc/NoDistort - bool bQuickEdit : 1; // Misc/TextObject/QuickEditing - bool bMasterPageCache : 1; // Misc/BackgroundCache - bool bDragWithCopy : 1; // Misc/CopyWhileMoving - bool bPickThrough : 1; // Misc/TextObject/Selectable - bool bDoubleClickTextEdit : 1; // Misc/DclickTextedit - bool bClickChangeRotation : 1; // Misc/RotateClick - bool bEnableSdremote : 1; // Misc/Start/EnableSdremote - bool bEnablePresenterScreen : 1; // Misc/Start/EnablePresenterDisplay - bool bSolidDragging : 1; // Misc/ModifyWithAttributes - bool bSummationOfParagraphs : 1; // misc/SummationOfParagraphs - bool bTabBarVisible : 1; // Misc/TabBarVisible - bool bShowUndoDeleteWarning : 1; // Misc/ShowUndoDeleteWarning + bool bStartWithTemplate : 1; // Misc/NewDoc/AutoPilot + bool bMarkedHitMovesAlways : 1; // Misc/ObjectMoveable + bool bMoveOnlyDragging : 1; // Currently, not in use !!! + bool bCrookNoContortion : 1; // Misc/NoDistort + bool bQuickEdit : 1; // Misc/TextObject/QuickEditing + bool bMasterPageCache : 1; // Misc/BackgroundCache + bool bDragWithCopy : 1; // Misc/CopyWhileMoving + bool bPickThrough : 1; // Misc/TextObject/Selectable + bool bDoubleClickTextEdit : 1; // Misc/DclickTextedit + bool bClickChangeRotation : 1; // Misc/RotateClick + bool bEnableSdremote : 1; // Misc/Start/EnableSdremote + bool bEnablePresenterScreen : 1; // Misc/Start/EnablePresenterScreen + bool bPresenterScreenFullScreen : 1; // Misc/Start/PresenterScreenFullScreen + bool bSolidDragging : 1; // Misc/ModifyWithAttributes + bool bSummationOfParagraphs : 1; // misc/SummationOfParagraphs + bool bTabBarVisible : 1; // Misc/TabBarVisible + bool bShowUndoDeleteWarning : 1; // Misc/ShowUndoDeleteWarning // #i75315# - bool bSlideshowRespectZOrder : 1; // Misc/SlideshowRespectZOrder - bool bShowComments : 1; // Misc/ShowComments + bool bSlideshowRespectZOrder : 1; // Misc/SlideshowRespectZOrder + bool bShowComments : 1; // Misc/ShowComments bool bPreviewNewEffects; bool bPreviewChangedEffects; @@ -247,6 +248,7 @@ public: bool IsClickChangeRotation() const { Init(); return bClickChangeRotation; } bool IsEnableSdremote() const { Init(); return bEnableSdremote; } bool IsEnablePresenterScreen() const { Init(); return bEnablePresenterScreen; } + bool IsPresenterScreenFullScreen() const { Init(); return bPresenterScreenFullScreen; } bool IsSolidDragging() const { Init(); return bSolidDragging; } bool IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs; }; bool IsTabBarVisible() const { Init(); return bTabBarVisible; }; @@ -287,6 +289,7 @@ public: void SetClickChangeRotation( bool bOn ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } } void SetEnableSdremote( bool bOn ) { if( bEnableSdremote != bOn ) { OptionsChanged(); bEnableSdremote = bOn; } } void SetEnablePresenterScreen( bool bOn ) { if( bEnablePresenterScreen != bOn ) { OptionsChanged(); bEnablePresenterScreen = bOn; } } + void SetPresenterScreenFullScreen( bool bOn ) { if ( bPresenterScreenFullScreen != bOn) { OptionsChanged(); bPresenterScreenFullScreen = bOn; } } void SetSummationOfParagraphs( bool bOn ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } } void SetTabBarVisible( bool bOn ){ if ( bOn != bTabBarVisible ) { OptionsChanged(); bTabBarVisible = bOn; } } /** Set the printer independent layout mode. diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx index d0f010a26332..995916331223 100644 --- a/sd/source/ui/inc/tpoption.hxx +++ b/sd/source/ui/inc/tpoption.hxx @@ -88,6 +88,7 @@ private: std::unique_ptr<weld::CheckButton> m_xCbxEnableSdremote; std::unique_ptr<weld::CheckButton> m_xCbxEnablePresenterScreen; + std::unique_ptr<weld::CheckButton> m_xCbxPresenterScreenFullScreen; std::unique_ptr<weld::CheckButton> m_xCbxCompatibility; //Scale |