summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx3
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx2
-rw-r--r--filter/source/msfilter/msvbahelper.cxx4
-rw-r--r--oox/source/vml/vmlinputstream.cxx2
-rw-r--r--sc/source/filter/excel/xltools.cxx4
-rw-r--r--svtools/source/config/colorcfg.cxx4
7 files changed, 9 insertions, 12 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 34a9c9ba401b..1602fb0e65ef 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1767,7 +1767,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const OUString& rClass )
// match interface name with passed class name
OSL_TRACE("Checking if object implements %s", OUStringToOString( aClassName, RTL_TEXTENCODING_UTF8 ).getStr() );
if ( (aClassName.getLength() <= aInterfaceName.getLength()) &&
- aInterfaceName.matchIgnoreAsciiCase( aClassName, aInterfaceName.getLength() - aClassName.getLength() ) )
+ aInterfaceName.endsWithIgnoreAsciiCase( aClassName ) )
{
result = true;
break;
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 320a9994f595..f6c935e6e417 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1322,8 +1322,7 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
// since LibO 4.1, '-' is a word separator
// fdo#67742 avoid "--" to be replaced by "–" if next is "-"
- if( rTxt.getLength() >= 3 &&
- rTxt.match( OUString("---"), rTxt.getLength()-3 ) )
+ if( rTxt.endsWith( "---" ) )
break;
bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
*this, pPara );
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index 66d20cea57d7..c519440e2747 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -598,7 +598,7 @@ namespace pcr
case TypeClass_STRING:
{
// some special handling for URL properties
- bool bIsURLProperty = ( _rPropertyName.getLength() >= 3 ) && _rPropertyName.matchAsciiL( "URL", 3, _rPropertyName.getLength() - 3 );
+ bool bIsURLProperty = _rPropertyName.endsWithAsciiL( "URL", 3 );
if ( bIsURLProperty )
{
aDescriptor.Control = _rxControlFactory->createPropertyControl(
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 6c48eed593e7..fbde4d64fc36 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -54,9 +54,7 @@ OUString makeMacroURL( const OUString& sMacroName )
OUString extractMacroName( const OUString& rMacroUrl )
{
- if( (rMacroUrl.getLength() > sUrlPart0.getLength() + sUrlPart1.getLength()) &&
- rMacroUrl.match( sUrlPart0 ) &&
- rMacroUrl.match( sUrlPart1, rMacroUrl.getLength() - sUrlPart1.getLength() ) )
+ if( rMacroUrl.startsWith( sUrlPart0 ) && rMacroUrl.endsWith( sUrlPart1 ) )
{
return rMacroUrl.copy( sUrlPart0.getLength(),
rMacroUrl.getLength() - sUrlPart0.getLength() - sUrlPart1.getLength() );
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index f534ecf2ea0c..70896e1952ff 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -355,7 +355,7 @@ void InputStream::updateBuffer() throw (IOException, RuntimeException)
if( aElement.match( maOpeningCData ) )
{
// search the end tag ']]>'
- while( ((aElement.getLength() < maClosingCData.getLength()) || !aElement.match( maClosingCData, aElement.getLength() - maClosingCData.getLength() )) && !mxTextStrm->isEOF() )
+ while( ((aElement.getLength() < maClosingCData.getLength()) || !aElement.endsWith( maClosingCData )) && !mxTextStrm->isEOF() )
aElement += readToElementEnd();
// copy the entire CDATA part
aBuffer.append( aElement );
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index a044442306e4..ce6e64611d86 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -704,8 +704,8 @@ OUString XclTools::GetXclMacroName( const OUString& rSbMacroUrl )
{
sal_Int32 nSbMacroUrlLen = rSbMacroUrl.getLength();
sal_Int32 nMacroNameLen = nSbMacroUrlLen - maSbMacroPrefix.getLength() - maSbMacroSuffix.getLength();
- if( (nMacroNameLen > 0) && rSbMacroUrl.matchIgnoreAsciiCase( maSbMacroPrefix, 0 ) &&
- rSbMacroUrl.matchIgnoreAsciiCase( maSbMacroSuffix, nSbMacroUrlLen - maSbMacroSuffix.getLength() ) )
+ if( (nMacroNameLen > 0) && rSbMacroUrl.startsWithIgnoreAsciiCase( maSbMacroPrefix ) &&
+ rSbMacroUrl.endsWithIgnoreAsciiCase( maSbMacroSuffix ) )
{
sal_Int32 nPrjDot = rSbMacroUrl.indexOf( '.', maSbMacroPrefix.getLength() ) + 1;
return rSbMacroUrl.copy( nPrjDot, nSbMacroUrlLen - nPrjDot - maSbMacroSuffix.getLength() );
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 5b4974573075..662733d66ad6 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -240,7 +240,7 @@ void ColorConfig_Impl::Load(const OUString& rScheme)
if(nIndex >= aColors.getLength())
break;
//test for visibility property
- if(pColorNames[nIndex].match(m_sIsVisible, pColorNames[nIndex].getLength() - m_sIsVisible.getLength()))
+ if(pColorNames[nIndex].endsWith(m_sIsVisible))
m_aConfigValues[i / 2].bIsVisible = Any2Bool(pColors[nIndex++]);
}
// fdo#71511: check if we are running in a11y autodetect
@@ -280,7 +280,7 @@ void ColorConfig_Impl::Commit()
if(nIndex >= aColorNames.getLength())
break;
//test for visibility property
- if(pColorNames[nIndex].match(m_sIsVisible, pColorNames[nIndex].getLength() - m_sIsVisible.getLength()))
+ if(pColorNames[nIndex].endsWith(m_sIsVisible))
{
pPropValues[nIndex].Name = pColorNames[nIndex];
pPropValues[nIndex].Value.setValue(&m_aConfigValues[i/2].bIsVisible, rBoolType);