diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-05-30 17:03:12 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-05-30 17:05:14 +0200 |
commit | be51f7ce59d5534cfda97badd4c02e2a4fe198e3 (patch) | |
tree | 83240f4a0078eb3babf93a162b0590b88f2f7a88 | |
parent | 41961997bed0c607920df447848e690cc858ec5f (diff) |
calc input line: Fix the size on Windows.
Change-Id: Iac102ad3794b8959fb219094a9db6345990c4883
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/inputwin.hxx | 1 | ||||
-rw-r--r-- | vcl/source/window/decoview.cxx | 16 |
3 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 53c5962a3495..37faa1d50eeb 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1139,7 +1139,6 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, ScTabViewShell* pViewSh mnLastExpandedLines( INPUTWIN_MULTILINES ), mbInvalidate( false ) { - mnTextHeight = GetTextHeight(); Size aBorder; aBorder = CalcWindowSize( aBorder); mnBorderHeight = aBorder.Height(); @@ -1173,7 +1172,7 @@ EditView* ScMultiTextWnd::GetEditView() long ScMultiTextWnd::GetPixelHeightForLines( long nLines ) { // add padding ( for the borders of the window ) - return ( nLines * mnTextHeight ) + mnBorderHeight; + return ( nLines * LogicToPixel( Size( 0, GetTextHeight() ) ).Height() ) + mnBorderHeight; } void ScMultiTextWnd::SetNumLines( long nLines ) @@ -1463,6 +1462,7 @@ ScTextWnd::ScTextWnd( Window* pParent, ScTabViewShell* pViewSh ) SetLineColor ( COL_BLACK ); SetMapMode ( MAP_TWIP ); SetPointer ( POINTER_TEXT ); + SetFont( aTextFont ); } ScTextWnd::~ScTextWnd() diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 84fb42141931..66e7eed31078 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -206,7 +206,6 @@ private: ScInputBarGroup& mrGroupBar; long mnLines; long mnLastExpandedLines; - long mnTextHeight; long mnBorderHeight; bool mbInvalidate; }; diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 20546e5e3dd0..7dfc30109dbc 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -742,10 +742,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, case FRAME_DRAW_NWF: // enough space for the native rendering - rRect.Left() += 5; - rRect.Top() += 5; - rRect.Right() -= 5; - rRect.Bottom() -= 5; + rRect.Left() += 4; + rRect.Top() += 4; + rRect.Right() -= 4; + rRect.Bottom() -= 4; break; } } @@ -841,10 +841,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, case FRAME_DRAW_NWF: // no rendering, just enough space for the native rendering - rRect.Left() += 5; - rRect.Top() += 5; - rRect.Right() -= 5; - rRect.Bottom() -= 5; + rRect.Left() += 4; + rRect.Top() += 4; + rRect.Right() -= 4; + rRect.Bottom() -= 4; break; } } |