Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2770
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/70/2770/1
Remove RTL_CONSTASCII_(U)STRING in toolkit
Change-Id: I62c89716d93c4dfb51a38b78f795a532e2b1d0b7
---
M toolkit/inc/toolkit/helper/macros.hxx
M toolkit/source/awt/animatedimagespeer.cxx
M toolkit/source/awt/asynccallback.cxx
M toolkit/source/awt/vclxmenu.cxx
4 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx
index 7f56227..184678e 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -274,23 +274,23 @@
// -------------------------------------------------------------------------------------
#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 ae41fad..46fa9db 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -113,7 +113,7 @@
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 @@
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 4c5a981..939757f 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -142,16 +142,14 @@
// 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 01a6895..154c265 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 @@
// ::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;
}
--
To view, visit https://gerrit.libreoffice.org/2770
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62c89716d93c4dfb51a38b78f795a532e2b1d0b7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith@web.de>
Context
- [PATCH] Remove RTL_CONSTASCII_(U)STRING in toolkit · via Code Review
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.