summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-17 22:02:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-19 17:53:06 +0100
commit46c5de832868d2812448b2caace3eeaa9237b9f6 (patch)
tree6f25538cfb7a0def54ff7ac5b6b17eb22a76178a /writerperfect
parent6dd1d2268487920e8bda44dfd169a5bda4d62f13 (diff)
make *String(string_view) constructors explicit
to make it more obvious when we are constructing heap OUStrings code and potentially inadvertently throwing away performance. And fix a handful of places so revealed. Change-Id: I0cf390f78026f8a670aaab53424cd31510633051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/common/WPFTEncodingDialog.cxx2
-rw-r--r--writerperfect/source/writer/exp/xmlimp.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/writerperfect/source/common/WPFTEncodingDialog.cxx b/writerperfect/source/common/WPFTEncodingDialog.cxx
index 5ee935ba2307..b0c955481fb5 100644
--- a/writerperfect/source/common/WPFTEncodingDialog.cxx
+++ b/writerperfect/source/common/WPFTEncodingDialog.cxx
@@ -82,7 +82,7 @@ std::size_t const numEncodings = SAL_N_ELEMENTS(s_encodings);
void insertEncodings(weld::ComboBox& box)
{
for (std::size_t i = 0; i < numEncodings; ++i)
- box.append(s_encodings[i].first, s_encodings[i].second);
+ box.append(OUString(s_encodings[i].first), OUString(s_encodings[i].second));
}
void selectEncoding(weld::ComboBox& box, const OUString& encoding) { box.set_active_id(encoding); }
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 33870c026e78..62d004197f67 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -119,7 +119,7 @@ OUString FindCoverImage(const OUString& rDocumentBaseURL, OUString& rMimeType,
SvFileStream aStream(aRet, StreamMode::READ);
if (aStream.IsOpen())
{
- rMimeType = GetMimeType(rExtension);
+ rMimeType = GetMimeType(OUString(rExtension));
// File exists.
return aRet;
}