diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/WW8TableInfo.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/WW8TableInfo.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 14 |
4 files changed, 7 insertions, 24 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index eba875d4cbe3..809ff6ecb88f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -701,15 +701,8 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80097, "fdo80097.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:space = 0]", 1); assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:color = '000000']", 1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideH[@w:val = 'single']",1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideH[@w:sz = 4]", 1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideH[@w:space = 0]", 1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideH[@w:color = '000000']", 1); - - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideV[@w:val = 'single']",1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideV[@w:sz = 4]", 1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideV[@w:space = 0]", 1); - assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideV[@w:color = '000000']", 1); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideH",0); + assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:insideV",0); } DECLARE_OOXMLEXPORT_TEST(testFdo77129, "fdo77129.docx") diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index b41639243669..e27e3393f3bd 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -120,11 +120,6 @@ void WW8TableNodeInfoInner::setRect(const SwRect & rRect) maRect = rRect; } -bool WW8TableNodeInfoInner::isFinalRow() const -{ - return mpTable && mpTable->GetTabLines().size() - 1 == mnRow; -} - const SwNode * WW8TableNodeInfoInner::getNode() const { const SwNode * pResult = nullptr; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index f2a2db21806a..a3b6df799180 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -94,7 +94,6 @@ public: bool isEndOfCell() const { return mbEndOfCell;} bool isEndOfLine() const { return mbEndOfLine;} bool isFinalEndOfLine() const { return mbFinalEndOfLine;} - bool isFinalRow() const; bool isFirstInTable() const { return mbFirstInTable;} const SwTableBox * getTableBox() const { return mpTableBox;} const SwTable * getTable() const { return mpTable;} diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index af29b9fcd4e0..05e4dfdc7bb5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3044,7 +3044,7 @@ static OutputBorderOptions lcl_getTableCellBorderOptions(bool bEcma) rOptions.tag = XML_tcBorders; rOptions.bUseStartEnd = !bEcma; rOptions.bWriteTag = true; - rOptions.bWriteInsideHV = true; + rOptions.bWriteInsideHV = false; rOptions.bWriteDistance = false; return rOptions; @@ -3067,9 +3067,7 @@ static void impl_borders( FSHelperPtr const & pSerializer, const SvxBoxItem& rBox, const OutputBorderOptions& rOptions, std::map<SvxBoxItemLine, - css::table::BorderLine2> &rTableStyleConf, - const bool bIsLastColumn = false, - const bool bIsLastRow = false ) + css::table::BorderLine2> &rTableStyleConf ) { static const SvxBoxItemLine aBorders[] = { @@ -3161,14 +3159,14 @@ static void impl_borders( FSHelperPtr const & pSerializer, bWriteInsideV = true; } } - if (bWriteInsideH && !bIsLastRow) + if (bWriteInsideH) { const table::BorderLine2 *aStyleProps = nullptr; if( rTableStyleConf.find( SvxBoxItemLine::BOTTOM ) != rTableStyleConf.end() ) aStyleProps = &rTableStyleConf[ SvxBoxItemLine::BOTTOM ]; impl_borderLine( pSerializer, XML_insideH, rBox.GetLine(SvxBoxItemLine::BOTTOM), 0, false, aStyleProps ); } - if (bWriteInsideV && !bIsLastColumn) + if (bWriteInsideV) { const table::BorderLine2 *aStyleProps = nullptr; if( rTableStyleConf.find( SvxBoxItemLine::RIGHT ) != rTableStyleConf.end() ) @@ -3237,8 +3235,6 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox( ); bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT; - const bool bIsLastColumn = pTableTextNodeInfoInner->isEndOfLine(); - const bool bIsLastRow = pTableTextNodeInfoInner->isFinalRow(); // Output any table cell redlines if there are any attached to this specific cell TableCellRedline( pTableTextNodeInfoInner ); @@ -3298,7 +3294,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point const SvxBoxItem& rDefaultBox = (*tableFirstCells.rbegin())->getTableBox( )->GetFrameFormat( )->GetBox( ); { // The cell borders - impl_borders( m_pSerializer, rBox, lcl_getTableCellBorderOptions(bEcma), m_aTableStyleConf, bIsLastColumn, bIsLastRow ); + impl_borders( m_pSerializer, rBox, lcl_getTableCellBorderOptions(bEcma), m_aTableStyleConf ); } TableBackgrounds( pTableTextNodeInfoInner ); |