summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-02-26 14:58:33 +0100
committerJulien Nabet <serval2412@yahoo.fr>2012-02-26 14:58:33 +0100
commit67d01fb5d4010a2486e47cdd9f55f38a2da162f2 (patch)
treec09e96419606c85bd2c6175a8a5d7a159dff063d
parent67c953e5a311bd2ab176b51341659b323e4f0ab4 (diff)
Avoid temporary rtl::OUString
-rw-r--r--sal/test/unloading/unloadTest.cxx2
-rw-r--r--sax/source/expatwrap/sax_expat.cxx3
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx3
-rw-r--r--sdext/source/presenter/PresenterClock.cxx6
-rw-r--r--starmath/source/smdetect.cxx22
-rw-r--r--stoc/source/inspect/introspection.cxx10
-rw-r--r--sw/source/ui/uno/swdetect.cxx22
7 files changed, 33 insertions, 35 deletions
diff --git a/sal/test/unloading/unloadTest.cxx b/sal/test/unloading/unloadTest.cxx
index 866a649ec588..355fa47079e0 100644
--- a/sal/test/unloading/unloadTest.cxx
+++ b/sal/test/unloading/unloadTest.cxx
@@ -560,7 +560,7 @@ sal_Bool test8()
for( sal_Int32 i=0; i<seqTypes.getLength(); i++)
{
OUString name= seqTypes[i].getTypeName();
- if( name == OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XUnloadingPreference")))
+ if( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.uno.XUnloadingPreference")))
b_ifaceSupported= sal_True;
}
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 677b7f59c8a2..487de5d6df34 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -1041,8 +1041,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL expwrap_component_getFactory(
OUString aImplementationName = OUString::createFromAscii( pImplName );
- if (aImplementationName ==
- OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ) )
+ if (aImplementationName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( IMPLEMENTATION_NAME ) ) )
{
xRet = createSingleFactory( xSMgr, aImplementationName,
SaxExpatParser_CreateInstance,
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 5ae050a8a43c..3bfe71880924 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -744,8 +744,7 @@ void SAL_CALL AccessibleDocumentViewBase::disposing (void)
if (xInfo.is())
{
OUString sFirstService = xInfo->getSupportedServiceNames()[0];
- if (sFirstService == OUString (
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView")))
+ if (sFirstService.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView")))
{
sDescription = OUString (RTL_CONSTASCII_USTRINGPARAM("Draw Document"));
}
diff --git a/sdext/source/presenter/PresenterClock.cxx b/sdext/source/presenter/PresenterClock.cxx
index f176b8bc3085..e52f2e0cd86f 100644
--- a/sdext/source/presenter/PresenterClock.cxx
+++ b/sdext/source/presenter/PresenterClock.cxx
@@ -1038,11 +1038,11 @@ void AnalogBitmapPainter::LoadBitmap (
if (rValues.size() == 3)
{
BitmapDescriptor* pDescriptor = NULL;
- if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("Face")))
+ if (rsKey.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Face")))
pDescriptor = &maFace;
- else if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("HourHand")))
+ else if (rsKey.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HourHand")))
pDescriptor = &maHourHand;
- else if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("MinuteHand")))
+ else if (rsKey.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MinuteHand")))
pDescriptor = &maMinuteHand;
if (pDescriptor == NULL)
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 63b0314309cd..617d8a0784e7 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -119,42 +119,42 @@ SmFilterDetect::~SmFilterDetect()
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
// extract properties
- if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) )
+ if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aURL = sTemp;
}
- else if( !aURL.Len() && lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")) )
+ else if( !aURL.Len() && lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aURL = sTemp;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aTypeName = sTemp;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FilterName")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aPreselectedFilterName = sTemp;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream")) )
nIndexOfInputStream = nProperty;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ReadOnly")) )
nIndexOfReadOnlyFlag = nProperty;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UCBContent")) )
nIndexOfContent = nProperty;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("AsTemplate")) )
{
lDescriptor[nProperty].Value >>= bOpenAsTemplate;
nIndexOfTemplateFlag = nProperty;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InteractionHandler")) )
lDescriptor[nProperty].Value >>= xInteraction;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("RepairPackage")) )
lDescriptor[nProperty].Value >>= bRepairPackage;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocumentTitle")) )
nIndexOfDocumentTitle = nProperty;
}
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index aad88991bfaf..2d4d13bbdf31 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -2355,7 +2355,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
}
else if( rxMethod_i->getDeclaringClass()->equals( mxAggregationClass ) )
{
- if( aMethName == OUString( RTL_CONSTASCII_USTRINGPARAM("setDelegator")) )
+ if( aMethName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("setDelegator")) )
{
rMethodConcept_i |= MethodConcept::DANGEROUS;
continue;
@@ -2388,7 +2388,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// Ist es eine get-Methode?
aStartStr = aMethName.copy( 0, 3 );
- if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("get")) )
+ if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("get")) )
{
// Namen der potentiellen Property
aPropName = aMethName.copy( 3 );
@@ -2461,7 +2461,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
OUString aMethName2 = rxMethod_k->getName();
OUString aStartStr2 = aMethName2.copy( 0, 3 );
// ACHTUNG: Wegen SDL-Bug NICHT != bei OUString verwenden !!!
- if( !( aStartStr2 == OUString( RTL_CONSTASCII_USTRINGPARAM("set")) ) )
+ if( !( aStartStr2.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) ) )
continue;
// Ist es denn der gleiche Name?
@@ -2509,7 +2509,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
}
// Ist es eine addListener-Methode?
- else if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("add")) )
+ else if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("add")) )
{
OUString aListenerStr( RTL_CONSTASCII_USTRINGPARAM("Listener" ) );
@@ -2598,7 +2598,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
// Ist es eine set-Methode ohne zugehoerige get-Methode?
aStartStr = aMethName.copy( 0, 3 );
- if( aStartStr == OUString( RTL_CONSTASCII_USTRINGPARAM("set")) )
+ if( aStartStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("set")) )
{
// Namen der potentiellen Property
aPropName = aMethName.copy( 3 );
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index bcba59fe8340..0dda7601a289 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -121,45 +121,45 @@ SwFilterDetect::~SwFilterDetect()
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
// extract properties
- if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) )
+ if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aURL = sTemp;
}
- else if( !aURL.Len() && lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")) )
+ else if( !aURL.Len() && lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aURL = sTemp;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aTypeName = sTemp;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FilterName")) )
{
lDescriptor[nProperty].Value >>= sTemp;
aPreselectedFilterName = sTemp;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream")) )
nIndexOfInputStream = nProperty;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ReadOnly")) )
nIndexOfReadOnlyFlag = nProperty;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UCBContent")) )
nIndexOfContent = nProperty;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("AsTemplate")) )
{
lDescriptor[nProperty].Value >>= bOpenAsTemplate;
nIndexOfTemplateFlag = nProperty;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InteractionHandler")) )
{
lDescriptor[nProperty].Value >>= xInteraction;
nIndexOfInteractionHandler = nProperty;
}
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("RepairPackage")) )
lDescriptor[nProperty].Value >>= bRepairPackage;
- else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) )
+ else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocumentTitle")) )
nIndexOfDocumentTitle = nProperty;
}