[PATCH] Remove RTL_CONSTASCII_(U)STRINGPARAM (toolkit)
Christina Roßmanith (via_Code_Review)
gerrit at gerrit.libreoffice.org
Sat Mar 16 02:53:02 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2772
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/72/2772/1
Remove RTL_CONSTASCII_(U)STRINGPARAM (toolkit)
Change-Id: I558a97be9ed883242455e6fd29267aed5d0a550c
---
M toolkit/source/controls/animatedimages.cxx
M toolkit/source/controls/controlmodelcontainerbase.cxx
M toolkit/source/controls/formattedcontrol.cxx
M toolkit/source/controls/geometrycontrolmodel.cxx
M toolkit/source/controls/grid/defaultgriddatamodel.cxx
M toolkit/source/controls/grid/gridcolumn.cxx
M toolkit/source/controls/grid/sortablegriddatamodel.cxx
M toolkit/source/controls/spinningprogress.cxx
M toolkit/source/controls/tabpagecontainer.cxx
9 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx
index 18231f4..bd91580 100644
--- a/toolkit/source/controls/animatedimages.cxx
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -74,7 +74,7 @@
//------------------------------------------------------------------------------------------------------------------
::rtl::OUString AnimatedImagesControl::GetComponentServiceName()
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AnimatedImages" ) );
+ return ::rtl::OUString( "AnimatedImages" );
}
//------------------------------------------------------------------------------------------------------------------
@@ -105,7 +105,7 @@
//------------------------------------------------------------------------------------------------------------------
::rtl::OUString SAL_CALL AnimatedImagesControl::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.AnimatedImagesControl" ) );
+ return ::rtl::OUString( "org.openoffice.comp.toolkit.AnimatedImagesControl" );
}
//------------------------------------------------------------------------------------------------------------------
@@ -279,15 +279,15 @@
//------------------------------------------------------------------------------------------------------------------
::rtl::OUString SAL_CALL AnimatedImagesControlModel::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.toolkit.AnimatedImagesControlModel"));
+ return ::rtl::OUString("org.openoffice.comp.toolkit.AnimatedImagesControlModel");
}
//------------------------------------------------------------------------------------------------------------------
- Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControlModel::getSupportedServiceNames() throw(RuntimeException)
+ Sequence< OUString > SAL_CALL AnimatedImagesControlModel::getSupportedServiceNames() throw(RuntimeException)
{
- Sequence< ::rtl::OUString > aServiceNames(2);
+ Sequence< OUString > aServiceNames(2);
aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
- aServiceNames[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel"));
+ aServiceNames[1] = "com.sun.star.awt.UnoControlModel";
return aServiceNames;
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index bc9b75b..1f087e9 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -73,7 +73,7 @@
using namespace ::com::sun::star::util;
using namespace toolkit;
-#define PROPERTY_RESOURCERESOLVER ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ))
+#define PROPERTY_RESOURCERESOLVER OUString( "ResourceResolver" )
//HELPER
::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
@@ -87,17 +87,17 @@
// ----------------------------------------------------------------------------
namespace
{
- static const Sequence< ::rtl::OUString >& lcl_getLanguageDependentProperties()
+ static const Sequence< OUString >& lcl_getLanguageDependentProperties()
{
- static Sequence< ::rtl::OUString > s_aLanguageDependentProperties;
+ static Sequence< OUString > s_aLanguageDependentProperties;
if ( s_aLanguageDependentProperties.getLength() == 0 )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( s_aLanguageDependentProperties.getLength() == 0 )
{
s_aLanguageDependentProperties.realloc( 2 );
- s_aLanguageDependentProperties[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) );
- s_aLanguageDependentProperties[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
+ s_aLanguageDependentProperties[0] = "HelpText";
+ s_aLanguageDependentProperties[1] = "Title";
// note: properties must be sorted
}
}
@@ -197,14 +197,14 @@
// ----------------------------------------------------------------------------
static const ::rtl::OUString& getTabIndexPropertyName( )
{
- static const ::rtl::OUString s_sTabIndexProperty( RTL_CONSTASCII_USTRINGPARAM( "TabIndex" ) );
+ static const ::rtl::OUString s_sTabIndexProperty( "TabIndex" );
return s_sTabIndexProperty;
}
// ----------------------------------------------------------------------------
static const ::rtl::OUString& getStepPropertyName( )
{
- static const ::rtl::OUString s_sStepProperty( RTL_CONSTASCII_USTRINGPARAM( "Step" ) );
+ static const ::rtl::OUString s_sStepProperty( "Step" );
return s_sStepProperty;
}
@@ -396,7 +396,7 @@
Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY );
if ( xAgg.is() )
{
- if ( xSI->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel"))) )
+ if ( xSI->supportsService(OUString("com.sun.star.awt.UnoControlModel")) )
{
// release 3 of the 4 references we have to the object
xAgg.clear();
@@ -992,8 +992,8 @@
#if OSL_DEBUG_LEVEL > 1
Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
::rtl::OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) )
- xModelProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString("Label") ) )
+ xModelProps->getPropertyValue( ::rtl::OUString("Label") ) >>= sLabel;
aCurrentGroupLabels.push_back( sLabel );
#endif
}
@@ -1025,8 +1025,8 @@
#if OSL_DEBUG_LEVEL > 1
Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
::rtl::OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) )
- xModelProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString("Label") ) )
+ xModelProps->getPropertyValue( ::rtl::OUString("Label") ) >>= sLabel;
aCurrentGroupLabels.push_back( sLabel );
#endif
continue;
@@ -1055,8 +1055,8 @@
#if OSL_DEBUG_LEVEL > 1
Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
::rtl::OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) )
- xModelProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString("Label") ) )
+ xModelProps->getPropertyValue( ::rtl::OUString("Label") ) >>= sLabel;
aCurrentGroupLabels.push_back( sLabel );
#endif
}
@@ -1420,10 +1420,10 @@
Reference< XPropertySet > xP( rxCtrl->getModel(), UNO_QUERY );
sal_Int32 nX = 0, nY = 0, nWidth = 0, nHeight = 0;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) ) ) >>= nX;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) ) ) >>= nY;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) >>= nWidth;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) >>= nHeight;
+ xP->getPropertyValue( ::rtl::OUString( "PositionX" ) ) >>= nX;
+ xP->getPropertyValue( ::rtl::OUString( "PositionY" ) ) >>= nY;
+ xP->getPropertyValue( ::rtl::OUString( "Width" ) ) >>= nWidth;
+ xP->getPropertyValue( ::rtl::OUString( "Height" ) ) >>= nHeight;
MapMode aMode( MAP_APPFONT );
OutputDevice*pOutDev = Application::GetDefaultDevice();
if ( pOutDev )
@@ -1679,10 +1679,10 @@
{
if( !isDesignMode() && !mbCreatingCompatiblePeer )
{
- ::rtl::OUString s1( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) );
- ::rtl::OUString s2( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) );
- ::rtl::OUString s3( RTL_CONSTASCII_USTRINGPARAM( "Width" ) );
- ::rtl::OUString s4( RTL_CONSTASCII_USTRINGPARAM( "Height" ) );
+ ::rtl::OUString s1( "PositionX" );
+ ::rtl::OUString s2( "PositionY" );
+ ::rtl::OUString s3( "Width" );
+ ::rtl::OUString s4( "Height" );
sal_Int32 nLen = rEvents.getLength();
for( sal_Int32 i = 0; i < nLen; i++ )
@@ -1730,10 +1730,10 @@
{
Sequence< ::rtl::OUString > aNames( 4 );
::rtl::OUString* pNames = aNames.getArray();
- *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionX") );
- *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionY") );
- *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Width"));
- *pNames++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Height"));
+ *pNames++ = "PositionX";
+ *pNames++ = "PositionY";
+ *pNames++ = "Width";
+ *pNames++ = "Height";
xProps->addPropertiesChangeListener( aNames, this );
}
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index bb7bd38..51af6be 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -362,9 +362,9 @@
}
throw IllegalArgumentException(
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to convert the given value for the property "))
+ ( OUString("Unable to convert the given value for the property ")
+= GetPropertyName((sal_uInt16)nPropId) )
- += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (double, integer, or string expected).")),
+ += OUString(" (double, integer, or string expected)."),
static_cast< XPropertySet* >(this),
1);
}
@@ -427,9 +427,9 @@
}
// -------------------------------------------------------------------
- ::rtl::OUString UnoFormattedFieldControl::GetComponentServiceName()
+ OUString UnoFormattedFieldControl::GetComponentServiceName()
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormattedField"));
+ return OUString("FormattedField");
}
// -------------------------------------------------------------------
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index 33923a5..98ae06f 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -40,15 +40,15 @@
#define GCM_PROPERTY_ID_TAG 8
#define GCM_PROPERTY_ID_RESOURCERESOLVER 9
-#define GCM_PROPERTY_POS_X ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionX"))
-#define GCM_PROPERTY_POS_Y ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionY"))
-#define GCM_PROPERTY_WIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Width"))
-#define GCM_PROPERTY_HEIGHT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Height"))
-#define GCM_PROPERTY_NAME ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))
-#define GCM_PROPERTY_TABINDEX ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabIndex"))
-#define GCM_PROPERTY_STEP ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Step"))
-#define GCM_PROPERTY_TAG ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tag"))
-#define GCM_PROPERTY_RESOURCERESOLVER ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceResolver"))
+#define GCM_PROPERTY_POS_X ::rtl::OUString("PositionX")
+#define GCM_PROPERTY_POS_Y ::rtl::OUString("PositionY")
+#define GCM_PROPERTY_WIDTH ::rtl::OUString("Width")
+#define GCM_PROPERTY_HEIGHT ::rtl::OUString("Height")
+#define GCM_PROPERTY_NAME ::rtl::OUString("Name")
+#define GCM_PROPERTY_TABINDEX ::rtl::OUString("TabIndex")
+#define GCM_PROPERTY_STEP ::rtl::OUString("Step")
+#define GCM_PROPERTY_TAG ::rtl::OUString("Tag")
+#define GCM_PROPERTY_RESOURCERESOLVER ::rtl::OUString("ResourceResolver")
#define DEFAULT_ATTRIBS() PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
index 17df373..b17ab96 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
@@ -425,7 +425,7 @@
//------------------------------------------------------------------------------------------------------------------
::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException)
{
- static const ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) );
+ static const ::rtl::OUString aImplName( "toolkit.DefaultGridDataModel" );
return aImplName;
}
diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx
index 5df063d..a0b26c9 100644
--- a/toolkit/source/controls/grid/gridcolumn.cxx
+++ b/toolkit/source/controls/grid/gridcolumn.cxx
@@ -261,7 +261,7 @@
//------------------------------------------------------------------------------------------------------------------
::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException)
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.GridColumn" ) );
+ return ::rtl::OUString( "org.openoffice.comp.toolkit.GridColumn" );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
index 787e771..f7fbc12 100644
--- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx
+++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
@@ -830,9 +830,9 @@
}
//------------------------------------------------------------------------------------------------------------------
- ::rtl::OUString SAL_CALL SortableGridDataModel::getImplementationName( ) throw (RuntimeException)
+ OUString SAL_CALL SortableGridDataModel::getImplementationName( ) throw (RuntimeException)
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.SortableGridDataModel" ) );
+ return OUString( "org.openoffice.comp.toolkit.SortableGridDataModel" );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx
index ed57513..59a4fe4 100644
--- a/toolkit/source/controls/spinningprogress.cxx
+++ b/toolkit/source/controls/spinningprogress.cxx
@@ -110,18 +110,18 @@
}
//------------------------------------------------------------------------------------------------------------------
- ::rtl::OUString SAL_CALL SpinningProgressControlModel::getImplementationName( ) throw(RuntimeException)
+ OUString SAL_CALL SpinningProgressControlModel::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.toolkit.SpinningProgressControlModel"));
+ return OUString("org.openoffice.comp.toolkit.SpinningProgressControlModel");
}
//------------------------------------------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames() throw(RuntimeException)
{
- Sequence< ::rtl::OUString > aServiceNames(3);
+ Sequence< OUString > aServiceNames(3);
aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
aServiceNames[1] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
- aServiceNames[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel"));
+ aServiceNames[2] = "com.sun.star.awt.UnoControlModel";
return aServiceNames;
}
diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx
index 071685c..44d1def 100644
--- a/toolkit/source/controls/tabpagecontainer.cxx
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -104,7 +104,7 @@
{
Reference< XPropertySet > const xParentDelegator( i_parentModel, UNO_QUERY_THROW );
Reference< XPropertySetInfo > const xPSI( xParentDelegator->getPropertySetInfo() );
- bool const isGeometryControlModel = xPSI.is() && xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) ) );
+ bool const isGeometryControlModel = xPSI.is() && xPSI->hasPropertyByName( OUString( "PositionX" ) );
Reference< XInterface > xInstance;
if ( isGeometryControlModel )
@@ -168,7 +168,7 @@
maContainerListeners.elementInserted( aEvent );
}
else
- throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )),
+ throw IllegalArgumentException( OUString( WRONG_TYPE_EXCEPTION ),
(OWeakObject *)this, 2 );
}
// -----------------------------------------------------------------------------
@@ -228,7 +228,7 @@
OUString UnoControlTabPageContainer::GetComponentServiceName()
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM("TabPageContainer"));
+ return OUString("TabPageContainer");
}
void SAL_CALL UnoControlTabPageContainer::dispose( ) throw(RuntimeException)
--
To view, visit https://gerrit.libreoffice.org/2772
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I558a97be9ed883242455e6fd29267aed5d0a550c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith at web.de>
More information about the LibreOffice
mailing list