diff options
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 7695865d8e16..1f8ae7ba9023 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1765,6 +1765,11 @@ void SwWrtShell::SetReadonlyOption(bool bSet) void SwWrtShell::ChangeHeaderOrFooter( const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning) { + SdrView *const pSdrView = GetDrawView(); + if (pSdrView && pSdrView->IsTextEdit()) + { // tdf#107474 deleting header may delete active drawing object + pSdrView->SdrEndTextEdit(true); + } addCurrentPosition(); StartAllAction(); StartUndo( UNDO_HEADER_FOOTER ); // #i7983# |