diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-11 11:04:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-11 14:13:03 +0200 |
commit | 7de833a626cea8cd741ba1d971fea6f0c3a2660b (patch) | |
tree | 2750dbed735b4df7a9e82add532df49049cc52e8 /lotuswordpro | |
parent | 6f9f9491bdef676f969898bd653db9905d14f5e8 (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 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpfribmark.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpmarker.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx index 05f4bc81daea..6c5ce34e8a20 100644 --- a/lotuswordpro/source/filter/lwpfribmark.cxx +++ b/lotuswordpro/source/filter/lwpfribmark.cxx @@ -374,7 +374,7 @@ void LwpFribField::RegisterTimeField(LwpFieldMark* pFieldMark) OUString tag = sFormula.copy(0,index); if (tag == "Now()" || tag == "CreateDate" || tag == "EditDate") - RegisterDateTimeStyle(sFormula.copy(index+1,sFormula.getLength()-index-1)); + RegisterDateTimeStyle(sFormula.copy(index+1)); } } diff --git a/lotuswordpro/source/filter/lwpmarker.cxx b/lotuswordpro/source/filter/lwpmarker.cxx index 97ddd200511e..5743daae7ebc 100644 --- a/lotuswordpro/source/filter/lwpmarker.cxx +++ b/lotuswordpro/source/filter/lwpmarker.cxx @@ -436,19 +436,19 @@ bool LwpFieldMark::IsDateTimeField(sal_uInt8& type,OUString& formula) if (tag == "Now()") { type = DATETIME_NOW; - formula = sFormula.copy(index+1,sFormula.getLength()-index-1); + formula = sFormula.copy(index+1); return true; } else if (tag == "CreateDate") { type = DATETIME_CREATE; - formula = sFormula.copy(index+1,sFormula.getLength()-index-1); + formula = sFormula.copy(index+1); return true; } else if (tag == "EditDate") { type = DATETIME_LASTEDIT; - formula = sFormula.copy(index+1,sFormula.getLength()-index-1); + formula = sFormula.copy(index+1); return true; } else if (tag == "YesterdaysDate" || tag == "TomorrowsDate" @@ -482,13 +482,13 @@ bool LwpFieldMark::IsCrossRefField(sal_uInt8& nType, OUString& sMarkName) OUString tag = sFormula.copy(0,index); if (tag == "PageRef") { - sMarkName = sFormula.copy(index+1,sFormula.getLength()-index-1); + sMarkName = sFormula.copy(index+1); nType = CROSSREF_PAGE; return true; } else if (tag == "ParaRef") { - sMarkName = sFormula.copy(index+1,sFormula.getLength()-index-1); + sMarkName = sFormula.copy(index+1); nType = CROSSREF_PARANUMBER; return true; } |