diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2022-03-14 14:52:59 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2022-04-13 08:26:30 +0200 |
commit | 6bf805ffb62a13f2f44a26f47f732f05c954ef49 (patch) | |
tree | c7424f0324fe0059dce14f82cca0b241721bf6bb /oox | |
parent | d2a2d16b4836bf62db7c32faffa0c5b6d0d30a5e (diff) |
tdf#147766 Export empty lines as line with noFill
We have a case that 0 width line but has auto color. If that case
exported there is no line over there, LO handles normally but MSO draws
back borders as default. To prevent this we have to export them as line
with noFill.
testTableBorderLineStyle change reverts a workaround for
3faf005a367cbd28077403bf93810bbaf4805851
testBnc480256 Cell(1,0) still invisible. We are just checking
this with another way.
Change-Id: If5f6d2dbdba5c295d58307fcfe3b37629ede8a8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131532
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132886
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/table/tablecell.cxx | 10 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 6 |
2 files changed, 7 insertions, 9 deletions
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 15ab06303e3b..fdf7950dcf2c 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -73,20 +73,12 @@ static void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase, aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 ); aBorderLine.LineDistance = 0; } - else if ( rLineProperties.moLineWidth.get(0)!=0 ) - { - aBorderLine.Color = sal_Int32( COL_AUTO ); - aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 ); - aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 ); - aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 ); - aBorderLine.LineDistance = 0; - } else { aBorderLine.Color = sal_Int32( COL_AUTO ); aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 ); aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 ); - aBorderLine.LineWidth = 12700; + aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 ); aBorderLine.LineDistance = 0; } diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 138106938ee2..97d09ca1be2e 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1975,6 +1975,12 @@ void ShapeExport::WriteBorderLine(const sal_Int32 XML_line, const BorderLine2& r DrawingML::WriteSolidFill( ::Color(ColorTransparency, rBorderLine.Color) ); mpFS->endElementNS( XML_a, XML_line ); } + else if( nBorderWidth == 0) + { + mpFS->startElementNS(XML_a, XML_line); + mpFS->singleElementNS(XML_a, XML_noFill); + mpFS->endElementNS( XML_a, XML_line ); + } } void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPropSet) |