diff options
author | yogesh.bharate001 <yogesh.bharate@synerzip.com> | 2015-04-17 17:37:00 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-09 19:58:53 +0000 |
commit | 8d74795e6e777cef0b1df64a56ea886208c87bc0 (patch) | |
tree | c06e12352506947a781013706e61539e22a096ed /oox/source | |
parent | 24be7ef5887ec3598b3b34cb4fccff17ed6e1106 (diff) |
tdf#90672: PPTX table cell border color is not exported.
Problem Description :
XML Difference :
Original :
<a:solidFill>
<a:srgbClr val="00B0F0"/>
</a:solidFill>
After Roundtrip : tag is missing
Solution : Added support for table cell border color.
Change-Id: I2baf969d7a8e46a0c5825d9f57bf135ec479c9eb
Reviewed-on: https://gerrit.libreoffice.org/15364
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/shapes.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index cdeefac339c0..87c019021bea 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1059,10 +1059,10 @@ void ShapeExport::WriteTableCellProperties(Reference< XPropertySet> xCellPropSet FSEND ); // Write background fill for table cell. - DrawingML::WriteFill(xCellPropSet); // TODO // tcW : Table cell width WriteTableCellBorders(xCellPropSet); + DrawingML::WriteFill(xCellPropSet); mpFS->endElementNS( XML_a, XML_tcPr ); } @@ -1073,6 +1073,7 @@ void ShapeExport::WriteTableCellBorders(Reference< XPropertySet> xCellPropSet) // lnL - Left Border Line Properties of table cell xCellPropSet->getPropertyValue("LeftBorder") >>= aBorderLine; sal_Int32 nLeftBorder = aBorderLine.LineWidth; + util::Color aLeftBorderColor = aBorderLine.Color; // While importing the table cell border line width, it converts EMU->Hmm then divided result by 2. // To get original value of LineWidth need to multiple by 2. @@ -1082,42 +1083,49 @@ void ShapeExport::WriteTableCellBorders(Reference< XPropertySet> xCellPropSet) if(nLeftBorder > 0) { mpFS->startElementNS( XML_a, XML_lnL, XML_w, I32S(nLeftBorder), FSEND ); + DrawingML::WriteSolidFill(aLeftBorderColor); mpFS->endElementNS( XML_a, XML_lnL ); } // lnR - Right Border Line Properties of table cell xCellPropSet->getPropertyValue("RightBorder") >>= aBorderLine; sal_Int32 nRightBorder = aBorderLine.LineWidth; + util::Color aRightBorderColor = aBorderLine.Color; nRightBorder = nRightBorder * 2 ; nRightBorder = oox::drawingml::convertHmmToEmu( nRightBorder ); if(nRightBorder > 0) { mpFS->startElementNS( XML_a, XML_lnR, XML_w, I32S(nRightBorder), FSEND); + DrawingML::WriteSolidFill(aRightBorderColor); mpFS->endElementNS( XML_a, XML_lnR); } // lnT - Top Border Line Properties of table cell xCellPropSet->getPropertyValue("TopBorder") >>= aBorderLine; sal_Int32 nTopBorder = aBorderLine.LineWidth; + util::Color aTopBorderColor = aBorderLine.Color; nTopBorder = nTopBorder * 2; nTopBorder = oox::drawingml::convertHmmToEmu( nTopBorder ); if(nTopBorder > 0) { mpFS->startElementNS( XML_a, XML_lnT, XML_w, I32S(nTopBorder), FSEND); + DrawingML::WriteSolidFill(aTopBorderColor); mpFS->endElementNS( XML_a, XML_lnT); } // lnB - Bottom Border Line Properties of table cell xCellPropSet->getPropertyValue("BottomBorder") >>= aBorderLine; sal_Int32 nBottomBorder = aBorderLine.LineWidth; + util::Color aBottomBorderColor = aBorderLine.Color; nBottomBorder = nBottomBorder * 2; nBottomBorder = oox::drawingml::convertHmmToEmu( nBottomBorder ); if(nBottomBorder > 0) { mpFS->startElementNS( XML_a, XML_lnB, XML_w, I32S(nBottomBorder), FSEND); + DrawingML::WriteSolidFill(aBottomBorderColor); mpFS->endElementNS( XML_a, XML_lnB); } } |