diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-06-16 17:28:55 +0200 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-06-16 17:40:50 +0200 |
commit | 9b2582064882bb1a1caea72fe7754b8872a16413 (patch) | |
tree | d561a9659b1051835f613af0fd8e46e630849a85 /accessibility/source | |
parent | 3dcfb9a892e528a386bb304e4e00d2fa34b1de25 (diff) |
fdo#74681: quick help may be used as accessible text
In case a tool box item does not contain some text to be used as the
accessible item name, use the quick help text.
Change-Id: I9caadb0989729787d8572f4007652bcab02b0412
Diffstat (limited to 'accessibility/source')
-rw-r--r-- | accessibility/source/standard/vclxaccessibletoolboxitem.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index 5f08a4f2c9c0..f0a257fc5f02 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -130,13 +130,17 @@ OUString VCLXAccessibleToolBoxItem::GetText( bool _bAsName ) sRet = m_pToolBox->GetItemText( m_nItemId ); if (sRet.isEmpty()) { - Window* pItemWindow = m_pToolBox->GetItemWindow( m_nItemId ); - if ( m_nRole == AccessibleRole::PANEL && pItemWindow && pItemWindow->GetAccessible().is() && - pItemWindow->GetAccessible()->getAccessibleContext().is() ) + sRet = m_pToolBox->GetQuickHelpText( m_nItemId ); + if (sRet.isEmpty()) { - OUString sWinText = pItemWindow->GetAccessible()->getAccessibleContext()->getAccessibleName(); - if (!sWinText.isEmpty()) - sRet = sWinText; + Window* pItemWindow = m_pToolBox->GetItemWindow( m_nItemId ); + if ( m_nRole == AccessibleRole::PANEL && pItemWindow && pItemWindow->GetAccessible().is() && + pItemWindow->GetAccessible()->getAccessibleContext().is() ) + { + OUString sWinText = pItemWindow->GetAccessible()->getAccessibleContext()->getAccessibleName(); + if (!sWinText.isEmpty()) + sRet = sWinText; + } } } |