$OpenBSD$

https://bugs.documentfoundation.org/show_bug.cgi?id=127048

Index: sw/source/filter/ww8/ww8toolbar.cxx
--- sw/source/filter/ww8/ww8toolbar.cxx.orig
+++ sw/source/filter/ww8/ww8toolbar.cxx
@@ -18,8 +18,10 @@
 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
 #include <com/sun/star/ui/ItemType.hpp>
 #include <fstream>
+#include <comphelper/documentinfo.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
+#include <sfx2/objsh.hxx>
 #include <unotools/configmgr.hxx>
 #include <vcl/graph.hxx>
 #include <map>
@@ -710,6 +712,9 @@ bool Tcg255::ImportCustomToolBar( SfxObjectShell& rDoc
             SwCTBWrapper* pCTBWrapper =  dynamic_cast< SwCTBWrapper* > ( rSubStruct.get() );
             if ( pCTBWrapper )
             {
+                // tdf#127048 set this flag if we might import something
+                uno::Reference<frame::XModel> const xModel(rDocSh.GetBaseModel());
+                comphelper::DocumentInfo::notifyMacroEventRead(xModel);
                 if ( !pCTBWrapper->ImportCustomToolBar( rDocSh ) )
                     return false;
             }
