summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-12-08 19:55:20 +0100
committerMichael Stahl <mstahl@redhat.com>2015-12-08 22:15:21 +0100
commite30658cc8d4321a460b73b054ae981a6b33f335d (patch)
tree04d8a8d59f7bd0b87b8eedf656eb609d420cf5c1 /sw/source
parent5b661e7b6d6aa046bc9ba913f17777589ce78995 (diff)
sw: un-break DOCX formula export
(regression from 1dac99e7ea45f90bf39eb95eb7bc01f7d79093ef) Change-Id: Iffe3ec6c28f62b78a2b223144bfaad383d272802 (cherry picked from commit 3b63d2b9371baa5f526d0fcd41043ec76abb0d50)
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 5c979e540cd4..f22968643c28 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -126,6 +126,7 @@
#include <com/sun/star/drawing/ShadingPattern.hpp>
#include <com/sun/star/text/GraphicCrop.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
#include <algorithm>
@@ -4501,6 +4502,10 @@ bool DocxAttributeOutput::WriteOLEMath( const SdrObject*, const SwOLENode& rOLEN
void DocxAttributeOutput::WritePostponedMath(const SwOLENode* pPostponedMath)
{
uno::Reference < embed::XEmbeddedObject > xObj(const_cast<SwOLENode*>(pPostponedMath)->GetOLEObj().GetOleRef());
+ if (embed::EmbedStates::LOADED == xObj->getCurrentState())
+ { // must be running so there is a Component
+ xObj->changeState(embed::EmbedStates::RUNNING);
+ }
uno::Reference< uno::XInterface > xInterface( xObj->getComponent(), uno::UNO_QUERY );
if (!xInterface.is())
{