summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-05-27 15:10:52 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2022-05-27 16:14:42 +0200
commit0779a1a185d2144d13766e6d827f43c0fd1bc814 (patch)
tree2a81c60cfcba9ea68eb7f4563512b8a5b7df7192
parent74de217a52a15588e3fdf4059d62a384777c66db (diff)
Drop useless text width calculation
It came from SvTreeListBox::GetHeightOffset dropped in commit 7da765dde1800aa607f96e7a5807582ad2894acb Author Noel Grandin <noel.grandin@collabora.co.uk> Date Thu Oct 27 10:21:42 2016 +0200 loplugin:expandablemethods in svtools Possibly the calculation was used for something else GetHeightOffset used before. Change-Id: I2a13035e0852637529c40a0ffe1bd0e2b8b3d077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135010 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--vcl/source/treelist/treelistbox.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index a244e97f809a..5092c64cb83d 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2029,10 +2029,10 @@ void SvTreeListBox::AdjustEntryHeight( const Image& rBmp )
void SvTreeListBox::AdjustEntryHeight()
{
- Size aSize( GetTextWidth(OUString('X')), GetTextHeight() );
- if( aSize.Height() > nEntryHeight )
+ tools::Long nHeight = GetTextHeight();
+ if( nHeight > nEntryHeight )
{
- nEntryHeight = static_cast<short>(aSize.Height()) + nEntryHeightOffs;
+ nEntryHeight = static_cast<short>(nHeight) + nEntryHeightOffs;
pImpl->SetEntryHeight();
}
}