summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-06-05 22:42:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-06 08:25:21 +0200
commit16ce815df3c782fecb56f3112169189d956a200e (patch)
treebe27706348545dd5df63ded316964c75db60c2d7 /toolkit/source
parente718817f0efc01c440271cc709c8e4eb28ff5c0d (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')
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx16
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 );
}