vcl/source/edit/textundo.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 1b5a4da9100675243b14f2d9b07f23010d94aa82 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Jan 27 08:38:37 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Jan 27 10:08:12 2020 +0100 Use more appropriate variable types, spare explicit casts Change-Id: I51114cf6c87b9368e72d5186fec457d307c25c09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87480 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index adbf8be9076c..b910be11257b 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -35,17 +35,17 @@ namespace // Shorten() -- inserts ellipsis (...) in the middle of a long text void Shorten (OUString& rString) { - unsigned nLen = rString.getLength(); + auto const nLen = rString.getLength(); if (nLen > 48) { // If possible, we don't break a word, hence first we look for a space. // Space before the ellipsis: - int iFirst = rString.lastIndexOf(' ', 32); - if (iFirst == -1 || unsigned(iFirst) < 16) + auto iFirst = rString.lastIndexOf(' ', 32); + if (iFirst == -1 || iFirst < 16) iFirst = 24; // not possible // Space after the ellipsis: - int iLast = rString.indexOf(' ', nLen - 16); - if (iLast == -1 || unsigned(iLast) > nLen - 4) + auto iLast = rString.indexOf(' ', nLen - 16); + if (iLast == -1 || iLast > nLen - 4) iLast = nLen - 8; // not possible // finally: rString = _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits