summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-03-20 16:50:55 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-03-23 21:51:12 +0000
commit53fc5fa0fed077b7d11e39b710280f0a84b631ff (patch)
treeace6d975c020c5c2812a7a07dac6e42da51fb112 /sfx2
parente713d9be05b788d5da0fff59c6070cca95b73b37 (diff)
tdf#142978 Show a11y sidebar when finding issues on PDF export
Change-Id: I5234aca76153e1a781b7df1d3fbea8bb856af921 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149430 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/sfx.sdi2
-rw-r--r--sfx2/source/sidebar/Sidebar.cxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx4
3 files changed, 6 insertions, 4 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 750cf6825d31..16e75ded94dc 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -4336,7 +4336,7 @@ SfxVoidItem StylePreview SID_STYLE_PREVIEW
]
SfxVoidItem SidebarDeck SID_SIDEBAR_DECK
-(SfxStringItem SidebarDeck SID_SIDEBAR_DECK)
+(SfxStringItem SidebarDeck SID_SIDEBAR_DECK, SfxBoolItem SidebarDeckToggle SID_SIDEBAR_DECK_TOGGLE)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx
index ca48542d5403..e56a259c5e7c 100644
--- a/sfx2/source/sidebar/Sidebar.cxx
+++ b/sfx2/source/sidebar/Sidebar.cxx
@@ -31,7 +31,7 @@ using namespace css;
namespace sfx2::sidebar {
-void Sidebar::ToggleDeck(std::u16string_view rsDeckId, SfxViewFrame* pViewFrame)
+void Sidebar::ShowDeck(std::u16string_view rsDeckId, SfxViewFrame* pViewFrame, bool bToggle)
{
if (!pViewFrame)
return;
@@ -46,7 +46,7 @@ void Sidebar::ToggleDeck(std::u16string_view rsDeckId, SfxViewFrame* pViewFrame)
if (!pController)
return;
- if (bInitiallyVisible && pController->IsDeckVisible(rsDeckId))
+ if (bToggle && bInitiallyVisible && pController->IsDeckVisible(rsDeckId))
{
// close the sidebar if it was already visible and showing this sidebar deck
const util::URL aURL(Tools::GetURL(".uno:Sidebar"));
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 8d4cb75f531b..a5f7c0a8a3c1 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3346,7 +3346,9 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
if (pDeckIdItem)
{
const OUString aDeckId(pDeckIdItem->GetValue());
- ::sfx2::sidebar::Sidebar::ToggleDeck(aDeckId, this);
+ const SfxBoolItem* pToggleItem = rReq.GetArg<SfxBoolItem>(SID_SIDEBAR_DECK_TOGGLE);
+ bool bToggle = pToggleItem && pToggleItem->GetValue();
+ ::sfx2::sidebar::Sidebar::ShowDeck(aDeckId, this, bToggle);
}
rReq.Done();
return;