svx/inc/frmsel.hrc | 13 ----- svx/source/accessibility/AccessibleFrameSelector.cxx | 45 ++++++++----------- svx/source/dialog/frmsel.cxx | 1 3 files changed, 21 insertions(+), 38 deletions(-)
New commits: commit 551d7191115a6c81cdb0c23e1cd18f35d986a585 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Apr 28 17:22:12 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Apr 28 21:42:01 2025 +0200 svx a11y: Flatten AccFrameSelectorChild::getAccessibleStateSet Return early if `mpFrameSel` is null. Change-Id: Ica11e586c1e20b8466547a64050a12109d291208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184725 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index fa8646891903..317c364fa75e 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -286,33 +286,30 @@ Reference< XAccessibleRelationSet > AccFrameSelectorChild::getAccessibleRelation sal_Int64 AccFrameSelectorChild::getAccessibleStateSet( ) { SolarMutexGuard aGuard; - sal_Int64 nStateSet = 0; if(!mpFrameSel) - nStateSet |= AccessibleStateType::DEFUNC; - else + return AccessibleStateType::DEFUNC; + + sal_Int64 nStateSet = AccessibleStateType::EDITABLE + | AccessibleStateType::FOCUSABLE + | AccessibleStateType::MULTI_SELECTABLE + | AccessibleStateType::SELECTABLE + | AccessibleStateType::SHOWING + | AccessibleStateType::VISIBLE + | AccessibleStateType::OPAQUE; + if (mpFrameSel->IsEnabled()) { - nStateSet |= - AccessibleStateType::EDITABLE | - AccessibleStateType::FOCUSABLE | - AccessibleStateType::MULTI_SELECTABLE | - AccessibleStateType::SELECTABLE | - AccessibleStateType::SHOWING | - AccessibleStateType::VISIBLE | - AccessibleStateType::OPAQUE; - if(mpFrameSel->IsEnabled()) - { - nStateSet |= AccessibleStateType::ENABLED; - nStateSet |= AccessibleStateType::SENSITIVE; - } + nStateSet |= AccessibleStateType::ENABLED; + nStateSet |= AccessibleStateType::SENSITIVE; + } - if (mpFrameSel->HasFocus() && mpFrameSel->IsBorderSelected(meBorder)) - { - nStateSet |= AccessibleStateType::ACTIVE; - nStateSet |= AccessibleStateType::FOCUSED; - nStateSet |= AccessibleStateType::SELECTED; - } + if (mpFrameSel->HasFocus() && mpFrameSel->IsBorderSelected(meBorder)) + { + nStateSet |= AccessibleStateType::ACTIVE; + nStateSet |= AccessibleStateType::FOCUSED; + nStateSet |= AccessibleStateType::SELECTED; } + return nStateSet; } commit cb76ba02148d48a09aa0fd81303dd2fdeba3ed06 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Apr 25 10:05:41 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Apr 28 21:41:55 2025 +0200 svx a11y: Don't duplicate frame selector a11y names as descriptions The strings in RID_SVXSTR_FRMSEL_DESCRIPTIONS used for the accessible description are exactly the same as those in RID_SVXSTR_FRMSEL_TEXTS which is used for the accessible name. That duplication doesn't provide any extra value (and might make screen readers announce the same thing twice), so just return an empty string for the accessible description instead. Those are used e.g. for the borders in Writer's "Format" -> "Paragraph" dialog, tab "Borders" for the single borders in the drawing area labeled "User-defined". Change-Id: I412ed482860fe1aecfc840b9c38491adf4f5b53e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184724 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/svx/inc/frmsel.hrc b/svx/inc/frmsel.hrc index c3fa77f9b7e2..82e18ff45c0f 100644 --- a/svx/inc/frmsel.hrc +++ b/svx/inc/frmsel.hrc @@ -39,19 +39,6 @@ std::pair<TranslateId, sal_uInt16> RID_SVXSTR_FRMSEL_TEXTS[] = { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Diagonal border line from bottom left to top right") , 8 }, }; -std::pair<TranslateId, sal_uInt16> RID_SVXSTR_FRMSEL_DESCRIPTIONS[] = -{ - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Border setting") , 0 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Left border line") , 1 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Right border line") , 2 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Top border line") , 3 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Bottom border line") , 4 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Horizontal border line") , 5 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Vertical border line") , 6 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Diagonal border line from top left to bottom right") , 7 }, - { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Diagonal border line from bottom left to top right") , 8 }, -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 39bdaa88fdb7..fa8646891903 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -90,7 +90,7 @@ OUString AccFrameSelector::getAccessibleDescription( ) { SolarMutexGuard aGuard; IsValid(); - return SvxResId(RID_SVXSTR_FRMSEL_DESCRIPTIONS[0].first); + return OUString(); } OUString AccFrameSelector::getAccessibleName( ) @@ -265,7 +265,7 @@ OUString AccFrameSelectorChild::getAccessibleDescription( ) { SolarMutexGuard aGuard; IsValid(); - return SvxResId(RID_SVXSTR_FRMSEL_DESCRIPTIONS[static_cast<sal_uInt32>(meBorder)].first); + return OUString(); } OUString AccFrameSelectorChild::getAccessibleName( ) commit 4cd6723a49ac3a07b59db97f1fd8e27b226e82f0 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Apr 25 09:56:37 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Apr 28 21:41:47 2025 +0200 svx a11y: Drop "bFireFox as API parameter is ugly..." comment It was added in commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366 Author: Steve Yin <stev...@apache.org> Date: Wed Nov 27 13:03:45 2013 +0000 Integrate branch of IAccessible2 and it's completely unclear what it refers to. Drop it. Change-Id: Iaf4bfddd531000d0abc77708b578a93b1fe79579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184723 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 4e02c1f76e94..d477131ba013 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -988,7 +988,6 @@ void FrameSelector::SelectBorder( FrameBorderType eBorder ) { mxImpl->SelectBorder( mxImpl->GetBorderAccess( eBorder ), true/*bSelect*/ ); #if !ENABLE_WASM_STRIP_ACCESSIBILITY - // MT: bFireFox as API parameter is ugly... // if (bFocus) { rtl::Reference< a11y::AccFrameSelectorChild > xRet = GetChildAccessible(eBorder);