summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/cfgutil.cxx8
-rw-r--r--cui/source/options/cfgchart.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index effb212be761..17c445d672e8 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -115,15 +115,15 @@ bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle)
OUString sArg = sCmdArgs.copy(0, i);
if (sArg.startsWith(CMDURL_SPART_ONLY))
- aStyle.sStyle = sArg.copy(LEN_SPART, sArg.getLength()-LEN_SPART);
+ aStyle.sStyle = sArg.copy(LEN_SPART);
else if (sArg.startsWith(CMDURL_FPART_ONLY))
- aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART);
+ aStyle.sFamily = sArg.copy(LEN_FPART);
sArg = sCmdArgs.copy(i+1, sCmdArgs.getLength()-i-1);
if (sArg.startsWith(CMDURL_SPART_ONLY))
- aStyle.sStyle = sArg.copy(LEN_SPART, sArg.getLength()-LEN_SPART);
+ aStyle.sStyle = sArg.copy(LEN_SPART);
else if (sArg.startsWith(CMDURL_FPART_ONLY))
- aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART);
+ aStyle.sFamily = sArg.copy(LEN_FPART);
return !(aStyle.sFamily.isEmpty() || aStyle.sStyle.isEmpty());
}
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index fe9a24a01437..8a2e95793b16 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -224,7 +224,7 @@ bool SvxChartOptions::RetrieveOptions()
{
aPrefix = aResName.copy( 0, nPos );
sal_Int32 idx = nPos + sizeof( "$(ROW)" ) - 1;
- aPostfix = aResName.copy( idx, aResName.getLength()-idx );
+ aPostfix = aResName.copy( idx );
}
else
aPrefix = aResName;