summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-01-24 11:14:38 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-24 14:20:50 +0100
commit4fa27dfc0e67adb298bbb412657958908433d547 (patch)
tree69e1326898b5a030580f497bdfc081421a04682c
parentfdo#43705: fix incomplete updating of the page preview pane in Draw (diff)
downloadcore-4fa27dfc0e67adb298bbb412657958908433d547.tar.gz
core-4fa27dfc0e67adb298bbb412657958908433d547.zip
fix ( hopefully ) viewing artifacts in input line fdo#44391
Signed-off-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/app/inputwin.cxx15
-rw-r--r--sc/source/ui/inc/inputwin.hxx1
2 files changed, 12 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 1793fae56d80..37caced86ff0 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1125,7 +1125,8 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, ScTabViewShell* pViewSh
ScTextWnd( pParen, pViewSh ),
mrGroupBar(* pParen ),
mnLines( 1 ),
- mnLastExpandedLines( INPUTWIN_MULTILINES )
+ mnLastExpandedLines( INPUTWIN_MULTILINES ),
+ mbInvalidate( false )
{
nTextStartPos = TEXT_MULTI_STARTPOS;
}
@@ -1138,7 +1139,14 @@ void ScMultiTextWnd::Paint( const Rectangle& rRec )
{
EditView* pView = GetEditView();
if ( pView )
- pView->Paint( rRec );
+ {
+ if ( mbInvalidate )
+ {
+ pView->Invalidate();
+ mbInvalidate = false;
+ }
+ pEditView->Paint( rRec );
+ }
}
EditView* ScMultiTextWnd::GetEditView()
@@ -1403,8 +1411,7 @@ void ScMultiTextWnd::SetTextString( const String& rNewString )
// inputbar window scrolled to the bottom if we do that here ( because the tableview and topview
// are synced I guess ).
// should fix that I suppose :-/ need to look a bit further into that
- if ( pEditView )
- pEditView->Invalidate();
+ mbInvalidate = true; // ensure next Paint ( that uses editengine ) call will call Invalidate first
ScTextWnd::SetTextString( rNewString );
SetScrollBarRange();
DoScroll();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 7b5bc28eaf94..eec7fede9ad4 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -204,6 +204,7 @@ private:
ScInputBarGroup& mrGroupBar;
long mnLines;
long mnLastExpandedLines;
+ bool mbInvalidate;
};
class ScInputBarGroup : public ScTextWndBase