diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 4c524674b0f4..48b0ca4e6baa 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2875,6 +2875,8 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) ePresObjKind == PresObjKind::Notes || ePresObjKind == PresObjKind::Text) { + sd::ModifyGuard aGuard(static_cast(&getSdrModelFromSdrPage())); + OUString aString( GetPresObjText(ePresObjKind) ); if (!aString.isEmpty()) diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 79234a4c7d48..90bbbdc69511 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -783,11 +783,20 @@ SdrEndTextEditKind View::SdrEndTextEdit(bool bDontDeleteReally) SdrTextObj* xObj = GetTextEditObject(); bool bDefaultTextRestored = RestoreDefaultText( xObj ); + const bool bSaveSetModifiedEnabled = mpDocSh && mpDocSh->IsEnableSetModified(); + if (bDefaultTextRestored) + { + if (bSaveSetModifiedEnabled) + mpDocSh->EnableSetModified(false); + } SdrEndTextEditKind eKind = FmFormView::SdrEndTextEdit(bDontDeleteReally); if( bDefaultTextRestored ) { + if (bSaveSetModifiedEnabled) + mpDocSh->EnableSetModified(); + if( xObj && !xObj->IsEmptyPresObj() ) { xObj->SetEmptyPresObj( true );