summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-01-24 10:40:21 +0000
committerNoel Power <noel.power@novell.com>2012-01-24 10:41:29 +0000
commit1f0ba007489e77e4145fc840cc3a878772494fd7 (patch)
tree6863c8c5466cb3529025d0cb9e21ba650955c529 /sc
parent229eb2e9dec3c54fa2b73b968d61985e5528edbf (diff)
fix ( hopefully ) viewing artifacts in input line fdo#44391
Diffstat (limited to 'sc')
-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 f6404a717c8b..1ae727c201e1 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