diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-10-01 17:26:43 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2020-10-16 11:09:32 +0200 |
commit | 0352089409859b0017a877b26d1c8590f8a4e5f1 (patch) | |
tree | 6756460bc75b6cf1660fb2560375eae04d2f844d | |
parent | f208469414f0f8823fe8003fd0e4c78b3c51bb02 (diff) |
sw: improve comments, dump rowspan to nodes.xml
Change-Id: Ifcd011f6d55ac534c449050d07009680dcd71d51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103771
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 309868c32f00e5ca045f941deafb5216aad2538c)
-rw-r--r-- | sw/inc/swtable.hxx | 4 | ||||
-rw-r--r-- | sw/inc/tblsel.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index a0deaf01e892..a373f561704f 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -310,7 +310,9 @@ public: // Search in format for registered table. static SwTable * FindTable( SwFrameFormat const*const pFormat ); - // Clean up structure a bit. + // Clean up structure of subtables a bit: + // convert row with 1 box with subtable; box with subtable with 1 row; + // by removing the subtable (both recursively) void GCLines(); // Returns the table node via m_TabSortContentBoxes or pTableNode. diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index 0639db32f72e..cc353cc424bb 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -160,8 +160,8 @@ class FndBox_ FndLines_t m_Lines; FndLine_* const m_pUpper; - SwTableLine *m_pLineBefore; // For deleting/restoring the layout. - SwTableLine *m_pLineBehind; + SwTableLine *m_pLineBefore; ///< For deleting/restoring the layout. + SwTableLine *m_pLineBehind; ///< For deleting/restoring the layout. FndBox_(FndBox_ const&) = delete; FndBox_& operator=(FndBox_ const&) = delete; @@ -224,6 +224,10 @@ struct FndPara : rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {} }; +/** This creates a structure mirroring the SwTable structure that contains all + rows and non-leaf boxes (as pointers to SwTableBox/SwTableLine, not copies), + plus the leaf boxes that are selected by pFndPara->rBoxes + */ SW_DLLPUBLIC void ForEach_FndLineCopyCol(SwTableLines& rLines, FndPara* pFndPara ); #endif // INCLUDED_SW_INC_TBLSEL_HXX diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 955e113f2768..61e8bd112d23 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -985,6 +985,8 @@ void SwStartNode::dumpAsXml(xmlTextWriterPtr pWriter) const } else if (GetStartNodeType() == SwTableBoxStartNode) { + if (SwTableBox* pBox = GetTableBox()) + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("rowspan"), BAD_CAST(OString::number(pBox->getRowSpan()).getStr())); xmlTextWriterStartElement(pWriter, BAD_CAST("attrset")); if (SwTableBox* pBox = GetTableBox()) pBox->GetFrameFormat()->GetAttrSet().dumpAsXml(pWriter); |