svx/source/svdraw/svdedxv.cxx | 45 ++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 27 deletions(-)
New commits: commit 428cd3b65ae653f6701fb9e0ed78947c5ed4b36e Author: Caolán McNamara <[email protected]> AuthorDate: Mon Jan 5 09:20:24 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Jan 6 14:40:29 2026 +0100 flatten SdrObjEditView::TextEditDrawing no logic change intended Change-Id: Ied15e90341d4e7e8f0228354dfadec2342138162 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196603 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index ffeb798a9067..9f749954610d 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -929,31 +929,28 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) // to update accordingly (will update selection, too). Suppress new // stuff when LibreOfficeKit is active EditViewInvalidate(tools::Rectangle()); + return; } - else - { - // draw old text edit stuff - if (IsTextEdit()) - { - const SdrOutliner* pActiveOutliner = GetTextEditOutliner(); - if (pActiveOutliner) - { - const sal_uInt32 nViewCount(pActiveOutliner->GetViewCount()); + // draw old text edit stuff + if (!IsTextEdit()) + return; - if (nViewCount) - { - const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); - const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); + const SdrOutliner* pActiveOutliner = GetTextEditOutliner(); + if (!pActiveOutliner) + return; - OutlinerView* pOLV = pActiveOutliner->GetView(0); - SdrPage* pPage = GetSdrPageView()->GetPage(); - pOLV->SetBackgroundColor(pPage->GetPageBackgroundColor(GetSdrPageView(), true)); - ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice()); - } - } - } - } + const sal_uInt32 nViewCount(pActiveOutliner->GetViewCount()); + if (!nViewCount) + return; + + const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); + const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); + + OutlinerView* pOLV = pActiveOutliner->GetView(0); + SdrPage* pPage = GetSdrPageView()->GetPage(); + pOLV->SetBackgroundColor(pPage->GetPageBackgroundColor(GetSdrPageView(), true)); + ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice()); } void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::Rectangle& rRect, commit be1a55019be53c1b1afe4d9f863ce8faaf361a2a Author: Caolán McNamara <[email protected]> AuthorDate: Mon Jan 5 09:18:18 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Jan 6 14:40:21 2026 +0100 nViewCount is always > 0 here so simplify Change-Id: Ie0e34d1c58e4a6e7b4c2fce5793b41e8f88e142d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196602 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 3c7df834e4bc..ffeb798a9067 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -946,16 +946,10 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); - if (sal_uInt32 i(0); i < nViewCount) - { - OutlinerView* pOLV = pActiveOutliner->GetView(i); - SdrPage* pPage = GetSdrPageView()->GetPage(); - pOLV->SetBackgroundColor( - pPage->GetPageBackgroundColor(GetSdrPageView(), true)); - ImpPaintOutlinerView(*pOLV, aCheckRect, - rPaintWindow.GetTargetOutputDevice()); - return; - } + OutlinerView* pOLV = pActiveOutliner->GetView(0); + SdrPage* pPage = GetSdrPageView()->GetPage(); + pOLV->SetBackgroundColor(pPage->GetPageBackgroundColor(GetSdrPageView(), true)); + ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice()); } } }
