summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
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 'xmloff')
-rw-r--r--xmloff/source/core/xmluconv.cxx2
-rw-r--r--xmloff/source/draw/propimp0.cxx2
-rw-r--r--xmloff/source/meta/xmlmetai.cxx3
-rw-r--r--xmloff/source/style/fonthdl.cxx2
-rw-r--r--xmloff/source/style/xmlexppr.cxx2
5 files changed, 5 insertions, 6 deletions
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 6cda57185a3b..23f3d7017ccd 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -449,7 +449,7 @@ void SvXMLUnitConverter::convertDateTime( OUStringBuffer& rBuffer,
// Truncate nFractionDecimals+1 digit if it was not rounded to zero.
const sal_Int32 nCount = nLen - 2 - static_cast<int>(nLen > nFractionDecimals + 2);
rBuffer.append( '.');
- rBuffer.append( std::u16string_view(aFraction).substr(2, nCount)); // strip 0.
+ rBuffer.append( aFraction.subView(2, nCount)); // strip 0.
}
}
diff --git a/xmloff/source/draw/propimp0.cxx b/xmloff/source/draw/propimp0.cxx
index 991b3cb7a271..961aa406d868 100644
--- a/xmloff/source/draw/propimp0.cxx
+++ b/xmloff/source/draw/propimp0.cxx
@@ -185,7 +185,7 @@ bool XMLTextAnimationStepPropertyHdl::importXML(
sal_Int32 nPos = rStrImpValue.indexOf( "px" );
if( nPos != -1 )
{
- if (::sax::Converter::convertNumber(nValue, std::u16string_view(rStrImpValue).substr(0, nPos)))
+ if (::sax::Converter::convertNumber(nValue, rStrImpValue.subView(0, nPos)))
{
rValue <<= sal_Int16( -nValue );
bRet = true;
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 6e2a485ca828..cf61dba8fab7 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -251,8 +251,7 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
if ( nBegin != -1 )
{
sBuffer.append( '$' );
- sBuffer.append( std::u16string_view(i_rBuildId).substr(
- nBegin + sBuildCompare.getLength()) );
+ sBuffer.append( i_rBuildId.subView(nBegin + sBuildCompare.getLength()) );
sBuildId = sBuffer.makeStringAndClear();
}
}
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 128dfa15289c..144de999cb78 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -97,7 +97,7 @@ bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno::Any
if( !sValue.isEmpty() )
sValue.append(';');
- sValue.append(std::u16string_view(rStrImpValue).substr(nFirst, nLast-nFirst+1));
+ sValue.append(rStrImpValue.subView(nFirst, nLast-nFirst+1));
}
if( -1 != nPos )
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 0e35f8b1948b..291c2ee36041 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -1005,7 +1005,7 @@ void SvXMLExportPropertyMapper::_exportXML(
sPrefix = pNamespaceMap->GetPrefixByKey( nKey );
}
// In any case, the attribute name has to be adapted.
- sNameBuffer.append(sPrefix).append(":").append(std::u16string_view(rAttribName).substr(nColonPos+1) );
+ sNameBuffer.append(sPrefix).append(":").append(rAttribName.subView(nColonPos+1));
sAttribName = sNameBuffer.makeStringAndClear();
}