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

Arnaud Versini arnaud.versini at gmail.com
Tue Mar 13 09:01:22 UTC 2018


 accessibility/inc/extended/AccessibleGridControlTableCell.hxx    |    6 +++---
 accessibility/inc/extended/accessibleiconchoicectrlentry.hxx     |    2 +-
 accessibility/inc/standard/vclxaccessiblelistitem.hxx            |    4 ++--
 accessibility/inc/standard/vclxaccessiblemenuitem.hxx            |    8 ++++----
 accessibility/source/extended/AccessibleGridControlTableCell.cxx |    6 +++---
 accessibility/source/extended/accessibleiconchoicectrlentry.cxx  |    6 +++---
 accessibility/source/extended/accessiblelistboxentry.cxx         |    6 +++---
 accessibility/source/standard/vclxaccessiblelistitem.cxx         |    6 +++---
 accessibility/source/standard/vclxaccessiblemenuitem.cxx         |    6 +++---
 9 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit c409fd2e8829b00f027070f34a5b743019800c6e
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sat Mar 3 19:18:05 2018 +0100

    accessibility: simplify getSelection when possible
    
    Change-Id: I187716bca329da0aeae9fec9f48a45a9df386130
    Reviewed-on: https://gerrit.libreoffice.org/50688
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx
index a250fe18cb6a..6af2e021e5c0 100644
--- a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx
+++ b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx
@@ -60,15 +60,15 @@ namespace accessibility
                                 ,   css::accessibility::XAccessible
                                 >   AccessibleTextHelper_BASE;
     // implementation of a table cell of GridControl
