diff options
Diffstat (limited to 'svx/source/svdraw/svdpntv.cxx')
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index a069edfe3362..1aa07b4731e1 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -163,6 +163,7 @@ SdrPaintView::SdrPaintView(SdrModel& rSdrModel, OutputDevice* pOut) , mbHideChart(false) , mbHideDraw(false) , mbHideFormControl(false) + , mbPaintTextEdit(true) , maGridColor(COL_BLACK) { maComeBackIdle.SetPriority(TaskPriority::REPAINT); @@ -630,7 +631,8 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFo { // draw postprocessing, only for known devices // it is necessary to always paint FormLayer - if(bPaintFormLayer) + // In the LOK case control rendering is performed through LokControlHandler + if(!comphelper::LibreOfficeKit::isActive() && bPaintFormLayer) { ImpFormLayerDrawing(rPaintWindow); } @@ -638,27 +640,31 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFo // look for active TextEdit. As long as this cannot be painted to a VDev, // it cannot get part of buffering. In that case, output evtl. prerender // early and paint text edit to window. - if(IsTextEdit() && GetSdrPageView()) + SdrPageView* pPageView = GetSdrPageView(); + if(IsTextEdit() && pPageView) { - static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow); + if (!comphelper::LibreOfficeKit::isActive() || mbPaintTextEdit) + static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow); } - if (comphelper::LibreOfficeKit::isActive()) + if (comphelper::LibreOfficeKit::isActive() && pPageView) { // Look for active text edits in other views showing the same page, - // and show them as well. - if (SdrPageView* pPageView = GetSdrPageView()) + // and show them as well. Show only if Page/MasterPage mode is matching. + SdrViewIter aIter(pPageView->GetPage()); + bool bRequireMasterPage = pPageView->GetPage() ? pPageView->GetPage()->IsMasterPage() : false; + for (SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView()) { - SdrViewIter aIter(pPageView->GetPage()); - for (SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView()) - { - if (pView == this) - continue; + SdrPageView* pCurrentPageView = pView->GetSdrPageView(); + bool bIsCurrentMasterPage = (pCurrentPageView && pCurrentPageView->GetPage()) ? + pCurrentPageView->GetPage()->IsMasterPage() : false; - if (pView->IsTextEdit() && pView->GetSdrPageView()) - { - pView->TextEditDrawing(rPaintWindow); - } + if (pView == this || bRequireMasterPage != bIsCurrentMasterPage) + continue; + + if (pView->IsTextEdit() && pView->GetSdrPageView()) + { + pView->TextEditDrawing(rPaintWindow); } } } |