Resolves: tdf#153059 after ChangeHeaderOrFooter the control can be disposed
If the cursor is still on page one then when a header, via a control on
another page, is added it jumps back to that page, so the widget on the
now hidden page is removed, but the click handler hasn't completed so
the follow up action to change it from a "plus" button to a dropdown
menubutton was on a disposed widget.
Change-Id: I981126412a0ee6a667d77fb97a3db2f2b0a0363c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145584
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>