desktop/source/deployment/gui/dp_gui_extlistbox.cxx |    2 ++
 sw/source/core/access/accportions.hxx               |    2 ++
 sw/source/core/access/textmarkuphelper.cxx          |    8 ++++++++
 3 files changed, 12 insertions(+)

New commits:
commit ab4cce65c069f69b2fecc302f583ddc08dad08de
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Nov 11 09:15:33 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Nov 11 12:13:55 2025 +0100

    tdf#127201 a11y extension mgr: Grab focus on mouse click
    
    When the list of extensions in the "Tools" -> "Extensions"
    dialog recevies a left mouse click, grab focus.
    
    This e.g. allows to navigate between the entries using
    the keyboard afterwards.
    
    Change-Id: I2702423a6bc8f2abcefc1730a5b37d8062f41eba
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193784
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx 
b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 17117b00bf0f..11f83f91f368 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -735,6 +735,8 @@ bool ExtensionBox::MouseButtonDown(const MouseEvent& rMEvt)
     if ( !rMEvt.IsLeft() )
         return false;
 
+    GrabFocus();
+
     if (rMEvt.IsMod1() && m_nActive >= 0)
         selectEntry(ExtensionBox::ENTRY_NOTFOUND);   // Selecting a not 
existing entry will deselect the current one
     else
commit dec956170fa3f968ae0fdb0eb68e3c337c86cdb0
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Nov 11 10:39:32 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Nov 11 12:13:42 2025 +0100

    nvda#19170 sw a11y: Only report invalid spelling if enabled
    
    In the same way that spelling errors are only visually
    indicated (using a red wavy underline) if automatic
    spell checking is enabled (which can be toggled via
    "Tools" -> "Automatic Spell Checking"), also only
    report invalid spelling via an accessible text attribute
    if that option is enabled.
    
    This fixes NVDA issue
    https://github.com/nvaccess/nvda/issues/19170
    ("Spelling errors reported in LibreOffice writer when "Automatic spell
    checking" disabled.").
    
    Change-Id: Iab34ef3f48fa66c82c0919d6374cf59dfca3c8bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193787
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/sw/source/core/access/accportions.hxx 
b/sw/source/core/access/accportions.hxx
index 37a1f013704b..299a37c2b018 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -109,6 +109,8 @@ public:
     /// get the text string, as presented by the layout
     const OUString& GetAccessibleString() const;
 
+    const SwViewOption* GetViewOptions() const { return m_pViewOptions; }
+
     /// get the start & end positions of the sentence
     void GetLineBoundary( css::i18n::Boundary& rBound,
                           sal_Int32 nPos ) const;
diff --git a/sw/source/core/access/textmarkuphelper.cxx 
b/sw/source/core/access/textmarkuphelper.cxx
index 910edc439b7c..66c9db2f395f 100644
--- a/sw/source/core/access/textmarkuphelper.cxx
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -110,6 +110,10 @@ std::unique_ptr<sw::WrongListIteratorCounter> 
SwTextMarkupHelper::getIterator(sa
 
 sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 
nTextMarkupType )
 {
+    if (nTextMarkupType == text::TextMarkupType::SPELLCHECK && 
mrPortionData.GetViewOptions()
+        && !mrPortionData.GetViewOptions()->IsOnlineSpell())
+        return 0;
+
     sal_Int32 nTextMarkupCount( 0 );
 
     std::unique_ptr<sw::WrongListIteratorCounter> pIter = 
getIterator(nTextMarkupType);
@@ -191,6 +195,10 @@ css::uno::Sequence< css::accessibility::TextSegment >
     // assumption:
     // value of <nCharIndex> is in range [0..length of accessible text)
 
+    if (nTextMarkupType == text::TextMarkupType::SPELLCHECK && 
mrPortionData.GetViewOptions()
+        && !mrPortionData.GetViewOptions()->IsOnlineSpell())
+        return {};
+
     const TextFrameIndex nCoreCharIndex = 
mrPortionData.GetCoreViewPosition(nCharIndex);
     // Handling of portions with core length == 0 at the beginning of the
     // paragraph - e.g. numbering portion.

Reply via email to