summaryrefslogtreecommitdiff
path: root/vcl/source/control/field.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-12-26 09:11:53 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2022-01-02 09:03:32 +0100
commit9f4aad493c7087256d03b01ca3fb18d96f461526 (patch)
tree6db1c950085bd2809cfb2e1ecf9ddcd3537da961 /vcl/source/control/field.cxx
parent41ee9dcc4e12c32d49294dd4b19a97cb24f8253f (diff)
Introduce OUString::unacquired(const OUStringBuffer&)
... and avoid OUStringBuffer::toString when the temporary is used for checking current buffer content Change-Id: I114178f3e74ca3e4a3e517763f9eaab4797b7deb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/control/field.cxx')
-rw-r--r--vcl/source/control/field.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index cc5a6330d1a9..7fabe96d400a 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -794,13 +794,13 @@ namespace
nTextLen = OUString(OUString::number(rFormatter.GetMin())).getLength();
string::padToLength(aBuf, nTextLen, '9');
Size aMinTextSize = rSpinField.CalcMinimumSizeForText(
- rFormatter.CreateFieldText(aBuf.toString().toInt64()));
+ rFormatter.CreateFieldText(OUString::unacquired(aBuf).toInt64()));
aBuf.setLength(0);
nTextLen = OUString(OUString::number(rFormatter.GetMax())).getLength();
string::padToLength(aBuf, nTextLen, '9');
Size aMaxTextSize = rSpinField.CalcMinimumSizeForText(
- rFormatter.CreateFieldText(aBuf.toString().toInt64()));
+ rFormatter.CreateFieldText(OUString::unacquired(aBuf).toInt64()));
aBuf.setLength(0);
Size aRet(std::max(aMinTextSize.Width(), aMaxTextSize.Width()),