Kaydet (Commit) 3b63d2b9 authored tarafından Michael Stahl's avatar Michael Stahl

sw: un-break DOCX formula export

(regression from 1dac99e7)

Change-Id: Iffe3ec6c28f62b78a2b223144bfaad383d272802
üst 742c2370
......@@ -984,6 +984,9 @@ DECLARE_OOXMLEXPORT_TEST(testFileOpenInputOutputError,"floatingtbl_with_formula.
if (!pXmlDoc)
return;
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pStyle", "val", "Normal");
// let's also assert that the formula was exported properly
assertXPathContent(pXmlDoc, "//wps:txbx/w:txbxContent/w:tbl/w:tr/w:tc[2]/w:p/m:oMath/m:sSubSup/m:e/m:r/m:t", OUString::fromUtf8("\xcf\x83"));
}
#endif
......
......@@ -127,6 +127,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>
......@@ -4521,6 +4522,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())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment