diff options
-rw-r--r-- | sd/source/ui/app/optsitem.cxx | 30 | ||||
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 39 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/inc/optsitem.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/inc/present.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/inc/tpoption.hxx | 2 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/optimpressgeneralpage.ui | 42 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/presentationdialog.ui | 34 |
8 files changed, 84 insertions, 84 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 0492be483658..e02618ca8f18 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -409,8 +409,6 @@ SdOptionsMisc::SdOptionsMisc( bool bImpress, bool bUseConfig ) : bDoubleClickTextEdit( true ), bClickChangeRotation( false ), bEnableSdremote( false ), - bEnablePresenterScreen( true ), - bPresenterScreenFullScreen( true ), bSolidDragging( true ), bSummationOfParagraphs( false ), bTabBarVisible( true ), @@ -446,8 +444,6 @@ bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const IsDoubleClickTextEdit() == rOpt.IsDoubleClickTextEdit() && IsClickChangeRotation() == rOpt.IsClickChangeRotation() && IsEnableSdremote() == rOpt.IsEnableSdremote() && - IsEnablePresenterScreen() == rOpt.IsEnablePresenterScreen() && - IsPresenterScreenFullScreen() == rOpt.IsPresenterScreenFullScreen() && IsSummationOfParagraphs() == rOpt.IsSummationOfParagraphs() && IsTabBarVisible() == rOpt.IsTabBarVisible() && IsSolidDragging() == rOpt.IsSolidDragging() && @@ -507,8 +503,6 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) "PenColor", "PenWidth", "Start/EnableSdremote", - "Start/EnablePresenterScreen", - "Start/PresenterScreenFullScreen", "TabBarVisible", "Start/ShowNavigationPanel" }; @@ -571,17 +565,11 @@ bool SdOptionsMisc::ReadData( const Any* pValues ) if( pValues[25].hasValue() ) SetEnableSdremote( *o3tl::doAccess<bool>(pValues[ 25 ]) ); - if( pValues[26].hasValue() ) - SetEnablePresenterScreen( *o3tl::doAccess<bool>(pValues[ 26 ]) ); - - if (pValues[27].hasValue() ) - SetPresenterScreenFullScreen( *o3tl::doAccess<bool>(pValues[ 27 ]) ); - - if( pValues[28].hasValue() ) { - SetTabBarVisible( *o3tl::doAccess<bool>(pValues[ 28 ]) ); + if( pValues[26].hasValue() ) { + SetTabBarVisible( *o3tl::doAccess<bool>(pValues[ 26 ]) ); } - if( pValues[29].hasValue() ) - SetShowNavigationPanel( *o3tl::doAccess<bool>(pValues[ 29 ]) ); + if( pValues[27].hasValue() ) + SetShowNavigationPanel( *o3tl::doAccess<bool>(pValues[ 27 ]) ); } @@ -624,11 +612,9 @@ bool SdOptionsMisc::WriteData( Any* pValues ) const pValues[ 23 ] <<= GetPresentationPenColor(); pValues[ 24 ] <<= GetPresentationPenWidth(); pValues[ 25 ] <<= IsEnableSdremote(); - pValues[ 26 ] <<= IsEnablePresenterScreen(); - pValues[ 27 ] <<= IsPresenterScreenFullScreen(); - pValues[ 28 ] <<= IsTabBarVisible(); + pValues[ 26 ] <<= IsTabBarVisible(); - pValues[ 29 ] <<= IsShowNavigationPanel(); + pValues[ 27 ] <<= IsShowNavigationPanel(); } @@ -655,8 +641,6 @@ 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() ); @@ -737,8 +721,6 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const pOpts->SetDoubleClickTextEdit( maOptionsMisc.IsDoubleClickTextEdit() ); 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/present.cxx b/sd/source/ui/dlg/present.cxx index d72b152ef7f8..6eaedbfae48b 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <officecfg/Office/Impress.hxx> #include <svl/itemset.hxx> #include <svl/intitem.hxx> #include <svl/eitem.hxx> @@ -31,6 +32,16 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; +namespace +{ +enum PresenterConsoleMode +{ + FullScreen = 0, + Windowed = 1, + Disabled = 2 +}; +} + SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList) : GenericDialogController(pWindow, "modules/simpress/ui/presentationdialog.ui", "PresentationDialog") @@ -54,6 +65,7 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI , m_xCbxAnimationAllowed(m_xBuilder->weld_check_button("animationsallowed")) , m_xCbxChangePage(m_xBuilder->weld_check_button("changeslidesbyclick")) , m_xCbxAlwaysOnTop(m_xBuilder->weld_check_button("alwaysontop")) + , m_xLbConsole(m_xBuilder->weld_combo_box("console_cb")) , m_xFtMonitor(m_xBuilder->weld_label("presdisplay_label")) , m_xLBMonitor(m_xBuilder->weld_combo_box("presdisplay_cb")) , m_xMonitor(m_xBuilder->weld_label("monitor_str")) @@ -130,6 +142,13 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI else m_xRbtStandard->set_active(true); + if (!officecfg::Office::Impress::Misc::Start::EnablePresenterScreen::get()) + m_xLbConsole->set_active(PresenterConsoleMode::Disabled); + else if (officecfg::Office::Impress::Misc::Start::PresenterScreenFullScreen::get()) + m_xLbConsole->set_active(PresenterConsoleMode::FullScreen); + else + m_xLbConsole->set_active(PresenterConsoleMode::Windowed); + InitMonitorSettings(); ChangeRangeHdl(*m_xRbtCustomshow); @@ -142,6 +161,26 @@ SdStartPresentationDlg::~SdStartPresentationDlg() { } +short SdStartPresentationDlg::run() +{ + short nRet = GenericDialogController::run(); + if (nRet == RET_OK) + { + std::shared_ptr<comphelper::ConfigurationChanges> batch( + comphelper::ConfigurationChanges::create()); + auto nActive = m_xLbConsole->get_active(); + bool bEnabled = nActive != PresenterConsoleMode::Disabled; + officecfg::Office::Impress::Misc::Start::EnablePresenterScreen::set(bEnabled, batch); + if (bEnabled) + { + officecfg::Office::Impress::Misc::Start::PresenterScreenFullScreen::set( + nActive == PresenterConsoleMode::FullScreen, batch); + } + batch->commit(); + } + return nRet; +} + OUString SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay, DisplayType eType ) { diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 2703161a17e1..efa66ab20821 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -207,8 +207,6 @@ SdTpOptionsMisc::SdTpOptionsMisc(weld::Container* pPage, weld::DialogController* , m_xLbMetric(m_xBuilder->weld_combo_box("units")) , 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_xCbxShowNavigationPanel(m_xBuilder->weld_check_button("shwnavpan")) , m_xScaleFrame(m_xBuilder->weld_frame("scaleframe")) @@ -364,8 +362,7 @@ OUString SdTpOptionsMisc::GetAllStrings() OUString checkButton[] = { "startwithwizard", "copywhenmove", "backgroundback", "objalwymov", "distortcb", "cbCompatibility", - "enremotcont", "enprsntcons", "enprsntconsfullscreen", - "qickedit", "textselected", "shwnavpan" }; + "enremotcont", "qickedit", "textselected", "shwnavpan" }; for (const auto& check : checkButton) { @@ -387,8 +384,6 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs ) 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() || m_xCbxShowNavigationPanel->get_state_changed_from_saved()) @@ -402,8 +397,6 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs ) aOptsItem.GetOptionsMisc().SetMasterPagePaintCaching( m_xCbxMasterPageCache->get_active() ); 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() ); aOptsItem.GetOptionsMisc().SetShowNavigationPanel( m_xCbxShowNavigationPanel->get_active() ); @@ -453,8 +446,6 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) m_xCbxMasterPageCache->set_active( aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() ); 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_xCbxShowNavigationPanel->set_active( aOptsItem.GetOptionsMisc().IsShowNavigationPanel() ); @@ -466,8 +457,6 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) m_xCbxMasterPageCache->save_state(); m_xCbxCopy->save_state(); m_xCbxEnableSdremote->save_state(); - m_xCbxEnablePresenterScreen->save_state(); - m_xCbxPresenterScreenFullScreen->save_state(); m_xCbxCompatibility->save_state(); m_xCbxDistort->save_state(); m_xCbxShowNavigationPanel->save_state(); @@ -552,8 +541,6 @@ void SdTpOptionsMisc::SetDrawMode() m_xScaleFrame->show(); 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/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index 7308b9137155..56b64450cc9d 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -196,7 +196,6 @@ private: 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 @@ -252,7 +251,6 @@ public: bool IsDoubleClickTextEdit() const { Init(); return bDoubleClickTextEdit; } 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; }; @@ -298,7 +296,6 @@ public: void SetDoubleClickTextEdit( bool bOn ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } } 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; } } diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx index 00c78ac79328..e5ca1f69266c 100644 --- a/sd/source/ui/inc/present.hxx +++ b/sd/source/ui/inc/present.hxx @@ -55,6 +55,8 @@ private: std::unique_ptr<weld::CheckButton> m_xCbxChangePage; std::unique_ptr<weld::CheckButton> m_xCbxAlwaysOnTop; + std::unique_ptr<weld::ComboBox> m_xLbConsole; + std::unique_ptr<weld::Label> m_xFtMonitor; std::unique_ptr<weld::ComboBox> m_xLBMonitor; @@ -84,6 +86,7 @@ public: const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList); virtual ~SdStartPresentationDlg() override; + virtual short run() override; void GetAttr( SfxItemSet& rOutAttrs ); }; diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx index 91077a63bbe4..e7f91d3b2c32 100644 --- a/sd/source/ui/inc/tpoption.hxx +++ b/sd/source/ui/inc/tpoption.hxx @@ -89,8 +89,6 @@ private: std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTabstop; 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; std::unique_ptr<weld::CheckButton> m_xCbxShowNavigationPanel; diff --git a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui index 761ff9956374..b7fcd3ae925e 100644 --- a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui +++ b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui @@ -96,7 +96,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=4 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid" id="grid5"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -106,25 +106,6 @@ <property name="row-spacing">6</property> <property name="column-spacing">12</property> <child> - <object class="GtkCheckButton" id="enprsntcons"> - <property name="label" translatable="yes" context="optimpressgeneralpage|enprsntcons">Enable Presenter Console</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="use-underline">True</property> - <property name="draw-indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="enprsntcons-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|enprsntcons">Specifies that you want to enable the Presenter Console during slideshows.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> <object class="GtkCheckButton" id="enremotcont"> <property name="label" translatable="yes" context="optimpressgeneralpage|enremotcont">Enable remote control</property> <property name="visible">True</property> @@ -145,25 +126,6 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="enprsntconsfullscreen"> - <property name="label" translatable="yes" context="optimpressgeneralpage|enprsntconsfullscreen">Fullscreen presenter console</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="use-underline">True</property> - <property name="draw-indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="enprsntconsfullscreen-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|enprsntconsfullscreen">Specifies that you want to show the Presenter Console in fullscreen mode.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> <object class="GtkCheckButton" id="shwnavpan"> <property name="label" translatable="yes" context="optimpressgeneralpage|shwnavpan">Show navigation panel</property> <property name="visible">True</property> @@ -179,7 +141,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">3</property> + <property name="top-attach">1</property> </packing> </child> </object> diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui b/sd/uiconfig/simpress/ui/presentationdialog.ui index 2f061dad484b..0dae8d3e5abd 100644 --- a/sd/uiconfig/simpress/ui/presentationdialog.ui +++ b/sd/uiconfig/simpress/ui/presentationdialog.ui @@ -268,12 +268,13 @@ <property name="hexpand">True</property> <property name="vexpand">True</property> <child> - <!-- n-columns=2 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid8"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="row-spacing">6</property> <property name="column-spacing">12</property> <child> <object class="GtkComboBoxText" id="presdisplay_cb"> @@ -305,6 +306,37 @@ <property name="top-attach">0</property> </packing> </child> + <child> + <object class="GtkComboBoxText" id="console_cb"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="hexpand">True</property> + <property name="active">0</property> + <items> + <item id="0" translatable="yes" context="presentationdialog|console_cb">Full screen</item> + <item id="1" translatable="yes" context="presentationdialog|console_cb">Windowed</item> + <item id="2" translatable="yes" context="presentationdialog|console_cb">Disabled</item> + </items> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="console_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="presentationdialog|console_label">Presenter console:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">console_cb</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> </object> <packing> <property name="left-attach">0</property> |