summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-05-30 17:03:12 +0200
committerJan Holesovsky <kendy@suse.cz>2012-05-30 17:05:14 +0200
commitbe51f7ce59d5534cfda97badd4c02e2a4fe198e3 (patch)
tree83240f4a0078eb3babf93a162b0590b88f2f7a88 /sc
parent41961997bed0c607920df447848e690cc858ec5f (diff)
calc input line: Fix the size on Windows.
Change-Id: Iac102ad3794b8959fb219094a9db6345990c4883
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/inc/inputwin.hxx1
2 files changed, 2 insertions, 3 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;
};