From d1075aab19737bc168439ba64b60cd8fae8fd3bb Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Fri, 15 Mar 2013 22:10:37 +0100 Subject: Remove RTL_CONSTASCII_(U)STRING in toolkit Change-Id: I62c89716d93c4dfb51a38b78f795a532e2b1d0b7 Reviewed-on: https://gerrit.libreoffice.org/2770 Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba --- toolkit/inc/toolkit/helper/macros.hxx | 10 +++++----- toolkit/source/awt/animatedimagespeer.cxx | 4 ++-- toolkit/source/awt/asynccallback.cxx | 12 +++++------- toolkit/source/awt/vclxmenu.cxx | 22 +++++++++++----------- 4 files changed, 23 insertions(+), 25 deletions(-) (limited to 'toolkit') diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx index 7f56227cbe54..184678ebdf80 100644 --- a/toolkit/inc/toolkit/helper/macros.hxx +++ b/toolkit/inc/toolkit/helper/macros.hxx @@ -274,23 +274,23 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa // ------------------------------------------------------------------------------------- #define DECLIMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \ - ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." #ImplName )); } \ - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ + OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return OUString("stardiv.Toolkit." #ImplName ); } \ + ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ { \ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = BaseClass::getSupportedServiceNames( ); \ aNames.realloc( aNames.getLength() + 1 ); \ - aNames[ aNames.getLength() - 1 ] = ::rtl::OUString::createFromAscii( ServiceName ); \ + aNames[ aNames.getLength() - 1 ] = OUString::createFromAscii( ServiceName ); \ return aNames; \ } \ // ------------------------------------------------------------------------------------- #define DECLIMPL_SERVICEINFO( ImplName, ServiceName ) \ - ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." #ImplName )); } \ + OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { return OUString("stardiv.Toolkit." #ImplName ); } \ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ { \ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames( 1 ); \ - aNames[ 0 ] = ::rtl::OUString::createFromAscii( ServiceName ); \ + aNames[ 0 ] = OUString::createFromAscii( ServiceName ); \ return aNames; \ } \ DECLIMPL_SUPPORTS_SERVICE( ) diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index ae41fad13ae5..46fa9db98b4a 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -113,7 +113,7 @@ namespace toolkit INetURLObject aURL( i_imageURL ); if ( aURL.GetProtocol() != INET_PROT_PRIV_SOFFICE ) { - OSL_VERIFY( aURL.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hicontrast" ) ), false, 0 ) ); + OSL_VERIFY( aURL.insertName( OUString( "hicontrast" ), false, 0 ) ); return aURL.GetMainURL( INetURLObject::NO_DECODE ); } // the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the @@ -158,7 +158,7 @@ namespace toolkit if ( i_graphic.is() ) { const Reference< XPropertySet > xGraphicProps( i_graphic, UNO_QUERY_THROW ); - OSL_VERIFY( xGraphicProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SizePixel" ) ) ) >>= aSizePixel ); + OSL_VERIFY( xGraphicProps->getPropertyValue( OUString( "SizePixel" ) ) >>= aSizePixel ); } } catch( const Exception& ) diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx index 4c5a981f078a..939757ff7373 100644 --- a/toolkit/source/awt/asynccallback.cxx +++ b/toolkit/source/awt/asynccallback.cxx @@ -142,16 +142,14 @@ IMPL_STATIC_LINK_NOINSTANCE( AsyncCallback, Notify_Impl, CallbackData*, pCallbac // component helper namespace namespace comp_AsyncCallback { -::rtl::OUString SAL_CALL _getImplementationName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.awt.comp.AsyncCallback")); +OUString SAL_CALL _getImplementationName() { + return OUString("com.sun.star.awt.comp.AsyncCallback"); } -css::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames() +css::uno::Sequence< OUString > SAL_CALL _getSupportedServiceNames() { - css::uno::Sequence< ::rtl::OUString > s(1); - s[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.awt.AsyncCallback")); + css::uno::Sequence< OUString > s(1); + s[0] = "com.sun.star.awt.AsyncCallback"; return s; } diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 01a6895eefb4..154c265619d4 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -39,18 +39,18 @@ #define THROW_MENUITEM_NOT_FOUND( Func, nItemId ) \ if ( MENU_ITEM_NOTFOUND == mpMenu->GetItemPos( nItemId ) ) \ throw ::com::sun::star::container::NoSuchElementException( \ - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Func ) ) \ - += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": There is no menu item with " ) ) \ - += ::rtl::OUString::valueOf( sal_Int32( nItemId ) ) \ - += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " as identifier" ) ), \ + OUString( Func ) \ + += OUString( ": There is no menu item with " ) \ + += OUString::valueOf( sal_Int32( nItemId ) ) \ + += OUString( " as identifier" ), \ *this \ ); #define THROW_MENUPOS_NOT_FOUND( Func, nPos ) \ if ( MENU_ITEM_NOTFOUND == sal_uInt16( nPos ) ) \ throw ::com::sun::star::container::NoSuchElementException( \ - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Func ) ) \ - += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": There is no menu item at position " ) ) \ - += ::rtl::OUString::valueOf( sal_Int32( nPos ) ), \ + OUString( Func ) \ + += OUString( ": There is no menu item at position " ) \ + += OUString::valueOf( sal_Int32( nPos ) ), \ *this \ ); #else @@ -203,18 +203,18 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent ) // ::com::sun::star::lang::XServiceInfo -::rtl::OUString SAL_CALL VCLXMenu::getImplementationName( ) +OUString SAL_CALL VCLXMenu::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { ::osl::ResettableGuard < ::osl::Mutex > aGuard( GetMutex() ); const sal_Bool bIsPopupMenu = IsPopupMenu(); aGuard.clear(); - ::rtl::OUString implName( RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." ) ); + OUString implName( "stardiv.Toolkit." ); if ( bIsPopupMenu ) - implName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VCLXPopupMenu" ) ); + implName += "VCLXPopupMenu"; else - implName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VCLXMenuBar" ) ); + implName += "VCLXMenuBar"; return implName; } -- cgit