Kaydet (Commit) 0e028d6c authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Norbert Thiebaud

OUString cleanups in editeng/accessibility

Change-Id: Ie280c48cabec4ef9e0c623f8966a65027b975fe4
Reviewed-on: https://gerrit.libreoffice.org/1468Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst de947575
...@@ -184,19 +184,17 @@ sal_Int32 SAL_CALL AccessibleComponentBase::getBackground (void) ...@@ -184,19 +184,17 @@ sal_Int32 SAL_CALL AccessibleComponentBase::getBackground (void)
::rtl::OUString SAL_CALL AccessibleComponentBase::getTitledBorderText (void) OUString SAL_CALL AccessibleComponentBase::getTitledBorderText (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
return ::rtl::OUString (""); return OUString();
} }
OUString SAL_CALL AccessibleComponentBase::getToolTipText (void)
::rtl::OUString SAL_CALL AccessibleComponentBase::getToolTipText (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
return ::rtl::OUString (""); return OUString();
} }
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <utility> #include <utility>
using namespace ::rtl;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::accessibility;
using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Reference;
...@@ -231,7 +230,7 @@ uno::Reference<XAccessible> SAL_CALL ...@@ -231,7 +230,7 @@ uno::Reference<XAccessible> SAL_CALL
{ {
ThrowIfDisposed (); ThrowIfDisposed ();
throw lang::IndexOutOfBoundsException ( throw lang::IndexOutOfBoundsException (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no child with index ") + nIndex), "no child with index " + OUString(nIndex),
NULL); NULL);
} }
...@@ -296,7 +295,7 @@ sal_Int16 SAL_CALL ...@@ -296,7 +295,7 @@ sal_Int16 SAL_CALL
::rtl::OUString SAL_CALL OUString SAL_CALL
AccessibleContextBase::getAccessibleDescription (void) AccessibleContextBase::getAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
...@@ -423,8 +422,7 @@ lang::Locale SAL_CALL ...@@ -423,8 +422,7 @@ lang::Locale SAL_CALL
//===== XAccessibleEventListener ============================================ //===== XAccessibleEventListener ============================================
void SAL_CALL void SAL_CALL AccessibleContextBase::addAccessibleEventListener (
AccessibleContextBase::addAccessibleEventListener (
const uno::Reference<XAccessibleEventListener >& rxListener) const uno::Reference<XAccessibleEventListener >& rxListener)
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
...@@ -447,8 +445,7 @@ void SAL_CALL ...@@ -447,8 +445,7 @@ void SAL_CALL
void SAL_CALL void SAL_CALL AccessibleContextBase::removeAccessibleEventListener (
AccessibleContextBase::removeAccessibleEventListener (
const uno::Reference<XAccessibleEventListener >& rxListener ) const uno::Reference<XAccessibleEventListener >& rxListener )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
...@@ -473,8 +470,7 @@ void SAL_CALL ...@@ -473,8 +470,7 @@ void SAL_CALL
//===== XServiceInfo ======================================================== //===== XServiceInfo ========================================================
::rtl::OUString SAL_CALL OUString SAL_CALL AccessibleContextBase::getImplementationName (void)
AccessibleContextBase::getImplementationName (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
ThrowIfDisposed (); ThrowIfDisposed ();
...@@ -491,7 +487,7 @@ sal_Bool SAL_CALL ...@@ -491,7 +487,7 @@ sal_Bool SAL_CALL
ThrowIfDisposed (); ThrowIfDisposed ();
// Iterate over all supported service names and return true if on of them // Iterate over all supported service names and return true if on of them
// matches the given name. // matches the given name.
uno::Sequence< ::rtl::OUString> aSupportedServices ( uno::Sequence< OUString > aSupportedServices (
getSupportedServiceNames ()); getSupportedServiceNames ());
for (int i=0; i<aSupportedServices.getLength(); i++) for (int i=0; i<aSupportedServices.getLength(); i++)
if (sServiceName == aSupportedServices[i]) if (sServiceName == aSupportedServices[i])
...@@ -502,16 +498,14 @@ sal_Bool SAL_CALL ...@@ -502,16 +498,14 @@ sal_Bool SAL_CALL
uno::Sequence< ::rtl::OUString> SAL_CALL uno::Sequence< OUString > SAL_CALL
AccessibleContextBase::getSupportedServiceNames (void) AccessibleContextBase::getSupportedServiceNames (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
ThrowIfDisposed (); ThrowIfDisposed ();
static const OUString sServiceNames[2] = { static const OUString sServiceNames[2] = {
OUString( "com.sun.star.accessibility.Accessible",
"com.sun.star.accessibility.Accessible"), "com.sun.star.accessibility.AccessibleContext"
OUString(
"com.sun.star.accessibility.AccessibleContext")
}; };
return uno::Sequence<OUString> (sServiceNames, 2); return uno::Sequence<OUString> (sServiceNames, 2);
} }
...@@ -564,7 +558,7 @@ void SAL_CALL AccessibleContextBase::disposing (void) ...@@ -564,7 +558,7 @@ void SAL_CALL AccessibleContextBase::disposing (void)
void AccessibleContextBase::SetAccessibleDescription ( void AccessibleContextBase::SetAccessibleDescription (
const ::rtl::OUString& rDescription, const OUString& rDescription,
StringOrigin eDescriptionOrigin) StringOrigin eDescriptionOrigin)
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
...@@ -589,7 +583,7 @@ void AccessibleContextBase::SetAccessibleDescription ( ...@@ -589,7 +583,7 @@ void AccessibleContextBase::SetAccessibleDescription (
void AccessibleContextBase::SetAccessibleName ( void AccessibleContextBase::SetAccessibleName (
const ::rtl::OUString& rName, const OUString& rName,
StringOrigin eNameOrigin) StringOrigin eNameOrigin)
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
...@@ -613,19 +607,19 @@ void AccessibleContextBase::SetAccessibleName ( ...@@ -613,19 +607,19 @@ void AccessibleContextBase::SetAccessibleName (
::rtl::OUString AccessibleContextBase::CreateAccessibleDescription (void) OUString AccessibleContextBase::CreateAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Empty Description")); return OUString("Empty Description");
} }
::rtl::OUString AccessibleContextBase::CreateAccessibleName (void) OUString AccessibleContextBase::CreateAccessibleName (void)
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Empty Name")); return OUString("Empty Name");
} }
...@@ -669,8 +663,7 @@ void AccessibleContextBase::ThrowIfDisposed (void) ...@@ -669,8 +663,7 @@ void AccessibleContextBase::ThrowIfDisposed (void)
if (rBHelper.bDisposed || rBHelper.bInDispose) if (rBHelper.bDisposed || rBHelper.bInDispose)
{ {
OSL_TRACE ("Calling disposed object. Throwing exception:"); OSL_TRACE ("Calling disposed object. Throwing exception:");
throw lang::DisposedException ( throw lang::DisposedException ("object has been already disposed",
OUString("object has been already disposed"),
static_cast<uno::XWeak*>(this)); static_cast<uno::XWeak*>(this));
} }
} }
......
...@@ -39,7 +39,7 @@ using namespace ::com::sun::star; ...@@ -39,7 +39,7 @@ using namespace ::com::sun::star;
namespace accessibility namespace accessibility
{ {
AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ) AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const OUString& rD )
: rTA( r ) : rTA( r )
{ {
pFld = p; pFld = p;
...@@ -72,9 +72,9 @@ namespace accessibility ...@@ -72,9 +72,9 @@ namespace accessibility
return bRet; return bRet;
} }
::rtl::OUString SAL_CALL AccessibleHyperlink::getAccessibleActionDescription( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) OUString SAL_CALL AccessibleHyperlink::getAccessibleActionDescription( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{ {
::rtl::OUString aDesc; OUString aDesc;
if ( isValid() && ( nIndex == 0 ) ) if ( isValid() && ( nIndex == 0 ) )
aDesc = aDescription; aDesc = aDescription;
......
...@@ -45,16 +45,16 @@ namespace accessibility ...@@ -45,16 +45,16 @@ namespace accessibility
SvxFieldItem* pFld; SvxFieldItem* pFld;
sal_uInt16 nPara, nRealIdx; // EE values sal_uInt16 nPara, nRealIdx; // EE values
sal_Int32 nStartIdx, nEndIdx; // translated values sal_Int32 nStartIdx, nEndIdx; // translated values
::rtl::OUString aDescription; OUString aDescription;
public: public:
AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ); AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const OUString& rD );
~AccessibleHyperlink(); ~AccessibleHyperlink();
// XAccessibleAction // XAccessibleAction
virtual sal_Int32 SAL_CALL getAccessibleActionCount() throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getAccessibleActionCount() throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
// XAccessibleHyperlink // XAccessibleHyperlink
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment