summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 1a94982df7e9..0e2fea644244 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -673,7 +673,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testConditionalText, "conditional-text.fodt"
// - Expression: xmlXPathNodeSetGetLength(pXmlNodes) > 0
// - In <...>, XPath '/w:document/w:body/w:p/w:r[2]/w:instrText' not found
// i.e. the field was lost on export.
- assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", aExpected);
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", OUString(aExpected));
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 6871bd4b6d26..6228aed5bf23 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -116,7 +116,7 @@ std::unique_ptr<weld::TreeIter> SwChangeDBDlg::Insert(const OUString& rDBName)
OUString sUserData = rDBName.getToken(0, DB_DELIM, nIdx);
sal_Int32 nCommandType = sUserData.toInt32();
- OUString rToInsert = nCommandType ? std::u16string_view(u"" RID_BMP_DBQUERY) : std::u16string_view(u"" RID_BMP_DBTABLE);
+ OUString rToInsert ( nCommandType ? std::u16string_view(u"" RID_BMP_DBQUERY) : std::u16string_view(u"" RID_BMP_DBTABLE) );
std::unique_ptr<weld::TreeIter> xIter(m_xUsedDBTLB->make_iterator());
if (m_xUsedDBTLB->get_iter_first(*xIter))
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index e6f3fa7948a0..e31483102e53 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -681,7 +681,7 @@ NavElementBox_Base::NavElementBox_Base(
m_xWidget->make_sorted();
m_xWidget->freeze();
for (sal_uInt16 i = 0; i < NID_COUNT; i++)
- m_xWidget->append(OUString::number(aNavigationInsertIds[i]), SwResId(aNavigationStrIds[i]), aNavigationImgIds[i]);
+ m_xWidget->append(OUString::number(aNavigationInsertIds[i]), SwResId(aNavigationStrIds[i]), OUString(aNavigationImgIds[i]));
m_xWidget->thaw();
m_xWidget->connect_changed(LINK(this, NavElementBox_Base, SelectHdl));