diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-23 14:25:37 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-23 15:06:54 +0100 |
commit | 41927dce4217d60808a889f8dac546f55848eead (patch) | |
tree | 93b99c2bdc11c68097b4ece517ec8eb48cf09e12 | |
parent | 9e118293188607ac883ed65754aaccc9ef2c6abb (diff) |
sw: enable drawingml export of textframes by default
This was only available in experimental mode previously. Also note that
export of shapes (including group shapes) was already enabled
previously, this commit just enables the same for Writer Text Frames.
Change-Id: I53e7f3fac84328cea316a9811ecd5eecec79b23d
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 40 |
2 files changed, 23 insertions, 24 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 11d962aa97f0..10ab77b2102d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1116,7 +1116,7 @@ DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, "table-floating-margins.docx" xmlDocPtr pXmlDoc = parseExport(); if (!pXmlDoc) return; - assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:pict/v:rect/v:textbox/w:txbxContent/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "after", "0"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "after", "0"); } DECLARE_OOXMLEXPORT_TEST(testFdo44689_start_page_0, "fdo44689_start_page_0.docx") @@ -1549,7 +1549,10 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx") xmlDocPtr pXmlDoc = parseExport(); if (!pXmlDoc) return; - CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:pict/v:rect/v:textbox", "style").match("mso-layout-flow-alt:bottom-to-top")); + // VML + CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox", "style").match("mso-layout-flow-alt:bottom-to-top")); + // drawingML + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr", "vert", "vert270"); } DECLARE_OOXMLEXPORT_TEST(testCharHighlight, "char_highlight.docx") diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 99bba6d0df30..20cdf08a2406 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -510,28 +510,24 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT { sw::Frame* pParentFrame = &aParentFrames[i]; m_pSerializer->startElementNS( XML_w, XML_r, FSEND ); - SvtMiscOptions aMiscOptions; - if (aMiscOptions.IsExperimentalMode()) - { - m_pSerializer->startElementNS(XML_mc, XML_AlternateContent, FSEND); - m_pSerializer->startElementNS(XML_mc, XML_Choice, - XML_Requires, "wps", - FSEND); - WriteDMLTextFrame(pParentFrame); - m_pSerializer->endElementNS(XML_mc, XML_Choice); - - // Reset table infos, otherwise the depth of the cells will be incorrect, - // in case the text frame had table(s) and we try to export the - // same table second time. - m_rExport.mpTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo()); - - m_pSerializer->startElementNS(XML_mc, XML_Fallback, FSEND); - WriteVMLTextFrame(pParentFrame); - m_pSerializer->endElementNS(XML_mc, XML_Fallback); - m_pSerializer->endElementNS(XML_mc, XML_AlternateContent); - } - else - WriteVMLTextFrame(pParentFrame); + + m_pSerializer->startElementNS(XML_mc, XML_AlternateContent, FSEND); + m_pSerializer->startElementNS(XML_mc, XML_Choice, + XML_Requires, "wps", + FSEND); + WriteDMLTextFrame(pParentFrame); + m_pSerializer->endElementNS(XML_mc, XML_Choice); + + // Reset table infos, otherwise the depth of the cells will be incorrect, + // in case the text frame had table(s) and we try to export the + // same table second time. + m_rExport.mpTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo()); + + m_pSerializer->startElementNS(XML_mc, XML_Fallback, FSEND); + WriteVMLTextFrame(pParentFrame); + m_pSerializer->endElementNS(XML_mc, XML_Fallback); + m_pSerializer->endElementNS(XML_mc, XML_AlternateContent); + m_pSerializer->endElementNS( XML_w, XML_r ); } |