summaryrefslogtreecommitdiff
path: root/accessibility/source/standard
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-26 08:27:06 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-26 12:04:01 +0100
commitc7e210919ac940ca7734ec6dd9b2ecb76ab3d4d4 (patch)
tree7a72943dd8616e8bcbcf4ce3759d8c4f6cbd8895 /accessibility/source/standard
parentc9cae91d0a37051e1009730ceadf3a1ca3f239ee (diff)
a11y: Create VCLXAccessibleEdit::isComboBoxChild helper
It will be reused in another method in an upcoming commit. Change-Id: Ie6b4559e268d9340b5b13844c906232c6ff38a6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177312 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'accessibility/source/standard')
-rw-r--r--accessibility/source/standard/vclxaccessibleedit.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx
index f7ce36f3187e..bc528a5c2690 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -168,15 +168,7 @@ bool VCLXAccessibleEdit::PreferFullTextInTextChangedEvent()
// for a combobox subedit, the Orca screen reader announces the new/added text
// so always send the whole old and new text and not just
// the changed characters, so the whole entry text gets announced
- Reference<XAccessible> xParent = getAccessibleParent();
- if (xParent.is())
- {
- Reference<XAccessibleContext> xParentContext = xParent->getAccessibleContext();
- if (xParentContext.is() && xParentContext->getAccessibleRole() == AccessibleRole::COMBO_BOX)
- return true;
- }
-
- return false;
+ return isComboBoxChild();
}
// XServiceInfo
@@ -616,6 +608,18 @@ sal_Bool VCLXAccessibleEdit::setText( const OUString& sText )
return bReturn;
}
+bool VCLXAccessibleEdit::isComboBoxChild()
+{
+ Reference<XAccessible> xParent = getAccessibleParent();
+ if (xParent.is())
+ {
+ Reference<XAccessibleContext> xParentContext = xParent->getAccessibleContext();
+ if (xParentContext.is() && xParentContext->getAccessibleRole() == AccessibleRole::COMBO_BOX)
+ return true;
+ }
+ return false;
+}
+
bool VCLXAccessibleEdit::isEditable()
{
VclPtr<Edit> pEdit = GetAs<Edit>();