[Libreoffice-commits] core.git: accessibility/inc accessibility/source comphelper/source editeng/source include/comphelper

Arnaud Versini Arnaud.Versini at libreoffice.org
Mon Nov 13 06:09:37 UTC 2017


 accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx      |    4 -
 accessibility/inc/standard/vclxaccessiblemenuitem.hxx            |    8 +--
 accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx       |    3 +
 accessibility/inc/standard/vclxaccessibletabpage.hxx             |    3 +
 accessibility/inc/standard/vclxaccessibletoolboxitem.hxx         |    2 
 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx   |    2 
 accessibility/source/extended/AccessibleGridControlTableCell.cxx |    2 
 accessibility/source/extended/accessibleiconchoicectrlentry.cxx  |    7 +--
 accessibility/source/extended/accessiblelistboxentry.cxx         |    4 -
 accessibility/source/extended/textwindowaccessibility.cxx        |    8 +--
 accessibility/source/standard/vclxaccessiblelistitem.cxx         |   16 +++----
 accessibility/source/standard/vclxaccessiblemenuitem.cxx         |   14 ++----
 accessibility/source/standard/vclxaccessiblestatusbaritem.cxx    |   15 ++++++
 accessibility/source/standard/vclxaccessibletabpage.cxx          |   19 ++++++--
 accessibility/source/standard/vclxaccessibletextcomponent.cxx    |    2 
 accessibility/source/standard/vclxaccessibletoolboxitem.cxx      |   15 ++++++
 comphelper/source/misc/accessibletexthelper.cxx                  |   22 ----------
 editeng/source/accessibility/AccessibleEditableTextPara.cxx      |    2 
 include/comphelper/accessibletexthelper.hxx                      |    6 --
 19 files changed, 83 insertions(+), 71 deletions(-)

New commits:
commit 8d4a44d176fc7e80d6c5f13b1e73069967b9593b
Author: Arnaud Versini <Arnaud.Versini at libreoffice.org>
Date:   Sun Nov 12 14:23:52 2017 +0100

    Remove OCommonAccessibleText::getText and getCharacterCount.
    
    No need to create helper for those methods.
    
    Change-Id: I0505fe8141b1bad852b7f30aeb69628fb6a90071
    Reviewed-on: https://gerrit.libreoffice.org/44649
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx b/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx
index dcb4c9c5b01a..75cb5e0d739a 100644
--- a/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx
+++ b/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx
@@ -39,7 +39,7 @@ namespace accessibility
 
     protected:
         // OCommonAccessibleText
-        virtual OUString                        implGetText() override;
+        virtual OUString                        implGetText() final override;
         virtual css::lang::Locale               implGetLocale() override;
         virtual void                            implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override;
 
@@ -112,7 +112,7 @@ namespace accessibility
         virtual sal_Int32 SAL_CALL getSelectionStart() override;
         virtual sal_Int32 SAL_CALL getSelectionEnd() override;
         virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
-        virtual OUString SAL_CALL getText() override;
+        virtual OUString SAL_CALL getText() final override;
         virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
         virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
         virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
diff --git a/accessibility/inc/standard/vclxaccessiblemenuitem.hxx b/accessibility/inc/standard/vclxaccessiblemenuitem.hxx
index 5e54ecb595e3..41373b8e00c3 100644
--- a/accessibility/inc/standard/vclxaccessiblemenuitem.hxx
+++ b/accessibility/inc/standard/vclxaccessiblemenuitem.hxx
@@ -51,7 +51,7 @@ protected:
     virtual void            FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override;
 
     // OCommonAccessibleText
-    virtual OUString                     implGetText() override;
+    virtual OUString                     implGetText() final override;
     virtual css::lang::Locale            implGetLocale() override;
     virtual void                         implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override;
 
@@ -75,16 +75,16 @@ public:
     // XAccessibleText
     virtual sal_Int32 SAL_CALL getCaretPosition() override;
     virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) override;
-    virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) override;
+    virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) final override;
     virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
     virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) override;
-    virtual sal_Int32 SAL_CALL getCharacterCount() override;
+    virtual sal_Int32 SAL_CALL getCharacterCount() final override;
     virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) override;
     virtual OUString SAL_CALL getSelectedText() override;
     virtual sal_Int32 SAL_CALL getSelectionStart() override;
     virtual sal_Int32 SAL_CALL getSelectionEnd() override;
     virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
