summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 10:31:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 13:55:30 +0200
commit65e4a776e8315fd61fd67ad00d28985b11f0b79e (patch)
tree1ab7a2947d47807086e0477a8d3ad35c2e75dd48 /sc
parenta7b7614c7cab42cd0839752635db81e25e1e50a1 (diff)
simplify some OUString::copy calls
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xehelper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 37244ae8ae80..a8317347e022 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -888,13 +888,13 @@ OUString lclEncodeDosUrl(
OUString aOldUrl = rUrl;
aBuf.append(EXC_URLSTART_ENCODED);
- if ( aOldUrl.getLength() > 2 && aOldUrl.copy(0,2) == "\\\\" )
+ if ( aOldUrl.getLength() > 2 && aOldUrl.startsWith("\\\\") )
{
// UNC
aBuf.append(EXC_URL_DOSDRIVE).append('@');
aOldUrl = aOldUrl.copy(2);
}
- else if ( aOldUrl.getLength() > 2 && aOldUrl.copy(1,2) == ":\\" )
+ else if ( aOldUrl.getLength() > 2 && aOldUrl.match(":\\", 1) )
{
// drive letter
sal_Unicode cThisDrive = rBase.isEmpty() ? ' ' : rBase[0];
@@ -916,7 +916,7 @@ OUString lclEncodeDosUrl(
sal_Int32 nPos = -1;
while((nPos = aOldUrl.indexOf('\\')) != -1)
{
- if ( aOldUrl.copy(0,2) == ".." )
+ if ( aOldUrl.startsWith("..") )
// parent dir (NOTE: the MS-XLS spec doesn't mention this, and
// Excel seems confused by this token).
aBuf.append(EXC_URL_PARENTDIR);