[Libreoffice-commits] .: filter/source

Radek Doulík rodo at kemper.freedesktop.org
Thu May 10 07:25:28 PDT 2012


 filter/source/msfilter/svdfppt.cxx |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit ea923cd424f6426d69a7fb375f5ac9e19ec2246a
Author: Radek Doulik <rodo at novell.com>
Date:   Thu May 10 16:21:45 2012 +0200

    use com::sun::star::table::BorderLine2 instead of older BorderLine (n#758914)
    
     - older BorderLine doesn't seem to work in case InnerLineWidth and OuterLineWidth are set to equal positive value and distance is set to 0 (possible regression)
     - using the newer API solves the problem for us
    
    Change-Id: I69f10a0e947352d20b78dbdc39b7c9af95f8603b

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index d61ab39..0501d4a 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -120,7 +120,8 @@
 #include <editeng/scripttypeitem.hxx>
 #include "com/sun/star/awt/Gradient.hpp"
 #include <com/sun/star/table/XMergeableCellRange.hpp>
-#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
 #include <vcl/virdev.hxx>
 #include <algorithm>
 #include <set>
@@ -7305,7 +7306,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
     {
         SfxItemSet aSet( pLine->GetMergedItemSet() );
         XLineStyle eLineStyle(((XLineStyleItem&)pLine->GetMergedItem( XATTR_LINESTYLE )).GetValue());
-        com::sun::star::table::BorderLine aBorderLine;
+        com::sun::star::table::BorderLine2 aBorderLine;
         switch( eLineStyle )
         {
             case XLINE_DASH :
@@ -7313,16 +7314,14 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
                 {
                     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 );
-                    aBorderLine.LineDistance = 0;
+                    aBorderLine.LineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
+                    aBorderLine.LineStyle = eLineStyle == XLINE_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED;
                 }
                 break;
             case XLINE_NONE :
                 {
-                    aBorderLine.OuterLineWidth = 0;
-                    aBorderLine.InnerLineWidth = 0;
-                    aBorderLine.LineDistance = 0;
+                    aBorderLine.LineWidth = 0;
+                    aBorderLine.LineStyle = table::BorderLineStyle::NONE;
                 }
             break;
         }


More information about the Libreoffice-commits mailing list