-    virtual OUString SAL_CALL getText() override;
+    virtual OUString SAL_CALL getText() final override;
     virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
     virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
     virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
diff --git a/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx
index 5fea0a071169..44c63d4c5d39 100644
--- a/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx
+++ b/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx
@@ -124,6 +124,9 @@ public:
     virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) override;
     virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
     virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
+    virtual OUString SAL_CALL getText() override;
+    virtual sal_Int32 SAL_CALL getCharacterCount() override;
+
 };
 
 #endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX
diff --git a/accessibility/inc/standard/vclxaccessibletabpage.hxx b/accessibility/inc/standard/vclxaccessibletabpage.hxx
index 3acc11a5fb3f..a116fab701c5 100644
--- a/accessibility/inc/standard/vclxaccessibletabpage.hxx
+++ b/accessibility/inc/standard/vclxaccessibletabpage.hxx
@@ -122,6 +122,8 @@ public:
     virtual OUString SAL_CALL getToolTipText(  ) override;
 
     // XAccessibleText
+    virtual OUString SAL_CALL getText() override;
+    virtual sal_Int32 SAL_CALL getCharacterCount() override;
     virtual sal_Int32 SAL_CALL getCaretPosition() override;
     virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) override;
     virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
@@ -129,6 +131,7 @@ public:
     virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) override;
     virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
     virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
+
 };
 
 #endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGE_HXX
diff --git a/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx
index 6a8836f13f94..a7f3e940d3a1 100644
--- a/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx
+++ b/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx
@@ -114,6 +114,8 @@ public:
     virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) override;
 
     // XAccessibleText
+    virtual OUString SAL_CALL getText() override;
+    virtual sal_Int32 SAL_CALL getCharacterCount() override;
     virtual sal_Int32 SAL_CALL getCaretPosition() override;
     virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) override;
     virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
index 0ac264bfbd6c..daff8477b051 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
@@ -246,7 +246,7 @@ namespace accessibility
     {
         SolarMethodGuard aGuard(getMutex());
 
-        return OCommonAccessibleText::getCharacterCount(  );
+        return implGetText().getLength();
     }
 
     OUString SAL_CALL AccessibleBrowseBoxTableCell::getSelectedText(  )
diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
index 71f378492c0b..42709cc5bb4a 100644
--- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
@@ -253,7 +253,7 @@ namespace accessibility
     {
         SolarMutexGuard aSolarGuard;
 
-        return OCommonAccessibleText::getCharacterCount(  );
+        return implGetText().getLength();
     }
 
     OUString SAL_CALL AccessibleGridControlTableCell::getSelectedText(  )
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 0c0c859c3741..3e9c1adf0b9a 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -422,7 +422,7 @@ namespace accessibility
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
 
-        if ( ( 0 > _nIndex ) || ( getCharacterCount() <= _nIndex ) )
+        if ( ( 0 > _nIndex ) || ( implGetText().getLength() <= _nIndex ) )
             throw IndexOutOfBoundsException();
 
         awt::Rectangle aBounds( 0, 0, 0, 0 );
@@ -470,8 +470,9 @@ namespace accessibility
     {
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
+        EnsureIsAlive();
 
-        OUString sText = getText();
+        OUString sText = implGetText();
         if  ( ( 0 > nStartIndex ) || ( sText.getLength() <= nStartIndex )
             || ( 0 > nEndIndex ) || ( sText.getLength() <= nEndIndex ) )
             throw IndexOutOfBoundsException();
@@ -555,7 +556,7 @@ namespace accessibility
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getCharacterCount(  );
+        return implGetText().getLength();;
     }
 
     OUString SAL_CALL AccessibleIconChoiceCtrlEntry::getSelectedText(  )
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 04de08a958cf..2d760b43b987 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -686,7 +686,7 @@ namespace accessibility
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
 
-        OUString sText = getText();
+        OUString sText = implGetText();
         if  ( ( 0 > nStartIndex ) || ( sText.getLength() <= nStartIndex )
             || ( 0 > nEndIndex ) || ( sText.getLength() <= nEndIndex ) )
             throw IndexOutOfBoundsException();
