summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-21 16:17:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-08-21 20:44:23 +0200
commitc93cf609dd5b602b0e1e3f90e17076f343692a7f (patch)
tree3fa60346172ac806a9d60e6ea78cd281a4057a95 /sw
parenteaf9565c84017ae3f162b3b6fd229b9772bf513e (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/77926 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-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 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;
}