summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-14 14:56:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-25 13:29:11 +0200
commit1bbcc3fdf312971ffb681b332f47369739d95dde (patch)
tree649e44c2e46b2c16973333300103cd152b9523ac /xmloff
parentb84ef4d67eaf9f9fd7fd700ca05339cb0cdff742 (diff)
O[U]String overloads that return view for rest parameter
Add new overloads to OUString methods that have a "OUString* rest" style parameter. Instead return a view, which does not require allocation. To avoid overload ambiguity, split the methods into different variants that do not use default parameters. Change-Id: I1aa366115750f1f7ea4fe665804195f59f7c4b69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167632 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/animationexport.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 9be7a7211ec7..64fee6b8ef4c 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -514,8 +514,7 @@ char const s_PkgScheme[] = "vnd.sun.star.Package:";
static OUString lcl_StoreMediaAndGetURL(SvXMLExport & rExport, OUString const& rURL)
{
- OUString urlPath;
- if (rURL.startsWithIgnoreAsciiCase(s_PkgScheme, &urlPath))
+ if (rURL.startsWithIgnoreAsciiCase(s_PkgScheme))
{
try // video is embedded
{
@@ -528,7 +527,7 @@ static OUString lcl_StoreMediaAndGetURL(SvXMLExport & rExport, OUString const& r
uno::Reference<embed::XStorage> const xTarget(
rExport.GetTargetStorage(), uno::UNO_SET_THROW);
- urlPath = rURL.copy(SAL_N_ELEMENTS(s_PkgScheme)-1);
+ OUString urlPath = rURL.copy(SAL_N_ELEMENTS(s_PkgScheme)-1);
lcl_CopyStream(xSource, xTarget, urlPath);