writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 8 ------- writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 4 --- writerfilter/source/ooxml/factoryimpl_ns.py | 3 -- writerfilter/source/ooxml/model.xml | 20 ------------------ 4 files changed, 35 deletions(-)
New commits: commit 6dc49cee20750827aad6e20ec1877530459bf624 Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Thu Aug 10 06:21:18 2017 +0200 Revert "A temporary workaround for out-of-order (in-paragraph) tbl on OOXML" A better fix follows This reverts commit 0eb0c7308ad57f4a20b5691d450b5185e52475f6. Change-Id: If36f73c580d96445086d8ab3d87fff6a76cd8b6a Reviewed-on: https://gerrit.libreoffice.org/40948 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 29843a64a7af..bb59ed9bebdc 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1614,14 +1614,6 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement mpParserState->endTable(); } -void OOXMLFastContextHandlerTextTable::start_P_Tbl() -{ -} - -void OOXMLFastContextHandlerTextTable::end_P_Tbl() -{ -} - /* class OOXMLFastContextHandlerShape */ diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 8a9c10c74ca0..eaf40e27f47b 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -433,10 +433,6 @@ public: virtual std::string getType() const override { return "TextTable"; } - // when <w:tbl> appears as direct child of <w:p>, we need to rearrange this paragraph - // to merge with the table's first paragraph (that's what Word does in this case) - void start_P_Tbl(); - void end_P_Tbl(); protected: virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) override; diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py b/writerfilter/source/ooxml/factoryimpl_ns.py index b37a468b5330..74ee6e8e3d25 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.py +++ b/writerfilter/source/ooxml/factoryimpl_ns.py @@ -442,9 +442,6 @@ def factoryChooseAction(actionNode): elif actionNode.getAttribute("action") == "handleGridBefore" or actionNode.getAttribute("action") == "handleGridAfter": ret.append(" %sif (OOXMLFastContextHandlerTextTableRow* pTextTableRow = dynamic_cast<OOXMLFastContextHandlerTextTableRow*>(pHandler))" % extra_space) ret.append(" %s pTextTableRow->%s();" % (extra_space, actionNode.getAttribute("action"))) - elif actionNode.getAttribute("action") in ("start_P_Tbl", "end_P_Tbl"): - ret.append(" %sif (OOXMLFastContextHandlerTextTable* pTextTable = dynamic_cast<OOXMLFastContextHandlerTextTable*>(pHandler))" % extra_space) - ret.append(" %s pTextTable->%s();" % (extra_space, actionNode.getAttribute("action"))) elif actionNode.getAttribute("action") in ("sendProperty", "handleHyperlink"): ret.append(" %sif (OOXMLFastContextHandlerStream* pStream = dynamic_cast<OOXMLFastContextHandlerStream*>(pHandler))" % extra_space) ret.append(" %s pStream->%s();" % (extra_space, actionNode.getAttribute("action"))) diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 05a7ff6d2a70..98e80b8eff2b 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -14191,10 +14191,6 @@ <ref name="CT_Br_OutOfOrder"/> </element> <!-- end tdf#108714 --> - <!-- allow <w:tbl> at paragraph level (despite this is illegal according to ECMA-376-1:2016) - bug-to-bug compatibility with Word --> - <element name="tbl"> - <ref name="CT_P_Tbl"/> - </element> </define> <define name="ST_TblWidth"> <choice> @@ -14708,17 +14704,6 @@ </element> <ref name="EG_ContentRowContent"/> </define> - <!-- Special element - copy of usual CT_Tbl, but only used as direct child of CT_P --> - <define name="CT_P_Tbl"> - <ref name="EG_RangeMarkupElements"/> - <element name="tblPr"> - <ref name="CT_TblPr"/> - </element> - <element name="tblGrid"> - <ref name="CT_TblGrid"/> - </element> - <ref name="EG_ContentRowContent"/> - </define> <define name="CT_TblLook"> <attribute name="firstRow"> <ref name="ST_OnOff"/> @@ -18453,11 +18438,6 @@ <element name="tblPrExChange" tokenid="ooxml:CT_TblPrEx_tblPrExChange"/> </resource> <resource name="CT_Tbl" resource="TextTable"/> - <!-- allow <w:tbl> at paragraph level (despite this is illegal according to ECMA-376-1:2016) - bug-to-bug compatibility with Word --> - <resource name="CT_P_Tbl" resource="TextTable"> - <action name="start" action="start_P_Tbl"/> - <action name="end" action="end_P_Tbl"/> - </resource> <resource name="CT_TblLook" resource="Properties"> <attribute name="firstRow" tokenid="ooxml:CT_TblLook_firstRow"/> <attribute name="lastRow" tokenid="ooxml:CT_TblLook_lastRow"/> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits