Kaydet (Commit) 41927dce authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 9e118293
......@@ -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")
......
......@@ -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 );
}
......
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