diff options
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 2aadd092824b..bc8cb9f657e9 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -654,10 +654,26 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder() return GetBackgroundTextForwarder(); } else + { + // tdf#123470 if the text edit mode of the shape is active, then we + // cannot trust a previously cached TextForwarder state as the text may + // be out of date, so force a refetch in that case. + if (IsEditMode()) + { + assert(!mbForwarderIsEditMode); // because without a view there is no other option except !mbForwarderIsEditMode + bool bTextEditActive = false; + SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(mpObject); + // similar to the GetBackgroundTextForwarder check, see if the text edit is active + if (pTextObj && pTextObj->getActiveText() == mpText && pTextObj->GetEditOutlinerParaObject()) + bTextEditActive = true; // text edit active + if (bTextEditActive) + mbDataValid = false; + } + return GetBackgroundTextForwarder(); + } } - std::unique_ptr<SvxDrawOutlinerViewForwarder> SvxTextEditSourceImpl::CreateViewForwarder() { if( mpView->GetTextEditOutlinerView() && mpObject ) |