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
commit40504a99ac475cbab3571a445040ca26b5527b3c (patch)
tree0b0fb55ef7c29a0bd86f731101b04d5c6e1eafaa
parent33b84b7973ff9067e24a9785314f22a318122b35 (diff)
parent5c20589d2239a650e25666ae184159adfead5f27 (diff)
CWS-TOOLING: integrate CWS vcl115
Notes
split repo tag: writer_ooo/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 9ee5a6e2ffa3..e6d7bf26db80 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 );