summaryrefslogtreecommitdiff
path: root/accessibility/source
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2022-08-11 03:56:31 +1000
committerTomaž Vajngerl <quikee@gmail.com>2022-08-25 13:05:25 +0200
commit9481156090d0b455c6b35eaadd363f47c24b8086 (patch)
tree5aca78c0cdc95ef1f56c5e8b64ea0b02d98ebc97 /accessibility/source
parent9ca3c6794ca1969f453ddaa66c4e02ac8c695cc6 (diff)
vcl: rename GetNonMnemonicString() and make it standalone function
Renamed GetNonMnemonicString() to removeMnemonicFromString() Change-Id: I272714f97bb6d9174360631c18c4fd9bb485698e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138103 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'accessibility/source')
-rw-r--r--accessibility/source/standard/accessiblemenuitemcomponent.cxx5
-rw-r--r--accessibility/source/standard/vclxaccessibleedit.cxx3
-rw-r--r--accessibility/source/standard/vclxaccessibletabpage.cxx3
-rw-r--r--accessibility/source/standard/vclxaccessibletextcomponent.cxx5
4 files changed, 10 insertions, 6 deletions
diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
index b599a66a7282..074cd0bdc531 100644
--- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx
+++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
@@ -31,6 +31,7 @@
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/menu.hxx>
+#include <vcl/mnemonic.hxx>
#include <vcl/settings.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -179,7 +180,7 @@ OUString OAccessibleMenuItemComponent::GetAccessibleName()
sName = m_pParent->GetAccessibleName( nItemId );
if ( sName.isEmpty() )
sName = m_pParent->GetItemText( nItemId );
- sName = OutputDevice::GetNonMnemonicString( sName );
+ sName = removeMnemonicFromString( sName );
#if defined(_WIN32)
if ( m_pParent->GetAccelKey( nItemId ).GetName().getLength() )
sName += "\t" + m_pParent->GetAccelKey(nItemId).GetName();
@@ -205,7 +206,7 @@ OUString OAccessibleMenuItemComponent::GetItemText()
{
OUString sText;
if ( m_pParent )
- sText = OutputDevice::GetNonMnemonicString( m_pParent->GetItemText( m_pParent->GetItemId( m_nItemPos ) ) );
+ sText = removeMnemonicFromString( m_pParent->GetItemText( m_pParent->GetItemId( m_nItemPos ) ) );
return sText;
}
diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx
index 4dc19a3e12bf..dc2a39acbf56 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -31,6 +31,7 @@
#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
+#include <vcl/mnemonic.hxx>
#include <vcl/settings.hxx>
#include <vcl/toolkit/edit.hxx>
#include <vcl/toolkit/vclmedit.hxx>
@@ -127,7 +128,7 @@ OUString VCLXAccessibleEdit::implGetText()
VclPtr< Edit > pEdit = GetAs< Edit >();
if ( pEdit )
{
- aText = OutputDevice::GetNonMnemonicString( pEdit->GetText() );
+ aText = removeMnemonicFromString( pEdit->GetText() );
if ( implGetAccessibleRole() == AccessibleRole::PASSWORD_TEXT )
{
diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx
index 8c483bf733c8..9786b2f761fd 100644
--- a/accessibility/source/standard/vclxaccessibletabpage.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpage.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
+#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
#include <vcl/unohelp2.hxx>
#include <vcl/tabctrl.hxx>
@@ -132,7 +133,7 @@ OUString VCLXAccessibleTabPage::GetPageText()
{
OUString sText;
if ( m_pTabControl )
- sText = OutputDevice::GetNonMnemonicString( m_pTabControl->GetPageText( m_nPageId ) );
+ sText = removeMnemonicFromString( m_pTabControl->GetPageText( m_nPageId ) );
return sText;
}
diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
index c5dba0df978a..63974960b694 100644
--- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx
+++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <vcl/window.hxx>
+#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
#include <vcl/unohelp2.hxx>
#include <vcl/ctrl.hxx>
@@ -47,7 +48,7 @@ VCLXAccessibleTextComponent::VCLXAccessibleTextComponent( VCLXWindow* pVCLXWindo
{
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
- m_sText = OutputDevice::GetNonMnemonicString( pWindow->GetText() );
+ m_sText = removeMnemonicFromString( pWindow->GetText() );
}
@@ -86,7 +87,7 @@ OUString VCLXAccessibleTextComponent::implGetText()
OUString aText;
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
- aText = OutputDevice::GetNonMnemonicString( pWindow->GetText() );
+ aText = removeMnemonicFromString( pWindow->GetText() );
return aText;
}