@@ -1019,7 +1019,7 @@ namespace accessibility
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getCharacterCount(  );
+        return implGetText().getLength();
     }
 
     OUString SAL_CALL AccessibleListBoxEntry::getSelectedText(  )
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 3a1d4860292d..ef69c9bc7045 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -328,7 +328,7 @@ Paragraph::getCharacterBounds(::sal_Int32 nIndex)
 ::sal_Int32 SAL_CALL Paragraph::getCharacterCount()
 {
     checkDisposed();
-    return OCommonAccessibleText::getCharacterCount();
+    return implGetText().getLength();;
 }
 
 // virtual
@@ -637,8 +637,7 @@ void Paragraph::implGetSelection(::sal_Int32 & rStartIndex,
 void Paragraph::implGetParagraphBoundary( css::i18n::Boundary& rBoundary,
                                               ::sal_Int32 nIndex )
 {
-    OUString sText( implGetText() );
-    ::sal_Int32 nLength = sText.getLength();
+    ::sal_Int32 nLength = implGetText().getLength();
 
     if ( implIsValidIndex( nIndex, nLength ) )
     {
@@ -656,8 +655,7 @@ void Paragraph::implGetParagraphBoundary( css::i18n::Boundary& rBoundary,
 void Paragraph::implGetLineBoundary( css::i18n::Boundary& rBoundary,
                                          ::sal_Int32 nIndex )
 {
-    OUString sText( implGetText() );
-    ::sal_Int32 nLength = sText.getLength();
+    ::sal_Int32 nLength = implGetText().getLength();
 
     if ( implIsValidIndex( nIndex, nLength ) || nIndex == nLength )
     {
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index 68be49dfe4ef..ae25d8c8d1b1 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -242,7 +242,7 @@ OUString SAL_CALL VCLXAccessibleListItem::getAccessibleName(  )
     ::osl::MutexGuard aGuard( m_aMutex );
 
     // entry text == accessible name
-    return implGetText();
+    return m_sEntryText;
 }
 
 Reference< XAccessibleRelationSet > SAL_CALL VCLXAccessibleListItem::getAccessibleRelationSet(  )
@@ -390,7 +390,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::setCaretPosition( sal_Int32 nIndex )
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nIndex, nIndex, m_sEntryText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
@@ -409,8 +409,7 @@ Sequence< PropertyValue > SAL_CALL VCLXAccessibleListItem::getCharacterAttribute
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    OUString sText( implGetText() );
-    if ( !implIsValidIndex( nIndex, sText.getLength() ) )
+    if ( !implIsValidIndex( nIndex, m_sEntryText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     return Sequence< PropertyValue >();
@@ -421,8 +420,7 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getCharacterBounds( sal_Int32 nI
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    OUString sText( implGetText() );
-    if ( !implIsValidIndex( nIndex, sText.getLength() ) )
+    if ( !implIsValidIndex( nIndex, m_sEntryText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     awt::Rectangle aBounds( 0, 0, 0, 0 );
@@ -443,7 +441,7 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getCharacterCount()
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    return OCommonAccessibleText::getCharacterCount();
+    return m_sEntryText.getLength();
 }
 
 sal_Int32 SAL_CALL VCLXAccessibleListItem::getIndexAtPoint( const awt::Point& aPoint )
@@ -495,7 +493,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::setSelection( sal_Int32 nStartIndex, s
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nStartIndex, nEndIndex, m_sEntryText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
@@ -506,7 +504,7 @@ OUString SAL_CALL VCLXAccessibleListItem::getText()
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    return implGetText();
+    return m_sEntryText;
 }
 
 OUString SAL_CALL VCLXAccessibleListItem::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index 2c6eb138f6eb..0de9911c10a1 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -203,7 +203,7 @@ sal_Bool VCLXAccessibleMenuItem::setCaretPosition( sal_Int32 nIndex )
 
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nIndex, nIndex, m_sItemText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
@@ -222,9 +222,7 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In
 {
     OExternalLockGuard aGuard( this );
 
-    OUString sText( implGetText() );
-
-    if ( !implIsValidIndex( nIndex, sText.getLength() ) )
+    if ( !implIsValidIndex( nIndex, m_sItemText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont();
@@ -239,7 +237,7 @@ awt::Rectangle VCLXAccessibleMenuItem::getCharacterBounds( sal_Int32 nIndex )
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidIndex( nIndex, implGetText().getLength() ) )
+    if ( !implIsValidIndex( nIndex, m_sItemText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     awt::Rectangle aBounds( 0, 0, 0, 0 );
@@ -260,7 +258,7 @@ sal_Int32 VCLXAccessibleMenuItem::getCharacterCount()
 {
     OExternalLockGuard aGuard( this );
 
-    return OCommonAccessibleText::getCharacterCount();
+    return m_sItemText.getLength();
 }
 
 
@@ -312,7 +310,7 @@ sal_Bool VCLXAccessibleMenuItem::setSelection( sal_Int32 nStartIndex, sal_Int32
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nStartIndex, nEndIndex, m_sItemText.getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
@@ -323,7 +321,7 @@ OUString VCLXAccessibleMenuItem::getText()
 {
     OExternalLockGuard aGuard( this );
 
-    return implGetText();
+    return m_sItemText;
 }
 
 
diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
index 7b0ce47daa84..6e5c285f21e4 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
@@ -439,6 +439,19 @@ OUString VCLXAccessibleStatusBarItem::getToolTipText(  )
 
 // XAccessibleText
 
+OUString VCLXAccessibleStatusBarItem::getText()
+{
+    OExternalLockGuard aGuard( this );
+
+    return GetItemText();
+}
+
+sal_Int32 VCLXAccessibleStatusBarItem::getCharacterCount()
+{
+    OExternalLockGuard aGuard( this );
+
+    return GetItemText().getLength();
+}
 
 sal_Int32 VCLXAccessibleStatusBarItem::getCaretPosition()
 {
@@ -452,7 +465,7 @@ sal_Bool VCLXAccessibleStatusBarItem::setCaretPosition( sal_Int32 nIndex )
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nIndex, nIndex, GetItemText().getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx
index 8fc4030209f8..25e15204b5f3 100644
--- a/accessibility/source/standard/vclxaccessibletabpage.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpage.cxx
@@ -517,6 +517,17 @@ OUString VCLXAccessibleTabPage::getToolTipText(  )
 
 // XAccessibleText
 
+OUString VCLXAccessibleTabPage::getText()
+{
+    OExternalLockGuard aGuard( this );
+
+    return GetPageText();
+}
+
+sal_Int32 VCLXAccessibleTabPage::getCharacterCount()
+{
+    return GetPageText().getLength();
+}
 
 sal_Int32 VCLXAccessibleTabPage::getCaretPosition()
 {
@@ -530,7 +541,7 @@ sal_Bool VCLXAccessibleTabPage::setCaretPosition( sal_Int32 nIndex )
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nIndex, nIndex, GetPageText().getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
@@ -542,7 +553,7 @@ Sequence< PropertyValue > VCLXAccessibleTabPage::getCharacterAttributes( sal_Int
     OExternalLockGuard aGuard( this );
 
     Sequence< PropertyValue > aValues;
-    OUString sText( implGetText() );
+    OUString sText( GetPageText() );
 
     if ( !implIsValidIndex( nIndex, sText.getLength() ) )
         throw IndexOutOfBoundsException();
@@ -564,7 +575,7 @@ awt::Rectangle VCLXAccessibleTabPage::getCharacterBounds( sal_Int32 nIndex )
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidIndex( nIndex, implGetText().getLength() ) )
+    if ( !implIsValidIndex( nIndex, GetPageText().getLength() ) )
         throw IndexOutOfBoundsException();
 
     awt::Rectangle aBounds( 0, 0, 0, 0 );
@@ -604,7 +615,7 @@ sal_Bool VCLXAccessibleTabPage::setSelection( sal_Int32 nStartIndex, sal_Int32 n
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nStartIndex, nEndIndex, GetPageText().getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
index 08a84c35db37..d222b2d20848 100644
--- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx
+++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
@@ -255,7 +255,7 @@ sal_Int32 VCLXAccessibleTextComponent::getCharacterCount()
 {
     OExternalLockGuard aGuard( this );
 
-    return OCommonAccessibleText::getCharacterCount();
+    return implGetText().getLength();;
 }
 
 
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 52a64acc05a2..cadf10c3f0fc 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -421,6 +421,19 @@ Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleToolBoxItem::getAccessib
 
 // XAccessibleText
 
+OUString VCLXAccessibleToolBoxItem::getText()
+{
+    OExternalLockGuard aGuard( this );
+
+    return GetText();
+}
+
+sal_Int32 VCLXAccessibleToolBoxItem::getCharacterCount()
+{
+    return GetText().getLength();
+}
+
+
 sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getCaretPosition()
 {
     return -1;
@@ -430,7 +443,7 @@ sal_Bool SAL_CALL VCLXAccessibleToolBoxItem::setCaretPosition( sal_Int32 nIndex
 {
     OExternalLockGuard aGuard( this );
 
-    if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
+    if ( !implIsValidRange( nIndex, nIndex, GetText().getLength() ) )
         throw IndexOutOfBoundsException();
 
     return false;
diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx
index 1dcf2f669eeb..38ad66679b1b 100644
--- a/comphelper/source/misc/accessibletexthelper.cxx
+++ b/comphelper/source/misc/accessibletexthelper.cxx
@@ -234,12 +234,6 @@ namespace comphelper
     }
 
 
-    sal_Int32 OCommonAccessibleText::getCharacterCount()
-    {
-        return implGetText().getLength();
-    }
-
-
     OUString OCommonAccessibleText::getSelectedText()
     {
         OUString sText;
@@ -774,14 +768,6 @@ namespace comphelper
     }
 
 
-    sal_Int32 OAccessibleTextHelper::getCharacterCount()
-    {
-        OExternalLockGuard aGuard( this );
-
-        return OCommonAccessibleText::getCharacterCount();
-    }
-
-
     OUString OAccessibleTextHelper::getSelectedText()
     {
         OExternalLockGuard aGuard( this );
@@ -806,14 +792,6 @@ namespace comphelper
     }
 
 
-    OUString OAccessibleTextHelper::getText()
-    {
-        OExternalLockGuard aGuard( this );
-
-        return implGetText();
-    }
-
-
     OUString OAccessibleTextHelper::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
     {
         OExternalLockGuard aGuard( this );
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index b7931eef21c4..a423246e4069 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1338,7 +1338,7 @@ namespace accessibility
         DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
                    "AccessibleEditableTextPara::getCharacterCount: index value overflow");
 
-        return OCommonAccessibleText::getCharacterCount();
+        return implGetText().getLength();
     }
 
     sal_Int32 SAL_CALL AccessibleEditableTextPara::getIndexAtPoint( const awt::Point& rPoint )
diff --git a/include/comphelper/accessibletexthelper.hxx b/include/comphelper/accessibletexthelper.hxx
index 5a9b07e0d7d1..95ca38cf5673 100644
--- a/include/comphelper/accessibletexthelper.hxx
+++ b/include/comphelper/accessibletexthelper.hxx
@@ -69,8 +69,6 @@ namespace comphelper
         */
         sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex );
         /// @throws css::uno::RuntimeException
-        sal_Int32 SAL_CALL getCharacterCount();
-        /// @throws css::uno::RuntimeException
         OUString SAL_CALL getSelectedText();
         /// @throws css::uno::RuntimeException
         sal_Int32 SAL_CALL getSelectionStart();
@@ -137,11 +135,9 @@ namespace comphelper
 
         // XAccessibleText
         virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) override;
-        virtual sal_Int32 SAL_CALL getCharacterCount() override;
         virtual OUString SAL_CALL getSelectedText() override;
         virtual sal_Int32 SAL_CALL getSelectionStart() override;
         virtual sal_Int32 SAL_CALL getSelectionEnd() override;
-        virtual OUString SAL_CALL getText() override;
         virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
         virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
         virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
@@ -161,11 +157,9 @@ namespace comphelper
 //  The following methods have a default implementation:
 
 //      getCharacter
-//      getCharacterCount
 //      getSelectedText
 //      getSelectionStart
 //      getSelectionEnd
-//      getText
 //      getTextRange
 //      getTextAtIndex
 //      getTextBeforeIndex


More information about the Libreoffice-commits mailing list