Kaydet (Commit) be51f7ce authored tarafından Jan Holesovsky's avatar Jan Holesovsky

calc input line: Fix the size on Windows.

Change-Id: Iac102ad3794b8959fb219094a9db6345990c4883
üst 41961997
...@@ -1139,7 +1139,6 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, ScTabViewShell* pViewSh ...@@ -1139,7 +1139,6 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, ScTabViewShell* pViewSh
mnLastExpandedLines( INPUTWIN_MULTILINES ), mnLastExpandedLines( INPUTWIN_MULTILINES ),
mbInvalidate( false ) mbInvalidate( false )
{ {
mnTextHeight = GetTextHeight();
Size aBorder; Size aBorder;
aBorder = CalcWindowSize( aBorder); aBorder = CalcWindowSize( aBorder);
mnBorderHeight = aBorder.Height(); mnBorderHeight = aBorder.Height();
...@@ -1173,7 +1172,7 @@ EditView* ScMultiTextWnd::GetEditView() ...@@ -1173,7 +1172,7 @@ EditView* ScMultiTextWnd::GetEditView()
long ScMultiTextWnd::GetPixelHeightForLines( long nLines ) long ScMultiTextWnd::GetPixelHeightForLines( long nLines )
{ {
// add padding ( for the borders of the window ) // 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 ) void ScMultiTextWnd::SetNumLines( long nLines )
...@@ -1463,6 +1462,7 @@ ScTextWnd::ScTextWnd( Window* pParent, ScTabViewShell* pViewSh ) ...@@ -1463,6 +1462,7 @@ ScTextWnd::ScTextWnd( Window* pParent, ScTabViewShell* pViewSh )
SetLineColor ( COL_BLACK ); SetLineColor ( COL_BLACK );
SetMapMode ( MAP_TWIP ); SetMapMode ( MAP_TWIP );
SetPointer ( POINTER_TEXT ); SetPointer ( POINTER_TEXT );
SetFont( aTextFont );
} }
ScTextWnd::~ScTextWnd() ScTextWnd::~ScTextWnd()
......
...@@ -206,7 +206,6 @@ private: ...@@ -206,7 +206,6 @@ private:
ScInputBarGroup& mrGroupBar; ScInputBarGroup& mrGroupBar;
long mnLines; long mnLines;
long mnLastExpandedLines; long mnLastExpandedLines;
long mnTextHeight;
long mnBorderHeight; long mnBorderHeight;
bool mbInvalidate; bool mbInvalidate;
}; };
......
...@@ -742,10 +742,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, ...@@ -742,10 +742,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
case FRAME_DRAW_NWF: case FRAME_DRAW_NWF:
// enough space for the native rendering // enough space for the native rendering
rRect.Left() += 5; rRect.Left() += 4;
rRect.Top() += 5; rRect.Top() += 4;
rRect.Right() -= 5; rRect.Right() -= 4;
rRect.Bottom() -= 5; rRect.Bottom() -= 4;
break; break;
} }
} }
...@@ -841,10 +841,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, ...@@ -841,10 +841,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
case FRAME_DRAW_NWF: case FRAME_DRAW_NWF:
// no rendering, just enough space for the native rendering // no rendering, just enough space for the native rendering
rRect.Left() += 5; rRect.Left() += 4;
rRect.Top() += 5; rRect.Top() += 4;
rRect.Right() -= 5; rRect.Right() -= 4;
rRect.Bottom() -= 5; rRect.Bottom() -= 4;
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment