[Libreoffice-commits] core.git: filter/source

Andre Fischer af at apache.org
Fri Apr 12 05:27:58 PDT 2013


 filter/source/msfilter/svdfppt.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 694ac8155517a88e7317170b189f9d5fabc270b0
Author: Andre Fischer <af at apache.org>
Date:   Tue Jun 12 11:06:43 2012 +0000

    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

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 93aaeaf..1de1b2e 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;


More information about the Libreoffice-commits mailing list