summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 11:04:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 14:13:03 +0200
commit7de833a626cea8cd741ba1d971fea6f0c3a2660b (patch)
tree2750dbed735b4df7a9e82add532df49049cc52e8 /svtools
parent6f9f9491bdef676f969898bd653db9905d14f5e8 (diff)
simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/collatorres.cxx2
-rw-r--r--svtools/source/control/indexentryres.cxx2
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx
index 15ea3a6afb1e..5998eb47ffae 100644
--- a/svtools/source/control/collatorres.cxx
+++ b/svtools/source/control/collatorres.cxx
@@ -51,7 +51,7 @@ CollatorResource::GetTranslation(const OUString &r_Algorithm)
else
{
nIndex += 1;
- aLocaleFreeAlgorithm = r_Algorithm.copy(nIndex, r_Algorithm.getLength() - nIndex);
+ aLocaleFreeAlgorithm = r_Algorithm.copy(nIndex);
}
for (size_t i = 0; i < m_aData.size(); ++i)
diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx
index cb8d5084de2b..d9040f909b63 100644
--- a/svtools/source/control/indexentryres.cxx
+++ b/svtools/source/control/indexentryres.cxx
@@ -46,7 +46,7 @@ const OUString& IndexEntryResource::GetTranslation(const OUString &r_Algorithm)
aLocaleFreeAlgorithm = r_Algorithm;
else {
nIndex += 1;
- aLocaleFreeAlgorithm = r_Algorithm.copy(nIndex, r_Algorithm.getLength() - nIndex);
+ aLocaleFreeAlgorithm = r_Algorithm.copy(nIndex);
}
for (size_t i = 0; i < m_aData.size(); ++i)
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index 71709b8cbd04..8b5998648712 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -83,7 +83,7 @@ void HTMLParser::RemoveSGMLComment( OUString &rString, bool bFull )
sal_Unicode c = 0;
while( !rString.isEmpty() &&
( ' '==(c=rString[0]) || '\t'==c || '\r'==c || '\n'==c ) )
- rString = rString.copy( 1, rString.getLength() - 1 );
+ rString = rString.copy( 1 );
while( !rString.isEmpty() &&
( ' '==(c=rString[rString.getLength()-1])
@@ -109,7 +109,7 @@ void HTMLParser::RemoveSGMLComment( OUString &rString, bool bFull )
nPos = 3;
}
++nPos;
- rString = rString.copy( nPos, rString.getLength() - nPos );
+ rString = rString.copy( nPos );
}
if( rString.endsWith("-->") )