[Libreoffice-commits] core.git: 2 commits - sw/qa sw/source writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Dec 23 06:07:56 PST 2013
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 7 +++-
sw/source/filter/ww8/docxattributeoutput.cxx | 40 ++++++++++++---------------
writerfilter/source/ooxml/model.xml | 4 +-
3 files changed, 25 insertions(+), 26 deletions(-)
New commits:
commit beb7c8db7b922f7ca76d0093e199282489b7c49b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 23 15:01:58 2013 +0100
writerfilter: handle moveFromRangeEnd / moveToRangeEnd like bookmark end
For bookmarks, at the start we omit all attributes (name, id), and at
the end we emit only the id. Do the same for moveFromRangeEnd /
moveToRangeEnd, which didn't emit an id at the end before.
This is just the tokenizer part, dmapper should still handle them, which
is missing.
Change-Id: I3f42fdbd86785adb36a8ef1bffe9af14c4d81fa2
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 804a9ad..4eec1ed 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -14800,13 +14800,13 @@
<ref name="CT_MoveBookmark"/>
</element>
<element name="moveFromRangeEnd">
- <ref name="CT_MarkupRange"/>
+ <ref name="CT_MarkupRangeBookmark"/>
</element>
<element name="moveToRangeStart">
<ref name="CT_MoveBookmark"/>
</element>
<element name="moveToRangeEnd">
- <ref name="CT_MarkupRange"/>
+ <ref name="CT_MarkupRangeBookmark"/>
</element>
<element name="commentRangeStart">
<ref name="CT_MarkupRangeCommentStart"/>
commit 41927dce4217d60808a889f8dac546f55848eead
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 23 14:25:37 2013 +0100
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
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 11d962a..10ab77b 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 99bba6d..20cdf08 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 );
}
More information about the Libreoffice-commits
mailing list