cui/source/inc/border.hxx | 4 ++-- cui/source/tabpages/border.cxx | 16 ++++++++++------ cui/uiconfig/ui/borderpage.ui | 6 +++--- 3 files changed, 15 insertions(+), 11 deletions(-)
New commits: commit be2287c5d2081b7de68d73cc657f5b249d19a082 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Jul 21 23:53:24 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jul 22 08:12:35 2025 +0200 tdf#167536 cui a11y: Set IconViews as mnemonic widgets for their labels ... and not the ScrolledWindows that contain the IconView objects. This makes Orca with the gtk3 VCL plugin announce the corresponding label again when the IconView receives focus after commit 4d6429c0368f9b2ec796dd8468defbee194a8b4c Date: Thu Jul 17 14:52:51 2025 +0530 tdf#167536 Switch to IconView for presets and shadows in border page e.g. in the Writer "Format" -> "Page Style" -> "Borders" tab. Change-Id: Ia66056788d51252ee5425a0396db58b2b5f5f3d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188133 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui index 7212d1d52920..a0894be689a7 100644 --- a/cui/uiconfig/ui/borderpage.ui +++ b/cui/uiconfig/ui/borderpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> @@ -122,7 +122,7 @@ <property name="valign">center</property> <property name="label" translatable="yes" context="borderpage|label14">Pr_esets:</property> <property name="use-underline">True</property> - <property name="mnemonic-widget">presets_scrolled_window</property> + <property name="mnemonic-widget">presets</property> <property name="xalign">0</property> </object> <packing> @@ -576,7 +576,7 @@ <property name="can-focus">False</property> <property name="label" translatable="yes" context="borderpage|label22">_Position:</property> <property name="use-underline">True</property> - <property name="mnemonic-widget">shadows_scrolled_window</property> + <property name="mnemonic-widget">shadows</property> <property name="xalign">0</property> </object> <packing> commit 7fc56525ed18de950d3892d69942f8dc8d15f22b Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Jul 21 23:49:37 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jul 22 08:12:30 2025 +0200 tdf#167536 cui: Set a11y names for IconView items in borders tab page Those got lost in commit 4d6429c0368f9b2ec796dd8468defbee194a8b4c Date: Thu Jul 17 14:52:51 2025 +0530 tdf#167536 Switch to IconView for presets and shadows in border page This makes Orca with the gtk3 VCL plugin announce the items with the same text as their tooltip again when one receives focus e.g. in the Writer "Format" -> "Page Style" -> "Borders" tab. Change-Id: I6d56d21f2ed493c9e452b8cfa72735597ccc0403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188132 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 0563ab518aa3..ccd1b67d2d51 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -172,7 +172,7 @@ private: DECL_LINK(QueryTooltipSdwHdl, const weld::TreeIter&, OUString); sal_uInt16 GetPresetImageId(sal_uInt16 nIconViewIdx) const; - TranslateId GetPresetStringId(sal_uInt16 nIconViewIdx) const; + OUString GetPresetName(sal_uInt16 nIconViewIdx) const; void FillPresetIV(); void FillShadowIV(); @@ -190,7 +190,7 @@ private: bool IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const; void UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset ); - static TranslateId GetShadowStringId(sal_uInt16 nIconViewIdx); + static OUString GetShadowTypeName(sal_uInt16 nIconViewIdx); static BitmapEx GetPreviewAsBitmap(const Image& rImage); }; diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 88df6cc4794f..0d9d2681629e 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -1239,7 +1239,7 @@ IMPL_LINK(SvxBorderTabPage, QueryTooltipPreHdl, const weld::TreeIter&, iter, OUS { const OUString sId = m_xWndPresets->get_id(iter); if (!sId.isEmpty()) - return SvxResId( GetPresetStringId( sId.toInt32() ) ); + return GetPresetName(sId.toInt32()); return OUString(); } @@ -1248,7 +1248,7 @@ IMPL_LINK(SvxBorderTabPage, QueryTooltipSdwHdl, const weld::TreeIter&, iter, OUS { const OUString sId = m_xWndShadows->get_id(iter); if (!sId.isEmpty()) - return CuiResId( GetShadowStringId( sId.toInt32() ) ); + return GetShadowTypeName(sId.toInt32()); return OUString(); } @@ -1394,7 +1394,7 @@ sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nIconViewIdx ) const return ppnImgIds[ nLine ][ nIconViewIdx - 1 ]; } -TranslateId SvxBorderTabPage::GetShadowStringId( sal_uInt16 nIconViewIdx ) +OUString SvxBorderTabPage::GetShadowTypeName(sal_uInt16 nIconViewIdx) { static const TranslateId pnStrIds[ BORDER_SHADOW_COUNT ] = { @@ -1405,10 +1405,10 @@ TranslateId SvxBorderTabPage::GetShadowStringId( sal_uInt16 nIconViewIdx ) RID_CUISTR_SHADOW_STYLE_TOPLEFT }; - return pnStrIds[ nIconViewIdx - 1 ]; + return CuiResId(pnStrIds[nIconViewIdx - 1]); } -TranslateId SvxBorderTabPage::GetPresetStringId( sal_uInt16 nIconViewIdx ) const +OUString SvxBorderTabPage::GetPresetName(sal_uInt16 nIconViewIdx) const { // string resource IDs for each image (in order of the IID_PRE_* image IDs) static const TranslateId pnStrIds[] = @@ -1438,7 +1438,7 @@ TranslateId SvxBorderTabPage::GetPresetStringId( sal_uInt16 nIconViewIdx ) const RID_SVXSTR_TABLE_PRESET_OUTERALL, RID_SVXSTR_TABLE_PRESET_OUTERINNER }; - return pnStrIds[ GetPresetImageId( nIconViewIdx ) - 1 ]; + return SvxResId(pnStrIds[GetPresetImageId(nIconViewIdx) - 1]); } void SvxBorderTabPage::FillPresetIV() @@ -1450,6 +1450,8 @@ void SvxBorderTabPage::FillPresetIV() OUString sId = OUString::number(nIdx); BitmapEx aPreviewBitmap = GetPreviewAsBitmap(m_aBorderImgVec[GetPresetImageId(nIdx) - 1]); m_xWndPresets->insert(-1, nullptr, &sId, &aPreviewBitmap, nullptr); + m_xWndPresets->set_item_accessible_name(m_xWndPresets->n_children() - 1, + GetPresetName(nIdx)); } // show the control @@ -1467,6 +1469,8 @@ void SvxBorderTabPage::FillShadowIV() OUString sId = OUString::number(nIdx); BitmapEx aPreviewBitmap = GetPreviewAsBitmap(m_aShadowImgVec[nIdx-1]); m_xWndShadows->insert(-1, nullptr, &sId, &aPreviewBitmap, nullptr); + m_xWndShadows->set_item_accessible_name(m_xWndShadows->n_children() - 1, + GetShadowTypeName(nIdx)); } // show the control