vcl/source/window/toolbox.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit c7efcb1340ceee35fe3b8ffd9ed86b8cae57d9ce Author: Tomofumi Yagi <ya...@mknada.sakura.ne.jp> Date: Sat Feb 14 22:10:36 2015 +0900 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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index bd64166..1a6179e 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();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits