diff options
author | Andre Fischer <af@apache.org> | 2012-06-12 11:06:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-12 13:27:37 +0100 |
commit | 694ac8155517a88e7317170b189f9d5fabc270b0 (patch) | |
tree | 7d0be39a0bf2c218d015eef65888f89c2c2bcbaf /filter | |
parent | a6e1f214c9c8c338da7cd216884e45e234e64669 (diff) |
Resolves: #i119546# Set minimal ppt table border width to 1
for loading from ppt format.
Patch by: Lei Debin
Review by: Andre
(cherry picked from commit 2b747915abca3369178d177291d706377676b19e)
Conflicts:
filter/source/msfilter/svdfppt.cxx
Change-Id: I2c10ae8161c44f2c60e7605a529887a0925d456d
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 93aaeaf8cb22..1de1b2eb82a8 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7412,7 +7412,9 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl { Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() ); aBorderLine.Color = aLineColor.GetColor(); - aBorderLine.LineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 ); + // Avoid width = 0, the min value should be 1. + sal_Int32 nLineWidth = std::max(sal_Int32(1), ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4); + aBorderLine.LineWidth = static_cast< sal_Int16 >( nLineWidth ); aBorderLine.LineStyle = eLineStyle == XLINE_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED; } break; |