diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 30 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 19 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 7 |
4 files changed, 50 insertions, 12 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 3c256baa5c4f..63b7b30c57cc 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -294,6 +294,36 @@ vcl::Window* EditView::GetWindow() const return pImpEditView->pOutWin; } +EditView::OutWindowSet& EditView::GetOtherViewWindows() +{ + return pImpEditView->aOutWindowSet; +} + +bool EditView::HasOtherViewWindow( vcl::Window* pWin ) +{ + OutWindowSet& rOutWindowSet = pImpEditView->aOutWindowSet; + auto found = std::find(rOutWindowSet.begin(), rOutWindowSet.end(), pWin); + return (found != rOutWindowSet.end()); +} + +bool EditView::AddOtherViewWindow( vcl::Window* pWin ) +{ + if (HasOtherViewWindow(pWin)) + return false; + pImpEditView->aOutWindowSet.emplace_back(pWin); + return true; +} + +bool EditView::RemoveOtherViewWindow( vcl::Window* pWin ) +{ + OutWindowSet& rOutWindowSet = pImpEditView->aOutWindowSet; + auto found = std::find(rOutWindowSet.begin(), rOutWindowSet.end(), pWin); + if (found == rOutWindowSet.end()) + return false; + rOutWindowSet.erase(found); + return true; +} + void EditView::SetVisArea( const Rectangle& rRect ) { pImpEditView->SetVisDocStartPos( rRect.TopLeft() ); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 84491febf354..7426862afabd 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -79,13 +79,13 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo pOutWin = pWindow; pPointer = nullptr; pBackgroundColor = nullptr; - mpViewShell = nullptr; - mpOtherShell = nullptr; + mpViewShell = nullptr; + mpOtherShell = nullptr; nScrollDiffX = 0; nExtraCursorFlags = 0; nCursorBidiLevel = CURSOR_BIDILEVEL_DONTKNOW; pCursor = nullptr; - pDragAndDropInfo = nullptr; + pDragAndDropInfo = nullptr; bReadOnly = false; bClickedInSelection = false; eSelectionMode = EE_SELMODE_TXTONLY; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 6143dfaea7fd..0a9dfb547bb8 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -218,17 +218,18 @@ class ImpEditView : public vcl::unohelper::DragAndDropClient using vcl::unohelper::DragAndDropClient::dragOver; private: - EditView* pEditView; - vcl::Cursor* pCursor; - Color* pBackgroundColor; + EditView* pEditView; + vcl::Cursor* pCursor; + Color* pBackgroundColor; /// Containing view shell, if any. - OutlinerViewShell* mpViewShell; + OutlinerViewShell* mpViewShell; /// An other shell, just listening to our state, if any. - OutlinerViewShell* mpOtherShell; - EditEngine* pEditEngine; - VclPtr<vcl::Window> pOutWin; - Pointer* pPointer; - DragAndDropInfo* pDragAndDropInfo; + OutlinerViewShell* mpOtherShell; + EditEngine* pEditEngine; + VclPtr<vcl::Window> pOutWin; + EditView::OutWindowSet aOutWindowSet; + Pointer* pPointer; + DragAndDropInfo* pDragAndDropInfo; css::uno::Reference< css::datatransfer::dnd::XDragSourceListener > mxDnDListener; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index ad5ba382fd1f..7d30eda43478 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -289,6 +289,13 @@ void ImpEditEngine::UpdateViews( EditView* pCurView ) // convert to window coordinates .... aClipRect = pView->pImpEditView->GetWindowPos( aClipRect ); pView->GetWindow()->Invalidate( aClipRect ); + + EditView::OutWindowSet& rOutWindowSet = pView->GetOtherViewWindows(); + for (auto pWin: rOutWindowSet) + { + if (pWin) + pWin->Invalidate(aClipRect); + } } } |