[Libreoffice-commits] .: editeng/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 24 22:06:21 PST 2012


 editeng/source/accessibility/AccessibleParaManager.cxx    |    2 -
 editeng/source/accessibility/AccessibleSelectionBase.cxx  |    1 
 editeng/source/accessibility/AccessibleStaticTextBase.cxx |   25 ++++++--------
 3 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit cd546700457c61b209deae7a4b75b5932127c1d0
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Fri Dec 21 23:19:35 2012 -0200

    OUString cleanup in editeng/acessibility
    
    Change-Id: I5f8b73aab1e67a5ac071427574fa943a844fbf96
    Reviewed-on: https://gerrit.libreoffice.org/1469
    Reviewed-by: Thomas Arnhold <thomas at arnhold.org>
    Tested-by: Thomas Arnhold <thomas at arnhold.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index f215062..c3c24d6 100644
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
@@ -185,7 +185,7 @@ namespace accessibility
                 uno::Reference< XAccessible > xChild( static_cast< ::cppu::OWeakObject* > (pChild), uno::UNO_QUERY );
 
                 if( !xChild.is() )
-                    throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Child creation failed")), xFrontEnd);
+                    throw uno::RuntimeException("Child creation failed", xFrontEnd);
 
                 aChild = WeakPara::HardRefType( xChild, pChild );
 
diff --git a/editeng/source/accessibility/AccessibleSelectionBase.cxx b/editeng/source/accessibility/AccessibleSelectionBase.cxx
index 0a97ebd..4f9936e 100644
--- a/editeng/source/accessibility/AccessibleSelectionBase.cxx
+++ b/editeng/source/accessibility/AccessibleSelectionBase.cxx
@@ -20,7 +20,6 @@
 
 #include <editeng/AccessibleSelectionBase.hxx>
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index 6843dfe..7a5f57a 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -300,8 +300,7 @@ namespace accessibility
         DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL );
 
         if( !mpTextParagraph )
-            throw lang::DisposedException (
-                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("object has been already disposed")), mxThis );
+            throw lang::DisposedException ("object has been already disposed", mxThis );
 
         // TODO: Have a differnt method on AccessibleEditableTextPara
         // that does not care about state changes
@@ -353,7 +352,7 @@ namespace accessibility
         DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL );
 
         if( nFlatIndex < 0 )
-            throw lang::IndexOutOfBoundsException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds")),
+            throw lang::IndexOutOfBoundsException("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds",
                                                   mxThis);
         // gratuitously accepting larger indices here, AccessibleEditableTextPara will throw eventually
 
@@ -386,7 +385,7 @@ namespace accessibility
         }
 
         // not found? Out of bounds
-        throw lang::IndexOutOfBoundsException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds")),
+        throw lang::IndexOutOfBoundsException("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds",
                                               mxThis);
     }
 
@@ -643,7 +642,7 @@ namespace accessibility
         return mpImpl->GetParagraph( aPos.nPara ).getCharacter( aPos.nIndex );
     }
 
-    uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleStaticTextBase::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+    uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleStaticTextBase::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
     {
         SolarMutexGuard aGuard;
 
@@ -709,7 +708,7 @@ namespace accessibility
         return -1;
     }
 
-    ::rtl::OUString SAL_CALL AccessibleStaticTextBase::getSelectedText() throw (uno::RuntimeException)
+    OUString SAL_CALL AccessibleStaticTextBase::getSelectedText() throw (uno::RuntimeException)
     {
         SolarMutexGuard aGuard;
 
@@ -718,7 +717,7 @@ namespace accessibility
 
         // #104481# Return the empty string for 'no selection'
         if( nStart < 0 || nEnd < 0 )
-            return ::rtl::OUString();
+            return OUString();
 
         return getTextRange( nStart, nEnd );
     }
@@ -762,19 +761,19 @@ namespace accessibility
                                      aEndIndex.nPara, aEndIndex.nIndex );
     }
 
-    ::rtl::OUString SAL_CALL AccessibleStaticTextBase::getText() throw (uno::RuntimeException)
+    OUString SAL_CALL AccessibleStaticTextBase::getText() throw (uno::RuntimeException)
     {
         SolarMutexGuard aGuard;
 
         sal_Int32 i, nParas;
-        ::rtl::OUString aRes;
+        OUString aRes;
         for( i=0, nParas=mpImpl->GetParagraphCount(); i<nParas; ++i )
             aRes += mpImpl->GetParagraph(i).getText();
 
         return aRes;
     }
 
-    ::rtl::OUString SAL_CALL AccessibleStaticTextBase::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+    OUString SAL_CALL AccessibleStaticTextBase::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
     {
         SolarMutexGuard aGuard;
 
@@ -792,7 +791,7 @@ namespace accessibility
         else
         {
             sal_Int32 i( aStartIndex.nPara );
-            ::rtl::OUString aRes( mpImpl->GetParagraph(i).getTextRange( aStartIndex.nIndex,
+            OUString aRes( mpImpl->GetParagraph(i).getTextRange( aStartIndex.nIndex,
                                                                         mpImpl->GetParagraph(i).getCharacterCount()-1) );
             ++i;
 
@@ -931,7 +930,7 @@ namespace accessibility
     }
 
     // XAccessibleTextAttributes
-    uno::Sequence< beans::PropertyValue > AccessibleStaticTextBase::getDefaultAttributes( const uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (uno::RuntimeException)
+    uno::Sequence< beans::PropertyValue > AccessibleStaticTextBase::getDefaultAttributes( const uno::Sequence< OUString >& RequestedAttributes ) throw (uno::RuntimeException)
     {
         // get the intersection of the default attributes of all paragraphs
 
@@ -968,7 +967,7 @@ namespace accessibility
         return aDefAttrVec.getAsConstList();
     }
 
-    uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleStaticTextBase::getRunAttributes( sal_Int32 nIndex, const uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+    uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleStaticTextBase::getRunAttributes( sal_Int32 nIndex, const uno::Sequence< OUString >& RequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
     {
         // get those default attributes of the paragraph, which are not part
         // of the intersection of all paragraphs and add them to the run attributes


More information about the Libreoffice-commits mailing list