[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 21 18:45:40 UTC 2019


 sw/source/filter/ww8/ww8par.cxx     |    2 --
 sw/source/filter/ww8/ww8toolbar.cxx |    6 ++++++
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit c93cf609dd5b602b0e1e3f90e17076f343692a7f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 21 16:17:48 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 21 20:44:23 2019 +0200

    Resolves: tdf#127048 loosen warning from presence to if parsed
    
    rather than warn if lcbCmds indicates some Cmd exist, only warn
    if we find something in the Cmd data to attempt to import
    
    Change-Id: I48f7db22d13688597374f7c77d6033c1ce6d7eb3
    Reviewed-on: https://gerrit.libreoffice.org/77926
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e4e9cee6cdd6..744772c46478 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4700,8 +4700,6 @@ void SwWW8ImplReader::StoreMacroCmds()
 
         try
         {
-            NotifyMacroEventRead();
-
             uno::Reference < io::XStream > xStream =
                     xRoot->openStreamElement( SL::aMSMacroCmds, embed::ElementModes::READWRITE );
             std::unique_ptr<SvStream> xOutStream(::utl::UcbStreamHelper::CreateStream(xStream));
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 1d7be7fd86cc..cdc9424e9ac2 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/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 <tools/diagnose_ex.h>
 #include <unotools/configmgr.hxx>
 #include <vcl/graph.hxx>
@@ -711,6 +713,10 @@ bool Tcg255::ImportCustomToolBar( SfxObjectShell& rDocSh )
             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;
             }


More information about the Libreoffice-commits mailing list