svx/source/svdraw/svdedxv.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
New commits: commit a4ff095b8260d712042103bf8b496a61ecb36faf Author: Pranam Lashkari <[email protected]> AuthorDate: Thu Jan 22 04:43:23 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Jan 23 11:29:04 2026 +0100 svx: fixed incorrect outlinerView used entering textbox editing problem: in multiple view when one view is in dark mode and another view is in light mode, and one user starts editing textbox, automatic font color changes according to editing view for all other views sometimes making text not reabable Change-Id: I2484c0978682a98d748f6c63f2cfd7508038baf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197883 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 de6c2db55a55..e9fd1297556d 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -933,19 +933,16 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) if (!IsTextEdit()) return; - const SdrOutliner* pActiveOutliner = GetTextEditOutliner(); - if (!pActiveOutliner) - return; - - const sal_uInt32 nViewCount(pActiveOutliner->GetViewCount()); - if (!nViewCount) + SfxViewShell* pViewShell = SfxViewShell::Current(); + SdrView* pSdrView = pViewShell ? pViewShell->GetDrawView() : nullptr; + OutlinerView* pOLV = pSdrView ? pSdrView->GetTextEditOutlinerView() : nullptr; + if (!pOLV) return; const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); - OutlinerView* pOLV = pActiveOutliner->GetView(0); - SdrPage* pPage = GetSdrPageView()->GetPage(); + SdrPage* pPage = pSdrView->GetSdrPageView()->GetPage(); pOLV->SetBackgroundColor(pPage->GetPageBackgroundColor(GetSdrPageView(), true)); ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice()); }
