[Libreoffice-commits] .: sc/source vcl/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed May 30 08:05:28 PDT 2012
sc/source/ui/app/inputwin.cxx | 4 ++--
sc/source/ui/inc/inputwin.hxx | 1 -
vcl/source/window/decoview.cxx | 16 ++++++++--------
3 files changed, 10 insertions(+), 11 deletions(-)
New commits:
commit be51f7ce59d5534cfda97badd4c02e2a4fe198e3
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed May 30 17:03:12 2012 +0200
calc input line: Fix the size on Windows.
Change-Id: Iac102ad3794b8959fb219094a9db6345990c4883
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 53c5962..37faa1d 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 84fb421..66e7eed 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 20546e5..7dfc301 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;
}
}
More information about the Libreoffice-commits
mailing list