vcl/source/treelist/treelistbox.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0779a1a185d2144d13766e6d827f43c0fd1bc814
Author:     Mike Kaganski <[email protected]>
AuthorDate: Fri May 27 15:10:52 2022 +0200
Commit:     Mike Kaganski <[email protected]>
CommitDate: Fri May 27 16:14:42 2022 +0200

    Drop useless text width calculation
    
    It came from SvTreeListBox::GetHeightOffset dropped in commit
    7da765dde1800aa607f96e7a5807582ad2894acb
      Author Noel Grandin <[email protected]>
      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 <[email protected]>

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();
     }
 }

Reply via email to