summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh/wrtsh1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/wrtsh/wrtsh1.cxx')
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index d37bfcd7a1d7..617fc2cecf20 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1763,6 +1763,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( SwUndoId::HEADER_FOOTER ); // #i7983#