diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-21 15:52:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-22 08:07:19 +0200 |
commit | 73342dbb82ba074d01962359dac50fb2aa36cbeb (patch) | |
tree | addab0397681725810b42ad55ab15be3fdb4c236 | |
parent | 071c3f3e93c4c00cf57ce3c382325cd717fed511 (diff) |
remove unnecessary RTL_CONSTASCII_STRINGPARAM
A final pass through the code, converting code to use the new
OUString and OString methods that can detect string literals.
Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
49 files changed, 138 insertions, 196 deletions
diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index 8f2f027136f9..9d06b6aebb29 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -140,8 +140,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartFrameLoader,CHART_FRAMELOADER_SERVICE_IMPLEMENT if( aIt != aMediaDescriptor.end()) { OUString aURL( (*aIt).second.get< OUString >()); - if( aURL.matchAsciiL( - RTL_CONSTASCII_STRINGPARAM( "private:factory/schart" ))) + if( aURL.startsWith( "private:factory/schart" ) ) { // create new file uno::Reference< frame::XLoadable > xLoadable( xModel, uno::UNO_QUERY_THROW ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index f501aa956d75..16da8f870b67 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2862,7 +2862,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService SdrModel* pModel = ( m_pDrawModelWrapper ? &m_pDrawModelWrapper->getSdrModel() : NULL ); if ( pModel ) { - if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DashTable" ) ) == 0 ) + if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) == 0 ) { if ( !m_xDashTable.is() ) { @@ -2870,7 +2870,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService } return m_xDashTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.GradientTable" ) ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) == 0 ) { if ( !m_xGradientTable.is() ) { @@ -2878,7 +2878,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService } return m_xGradientTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.HatchTable" ) ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) == 0 ) { if ( !m_xHatchTable.is() ) { @@ -2886,7 +2886,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService } return m_xHatchTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.BitmapTable" ) ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) == 0 ) { if ( !m_xBitmapTable.is() ) { @@ -2894,7 +2894,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService } return m_xBitmapTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.TransparencyGradientTable" ) ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) == 0 ) { if ( !m_xTransGradientTable.is() ) { @@ -2902,7 +2902,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService } return m_xTransGradientTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.MarkerTable" ) ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) == 0 ) { if ( !m_xMarkerTable.is() ) { diff --git a/configmgr/source/type.cxx b/configmgr/source/type.cxx index 73b0b0913856..b257607eef4a 100644 --- a/configmgr/source/type.cxx +++ b/configmgr/source/type.cxx @@ -137,8 +137,7 @@ Type getDynamicType(css::uno::Any const & value) { OUString name(value.getValueType().getTypeName()); if ( name == "[]byte" ) { return TYPE_HEXBINARY; - } else if (name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("[]boolean"))) + } else if (name == "[]boolean") { return TYPE_BOOLEAN_LIST; } else if ( name == "[]short" ) @@ -150,16 +149,13 @@ Type getDynamicType(css::uno::Any const & value) { } else if ( name == "[]hyper" ) { return TYPE_LONG_LIST; - } else if (name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("[]double"))) + } else if (name == "[]double") { return TYPE_DOUBLE_LIST; - } else if (name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("[]string"))) + } else if (name == "[]string") { return TYPE_STRING_LIST; - } else if (name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("[][]byte"))) + } else if (name == "[][]byte") { return TYPE_HEXBINARY_LIST; } diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index 4583503f8b7a..01e4aee0640d 100644 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -60,8 +60,8 @@ void OCatalog::refreshTables() if ( aElement.IsValid() ) { OUString sTypeName = aElement.get_Type(); - if ( !sTypeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("SYSTEM TABLE")) - && !sTypeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("ACCESS TABLE")) ) + if ( !sTypeName.equalsIgnoreAsciiCase("SYSTEM TABLE") + && !sTypeName.equalsIgnoreAsciiCase("ACCESS TABLE") ) aVector.push_back(aElement.get_Name()); } } diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index f6f929549985..afb296565898 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -1070,12 +1070,6 @@ void bufferKey2TableConstraint( } -static bool equalsIgnoreCase( const OString & str, const char *str2, int length2 ) -{ - return 0 == rtl_str_compareIgnoreAsciiCase_WithLength( - str.pData->buffer, str.pData->length, str2, length2 ); -} - void extractNameValuePairsFromInsert( String2StringMap & map, const OString & lastQuery ) { OStringVector vec; @@ -1084,15 +1078,15 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la int nSize = vec.size(); // printf( "1 %d\n", nSize ); if( nSize > 6 && - equalsIgnoreCase( vec[0] , RTL_CONSTASCII_STRINGPARAM( "insert" ) ) && - equalsIgnoreCase( vec[1] , RTL_CONSTASCII_STRINGPARAM( "into" ) ) ) + vec[0].equalsIgnoreAsciiCase( "insert" ) && + vec[1].equalsIgnoreAsciiCase( "into" ) ) { int n = 2; // printf( "1a\n" ); // extract table name OString tableName; - if( equalsIgnoreCase( vec[n+1], RTL_CONSTASCII_STRINGPARAM( "." ) ) ) + if( vec[n+1].equalsIgnoreAsciiCase( "." ) ) { tableName = vec[n]; tableName += vec[n+1]; @@ -1106,15 +1100,15 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la OStringVector names; n ++; - if( equalsIgnoreCase( vec[n], RTL_CONSTASCII_STRINGPARAM( "(" ) ) ) + if( vec[n].equalsIgnoreAsciiCase( "(" ) ) { // printf( "2\n" ); // extract names n++; - while( nSize > n && ! equalsIgnoreCase(vec[n] , RTL_CONSTASCII_STRINGPARAM( ")" ) ) ) + while( nSize > n && ! vec[n].equalsIgnoreAsciiCase( ")" ) ) { names.push_back( vec[n] ); - if( nSize > n+1 && equalsIgnoreCase( vec[n+1] , RTL_CONSTASCII_STRINGPARAM( "," ) ) ) + if( nSize > n+1 && vec[n+1].equalsIgnoreAsciiCase( "," ) ) { n ++; } @@ -1123,15 +1117,15 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const OString & la n++; // now read the values - if( nSize > n +1 && equalsIgnoreCase( vec[n], RTL_CONSTASCII_STRINGPARAM("VALUES") ) && - equalsIgnoreCase(vec[n+1], RTL_CONSTASCII_STRINGPARAM( "(" ) ) ) + if( nSize > n +1 && vec[n].equalsIgnoreAsciiCase("VALUES") && + vec[n+1].equalsIgnoreAsciiCase( "(" ) ) { n +=2; // printf( "3\n" ); for ( OStringVector::size_type i = 0 ; i < names.size() && nSize > n ; i ++ ) { map[names[i]] = vec[n]; - if( nSize > n+1 && equalsIgnoreCase( vec[n+1] , RTL_CONSTASCII_STRINGPARAM(",") ) ) + if( nSize > n+1 && vec[n+1].equalsIgnoreAsciiCase(",") ) { n ++; } diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index a7ec8884a635..466e4fb2abe0 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -88,8 +88,8 @@ static Any isCurrency( const OUString & typeName ) // static sal_Bool isAutoIncrement8( const OUString & typeName ) // { -// return typeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("serial8")) || -// typeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bigserial")); +// return typeName.equalsIgnoreAsciiCase("serial8") || +// typeName.equalsIgnoreAsciiCase("bigserial"); // } static Any isAutoIncrement( const OUString & defaultValue ) diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 13699a6d7d13..6ed87334a977 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -912,10 +912,8 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const OUSt { nId = text::textfield::Type::EXTENDED_FILE; } - else if (aFieldType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("docinfo.Title") ) || - aFieldType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) ) + else if (aFieldType == "docinfo.Title" || + aFieldType == "DocInfo.Title" ) { nId = text::textfield::Type::DOCINFO_TITLE; } diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index de686b38ea9d..eed1c2cd596e 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -226,15 +226,13 @@ SvxSimpleUnoModel::~SvxSimpleUnoModel() uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( const OUString& aServiceSpecifier ) throw(uno::Exception, uno::RuntimeException) { - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.NumberingRules" ) ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.NumberingRules" ) ) { return uno::Reference< uno::XInterface >( SvxCreateNumRule(), uno::UNO_QUERY ); } - if ( (0 == aServiceSpecifier.reverseCompareToAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.textfield.DateTime"))) - || (0 == aServiceSpecifier.reverseCompareToAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime"))) + if ( (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.textfield.DateTime" )) + || (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.TextField.DateTime" )) ) { return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::DATE ); diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 13f2aec7ddac..0df49f784035 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -744,7 +744,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) m_bActive = sal_True; OUString aCommand( m_aMenuItemCommand ); - if (m_aMenuItemCommand.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(UNO_COMMAND))) + if (m_aMenuItemCommand.matchIgnoreAsciiCase(UNO_COMMAND)) { // Remove protocol part from command so we can use an easier comparision method aCommand = aCommand.copy(RTL_CONSTASCII_LENGTH(UNO_COMMAND)); diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx index 2303bebf89e4..e14eba7a0ade 100644 --- a/framework/source/uifactory/uicontrollerfactory.cxx +++ b/framework/source/uifactory/uicontrollerfactory.cxx @@ -49,9 +49,7 @@ UIControllerFactory::UIControllerFactory( , m_pConfigAccess() { rtl::OUStringBuffer aBuffer; - aBuffer.appendAscii( - RTL_CONSTASCII_STRINGPARAM( - "/org.openoffice.Office.UI.Controller/Registered/" ) ); + aBuffer.append( "/org.openoffice.Office.UI.Controller/Registered/" ); aBuffer.append( rConfigurationNode ); m_pConfigAccess = new ConfigurationAccess_ControllerFactory( m_xContext, aBuffer.makeStringAndClear() ); m_pConfigAccess->acquire(); diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 2e1043ac49e0..73d7812b804f 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -624,7 +624,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const if (!strFrom.isEmpty() && str.isEmpty()) incErrorStr("replaceFrom=\"%s\" replaceTo=\"\" is empty replacement.", strFrom); // Locale data generator inserts FFFF for LangID, we need to adapt that. - if (str.endsWithIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "-FFFF]"))) + if (str.endsWithIgnoreAsciiCase( "-FFFF]")) incErrorStr("replaceTo=\"%s\" needs FFFF to be adapted to the real LangID value.", str); of.writeParameter("replaceTo", str, mnSection); // Remember the replaceTo value for "[CURRENCY]" to check format codes. @@ -804,7 +804,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const if (sTheCurrencyReplaceTo.isEmpty()) { OUString aCode( n->getValue()); - if (aCode.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "[CURRENCY]")) >= 0) + if (aCode.indexOf( "[CURRENCY]" ) >= 0) incErrorInt( "[CURRENCY] replaceTo not found for formatindex=\"%d\".", formatindex); } break; diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 0b9535e98116..79903707009b 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -553,7 +553,7 @@ OUString getApplicationClassPath() OUStringBuffer buf; sal_Int32 index = 0; - char szClassPathSep[] = {SAL_PATHSEPARATOR,0}; + const char szClassPathSep[] = {SAL_PATHSEPARATOR,0}; do { OUString token( sParams.getToken( 0, ' ', index ).trim() ); @@ -566,8 +566,7 @@ OUString getApplicationClassPath() if (rc == osl_File_E_None && !systemPathElement.isEmpty()) { if (buf.getLength() > 0) - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - szClassPathSep) ); + buf.append( szClassPathSep ); buf.append( systemPathElement ); } } diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 7bae8ba093b5..e17079a4dec6 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -208,11 +208,8 @@ OUString findPlugin( { throw FrameworkException( JFW_E_ERROR, - (OString( - RTL_CONSTASCII_STRINGPARAM( - "[Java framework] IllegalArgumentException in" - " findPlugin: ")) - + OUStringToOString(e.Message, osl_getThreadTextEncoding()))); + OString("[Java framework] IllegalArgumentException in findPlugin: ") + + OUStringToOString(e.Message, osl_getThreadTextEncoding())); } OUString sUrl; try @@ -223,12 +220,9 @@ OUString findPlugin( { throw FrameworkException( JFW_E_ERROR, - (OString( - RTL_CONSTASCII_STRINGPARAM( - "[Java framework] rtl::MalformedUriException in" - " findPlugin: ")) + OString("[Java framework] rtl::MalformedUriException in findPlugin: ") + OUStringToOString( - e.getMessage(), osl_getThreadTextEncoding()))); + e.getMessage(), osl_getThreadTextEncoding())); } if (checkFileURL(sUrl) == jfw::FILE_OK) { diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 42e18a7b62b6..47391ddbdda5 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -133,7 +133,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe bNeg = sal_False; } - if (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("---")) != -1) // end of header + if (aLine.indexOf("---") != -1) // end of header break; } if (!bSuccess) diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index be12b954224e..95c98a281fb6 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -74,7 +74,7 @@ OptValue< double > lclDecodeOpacity( const AttributeList& rAttribs, sal_Int32 nT if(nLength > 0) { - if(aString.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM("f"))) + if(aString.endsWith("f")) { fRetval = std::max(0.0, std::min(1.0, aString.toDouble() / 65536.0)); } diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 1b72bb5e270e..023b0a9de781 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2236,9 +2236,9 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co { xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY); } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.PageStyle") ) == 0 || - aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.FrameStyle") ) == 0 || - aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.GraphicStyle") ) == 0 + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.style.PageStyle" ) == 0 || + aServiceSpecifier.reverseCompareTo( "com.sun.star.style.FrameStyle" ) == 0 || + aServiceSpecifier.reverseCompareTo( "com.sun.star.style.GraphicStyle" ) == 0 ) { uno::Reference< style::XStyle> xStyle = new OStyle(); @@ -2249,72 +2249,72 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co return xStyle.get(); } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.Settings") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.Settings" ) == 0 ) { uno::Reference<beans::XPropertySet> xProp = new OStyle(); return xProp.get(); } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Defaults") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.Defaults" ) == 0 ) { uno::Reference<beans::XPropertySet> xProp = new OStyle(); return xProp.get(); } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GradientTable") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) == 0 ) { if ( !m_pImpl->m_xGradientTable.is() ) m_pImpl->m_xGradientTable.set(SvxUnoGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY); return m_pImpl->m_xGradientTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.HatchTable") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) == 0 ) { if ( !m_pImpl->m_xHatchTable.is() ) m_pImpl->m_xHatchTable.set(SvxUnoHatchTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY); return m_pImpl->m_xHatchTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.BitmapTable") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) == 0 ) { if ( !m_pImpl->m_xBitmapTable.is() ) m_pImpl->m_xBitmapTable.set(SvxUnoBitmapTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY); return m_pImpl->m_xBitmapTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TransparencyGradientTable") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) == 0 ) { if ( !m_pImpl->m_xTransparencyGradientTable.is() ) m_pImpl->m_xTransparencyGradientTable.set(SvxUnoTransGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY); return m_pImpl->m_xTransparencyGradientTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) == 0 ) { if ( !m_pImpl->m_xDashTable.is() ) m_pImpl->m_xDashTable.set(SvxUnoDashTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY); return m_pImpl->m_xDashTable; } - else if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MarkerTable") ) ) + else if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) ) { if( !m_pImpl->m_xMarkerTable.is() ) m_pImpl->m_xMarkerTable.set(SvxUnoMarkerTable_createInstance( m_pImpl->m_pReportModel.get() ),uno::UNO_QUERY); return m_pImpl->m_xMarkerTable; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver")) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ImportEmbeddedObjectResolver" ) == 0 ) return static_cast< ::cppu::OWeakObject* >(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, EMBEDDEDOBJECTHELPER_MODE_READ )); - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ExportEmbeddedObjectResolver")) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ExportEmbeddedObjectResolver" ) == 0 ) return static_cast< ::cppu::OWeakObject* >(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, EMBEDDEDOBJECTHELPER_MODE_WRITE )); - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ImportGraphicObjectResolver")) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ImportGraphicObjectResolver" ) == 0 ) { SvXMLGraphicHelper* pGraphicHelper = SvXMLGraphicHelper::Create(m_pImpl->m_xStorage,GRAPHICHELPER_MODE_WRITE); uno::Reference< uno::XInterface> xRet(static_cast< ::cppu::OWeakObject* >(pGraphicHelper)); pGraphicHelper->release(); return xRet; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ExportGraphicObjectResolver")) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ExportGraphicObjectResolver" ) == 0 ) { SvXMLGraphicHelper* pGraphicHelper = SvXMLGraphicHelper::Create(m_pImpl->m_xStorage,GRAPHICHELPER_MODE_WRITE); uno::Reference< uno::XInterface> xRet(static_cast< ::cppu::OWeakObject* >(pGraphicHelper)); pGraphicHelper->release(); return xRet; } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.data.DataProvider")) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.chart2.data.DataProvider" ) == 0 ) { uno::Reference<chart2::data::XDatabaseDataProvider> xDataProvider(chart2::data::DatabaseDataProvider::createWithConnection( m_aProps->m_xContext, m_pImpl->m_xActiveConnection )); xDataProvider->setRowLimit(10); @@ -2323,7 +2323,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co xChild->setParent(*this); return uno::Reference< uno::XInterface >(xDataProvider,uno::UNO_QUERY); } - else if ( aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.xml.NamespaceMap")) == 0 ) + else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.xml.NamespaceMap" ) == 0 ) { if ( !m_pImpl->m_xXMLNamespaceMap.is() ) m_pImpl->m_xXMLNamespaceMap = comphelper::NameContainer_createInstance( ::getCppuType( (const OUString*) 0 ) ).get(); diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 4ad9b4487abc..576745eb876a 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -857,7 +857,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, aOStm.WriteLine(aLine); } - else if (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("ImageList")) != -1) + else if (aLine.indexOf("ImageList") != -1) { ::std::vector< ::std::pair< OString, sal_Int32 > > aEntryVector; @@ -872,7 +872,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, if( !aIStm.ReadLine(aLine) ) break; } - while (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("Prefix")) == -1); + while (aLine.indexOf("Prefix") == -1); const OString aPrefix( getToken(aLine, 1, '"') ); aIStm.Seek( nImgListStartPos ); @@ -882,7 +882,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, if (!aIStm.ReadLine(aLine) ) break; } - while (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("IdList")) == -1); + while (aLine.indexOf("IdList") == -1); // scan all ids and collect images while (aLine.indexOf('}') == -1) @@ -917,7 +917,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, { aIStm.ReadLine( aLine ); - if (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("IdList")) != -1) + if (aLine.indexOf("IdList") != -1) { while (aLine.indexOf('}') == -1) aIStm.ReadLine(aLine); diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx index dcf6af8274e2..f056ce191771 100644 --- a/sal/osl/w32/procimpl.cxx +++ b/sal/osl/w32/procimpl.cxx @@ -372,9 +372,9 @@ namespace /* private */ bool is_batch_file(const rtl::OUString& file_name) { rtl::OUString ext = get_file_extension(file_name); - return (ext.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bat")) || - ext.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("cmd")) || - ext.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("btm"))); + return (ext.equalsIgnoreAsciiCase("bat") || + ext.equalsIgnoreAsciiCase("cmd") || + ext.equalsIgnoreAsciiCase("btm")); } //########################################################## diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index 0d47a7b6ef72..a1ff682de1dc 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -67,8 +67,7 @@ namespace { static char const VND_SUN_STAR_PATHNAME[] = "vnd.sun.star.pathname:"; bool isPathnameUrl(rtl::OUString const & url) { - return url.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(VND_SUN_STAR_PATHNAME)); + return url.matchIgnoreAsciiCase(VND_SUN_STAR_PATHNAME); } bool resolvePathnameUrl(rtl::OUString * url) { diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index b48f4f285539..8d3015781c5c 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -3135,7 +3135,7 @@ void Test::testCopyPaste() fValue = m_pDoc->GetValue(ScAddress(1,1,1)); ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", fValue, 0); aString = m_pDoc->GetString(2, 1, 1); - CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(""))); + CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString == ""); CPPUNIT_ASSERT_MESSAGE("after undo, note on A2 should be removed", !m_pDoc->HasNote(ScAddress(0, 1, 1))); CPPUNIT_ASSERT_MESSAGE("after undo, note on B2 should be removed", !m_pDoc->HasNote(ScAddress(1, 1, 1))); CPPUNIT_ASSERT_MESSAGE("after undo, note on C2 should be removed", !m_pDoc->HasNote(ScAddress(2, 1, 1))); diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 7868c204eb18..6a7e88ecea75 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -246,8 +246,7 @@ void ScfPropertySet::SetAnyProperty( const OUString& rPropName, const Any& rValu } catch (const Exception&) { - OSL_FAIL(OStringBuffer(RTL_CONSTASCII_STRINGPARAM( - "ScfPropertySet::SetAnyProperty - cannot set property \"")) + OSL_FAIL(OStringBuffer("ScfPropertySet::SetAnyProperty - cannot set property \"") .append(OUStringToOString(rPropName, RTL_TEXTENCODING_ASCII_US)) .append('"').getStr()); diff --git a/sc/source/filter/oox/ooxformulaparser.cxx b/sc/source/filter/oox/ooxformulaparser.cxx index 9b91c79dd382..6b80335b4731 100644 --- a/sc/source/filter/oox/ooxformulaparser.cxx +++ b/sc/source/filter/oox/ooxformulaparser.cxx @@ -83,7 +83,7 @@ const FunctionInfo* OOXMLFormulaParserImpl::resolveBadFuncName( const OUString& // find preceding backslash that separates the last directory name sal_Int32 nDirSep = rTokenData.lastIndexOf( '\\', nFileSep - 1 ); // function library is located in a directory called 'library' - if( (nDirSep > 0) && rTokenData.matchIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "\\LIBRARY\\" ), nDirSep ) ) + if( (nDirSep > 0) && rTokenData.matchIgnoreAsciiCase( "\\LIBRARY\\", nDirSep ) ) { // try to find a function info for the function name OUString aFuncName = rTokenData.copy( nExclamPos + 1 ).toAsciiUpperCase(); diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index 89d7df8a1e3e..5622ba566f5b 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -151,7 +151,7 @@ namespace basprov else if ( aScheme.equalsIgnoreAsciiCase("vnd.sun.star.pkg") ) { OUString aAuthority = xUriRef->getAuthority(); - if ( aAuthority.matchIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.expand:" ) ) ) + if ( aAuthority.matchIgnoreAsciiCase( "vnd.sun.star.expand:" ) ) { OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) ); aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index a613d9787f7d..1f86d7b1a270 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -145,7 +145,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( { try { - bool bIsDocumentScript = ( aURL.Complete.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "document" ) ) !=-1 ); + bool bIsDocumentScript = ( aURL.Complete.indexOf( "document" ) !=-1 ); // TODO: isn't this somewhat strange? This should be a test for a location=document parameter, shouldn't it? if ( bIsDocumentScript ) diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 1b823cc42893..7eba5b092fb7 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -132,8 +132,7 @@ uno::Reference<rdf::XURI> createBaseURI( // #i108078# workaround non-hierarchical vnd.sun.star.expand URIs // this really should be done somewhere else, not here. OUString pkgURI(i_rPkgURI); - if (pkgURI.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.expand:"))) + if (pkgURI.matchIgnoreAsciiCase("vnd.sun.star.expand:")) { // expand it here (makeAbsolute requires hierarchical URI) pkgURI = pkgURI.copy( RTL_CONSTASCII_LENGTH("vnd.sun.star.expand:") ); diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 4285fafe8f2a..357ebe6f6c71 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1512,7 +1512,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon OSL_TRACE( "in CallXScript" ); ErrCode nErr = ERRCODE_NONE; - bool bIsDocumentScript = ( _rScriptURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "location=document" ) ) >= 0 ); + bool bIsDocumentScript = ( _rScriptURL.indexOf( "location=document" ) >= 0 ); // TODO: we should parse the URL, and check whether there is a parameter with this name. // Otherwise, we might find too much. if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) ) diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index 5900b3efff9a..d3088907f847 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -636,8 +636,7 @@ void ResourceManager::GetToolPanelNodeNames ( const sal_Int32 nCount (aChildNodeNames.getLength()); for (sal_Int32 nIndex(0); nIndex<nCount; ++nIndex) { - if (aChildNodeNames[nIndex].matchAsciiL( - RTL_CONSTASCII_STRINGPARAM( "private:resource/toolpanel/"))) + if (aChildNodeNames[nIndex].startsWith( "private:resource/toolpanel/" )) rMatchingNames.push_back(aChildNodeNames[nIndex]); } } diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 25d6a958714f..4c0560d4c5c2 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -368,7 +368,7 @@ sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const OUString& i_rFactoryUR if ( nParamPos >= 0 ) { // currently only the "slot" parameter is supported - const sal_Int32 nSlotPos = i_rFactoryURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "slot=" ), nParamPos ); + const sal_Int32 nSlotPos = i_rFactoryURL.indexOf( "slot=", nParamPos ); if ( nSlotPos > 0 ) sSlotParam = i_rFactoryURL.copy( nSlotPos + 5 ); } diff --git a/shell/source/backends/kde4be/kde4access.cxx b/shell/source/backends/kde4be/kde4access.cxx index 4961d7047c49..4cf3869aa871 100644 --- a/shell/source/backends/kde4be/kde4access.cxx +++ b/shell/source/backends/kde4be/kde4access.cxx @@ -60,8 +60,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { sClientProgram = (const sal_Unicode *) aClientProgram.utf16(); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sClientProgram ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight"))) + } else if (id == "SourceViewFontHeight") { QFont aFixedFont; short nFontHeight; @@ -70,8 +69,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { nFontHeight = aFixedFont.pointSize(); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( nFontHeight ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("SourceViewFontName"))) + } else if (id == "SourceViewFontName") { QFont aFixedFont; QString aFontName; @@ -82,15 +80,13 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { sFontName = (const sal_Unicode *) aFontName.utf16(); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sFontName ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport"))) + } else if (id == "EnableATToolSupport") { /* does not make much sense without an accessibility bridge */ sal_Bool ATToolSupport = sal_False; return css::beans::Optional< css::uno::Any >( true, uno::makeAny( OUString::boolean( ATToolSupport ) ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("WorkPathVariable"))) + } else if (id == "WorkPathVariable") { QString aDocumentsDir( KGlobalSettings::documentPath() ); OUString sDocumentsDir; @@ -101,8 +97,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData ); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sDocumentsURL ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName"))) + } else if (id == "ooInetFTPProxyName") { QString aFTPProxy; switch ( KProtocolManager::proxyType() ) @@ -128,8 +123,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort"))) + } else if (id == "ooInetFTPProxyPort") { QString aFTPProxy; switch ( KProtocolManager::proxyType() ) @@ -155,8 +149,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( nPort ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName"))) + } else if (id == "ooInetHTTPProxyName") { QString aHTTPProxy; switch ( KProtocolManager::proxyType() ) @@ -182,8 +175,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort"))) + } else if (id == "ooInetHTTPProxyPort") { QString aHTTPProxy; switch ( KProtocolManager::proxyType() ) @@ -209,8 +201,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( nPort ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName"))) + } else if (id == "ooInetHTTPSProxyName") { QString aHTTPSProxy; switch ( KProtocolManager::proxyType() ) @@ -236,8 +227,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort"))) + } else if (id == "ooInetHTTPSProxyPort") { QString aHTTPSProxy; switch ( KProtocolManager::proxyType() ) diff --git a/shell/source/backends/kdebe/kdeaccess.cxx b/shell/source/backends/kdebe/kdeaccess.cxx index c4636aa7e3d1..cff355f0bd1a 100644 --- a/shell/source/backends/kdebe/kdeaccess.cxx +++ b/shell/source/backends/kdebe/kdeaccess.cxx @@ -56,8 +56,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { sClientProgram = (const sal_Unicode *) aClientProgram.ucs2(); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sClientProgram ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight"))) + } else if (id == "SourceViewFontHeight") { QFont aFixedFont; short nFontHeight; @@ -66,8 +65,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { nFontHeight = aFixedFont.pointSize(); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( nFontHeight ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("SourceViewFontName"))) + } else if (id == "SourceViewFontName") { QFont aFixedFont; QString aFontName; @@ -78,15 +76,13 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { sFontName = (const sal_Unicode *) aFontName.ucs2(); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sFontName ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport"))) + } else if (id == "EnableATToolSupport") { /* does not make much sense without an accessibility bridge */ sal_Bool ATToolSupport = sal_False; return css::beans::Optional< css::uno::Any >( true, uno::makeAny( OUString::boolean( ATToolSupport ) ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("WorkPathVariable"))) + } else if (id == "WorkPathVariable") { QString aDocumentsDir( KGlobalSettings::documentPath() ); OUString sDocumentsDir; @@ -97,8 +93,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { osl_getFileURLFromSystemPath( sDocumentsDir.pData, &sDocumentsURL.pData ); return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sDocumentsURL ) ); - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName"))) + } else if (id == "ooInetFTPProxyName") { QString aFTPProxy; switch ( KProtocolManager::proxyType() ) @@ -124,8 +119,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort"))) + } else if (id == "ooInetFTPProxyPort") { QString aFTPProxy; switch ( KProtocolManager::proxyType() ) @@ -151,8 +145,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( nPort ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName"))) + } else if (id == "ooInetHTTPProxyName") { QString aHTTPProxy; switch ( KProtocolManager::proxyType() ) @@ -178,8 +171,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort"))) + } else if (id == "ooInetHTTPProxyPort") { QString aHTTPProxy; switch ( KProtocolManager::proxyType() ) @@ -205,8 +197,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( nPort ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName"))) + } else if (id == "ooInetHTTPSProxyName") { QString aHTTPSProxy; switch ( KProtocolManager::proxyType() ) @@ -232,8 +223,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { return css::beans::Optional< css::uno::Any >( true, uno::makeAny( sProxy ) ); } - } else if (id.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort"))) + } else if (id == "ooInetHTTPSProxyPort") { QString aHTTPSProxy; switch ( KProtocolManager::proxyType() ) diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 004dce8bad63..1b4ed43421c3 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -323,16 +323,13 @@ namespace slideshow aDeviceParams[ 0 ] >>= aImplName; - if( aImplName.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("VCL") ) || aImplName.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("Cairo") ) ) + if( aImplName.endsWithIgnoreAsciiCase( "VCL" ) || + aImplName.endsWithIgnoreAsciiCase( "Cairo" ) ) { implInitializeVCLBasedPlayerWindow( rBounds, aDeviceParams ); } - else if( aImplName.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("DX")) || - aImplName.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("DX9"))) + else if( aImplName.endsWithIgnoreAsciiCase("DX") || + aImplName.endsWithIgnoreAsciiCase("DX9") ) { implInitializeDXBasedPlayerWindow( rBounds, aDeviceParams ); } diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index 91f5b8cd68d8..32d1553dc8f2 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -102,8 +102,7 @@ OUString Translator::translateToInternal( OUString const & externalUriReference) throw (css::uno::RuntimeException) { - if (!externalUriReference.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("file:/"))) + if (!externalUriReference.matchIgnoreAsciiCase("file:/")) { return externalUriReference; } @@ -112,7 +111,7 @@ OUString Translator::translateToInternal( buf.append(externalUriReference.getStr(), i); // Some environments (e.g., Java) produce illegal file URLs without an // authority part; treat them as having an empty authority part: - if (!externalUriReference.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("//"), i)) + if (!externalUriReference.match("//", i)) { buf.append("//"); } @@ -152,8 +151,7 @@ OUString Translator::translateToExternal( OUString const & internalUriReference) throw (css::uno::RuntimeException) { - if (!internalUriReference.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("file://"))) + if (!internalUriReference.matchIgnoreAsciiCase("file://")) { return internalUriReference; } diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx index aaacf910d461..c4e19a104738 100644 --- a/stoc/test/tdmanager/testtdmanager.cxx +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -138,8 +138,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const & arguments) OUString url; OSL_VERIFY( osl_File_E_None == osl_getFileURLFromSystemPath( arguments[argPos].pData, &url.pData ) ); - bool supposedToBeCompatible = ! url.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("_incomp.rdb") ); + bool supposedToBeCompatible = ! url.endsWithIgnoreAsciiCase("_incomp.rdb"); css::uno::Reference<css::registry::XSimpleRegistry> xReg( m_context->getServiceManager()->createInstanceWithContext( diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 3f72ec305d6e..b045557219eb 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -524,9 +524,9 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm ) { aStr = aStr.toAsciiLowerCase(); - if ( (aStr.indexOfL(RTL_CONSTASCII_STRINGPARAM("rect")) != -1) || - (aStr.indexOfL(RTL_CONSTASCII_STRINGPARAM("circ")) != -1) || - (aStr.indexOfL(RTL_CONSTASCII_STRINGPARAM("poly")) != -1) ) + if ( (aStr.indexOf("rect") != -1) || + (aStr.indexOf("circ") != -1) || + (aStr.indexOf("poly") != -1) ) { if ( ( aStr.indexOf('(') != -1 ) && ( aStr.indexOf(')') != -1 ) ) diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 54c154838a14..a86fad6b6bba 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1957,7 +1957,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader, return true; // <HTML> somewhere in the first 80 characters of the document - nStart = sCmp.indexOfL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_html)); + nStart = sCmp.indexOf(OOO_STRING_SVTOOLS_HTML_html); if( nStart>0 && '<'==sCmp[nStart-1] && nStart+4 < sCmp.getLength() && '>'==sCmp[nStart+4] ) return true; diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 3cbc67471b9d..5d5aa6ec2c99 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -107,7 +107,7 @@ namespace if ( !( _rError >>= aError ) ) return true; - if ( aError.Message.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "[OOoBase]" ) ) != 0 ) + if ( ! aError.Message.startsWith( "[OOoBase]" ) ) // it is an exception *not* thrown by an OOo Base core component return true; diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 06ee08fa605f..7eb910797acb 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -367,43 +367,43 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c { ::SolarMutexGuard aGuard; - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) ) { if( !mxDashTable.is() ) mxDashTable = SvxUnoDashTable_createInstance( mpDoc ); return mxDashTable; } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GradientTable") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) ) { if( !mxGradientTable.is() ) mxGradientTable = SvxUnoGradientTable_createInstance( mpDoc ); return mxGradientTable; } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.HatchTable") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) ) { if( !mxHatchTable.is() ) mxHatchTable = SvxUnoHatchTable_createInstance( mpDoc ); return mxHatchTable; } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.BitmapTable") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) ) { if( !mxBitmapTable.is() ) mxBitmapTable = SvxUnoBitmapTable_createInstance( mpDoc ); return mxBitmapTable; } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TransparencyGradientTable") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) ) { if( !mxTransGradientTable.is() ) mxTransGradientTable = SvxUnoTransGradientTable_createInstance( mpDoc ); return mxTransGradientTable; } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MarkerTable") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) ) { if( !mxMarkerTable.is() ) mxMarkerTable = SvxUnoMarkerTable_createInstance( mpDoc ); return mxMarkerTable; } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.NumberingRules" ) ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.NumberingRules" ) ) { return uno::Reference< uno::XInterface >( SvxCreateNumRule( mpDoc ), uno::UNO_QUERY ); } @@ -423,7 +423,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c return SvUnoImageMapPolygonObject_createInstance( ImplGetSupportedMacroItems() ); } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) ) + if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.TextField.DateTime" ) ) { return (::cppu::OWeakObject * )new SvxUnoTextField(text::textfield::Type::DATE); } diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 11f347f52661..d2b91b9f05ac 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2484,8 +2484,7 @@ throw (uno::RuntimeException) OUString sServiceNameCC( OldNameToNewName_Impl( sServiceName ) ); return sServiceName == rServiceName || sServiceNameCC == rServiceName || - rServiceName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent")); + rServiceName == "com.sun.star.text.TextContent"; } uno::Sequence< OUString > SAL_CALL SwXTextField::getSupportedServiceNames() diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 844f374fb035..572e7392a1f1 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2992,7 +2992,7 @@ throw (uno::RuntimeException) { SolarMutexGuard g; - if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent"))) + if (rServiceName != "com.sun.star.text.TextContent") { throw uno::RuntimeException(); } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index c49a4635107c..96b0722f4f1b 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1502,8 +1502,7 @@ void SwXMLImport::initialize( beans::PropertyValue aValue; if ( aArguments[i] >>= aValue ) { - if (aValue.Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("PreserveRedlineMode"))) + if (aValue.Name == "PreserveRedlineMode") { OSL_VERIFY( aValue.Value >>= bPreserveRedlineMode ); } @@ -1513,8 +1512,7 @@ void SwXMLImport::initialize( beans::NamedValue aNamedValue; if ( aArguments[i] >>= aNamedValue ) { - if (aNamedValue.Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("LateInitSettings"))) + if (aNamedValue.Name == "LateInitSettings") { OSL_VERIFY( aNamedValue.Value >>= xLateInitSettings ); } diff --git a/sw/source/ui/vba/vbacheckbox.cxx b/sw/source/ui/vba/vbacheckbox.cxx index 90e6ba981572..235dd1029e1b 100644 --- a/sw/source/ui/vba/vbacheckbox.cxx +++ b/sw/source/ui/vba/vbacheckbox.cxx @@ -50,7 +50,7 @@ sal_Bool SAL_CALL SwVbaCheckBox::getValue() throw ( uno::RuntimeException ) { if( mxFormField->getParamName(i).equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX_CHECKED ) ) { - if( mxFormField->getParamValue(i).equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("on")) ) + if( mxFormField->getParamValue(i).equalsIgnoreAsciiCase("on") ) bValue = sal_True; else bValue = sal_False; diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index 969187a29349..dbd42e5b24b1 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -55,7 +55,7 @@ OUString SAL_CALL SwVbaFormField::getResult() throw ( uno::RuntimeException ) { if( mxFormField->getParamName(i).equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX_CHECKED ) ) { - if( mxFormField->getParamValue(i).equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("on")) ) + if( mxFormField->getParamValue(i).equalsIgnoreAsciiCase("on") ) nValue = 1; else nValue = 0; diff --git a/sw/source/ui/vba/vbaformfields.cxx b/sw/source/ui/vba/vbaformfields.cxx index 3a963f0c5472..45491a0adde9 100644 --- a/sw/source/ui/vba/vbaformfields.cxx +++ b/sw/source/ui/vba/vbaformfields.cxx @@ -38,7 +38,7 @@ OUString lcl_getFormFieldName( const uno::Reference< text::XFormField >& xFormFi sal_Int32 nCount = xFormField->getParamCount(); for( sal_Int32 i = 0; i < nCount; i++ ) { - if( xFormField->getParamName(i).equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("Name")) ) + if( xFormField->getParamName(i).equalsIgnoreAsciiCase("Name") ) { sName = xFormField->getParamValue(i); OSL_TRACE("lcl_getFormFieldName: %s", OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() ); diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index e4e254d8fc28..7d29a241dcb9 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -185,7 +185,7 @@ bool DAVProperties::isUCBSpecialProperty(const rtl::OUString& rFullName, rtl::OU sal_Int32 nLen = rFullName.getLength(); if ( nLen <= 0 || !rFullName.startsWith( "<prop:" ) || - !rFullName.endsWithAsciiL( RTL_CONSTASCII_STRINGPARAM( "\">" ) ) ) + !rFullName.endsWith( "\">" ) ) return false; sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "<prop:" ); @@ -198,7 +198,7 @@ bool DAVProperties::isUCBSpecialProperty(const rtl::OUString& rFullName, rtl::OU return false; // TODO skip whitespaces? - if ( !rFullName.startsWith( RTL_CONSTASCII_STRINGPARAM( "xmlns:prop=\"" ), ++nEnd ) ) + if ( !rFullName.startsWith( "xmlns:prop=\"", ++nEnd ) ) return false; nStart = nEnd + RTL_CONSTASCII_LENGTH( "xmlns:prop=\"" ); diff --git a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx index 9be84da091e8..49963ca09fce 100644 --- a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx +++ b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx @@ -65,8 +65,7 @@ void SerfRequestProcessorImpl::setRequestHeaders( serf_bucket_t* inoutSerfHeader OSL_TRACE( "Request Header - \"%s: %s\"", aHeader.getStr(), aValue.getStr() ); if ( !bHasUserAgent ) - bHasUserAgent = aHeaderIter->first.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "User-Agent" ) ); + bHasUserAgent = aHeaderIter->first == "User-Agent"; serf_bucket_headers_set( inoutSerfHeaderBucket, aHeader.getStr(), diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index e9ae31e313a5..f07239d56725 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -96,13 +96,13 @@ ContentProvider::ContentProvider( xConfigAccess->getByName(OUString("ooName")) >>= aVal; OUString &aUserAgent = WebDAVUserAgent::get(); - sal_Int32 nIndex = aUserAgent.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "$ooName" ) ); + sal_Int32 nIndex = aUserAgent.indexOf( "$ooName" ); if ( !aVal.getLength() || nIndex == -1 ) return; aUserAgent = aUserAgent.replaceAt( nIndex, RTL_CONSTASCII_LENGTH( "$ooName" ), aVal ); xConfigAccess->getByName(OUString("ooSetupVersion")) >>= aVal; - nIndex = aUserAgent.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "$ooSetupVersion" ) ); + nIndex = aUserAgent.indexOf( "$ooSetupVersion" ); if ( !aVal.getLength() || nIndex == -1 ) return; aUserAgent = aUserAgent.replaceAt( nIndex, RTL_CONSTASCII_LENGTH( "$ooSetupVersion" ), aVal ); diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index c9b8b943b08d..9966c08e7128 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -301,7 +301,7 @@ void X11SalInstance::FillFontPathList( std::list< OString >& o_rFontPaths ) psp::normPath( aLine ); // try to avoid bad fonts in some cases static bool bAvoid = (strncasecmp( lang, "ar", 2 ) == 0) || (strncasecmp( lang, "he", 2 ) == 0) || strncasecmp( lang, "iw", 2 ) == 0 || (strncasecmp( lang, "hi", 2 ) == 0); - if( bAvoid && aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("iso_8859")) != -1 ) + if( bAvoid && aLine.indexOf("iso_8859") != -1 ) continue; o_rFontPaths.push_back( aLine ); } diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 25ada354ac7f..57c9ff5649c1 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -559,7 +559,7 @@ OUString PPDParser::getPPDFile( const OUString& rFile ) // our *Include hack does usually not begin // with *PPD-Adobe, so try some lines for *Include int nLines = 10; - while (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("*Include")) != 0 && --nLines) + while (aLine.indexOf("*Include") != 0 && --nLines) aLine = aStream.ReadLine(); if( nLines ) aRet = aStream.GetFileName(); @@ -702,18 +702,18 @@ PPDParser::PPDParser( const OUString& rFile ) : { bLanguageEncoding = true; // generally only the first one counts OString aLower = aCurLine.toAsciiLowerCase(); - if( aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("isolatin1"), 17 ) != -1 || - aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("windowsansi"), 17 ) != -1 ) + if( aLower.indexOf("isolatin1", 17 ) != -1 || + aLower.indexOf("windowsansi", 17 ) != -1 ) m_aFileEncoding = RTL_TEXTENCODING_MS_1252; - else if( aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("isolatin2"), 17 ) != -1 ) + else if( aLower.indexOf("isolatin2", 17 ) != -1 ) m_aFileEncoding = RTL_TEXTENCODING_ISO_8859_2; - else if( aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("isolatin5"), 17 ) != -1 ) + else if( aLower.indexOf("isolatin5", 17 ) != -1 ) m_aFileEncoding = RTL_TEXTENCODING_ISO_8859_5; - else if( aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("jis83-rksj"), 17 ) != -1 ) + else if( aLower.indexOf("jis83-rksj", 17 ) != -1 ) m_aFileEncoding = RTL_TEXTENCODING_SHIFT_JIS; - else if( aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("macstandard"), 17 ) != -1 ) + else if( aLower.indexOf("macstandard", 17 ) != -1 ) m_aFileEncoding = RTL_TEXTENCODING_APPLE_ROMAN; - else if( aLower.indexOfL(RTL_CONSTASCII_STRINGPARAM("utf-8"), 17 ) != -1 ) + else if( aLower.indexOf("utf-8", 17 ) != -1 ) m_aFileEncoding = RTL_TEXTENCODING_UTF8; } } diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 7b8edec681a8..96430ad04cb1 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -1528,7 +1528,7 @@ sal_Bool WinSalPrinter::StartJob( const OUString* pFileName, // bring up a file choser if printing to file port but no file name given OUString aOutFileName; - if( mpInfoPrinter->maPortName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "FILE:" ) ) && !(pFileName && !pFileName->isEmpty()) ) + if( mpInfoPrinter->maPortName.equalsIgnoreAsciiCase( "FILE:" ) && !(pFileName && !pFileName->isEmpty()) ) { uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); |