diff options
Diffstat (limited to 'editeng/source/editeng/editview.cxx')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 63b7b30c57cc..3ada3d3fb264 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -173,10 +173,10 @@ EditEngine* EditView::GetEditEngine() const return pImpEditView->pEditEngine; } -void EditView::Invalidate() +Rectangle EditView::GetInvalidateRect() const { if ( !pImpEditView->DoInvalidateMore() ) - pImpEditView->GetWindow()->Invalidate( pImpEditView->aOutArea ); + return pImpEditView->aOutArea; else { Rectangle aRect( pImpEditView->aOutArea ); @@ -185,10 +185,29 @@ void EditView::Invalidate() aRect.Right() += nMore; aRect.Top() -= nMore; aRect.Bottom() += nMore; - pImpEditView->GetWindow()->Invalidate( aRect ); + return aRect; + } +} + +void EditView::InvalidateOtherViewWindows( const Rectangle& rInvRect ) +{ + if (comphelper::LibreOfficeKit::isActive()) + { + for (auto& pWin: GetOtherViewWindows()) + { + if (pWin) + pWin->Invalidate( rInvRect ); + } } } +void EditView::Invalidate() +{ + const Rectangle& rInvRect = GetInvalidateRect(); + pImpEditView->GetWindow()->Invalidate( rInvRect ); + InvalidateOtherViewWindows( rInvRect ); +} + void EditView::SetReadOnly( bool bReadOnly ) { pImpEditView->bReadOnly = bReadOnly; |