diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-05 22:42:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-06 08:25:21 +0200 |
commit | 16ce815df3c782fecb56f3112169189d956a200e (patch) | |
tree | be27706348545dd5df63ded316964c75db60c2d7 /toolkit/source/controls/dialogcontrol.cxx | |
parent | e718817f0efc01c440271cc709c8e4eb28ff5c0d (diff) |
cppcheck: knownConditionTrueFalse
Change-Id: I231113eaf3117e13ed18de906e3787643abe9335
Reviewed-on: https://gerrit.libreoffice.org/38423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/controls/dialogcontrol.cxx')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index ac9d0c427b25..06ce235374c1 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1089,13 +1089,10 @@ void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) OutputDevice*pOutDev = Application::GetDefaultDevice(); if ( pOutDev ) { - if ( !bOwnCtrl && !sTitle.isEmpty() ) - { - // Adjust Y based on height of Title - ::tools::Rectangle aRect; - aRect = pOutDev->GetTextRect( aRect, sTitle ); - nY = nY + ( aRect.GetHeight() / 2 ); - } + // Adjust Y based on height of Title + ::tools::Rectangle aRect; + aRect = pOutDev->GetTextRect( aRect, sTitle ); + nY = nY + ( aRect.GetHeight() / 2 ); } else { @@ -1119,9 +1116,8 @@ void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) } sal_Int16 nH = aFM.Ascent + aFM.Descent; - if ( !bOwnCtrl && !sTitle.isEmpty() ) - // offset y based on height of font ( not sure if my guess at the correct calculation is correct here ) - nY = nY + ( nH / 8); // how do I test this + // offset y based on height of font ( not sure if my guess at the correct calculation is correct here ) + nY = nY + ( nH / 8); // how do I test this } xW->setPosSize( nX, nY, nWidth, nHeight, PosSize::POSSIZE ); } |