incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1349286 - /incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
Date Tue, 12 Jun 2012 12:06:44 GMT
Author: af
Date: Tue Jun 12 12:06:43 2012
New Revision: 1349286

URL: http://svn.apache.org/viewvc?rev=1349286&view=rev
Log:
#i119546# Set minimal table border width to 1 for writing in ppt format.

          Patch by: Lei Debin
          Review by: Andre


Modified:
    incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx

Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1349286&r1=1349285&r2=1349286&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Tue Jun 12 12:06:43 2012
@@ -7612,8 +7612,9 @@ void ApplyCellLineAttributes( const SdrO
 				{
 					Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue()
);
 					aBorderLine.Color = aLineColor.GetColor();
-					aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue()
/ 4 );
-					aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue()
/ 4 );
+					// Avoid width = 0, the min value should be 1.
+					aBorderLine.OuterLineWidth = std::max( static_cast< sal_Int16 >( 1 ), static_cast<
sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue()
/ 4) );		
+					aBorderLine.InnerLineWidth = std::max( static_cast< sal_Int16 >( 1 ), static_cast<
sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue()
/ 4) );							     
 					aBorderLine.LineDistance = 0;
 				}
 				break;



Mime
View raw message