diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-29 20:52:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-30 21:21:34 +0200 |
commit | fbff7af0a1a31e82c3a3eb6dac77d5a48ef3371d (patch) | |
tree | 2aad7e48c6f7a260e0c3ebf6799fbfb95bb6a210 /starmath | |
parent | 40077fe30919494f0ecd04c4620cac2334d3d382 (diff) |
split comphelper::string::strip functions into String and view version
which is more obvious, from the perspective of the caller, and lets us
avoid creating a new String if nothing needs to be stripped
Change-Id: I66a980eaf4aa818251bec49bdb16c2dddb0745e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/cursor.cxx | 2 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index e2dbdc44bfe8..52621d360c80 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -986,7 +986,7 @@ void SmCursor::InsertSpecial(std::u16string_view _aString) BeginEdit(); Delete(); - OUString aString = comphelper::string::strip(_aString, ' '); + OUString aString( comphelper::string::strip(_aString, ' ') ); //Create instance of special node SmToken token; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index b3dc324a0d5f..043739cf5c0d 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1821,7 +1821,7 @@ bool SmSymDefineDialog::SelectSymbolSet(weld::ComboBox& rComboBox, assert((&rComboBox == m_xOldSymbolSets.get() || &rComboBox == m_xSymbolSets.get()) && "Sm : wrong ComboBox"); // trim SymbolName (no leading and trailing blanks) - OUString aNormName = comphelper::string::strip(rSymbolSetName, ' '); + OUString aNormName( comphelper::string::strip(rSymbolSetName, ' ') ); // and remove possible deviations within the input rComboBox.set_entry_text(aNormName); |