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)
::rtl::OUString SAL_CALL AccessibleComponentBase::getTitledBorderText (void)
OUString SAL_CALL AccessibleComponentBase::getTitledBorderText (void)
throw (::com::sun::star::uno::RuntimeException)
{
return ::rtl::OUString ("");
return OUString();
}
::rtl::OUString SAL_CALL AccessibleComponentBase::getToolTipText (void)
OUString SAL_CALL AccessibleComponentBase::getToolTipText (void)
throw (::com::sun::star::uno::RuntimeException)
{
return ::rtl::OUString ("");
return OUString();
}
......
......@@ -33,7 +33,6 @@
#include <utility>
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::com::sun::star::uno::Reference;
......@@ -231,7 +230,7 @@ uno::Reference<XAccessible> SAL_CALL
{
ThrowIfDisposed ();
throw lang::IndexOutOfBoundsException (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no child with index ") + nIndex),
"no child with index " + OUString(nIndex),
NULL);
}
......@@ -296,7 +295,7 @@ sal_Int16 SAL_CALL
::rtl::OUString SAL_CALL
OUString SAL_CALL
AccessibleContextBase::getAccessibleDescription (void)
throw (::com::sun::star::uno::RuntimeException)
{
......@@ -423,8 +422,7 @@ lang::Locale SAL_CALL
//===== XAccessibleEventListener ============================================
void SAL_CALL
AccessibleContextBase::addAccessibleEventListener (
void SAL_CALL AccessibleContextBase::addAccessibleEventListener (
const uno::Reference<XAccessibleEventListener >& rxListener)
throw (uno::RuntimeException)
{
......@@ -447,8 +445,7 @@ void SAL_CALL
void SAL_CALL
AccessibleContextBase::removeAccessibleEventListener (
void SAL_CALL AccessibleContextBase::removeAccessibleEventListener (
const uno::Reference<XAccessibleEventListener >& rxListener )
throw (uno::RuntimeException)
{
......@@ -473,8 +470,7 @@ void SAL_CALL
//===== XServiceInfo ========================================================
::rtl::OUString SAL_CALL
AccessibleContextBase::getImplementationName (void)
OUString SAL_CALL AccessibleContextBase::getImplementationName (void)
throw (::com::sun::star::uno::RuntimeException)
{
ThrowIfDisposed ();
......@@ -491,7 +487,7 @@ sal_Bool SAL_CALL
ThrowIfDisposed ();
// Iterate over all supported service names and return true if on of them
// matches the given name.
uno::Sequence< ::rtl::OUString> aSupportedServices (
uno::Sequence< OUString > aSupportedServices (
getSupportedServiceNames ());
for (int i=0; i<aSupportedServices.getLength(); i++)
if (sServiceName == aSupportedServices[i])
......@@ -502,16 +498,14 @@ sal_Bool SAL_CALL
uno::Sequence< ::rtl::OUString> SAL_CALL
uno::Sequence< OUString > SAL_CALL
AccessibleContextBase::getSupportedServiceNames (void)
throw (::com::sun::star::uno::RuntimeException)
{
ThrowIfDisposed ();
static const OUString sServiceNames[2] = {
OUString(
"com.sun.star.accessibility.Accessible"),
OUString(
"com.sun.star.accessibility.AccessibleContext")
"com.sun.star.accessibility.Accessible",
"com.sun.star.accessibility.AccessibleContext"
};
return uno::Sequence<OUString> (sServiceNames, 2);
}
......@@ -564,7 +558,7 @@ void SAL_CALL AccessibleContextBase::disposing (void)
void AccessibleContextBase::SetAccessibleDescription (
const ::rtl::OUString& rDescription,
const OUString& rDescription,
StringOrigin eDescriptionOrigin)
throw (uno::RuntimeException)
{
......@@ -589,7 +583,7 @@ void AccessibleContextBase::SetAccessibleDescription (
void AccessibleContextBase::SetAccessibleName (
const ::rtl::OUString& rName,
const OUString& rName,
StringOrigin eNameOrigin)
throw (uno::RuntimeException)
{
......@@ -613,19 +607,19 @@ void AccessibleContextBase::SetAccessibleName (
::rtl::OUString AccessibleContextBase::CreateAccessibleDescription (void)
OUString AccessibleContextBase::CreateAccessibleDescription (void)
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)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Empty Name"));
return OUString("Empty Name");
}
......@@ -669,8 +663,7 @@ void AccessibleContextBase::ThrowIfDisposed (void)
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
OSL_TRACE ("Calling disposed object. Throwing exception:");
throw lang::DisposedException (
OUString("object has been already disposed"),
throw lang::DisposedException ("object has been already disposed",
static_cast<uno::XWeak*>(this));
}
}
......
......@@ -39,7 +39,7 @@ using namespace ::com::sun::star;
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 )
{
pFld = p;
......@@ -72,9 +72,9 @@ namespace accessibility
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 ) )
aDesc = aDescription;
......
......@@ -45,16 +45,16 @@ namespace accessibility
SvxFieldItem* pFld;
sal_uInt16 nPara, nRealIdx; // EE values
sal_Int32 nStartIdx, nEndIdx; // translated values
::rtl::OUString aDescription;
OUString aDescription;
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();
// XAccessibleAction
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 ::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);
// 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