summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-21 16:17:48 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-29 10:34:54 +0200
commita2ee78dd5628eae43975f1bb8d767225cfde920c (patch)
tree5a4cf7b4f04c13df68802e4edf91170269ec0531
parent0417dd10991b0e92b5163167ddba59f1ffe6d73d (diff)
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/77927 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx6
2 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 8ec9c6fed8e8..1baf02989eb1 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4699,8 +4699,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 1724d2e5bb07..55eec24c7618 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 <unotools/configmgr.hxx>
#include <vcl/graph.hxx>
#include <map>
@@ -710,6 +712,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;
}