From 6320a4c21cf54d32c778417ee077d67fd0bad050 Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Mon, 16 Oct 2023 06:48:35 -0800 Subject: tdf#156114 UNO commands / menu entries to enable PS/CS spotlight Change-Id: I2796b595ef961c477dea85c337ad343599aea7cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158055 Tested-by: Jenkins Reviewed-by: Jim Raykowski --- sw/source/uibase/uiview/view0.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'sw/source/uibase/uiview/view0.cxx') diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 1aff6af42f8d..66d8c66597ae 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -361,6 +361,12 @@ void SwView::StateViewOptions(SfxItemSet &rSet) case FN_HIGHLIGHT_CHAR_DF: aBool.SetValue(m_bIsHighlightCharDF); break; + case SID_SPOTLIGHT_PARASTYLES: + aBool.SetValue(m_bIsSpotlightParaStyles); + break; + case SID_SPOTLIGHT_CHARSTYLES: + aBool.SetValue(m_bIsSpotlightCharStyles); + break; } if( nWhich ) @@ -557,6 +563,28 @@ void SwView::ExecViewOptions(SfxRequest &rReq) m_bIsHighlightCharDF = bFlag; break; + case SID_SPOTLIGHT_PARASTYLES: + if (!pArgs || (pArgs && !pArgs->HasItem(FN_PARAM_1))) + { + const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "StyleListDeck"); + GetDispatcher().ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::SYNCHRON, { &sDeckName }); + } + if (STATE_TOGGLE == eState) + bFlag = !m_bIsSpotlightParaStyles; + m_bIsSpotlightParaStyles = bFlag; + break; + + case SID_SPOTLIGHT_CHARSTYLES: + if (!pArgs || (pArgs && !pArgs->HasItem(FN_PARAM_1))) + { + const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "StyleListDeck"); + GetDispatcher().ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::SYNCHRON, { &sDeckName }); + } + if (STATE_TOGGLE == eState) + bFlag = !m_bIsSpotlightCharStyles; + m_bIsSpotlightCharStyles = bFlag; + break; + case FN_VIEW_META_CHARS: if( STATE_TOGGLE == eState ) bFlag = !pOpt->IsViewMetaChars(); -- cgit v1.2.3