[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - 2 commits - lotuswordpro/source sw/qa sw/source

Michael Stahl mstahl at redhat.com
Tue Dec 8 14:24:35 PST 2015


 lotuswordpro/source/filter/lwptabrack.cxx    |    2 ++
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx    |    3 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |    5 +++++
 3 files changed, 10 insertions(+)

New commits:
commit e30658cc8d4321a460b73b054ae981a6b33f335d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Dec 8 19:55:20 2015 +0100

    sw: un-break DOCX formula export
    
    (regression from 1dac99e7ea45f90bf39eb95eb7bc01f7d79093ef)
    
    Change-Id: Iffe3ec6c28f62b78a2b223144bfaad383d272802
    (cherry picked from commit 3b63d2b9371baa5f526d0fcd41043ec76abb0d50)

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index de71773..759ccf1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -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
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 5c979e5..f229686 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())
     {
commit 5b661e7b6d6aa046bc9ba913f17777589ce78995
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Dec 8 22:11:13 2015 +0100

    lotuswordpro: GCC 4.6 seems to need stdexcept included
    
    Change-Id: I30bbf7bab8cb37422fd20a25741e564500faa31c
    (cherry picked from commit 742c2370566bf1e7caa7403c99f088a79ae146fa)

diff --git a/lotuswordpro/source/filter/lwptabrack.cxx b/lotuswordpro/source/filter/lwptabrack.cxx
index a07fa39..9d284db 100644
--- a/lotuswordpro/source/filter/lwptabrack.cxx
+++ b/lotuswordpro/source/filter/lwptabrack.cxx
@@ -61,6 +61,8 @@
 #include "lwpobjstrm.hxx"
 #include "lwpslvlist.hxx"
 
+#include <stdexcept>
+
 LwpTab::LwpTab()
 {
     m_nX = 0;


More information about the Libreoffice-commits mailing list