summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-14 15:26:15 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-15 08:56:24 +0900
commit848e020fcf3ba4d6c8ff0a03fb6049193cc78848 (patch)
tree1641f4b9ed00fb06ccfb597e7e53ec1387f55f1f /sc
parent71131e2b16272b0a504f44bd0b00a6cbd17aee13 (diff)
move Resize code to Paint for ScTextWnd
Change-Id: Icd0e12e02b808c3cf1eacd15021cdf249bdcfab3
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputwin.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 940b125328e9..d7ae24e611b2 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1518,6 +1518,10 @@ void ScTextWnd::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
{
if (pEditView)
{
+ Size aSize = rRenderContext.GetOutputSizePixel();
+ long nDiff = aSize.Height() - rRenderContext.LogicToPixel(Size(0, rRenderContext.GetTextHeight())).Height();
+ pEditView->SetOutputArea(rRenderContext.PixelToLogic(Rectangle(Point(0, (nDiff > 0) ? nDiff / 2 : 1), aSize)));
+
pEditView->Paint(rRect, &rRenderContext);
}
else
@@ -1544,14 +1548,7 @@ void ScTextWnd::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
void ScTextWnd::Resize()
{
- if (pEditView)
- {
- Size aSize = GetOutputSizePixel();
- long nDiff = aSize.Height() - LogicToPixel( Size( 0, GetTextHeight() ) ).Height();
-
- pEditView->SetOutputArea(PixelToLogic( Rectangle( Point( 0, (nDiff > 0) ? nDiff/2 : 1 ),
- aSize ) ) );
- }
+ Invalidate();
}
void ScTextWnd::MouseMove( const MouseEvent& rMEvt )