[Libreoffice-commits] core.git: 4 commits - chart2/source configmgr/source connectivity/source cppcanvas/source cpputools/source dbaccess/source desktop/source drawinglayer/source editeng/source filter/source framework/source i18npool/source jvmfwk/source l10ntools/source linguistic/source oox/source padmin/source reportdesign/source rsc/source sal/osl sal/rtl sc/qa scripting/source sc/source sfx2/source shell/source slideshow/source stoc/source stoc/test svtools/source svx/source sw/source ucb/source vcl/source vcl/unx vcl/win
Noel Grandin
noel at peralex.com
Thu Nov 21 23:08:15 PST 2013
chart2/source/controller/main/ChartFrameloader.cxx | 3 -
chart2/source/view/main/ChartView.cxx | 12 ++---
configmgr/source/type.cxx | 12 +----
connectivity/source/drivers/ado/ACatalog.cxx | 4 -
connectivity/source/drivers/postgresql/pq_tools.cxx | 24 +++-------
connectivity/source/drivers/postgresql/pq_xcolumns.cxx | 4 -
cppcanvas/source/mtfrenderer/implrenderer.cxx | 4 -
cpputools/source/unoexe/unoexe.cxx | 2
dbaccess/source/core/api/tablecontainer.cxx | 2
desktop/source/deployment/registry/help/dp_help.cxx | 2
drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 4 -
editeng/source/uno/unofield.cxx | 6 --
editeng/source/xml/xmltxtexp.cxx | 8 +--
filter/source/svg/svgexport.cxx | 4 -
filter/source/svg/svgwriter.cxx | 37 +++++++---------
framework/source/classes/menumanager.cxx | 2
framework/source/uifactory/uicontrollerfactory.cxx | 4 -
i18npool/source/localedata/LocaleNode.cxx | 4 -
jvmfwk/source/fwkbase.cxx | 5 --
jvmfwk/source/fwkutil.cxx | 14 +-----
l10ntools/source/export.cxx | 2
l10ntools/source/lngmerge.cxx | 2
l10ntools/source/uimerge.cxx | 2
l10ntools/source/xrmmerge.cxx | 4 -
linguistic/source/dicimp.cxx | 2
oox/source/vml/vmlshapecontext.cxx | 2
padmin/source/adddlg.cxx | 2
reportdesign/source/core/api/ReportDefinition.cxx | 34 +++++++-------
rsc/source/rsc/rsc.cxx | 8 +--
sal/osl/w32/procimpl.cxx | 6 +-
sal/rtl/bootstrap.cxx | 3 -
sc/qa/unit/ucalc.cxx | 2
sc/source/filter/ftools/fapihelper.cxx | 3 -
sc/source/filter/oox/ooxformulaparser.cxx | 2
sc/source/ui/vba/vbapagesetup.cxx | 2
scripting/source/basprov/basprov.cxx | 2
scripting/source/protocolhandler/scripthandler.cxx | 2
sfx2/source/appl/app.cxx | 3 -
sfx2/source/doc/DocumentMetadataAccess.cxx | 3 -
sfx2/source/doc/objmisc.cxx | 2
sfx2/source/doc/oleprops.cxx | 3 -
sfx2/source/sidebar/ResourceManager.cxx | 3 -
sfx2/source/view/frmload.cxx | 2
shell/source/backends/kde4be/kde4access.cxx | 30 ++++--------
shell/source/backends/kdebe/kdeaccess.cxx | 30 ++++--------
slideshow/source/engine/shapes/drawshape.cxx | 6 --
slideshow/source/engine/shapes/drawshapesubsetting.cxx | 14 +++---
slideshow/source/engine/shapes/gdimtftools.cxx | 6 --
slideshow/source/engine/shapes/viewmediashape.cxx | 11 +---
stoc/source/typeconv/convert.cxx | 4 -
stoc/source/uriproc/ExternalUriReferenceTranslator.cxx | 8 +--
stoc/test/tdmanager/testtdmanager.cxx | 3 -
svtools/source/misc/imap2.cxx | 6 +-
svtools/source/misc/transfer.cxx | 28 ++++++------
svtools/source/svhtml/parhtml.cxx | 2
svx/source/form/fmtools.cxx | 2
svx/source/svdraw/svdfmtf.cxx | 2
svx/source/unodraw/unomod.cxx | 16 +++---
svx/source/xml/xmleohlp.cxx | 2
sw/source/core/unocore/unofield.cxx | 3 -
sw/source/core/unocore/unoobj.cxx | 2
sw/source/filter/xml/xmlimp.cxx | 6 --
sw/source/ui/vba/vbacheckbox.cxx | 2
sw/source/ui/vba/vbaformfield.cxx | 2
sw/source/ui/vba/vbaformfields.cxx | 2
ucb/source/ucp/webdav/DAVProperties.cxx | 4 -
ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx | 3 -
ucb/source/ucp/webdav/SerfSession.cxx | 2
ucb/source/ucp/webdav/webdavprovider.cxx | 4 -
vcl/source/gdi/pdfwriter_impl.cxx | 12 ++---
vcl/unx/generic/app/salinst.cxx | 2
vcl/unx/generic/dtrans/X11_transferable.cxx | 4 -
vcl/unx/generic/printer/ppdparser.cxx | 20 ++++----
vcl/win/source/gdi/salprn.cxx | 2
74 files changed, 214 insertions(+), 279 deletions(-)
New commits:
commit 73342dbb82ba074d01962359dac50fb2aa36cbeb
Author: Noel Grandin <noel at peralex.com>
Date: Thu Nov 21 15:52:45 2013 +0200
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
diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx
index 8f2f027..9d06b6a 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 f501aa9..16da8f8 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 73b0b09..b257607 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 4583503..01e4aee 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 f6f9295..afb2965 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 a7ec888..466e4fb 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 13699a6..6ed8733 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 de686b3..eed1c2c 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 13f2aec..0df49f7 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 2303beb..e14eba7 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 2e1043a..73d7812 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 0b9535e..7990370 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 7bae8ba..e17079a 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 42e18a7..47391dd 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 be12b95..95c98a2 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 1b72bb5..023b0a9 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 4ad9b44..576745e 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 dcf6af8..f056ce1 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 0d47a7b..a1ff682 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 b48f4f2..8d30157 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 7868c20..6a7e88e 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 9b91c79..6b80335 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 89d7df8..5622ba5 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 a613d97..1f86d7b 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 1b823cc..7eba5b0 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 4285faf..357ebe6 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 5900b3e..d308890 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 25d6a95..4c0560d 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 4961d70..4cf3869 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 c4636aa..cff355f 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 004dce8..1b4ed43 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 91f5b8c..32d1553 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 aaacf91..c4e19a1 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 3f72ec3..b045557 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 54c1548..a86fad6 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 3cbc674..5d5aa6e 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 06ee08f..7eb9107 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 11f347f..d2b91b9 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 844f374..572e739 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 c49a463..96b0722 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 90e6ba9..235dd10 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 969187a..dbd42e5 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 3a963f0..45491a0 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 e4e254d..7d29a24 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 9be84da..49963ca0 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 e9ae31e..f07239d5 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 c9b8b94..9966c08 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 25ada35..57c9ff5 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 7b8edec..96430ad 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() );
commit 071c3f3e93c4c00cf57ce3c382325cd717fed511
Author: Noel Grandin <noel at peralex.com>
Date: Thu Nov 21 14:27:06 2013 +0200
remove unnecessary use of OUString constructor in equalsIgnoreAsciiCase
Convert code like:
sType.equalsIgnoreAsciiCase(OUString("VIEW"));
to:
sType.equalsIgnoreAsciiCase("VIEW");
Change-Id: I6fb47e6a83b561c7e5a25da76b63606a3174858d
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index e02003a..d7dc202 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -479,7 +479,7 @@ SAL_IMPLEMENT_MAIN()
sal_Int32 nIndex = 0, nTokens = 0;
do { aUnoUrl.getToken( 0, ';', nIndex ); nTokens++; } while( nIndex != -1 );
if (nTokens != 3 || aUnoUrl.getLength() < 10 ||
- !aUnoUrl.copy( 0, 4 ).equalsIgnoreAsciiCase( OUString("uno:") ))
+ !aUnoUrl.copy( 0, 4 ).equalsIgnoreAsciiCase( "uno:" ))
{
throw RuntimeException("illegal uno url given!", Reference< XInterface >() );
}
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 32400c8..219f0dd 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -380,7 +380,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const OUString _sElementName)
OUString sType;
xTable->getPropertyValue(PROPERTY_TYPE) >>= sType;
- bIsView = sType.equalsIgnoreAsciiCase(OUString("VIEW"));
+ bIsView = sType.equalsIgnoreAsciiCase("VIEW");
}
if(sComposedName.isEmpty())
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index b7978bf..47dfc2d 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -590,7 +590,7 @@ void BackendImpl::implCollectXhpFiles( const OUString& aDir,
if( nLastDot != -1 )
{
OUString aExt = aURL.copy( nLastDot + 1 );
- if( aExt.equalsIgnoreAsciiCase( OUString("xhp" ) ) )
+ if( aExt.equalsIgnoreAsciiCase( "xhp" ) )
o_rXhpFileVector.push_back( aURL );
}
}
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index a735512..d3c1c0e 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -93,7 +93,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const OUString& rAreas ) throw (css:
{
uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
if( rAreas.isEmpty() ||
- rAreas.equalsIgnoreAsciiCase ( OUString("FALSE") ) )
+ rAreas.equalsIgnoreAsciiCase( "FALSE" ) )
{
// print the whole sheet
uno::Sequence< table::CellRangeAddress > aSeq;
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 57bdff8..b0c01c3 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -751,12 +751,12 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
case TypeClass_STRING:
{
const OUString & aStr = *(const OUString *)rVal.getValue();
- if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( OUString("false") ))
+ if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( "false" ))
{
sal_Bool bFalse = sal_False;
aRet.setValue( &bFalse, getCppuBooleanType() );
}
- else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( OUString("true") ))
+ else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( "true" ))
{
sal_Bool bTrue = sal_True;
aRet.setValue( &bTrue, getCppuBooleanType() );
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 6a8df65..3e3693d 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -1408,33 +1408,33 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
aFlavorEx.mnSotId = SOT_FORMATSTR_ID_HTML_NO_COMMENT;
rDataFlavorExVector.push_back( aFlavorEx );
}
- else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/plain" ) ) )
+ else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) )
{
// add, if it is a UTF-8 byte buffer
if( xMimeType->hasParameter( aCharsetStr ) )
{
- if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( OUString( "unicode" ) ) ||
- xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( OUString( "utf-16" ) ) )
+ if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( "unicode" ) ||
+ xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( "utf-16" ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_STRING;
}
}
}
- else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/rtf" ) ) )
+ else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/rtf" ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_RTF;
}
- else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/html" ) ) )
+ else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/html" ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_HTML;
}
- else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/uri-list" ) ) )
+ else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/uri-list" ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMAT_FILE_LIST;
}
- else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "application/x-openoffice-objectdescriptor-xml" ) ) )
+ else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice-objectdescriptor-xml" ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_OBJECTDESCRIPTOR;
}
@@ -2338,19 +2338,19 @@ sal_Bool TransferableDataHelper::IsEqual( const ::com::sun::star::datatransfer::
{
if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( xRequestType2->getFullMediaType() ) )
{
- if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/plain" ) ) )
+ if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) )
{
// special handling for text/plain media types
const OUString aCharsetString( "charset" );
if( !xRequestType2->hasParameter( aCharsetString ) ||
- xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( OUString( "utf-16" ) ) ||
- xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( OUString( "unicode" ) ) )
+ xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( "utf-16" ) ||
+ xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( "unicode" ) )
{
bRet = sal_True;
}
}
- else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( OUString( "application/x-openoffice" ) ) )
+ else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice" ) )
{
// special handling for application/x-openoffice media types
const OUString aFormatString( "windows_formatname" );
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 6feddd4..757adbb 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -264,7 +264,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
while( nPos >= 0 && nPos < rURLStr.getLength() )
{
OUString aToken = rURLStr.getToken( 0, ',', nPos );
- if ( aToken.equalsIgnoreAsciiCase( OUString( "oasis=false" ) ) )
+ if ( aToken.equalsIgnoreAsciiCase( "oasis=false" ) )
{
if ( pOasisFormat )
*pOasisFormat = sal_False;
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 0df25d3..008b6f1 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -207,7 +207,7 @@ bool SerfSession::isHeadRequestInProgress()
bool SerfSession::isSSLNeeded()
{
- return m_aUri.GetScheme().equalsIgnoreAsciiCase( OUString( "https" ) );
+ return m_aUri.GetScheme().equalsIgnoreAsciiCase( "https" );
}
char* SerfSession::getHostinfo()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 572d4b9..5c59a93 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4448,21 +4448,21 @@ we check in the following sequence:
{
bool bChangeFileExtensionToPDF = false;
//examine the file type (.odm .odt. .odp, odg, ods)
- if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odm" ) ) )
+ if( aFileExtension.equalsIgnoreAsciiCase( "odm" ) )
bChangeFileExtensionToPDF = true;
- if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odt" ) ) )
+ if( aFileExtension.equalsIgnoreAsciiCase( "odt" ) )
bChangeFileExtensionToPDF = true;
- else if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odp" ) ) )
+ else if( aFileExtension.equalsIgnoreAsciiCase( "odp" ) )
bChangeFileExtensionToPDF = true;
- else if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odg" ) ) )
+ else if( aFileExtension.equalsIgnoreAsciiCase( "odg" ) )
bChangeFileExtensionToPDF = true;
- else if( aFileExtension.equalsIgnoreAsciiCase(OUString( "ods" ) ) )
+ else if( aFileExtension.equalsIgnoreAsciiCase( "ods" ) )
bChangeFileExtensionToPDF = true;
if( bChangeFileExtensionToPDF )
aTargetURL.setExtension(OUString( "pdf" ) );
}
//check if extension is pdf, see if GoToR should be forced
- bTargetHasPDFExtension = aTargetURL.GetFileExtension().equalsIgnoreAsciiCase(OUString( "pdf" ) );
+ bTargetHasPDFExtension = aTargetURL.GetFileExtension().equalsIgnoreAsciiCase( "pdf" );
if( m_aContext.ForcePDFAction && bTargetHasPDFExtension )
nSetGoToRMode++;
}
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx
index bcf54b6..34bdd27 100644
--- a/vcl/unx/generic/dtrans/X11_transferable.cxx
+++ b/vcl/unx/generic/dtrans/X11_transferable.cxx
@@ -67,7 +67,7 @@ Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor )
{
throw UnsupportedFlavorException( rFlavor.MimeType, static_cast < XTransferable * > ( this ) );
}
- if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString("text/plain;charset=utf-16") ) )
+ if( rFlavor.MimeType.equalsIgnoreAsciiCase( "text/plain;charset=utf-16" ) )
{
int nLen = aData.getLength()/2;
if( ((sal_Unicode*)aData.getConstArray())[nLen-1] == 0 )
@@ -105,7 +105,7 @@ sal_Bool SAL_CALL X11Transferable::isDataFlavorSupported( const DataFlavor& aFla
{
if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) )
{
- if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString("text/plain;charset=utf-16") ) &&
+ if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( "text/plain;charset=utf-16" ) &&
aFlavor.DataType == getCppuType( (OUString*)0 ) )
return false;
}
commit 2241fd5302c1ec83c8cbaa2422a477628a569aab
Author: Noel Grandin <noel at peralex.com>
Date: Thu Nov 21 14:05:24 2013 +0200
remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::equalsIgnoreAsciiL
Convert code like:
aStr.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN"))
to:
aStr.equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN")
which compiles down to the same code.
Change-Id: Ia69289d853d292b2f27b68863cb6f6ecdbf1a71e
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 9b60ea5..d44567c 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1616,7 +1616,7 @@ namespace cppcanvas
MetaCommentAction* pAct = static_cast<MetaCommentAction*>(pCurrAct);
// Handle gradients
- if (pAct->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")))
+ if (pAct->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN"))
{
MetaGradientExAction* pGradAction = NULL;
bool bDone( false );
@@ -1632,7 +1632,7 @@ namespace cppcanvas
// skip broken-down rendering, output gradient when sequence is ended
case META_COMMENT_ACTION:
- if( static_cast<MetaCommentAction*>(pCurrAct)->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_END")) )
+ if( static_cast<MetaCommentAction*>(pCurrAct)->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") )
{
bDone = true;
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 6172f40..00d0059 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -3085,7 +3085,7 @@ namespace
// and makes the code less dependent from those Metafile Add-Ons
const MetaCommentAction* pA = (const MetaCommentAction*)pAction;
- if (pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")))
+ if (pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN"))
{
// XGRAD_SEQ_BEGIN, XGRAD_SEQ_END should be supported since the
// pure recorded paint of the gradients uses the XOR paint functionality
@@ -3105,7 +3105,7 @@ namespace
}
else if(META_COMMENT_ACTION == pAction->GetType())
{
- if (((const MetaCommentAction*)pAction)->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_END")))
+ if (((const MetaCommentAction*)pAction)->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END"))
{
bDone = true;
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 6065416..97eddc7 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1912,11 +1912,11 @@ sal_Bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & r
if( nType == META_COMMENT_ACTION )
{
const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
- if( ( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XTEXT_PAINTSHAPE_BEGIN")) ) )
+ if( ( pA->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_BEGIN") ) )
{
bIsTextShapeStarted = sal_True;
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_PAINTSHAPE_END" ) ) ) )
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) ) )
{
bIsTextShapeStarted = sal_False;
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 3a26b52..a0ec7da 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -591,11 +591,11 @@ sal_Int32 SVGTextWriter::setTextPosition( const GDIMetaFile& rMtf, sal_uLong& nC
{
const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
const OString& rsComment = pA->GetComment();
- if( rsComment.equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_EOL" ) ) )
+ if( rsComment.equalsIgnoreAsciiCase( "XTEXT_EOL" ) )
{
bEOL = true;
}
- else if( rsComment.equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_EOP" ) ) )
+ else if( rsComment.equalsIgnoreAsciiCase( "XTEXT_EOP" ) )
{
bEOP = true;
@@ -630,7 +630,7 @@ sal_Int32 SVGTextWriter::setTextPosition( const GDIMetaFile& rMtf, sal_uLong& nC
}
}
}
- else if( rsComment.equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_PAINTSHAPE_END" ) ) )
+ else if( rsComment.equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) )
{
bETS = true;
}
@@ -708,7 +708,7 @@ void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAc
{
const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
const OString& rsComment = pA->GetComment();
- if( rsComment.equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_EOP" ) ) )
+ if( rsComment.equalsIgnoreAsciiCase( "XTEXT_EOP" ) )
{
bEOP = true;
}
@@ -2686,8 +2686,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
sType.append(OStringToOUString(
sComment, RTL_TEXTENCODING_UTF8));
}
- if (sComment.equalsIgnoreAsciiCaseL(
- RTL_CONSTASCII_STRINGPARAM("FIELD_SEQ_BEGIN")))
+ if (sComment.equalsIgnoreAsciiCase("FIELD_SEQ_BEGIN"))
{
sal_uInt8 const*const pData = pA->GetData();
if (pData && (pA->GetDataSize()))
@@ -2964,7 +2963,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
- if( ( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")) ) &&
+ if( ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) )
{
const MetaGradientExAction* pGradAction = NULL;
@@ -2978,7 +2977,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
pGradAction = (const MetaGradientExAction*) pAction;
else if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
( ( (const MetaCommentAction*) pAction )->GetComment().
- equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_END")) ) )
+ equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
{
bDone = sal_True;
}
@@ -2987,7 +2986,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( pGradAction )
ImplWriteGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), nWriteFlags );
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_BEGIN")) ) &&
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) &&
pA->GetDataSize() )
{
@@ -3036,7 +3035,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
( ( (const MetaCommentAction*) pAction )->GetComment().
- equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_END")) ) )
+ equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) )
{
bSkip = sal_False;
}
@@ -3064,13 +3063,13 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
( ( (const MetaCommentAction*) pAction )->GetComment().
- equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_END")) ) )
+ equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) )
{
bSkip = sal_False;
}
}
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHSTROKE_SEQ_BEGIN")) ) &&
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) &&
pA->GetDataSize() )
{
@@ -3204,7 +3203,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
( ( (const MetaCommentAction*) pAction )->GetComment().
- equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHSTROKE_SEQ_END")) ) )
+ equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_END") ) )
{
bSkip = sal_False;
}
@@ -3212,7 +3211,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
else if( !mrExport.IsUsePositionedCharacters() && ( nWriteFlags & SVGWRITER_WRITE_TEXT ) )
{
- if( ( pA->GetComment().equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_PAINTSHAPE_BEGIN" ) ) ) )
+ if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_BEGIN" ) ) )
{
if( pxShape )
{
@@ -3247,15 +3246,15 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_PAINTSHAPE_END" ) ) ) )
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_PAINTSHAPE_END" ) ) )
{
maTextWriter.endTextShape();
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_EOP" ) ) ) )
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOP" ) ) )
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pNextAction )->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XTEXT_PAINTSHAPE_END") ) ) ))
+ ( ( (const MetaCommentAction*) pNextAction )->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_END") ) ))
{
// nTextFound == -1 => no text found and end of paragraph reached
// nTextFound == 0 => no text found and end of text shape reached
@@ -3284,11 +3283,11 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
- else if( ( pA->GetComment().equalsIgnoreAsciiCaseL( RTL_CONSTASCII_STRINGPARAM( "XTEXT_EOL" ) ) ) )
+ else if( ( pA->GetComment().equalsIgnoreAsciiCase( "XTEXT_EOL" ) ) )
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pNextAction )->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XTEXT_EOP") ) ) ) )
+ ( ( (const MetaCommentAction*) pNextAction )->GetComment().equalsIgnoreAsciiCase("XTEXT_EOP") ) ) )
{
// nTextFound == -2 => no text found and end of line reached
// nTextFound == -1 => no text found and end of paragraph reached
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 5f40c10..ef18481 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -371,7 +371,7 @@ int Export::Execute( int nToken, const char * pToken )
break;
}
}
- if( sToken.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("#define NO_LOCALIZE_EXPORT")) ){
+ if( sToken.equalsIgnoreAsciiCase("#define NO_LOCALIZE_EXPORT") ){
bSkipFile = true;
return 0;
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index fc8aa7b..e221f16 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -276,7 +276,7 @@ sal_Bool LngParser::Merge(
for(size_t n = 0; n < aLanguages.size(); ++n)
{
sCur = aLanguages[ n ];
- if( !sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")) && Text[sCur].isEmpty() && pEntrys )
+ if( !sCur.equalsIgnoreAsciiCase("en-US") && Text[sCur].isEmpty() && pEntrys )
{
OString sNewText;
diff --git a/l10ntools/source/uimerge.cxx b/l10ntools/source/uimerge.cxx
index 91a0283..59d956f 100644
--- a/l10ntools/source/uimerge.cxx
+++ b/l10ntools/source/uimerge.cxx
@@ -170,7 +170,7 @@ bool Merge(
for(size_t n = 0; n < aLanguages.size(); ++n)
{
OString sCur = aLanguages[ n ];
- if (sCur.isEmpty() || sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")))
+ if (sCur.isEmpty() || sCur.equalsIgnoreAsciiCase("en-US"))
continue;
const OString aDestinationFile(aDestinationDir + sCur + ".ui");
if (!lcl_MergeLang(rMap, sCur, aDestinationFile))
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 8265b4a..046d02a 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -418,7 +418,7 @@ void XRMResMerge::WorkOnDesc(
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
OString sContent;
- if ( !sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")) &&
+ if ( !sCur.equalsIgnoreAsciiCase("en-US") &&
( pEntrys->GetText(
sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
!sContent.isEmpty())
@@ -507,7 +507,7 @@ void XRMResMerge::EndOfText(
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
OString sContent;
- if (!sCur.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("en-US")) &&
+ if (!sCur.equalsIgnoreAsciiCase("en-US") &&
( pEntrys->GetText(
sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
!sContent.isEmpty() &&
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 379d73c..25d006f 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -586,7 +586,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
aValue = aConfig.ReadKey( "Orientation", aDefOrientation );
if (!aValue.isEmpty())
- aInfo.m_eOrientation = aValue.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("landscape")) ? orientation::Landscape : orientation::Portrait;
+ aInfo.m_eOrientation = aValue.equalsIgnoreAsciiCase("landscape") ? orientation::Landscape : orientation::Portrait;
int nGroupKeys = aConfig.GetKeyCount();
for( int nPPDKey = 0; nPPDKey < nGroupKeys; nPPDKey++ )
{
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index 2a8b6f0..76e60b4 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -916,8 +916,7 @@ namespace slideshow
MetaCommentAction * pAct =
static_cast<MetaCommentAction *>(pCurrAct);
// skip comment if not a special XTEXT comment
- if (pAct->GetComment().equalsIgnoreAsciiCaseL(
- RTL_CONSTASCII_STRINGPARAM("FIELD_SEQ_BEGIN") ) &&
+ if (pAct->GetComment().equalsIgnoreAsciiCase("FIELD_SEQ_BEGIN") &&
// e.g. date field doesn't have data!
// currently assuming that only url field, this is
// somehow fragile! xxx todo if possible
@@ -942,8 +941,7 @@ namespace slideshow
pAct->GetDataSize() / sizeof(sal_Unicode) )
) );
}
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list