-    class AccessibleGridControlTableCell    :public AccessibleGridControlCell
+    class AccessibleGridControlTableCell final   :public AccessibleGridControlCell
                                         ,public AccessibleTextHelper_BASE
                                         ,public ::comphelper::OCommonAccessibleText
     {
-    protected:
+    private:
         // OCommonAccessibleText
         virtual OUString                        implGetText() override;
         virtual css::lang::Locale               implGetLocale() override;
-        virtual void                            implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override;
+        virtual void                            implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override final;
         virtual tools::Rectangle implGetBoundingBox() override;
         virtual tools::Rectangle implGetBoundingBoxOnScreen() override;
 
diff --git a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx
index e256034d2952..05258185985a 100644
--- a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx
+++ b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx
@@ -92,7 +92,7 @@ namespace accessibility
         // OCommonAccessibleText
         virtual OUString                        implGetText() override;
         virtual css::lang::Locale               implGetLocale() override;
-        virtual void                            implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override;
+        virtual void                            implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override final;
 
     public:
         /** Ctor()
diff --git a/accessibility/inc/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/standard/vclxaccessiblelistitem.hxx
index 289162a1bbf9..02eb11641755 100644
--- a/accessibility/inc/standard/vclxaccessiblelistitem.hxx
+++ b/accessibility/inc/standard/vclxaccessiblelistitem.hxx
@@ -53,8 +53,8 @@ typedef ::cppu::WeakAggComponentImplHelper6< css::accessibility::XAccessible
 /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry
 */
 class VCLXAccessibleListItem final : public ::cppu::BaseMutex,
-                               public ::comphelper::OCommonAccessibleText,
-                               public VCLXAccessibleListItem_BASE
+                                     public ::comphelper::OCommonAccessibleText,
+                                     public VCLXAccessibleListItem_BASE
 {
 private:
     OUString                            m_sEntryText;
diff --git a/accessibility/inc/standard/vclxaccessiblemenuitem.hxx b/accessibility/inc/standard/vclxaccessiblemenuitem.hxx
index 806c28728d65..0b73bbcb950c 100644
--- a/accessibility/inc/standard/vclxaccessiblemenuitem.hxx
+++ b/accessibility/inc/standard/vclxaccessiblemenuitem.hxx
@@ -53,7 +53,7 @@ protected:
     // OCommonAccessibleText
     virtual OUString                     implGetText() final override;
     virtual css::lang::Locale            implGetLocale() override;
-    virtual void                         implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override;
+    virtual void                         implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override final;
 
 public:
     VCLXAccessibleMenuItem( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = nullptr );
@@ -79,9 +79,9 @@ public:
     virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) 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 OUString SAL_CALL getSelectedText() override final;
+    virtual sal_Int32 SAL_CALL getSelectionStart() override final;
+    virtual sal_Int32 SAL_CALL getSelectionEnd() override final;
     virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
     virtual OUString SAL_CALL getText() final override;
     virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
index 39d76363408e..db605e334e62 100644
--- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
@@ -253,19 +253,19 @@ namespace accessibility
     {
         SolarMutexGuard aSolarGuard;
 
-        return OCommonAccessibleText::getSelectedText(  );
+        return OUString();
     }
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getSelectionStart(  )
     {
         SolarMutexGuard aSolarGuard;
 
-        return OCommonAccessibleText::getSelectionStart(  );
+        return 0;
     }
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getSelectionEnd(  )
     {
         SolarMutexGuard aSolarGuard;
 
-        return OCommonAccessibleText::getSelectionEnd(  );
+        return 0;
     }
     sal_Bool SAL_CALL AccessibleGridControlTableCell::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
     {
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 54d1cbcb094f..1520a3db70eb 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -564,21 +564,21 @@ namespace accessibility
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getSelectedText(  );
+        return OUString();
     }
     sal_Int32 SAL_CALL AccessibleIconChoiceCtrlEntry::getSelectionStart(  )
     {
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getSelectionStart(  );
+        return 0;
     }
     sal_Int32 SAL_CALL AccessibleIconChoiceCtrlEntry::getSelectionEnd(  )
     {
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getSelectionEnd(  );
+        return 0;
     }
     sal_Bool SAL_CALL AccessibleIconChoiceCtrlEntry::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
     {
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index ab16ca5e6f87..9868b47c09a9 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -1026,21 +1026,21 @@ namespace accessibility
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getSelectedText(  );
+        return OUString();
     }
     sal_Int32 SAL_CALL AccessibleListBoxEntry::getSelectionStart(  )
     {
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getSelectionStart(  );
+        return 0;
     }
     sal_Int32 SAL_CALL AccessibleListBoxEntry::getSelectionEnd(  )
     {
         SolarMutexGuard aSolarGuard;
         ::osl::MutexGuard aGuard( m_aMutex );
         EnsureIsAlive();
-        return OCommonAccessibleText::getSelectionEnd(  );
+        return 0;
     }
     sal_Bool SAL_CALL AccessibleListBoxEntry::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
     {
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index fe298428ca7f..90f2ac4256fd 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -465,7 +465,7 @@ OUString SAL_CALL VCLXAccessibleListItem::getSelectedText()
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    return OCommonAccessibleText::getSelectedText();
+    return OUString();
 }
 
 sal_Int32 SAL_CALL VCLXAccessibleListItem::getSelectionStart()
@@ -473,7 +473,7 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getSelectionStart()
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    return OCommonAccessibleText::getSelectionStart();
+    return 0;
 }
 
 sal_Int32 SAL_CALL VCLXAccessibleListItem::getSelectionEnd()
@@ -481,7 +481,7 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getSelectionEnd()
     SolarMutexGuard aSolarGuard;
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    return OCommonAccessibleText::getSelectionEnd();
+    return 0;
 }
 
 sal_Bool SAL_CALL VCLXAccessibleListItem::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index 28020731f8f6..71c842774bde 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -281,7 +281,7 @@ OUString VCLXAccessibleMenuItem::getSelectedText()
 {
     OExternalLockGuard aGuard( this );
 
-    return OCommonAccessibleText::getSelectedText();
+    return OUString();
 }
 
 
@@ -289,7 +289,7 @@ sal_Int32 VCLXAccessibleMenuItem::getSelectionStart()
 {
     OExternalLockGuard aGuard( this );
 
-    return OCommonAccessibleText::getSelectionStart();
+    return 0;
 }
 
 
@@ -297,7 +297,7 @@ sal_Int32 VCLXAccessibleMenuItem::getSelectionEnd()
 {
     OExternalLockGuard aGuard( this );
 
-    return OCommonAccessibleText::getSelectionEnd();
+    return 0;
 }
 
 


More information about the Libreoffice-commits mailing list