summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-10-18 13:28:53 +0200
committerVladimir Glazunov <vg@openoffice.org>2010-10-18 13:28:53 +0200
commita9e23e32bd9f4019779f1a10ecfb4f69598980bf (patch)
tree4ef21afdb13fd62ad45e89459d841b7d568f768f
parentee4b5132f9d210dd435f242b228c3d1ad6d3b904 (diff)
parente2c9644a237e6d89cd097cb8bfa155aedd685421 (diff)
CWS-TOOLING: integrate CWS vcl115ooo/DEV300_m90
-rwxr-xr-xsw/source/ui/ribbar/inputwin.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 3fe5e3edb5..2d61300860 100755
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -103,16 +103,23 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl ));
Size aSizeTbx = CalcWindowSizePixel();
+ Size aEditSize = aEdit.GetSizePixel();
+ Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) );
+ long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight();
+ if( nMaxHeight+2 > aSizeTbx.Height() )
+ aSizeTbx.Height() = nMaxHeight+2;
Size aSize = GetSizePixel();
aSize.Height() = aSizeTbx.Height();
SetSizePixel( aSize );
- Size aPosSize = aPos.GetSizePixel();
- Size aEditSize = aEdit.GetSizePixel();
- aPosSize.Height() = aEditSize.Height() = GetItemRect(FN_FORMULA_CALC).GetHeight() - 2;
- Point aPosPos = aPos.GetPosPixel();
- Point aEditPos= aEdit.GetPosPixel();
- aPosPos.Y() = aEditPos.Y() = GetItemRect( FN_FORMULA_CALC ).TopLeft().Y() + 1;
+ // align edit and item vcentered
+ Size aPosSize = aPos.GetSizePixel();
+ aPosSize.Height() = nMaxHeight;
+ aEditSize.Height() = nMaxHeight;
+ Point aPosPos = aPos.GetPosPixel();
+ Point aEditPos = aEdit.GetPosPixel();
+ aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1;
+ aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1;
aPos.SetPosSizePixel( aPosPos, aPosSize );
aEdit.SetPosSizePixel( aEditPos, aEditSize );