summaryrefslogtreecommitdiffstats
path: root/svtools/source/svhtml/htmlsupp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-21 10:21:01 +0200
committerNoel Grandin <noel@peralex.com>2013-10-23 08:29:15 +0200
commit7a06928bcf638e1eeedebc9d53c306a1b852cc9b (patch)
treec0402c2da4e2c522ecf32a0b413128f727cbc0fa /svtools/source/svhtml/htmlsupp.cxx
parentmacosx: add a LSMinimumSystemVersion in Info.plist (diff)
downloadcore-7a06928bcf638e1eeedebc9d53c306a1b852cc9b.tar.gz
core-7a06928bcf638e1eeedebc9d53c306a1b852cc9b.zip
convert code to use OUString::endsWith
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
Diffstat (limited to 'svtools/source/svhtml/htmlsupp.cxx')
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index 829e8f3b2a19..f1de1c0e3313 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -96,8 +96,7 @@ void HTMLParser::RemoveSGMLComment( OUString &rString, sal_Bool bFull )
// remove SGML comments
- if( rString.getLength() >= 4 &&
- rString.startsWith( "<!--" ) )
+ if( rString.startsWith( "<!--" ) )
{
sal_Int32 nPos = 3;
if( bFull )
@@ -117,8 +116,7 @@ void HTMLParser::RemoveSGMLComment( OUString &rString, sal_Bool bFull )
rString = rString.copy( nPos, rString.getLength() - nPos );
}
- if( rString.getLength() >=3 &&
- rString.endsWith("-->") )
+ if( rString.endsWith("-->") )
{
rString = rString.copy( 0, rString.getLength()-3 );
if( bFull )