svx/source/svdraw/svdedxv.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 544ebb0f34b8e5126f649d895bb09b624996d1c9
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Thu Jan 22 04:43:23 2026 +0530
Commit:     Pranam Lashkari <[email protected]>
CommitDate: Fri Jan 23 10:13:11 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/+/197778
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-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());
 }

Reply via email to