summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-07-12 21:16:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-13 08:20:40 +0000
commitcba5a9223a7e8141dc171c3e2e992ce1c0df8330 (patch)
treed6fb552946346d47bbe727e74db9944c74b1261c
parentea95a97c1ddcc6ad4f90ac2397ffb8c7b77b490f (diff)
no need to create temporary OUString for comparison
Change-Id: I0a321e8ffbe379588a288084ec2e74e1a8c296b2 Reviewed-on: https://gerrit.libreoffice.org/27171 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--framework/inc/macros/registration.hxx2
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx6
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx10
-rw-r--r--xmlsecurity/source/xmlsec/nss/xsec_nss.cxx12
-rw-r--r--xmlsecurity/source/xmlsec/xsec_xmlsec.cxx6
9 files changed, 24 insertions, 24 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 56c7a59e795b..214cf3caafbd 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1485,7 +1485,7 @@ void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDraw
uno::Reference< beans::XPropertySet > xEmbeddedProps( xEmbeddedObjects->getByName( aNames[nN] ), uno::UNO_QUERY );
if( xEmbeddedProps.is() )
{
- static OUString aChartCLSID = OUString( SvGlobalName( SO3_SCH_CLASSID ).GetHexName());
+ static OUString aChartCLSID = SvGlobalName( SO3_SCH_CLASSID ).GetHexName();
OUString aCLSID;
xEmbeddedProps->getPropertyValue( "CLSID" ) >>= aCLSID;
if( aCLSID.equals(aChartCLSID) )
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 088f4c51694d..24bcca662a08 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -4435,7 +4435,7 @@ void ToolbarSaveInData::LoadToolbar(
// If custom label not set retrieve it from the command
// to info service
- if ( aLabel.equals( OUString() ) )
+ if ( aLabel.isEmpty() )
{
uno::Sequence< beans::PropertyValue > aPropSeq;
if ( a >>= aPropSeq )
diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx
index 927b437b7b74..0e072e27a9d9 100644
--- a/framework/inc/macros/registration.hxx
+++ b/framework/inc/macros/registration.hxx
@@ -41,7 +41,7 @@ ________________________________________________________________________________
#define IFFACTORY( CLASS ) \
/* If searched name found ... */ \
/* You can't add some statements before follow line ... Here can be an ELSE-statement! */ \
- if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) ) \
+ if ( CLASS::impl_getStaticImplementationName().equalsAscii( pImplementationName ) ) \
{ \
/* ... then create right factory for this service. */ \
/* xFactory and xServiceManager are local variables of method which use this macro. */ \
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 262bd66d7582..33f0aa966183 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -69,7 +69,7 @@ void FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString
const char** pPtr;
for ( pPtr = InternalPixelFilterNameList; *pPtr && !bIsInternalFilter; pPtr++ )
{
- if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) )
+ if ( sFilterName.equalsIgnoreAsciiCaseAscii( *pPtr ) )
{
bIsInternalFilter = true;
bIsPixelFormat = true;
@@ -77,14 +77,14 @@ void FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString
}
for ( pPtr = InternalVectorFilterNameList; *pPtr && !bIsInternalFilter; pPtr++ )
{
- if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) )
+ if ( sFilterName.equalsIgnoreAsciiCaseAscii( *pPtr ) )
bIsInternalFilter = true;
}
if ( !bIsInternalFilter )
{
for ( pPtr = ExternalPixelFilterNameList; *pPtr && !bIsPixelFormat; pPtr++ )
{
- if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) )
+ if ( sFilterName.equalsIgnoreAsciiCaseAscii( *pPtr ) )
bIsPixelFormat = true;
}
sExternalFilterName = sFilterName;
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 652e59ce46dc..5548b6725031 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1031,7 +1031,7 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
mbHasSeriesLabels( false ),
mbHasCategoryLabels( false ),
mbRowSourceColumns( true ),
- msCLSID( OUString( SvGlobalName( SO3_SCH_CLASSID ).GetHexName()))
+ msCLSID( SvGlobalName( SO3_SCH_CLASSID ).GetHexName() )
{
msTableName = "local-table";
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index a6d461029926..504c4b90f03d 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1115,11 +1115,11 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
if(xPropSet->getPropertyValue("CLSID") >>= sCLSID)
{
if (sCLSID.equals(mrExport.GetChartExport()->getChartCLSID()) ||
- sCLSID.equals(OUString( SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName())))
+ sCLSID.equals( SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName() ))
{
eShapeType = XmlShapeTypeDrawChartShape;
}
- else if (sCLSID.equals(OUString( SvGlobalName( SO3_SC_CLASSID ).GetHexName())))
+ else if (sCLSID.equals( SvGlobalName( SO3_SC_CLASSID ).GetHexName() ))
{
eShapeType = XmlShapeTypeDrawSheetShape;
}
@@ -1165,7 +1165,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
OUString sCLSID;
if(xPropSet->getPropertyValue("CLSID") >>= sCLSID)
{
- if( sCLSID.equals(OUString( SvGlobalName( SO3_SC_CLASSID ).GetHexName())) )
+ if( sCLSID.equals( SvGlobalName( SO3_SC_CLASSID ).GetHexName() ) )
{
eShapeType = XmlShapeTypePresSheetShape;
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
index ece35be08141..47dac9444828 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
@@ -45,15 +45,15 @@ void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* p
Reference< XSingleServiceFactory > xFactory ;
if( pImplName != NULL && pServiceManager != NULL ) {
- if( XMLSignature_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
+ if( XMLSignature_MSCryptImpl::impl_getImplementationName().equalsAscii( pImplName ) ) {
xFactory = XMLSignature_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
- } else if( XMLSecurityContext_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
+ } else if( XMLSecurityContext_MSCryptImpl::impl_getImplementationName().equalsAscii( pImplName ) ) {
xFactory = XMLSecurityContext_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
- } else if( SecurityEnvironment_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
+ } else if( SecurityEnvironment_MSCryptImpl::impl_getImplementationName().equalsAscii( pImplName ) ) {
xFactory = SecurityEnvironment_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
- } else if( XMLEncryption_MSCryptImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
+ } else if( XMLEncryption_MSCryptImpl::impl_getImplementationName().equalsAscii( pImplName ) ) {
xFactory = XMLEncryption_MSCryptImpl::impl_createFactory( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
- } else if( SEInitializer_MSCryptImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) ) {
+ } else if( SEInitializer_MSCryptImpl_getImplementationName().equalsAscii( pImplName ) ) {
xFactory.set( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
index 3a46eaa2426b..33ab82c265f4 100644
--- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
@@ -48,31 +48,31 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
if( pImplName != nullptr && pServiceManager != nullptr )
{
#ifdef XMLSEC_CRYPTO_NSS
- if( SEInitializer_NssImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ if( SEInitializer_NssImpl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory.set( createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
SEInitializer_NssImpl_createInstance, SEInitializer_NssImpl_getSupportedServiceNames() ) );
}
- else if( XMLSignature_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ else if( XMLSignature_NssImpl::impl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = XMLSignature_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
}
- else if( XMLSecurityContext_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ else if( XMLSecurityContext_NssImpl::impl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = XMLSecurityContext_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
}
- else if( SecurityEnvironment_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ else if( SecurityEnvironment_NssImpl::impl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = SecurityEnvironment_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
}
- else if( XMLEncryption_NssImpl::impl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ else if( XMLEncryption_NssImpl::impl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = XMLEncryption_NssImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
}
#else
- if( ONSSInitializer_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ if( ONSSInitializer_getImplementationName().equalsAscii( pImplName ) )
{
xFactory.set( createSingleFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
index 8f0777c86343..3b973e16b7b7 100644
--- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
+++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
@@ -40,21 +40,21 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_xmlsec_component_getFactory( const sal_
Reference< XInterface > xFactory ;
if( pImplName != nullptr ) {
- if( XMLElementWrapper_XmlSecImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ if( XMLElementWrapper_XmlSecImpl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = cppu::createSingleComponentFactory(
XMLElementWrapper_XmlSecImpl_createInstance,
OUString::createFromAscii( pImplName ),
XMLElementWrapper_XmlSecImpl_getSupportedServiceNames() );
}
- else if( XMLDocumentWrapper_XmlSecImpl_getImplementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ else if( XMLDocumentWrapper_XmlSecImpl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = cppu::createSingleComponentFactory(
XMLDocumentWrapper_XmlSecImpl_createInstance,
OUString::createFromAscii( pImplName ),
XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames() );
}
- else if( xml_security::serial_number_adapter::implementationName().equals( OUString::createFromAscii( pImplName ) ) )
+ else if( xml_security::serial_number_adapter::implementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleComponentFactory(
xml_security::serial_number_adapter::create,