Kaydet (Commit) 694ac815 authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Caolán McNamara

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 2b747915)

Conflicts:
	filter/source/msfilter/svdfppt.cxx

Change-Id: I2c10ae8161c44f2c60e7605a529887a0925d456d
üst a6e1f214
...@@ -7412,7 +7412,9 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl ...@@ -7412,7 +7412,9 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
{ {
Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() ); Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor(); 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; aBorderLine.LineStyle = eLineStyle == XLINE_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED;
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment