summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomofumi Yagi <yagit@mknada.sakura.ne.jp>2015-02-14 22:10:36 +0900
committerCaolán McNamara <caolanm@redhat.com>2015-02-19 09:39:59 +0000
commitc7efcb1340ceee35fe3b8ffd9ed86b8cae57d9ce (patch)
treec25d07344addaa751ec1c61d7731bddbee39ac39
parent3eaeefe83772bacad4fe5e0f35bbf52b2590e835 (diff)
tdf#83099 fix Top of formula bar is missing when expanding on Windows 7
This is workaround patch. ToolBox::ImplFormat() method places it to the new position, when the new item is added. ToolBox::ImplFormat() method determines whether or not the item is newly added, using that the new item's Top Coordinate is 0. However, it seems that the non-new item's Top Coordinate is 0 on Windows 7 with default(aero) theme, using small icons. We also need to consider in this case. Change-Id: I35cf81502799432f63e0920219fcbaac9050d81f Reviewed-on: https://gerrit.libreoffice.org/14538 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/window/toolbox.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index bd6416686242..1a6179eddd72 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2492,7 +2492,15 @@ void ToolBox::ImplFormat( bool bResize )
// items here. ( Note: assume mnMaxItemHeight is
// equal to the LineSize when multibar has a single
// line size )
- it->maCalcRect.Top() = it->maRect.Top() ? it->maRect.Top() : ( nY + ( mnMaxItemHeight-aCurrentItemSize.Height())/2 );
+ if ( it->maRect.Top() ||
+ (it->mpWindow && it->mpWindow->GetType() == WINDOW_CALCINPUTLINE) ) // tdf#83099
+ {
+ it->maCalcRect.Top() = it->maRect.Top();
+ }
+ else
+ {
+ it->maCalcRect.Top() = nY+(mnMaxItemHeight-aCurrentItemSize.Height())/2;
+ }
}
else
it->maCalcRect.Top() = nY+(nLineSize-aCurrentItemSize.Height())/2;
@@ -2516,6 +2524,9 @@ void ToolBox::ImplFormat( bool bResize )
if ( it->mbShowWindow )
{
Point aPos( it->maCalcRect.Left(), it->maCalcRect.Top() );
+
+ assert( it->maCalcRect.Top() >= 0 );
+
it->mpWindow->SetPosPixel( aPos );
if ( !mbCustomizeMode )
it->mpWindow->Show();