summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-28 12:38:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-28 17:32:18 +0100
commit943060836339f9640c612e9724f20e79db616e6e (patch)
tree3dc6e7748aef3ef0f2fca86979792162daa443fc /sdext
parentd249bd5a3dfe13052ce9aa91bad94ec7d60604d4 (diff)
simplify code, use more subView()
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/style.cxx2
-rw-r--r--sdext/source/presenter/PresenterController.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx
index 68f36379e172..73a9bd936663 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -167,7 +167,7 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const
else
aStyleName = OStringToOUString( rStyle.Name, RTL_TEXTENCODING_ASCII_US );
sal_Int32 nIndex = aStyleName.lastIndexOf( ':' );
- aRet.append( std::u16string_view(aStyleName).substr(nIndex+1) );
+ aRet.append( aStyleName.subView(nIndex+1) );
aRet.append( nStyle );
}
}
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 6d414d5f66ca..050109ff7182 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -375,13 +375,13 @@ void PresenterController::UpdatePaneTitles()
if (nStartIndex < 0)
{
// Add the remaining part of the string.
- sResult.append(std::u16string_view(sTemplate).substr(nIndex));
+ sResult.append(sTemplate.subView(nIndex));
break;
}
else
{
// Add the part preceding the next %.
- sResult.append(std::u16string_view(sTemplate).substr(nIndex, nStartIndex-nIndex));
+ sResult.append(sTemplate.subView(nIndex, nStartIndex-nIndex));
// Get the placeholder
++nStartIndex;