[ooo-build-commit] .: editeng/inc editeng/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Thu Oct 7 03:09:05 PDT 2010


 editeng/inc/editeng/boxitem.hxx   |    2 +-
 editeng/source/items/frmitems.cxx |   26 ++++++++++++++++++++------
 2 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit 39500f2d04e439544b3704bdec842f9c3b063b61
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Thu Oct 7 12:08:31 2010 +0200

    Dotted, dashed lines ODT import fixed

diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx
index 0ea363d..2c47a3d 100644
--- a/editeng/inc/editeng/boxitem.hxx
+++ b/editeng/inc/editeng/boxitem.hxx
@@ -107,7 +107,7 @@ public:
         //							keine Line gesetzt ist
     USHORT 	CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const;
     static com::sun::star::table::BorderLine2 SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert );
-    static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
+    static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
 };
 
 inline void SvxBoxItem::SetDistance( USHORT nNew )
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 2cb6829..ebdf793 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -41,6 +41,7 @@
 #include <com/sun/star/util/SortField.hpp>
 #include <com/sun/star/util/SortFieldType.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
 #include <com/sun/star/table/CellOrientation.hpp>
 #include <com/sun/star/table/CellAddress.hpp>
 #include <com/sun/star/style/PageStyleLayout.hpp>
@@ -1937,12 +1938,25 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
 }
 
 // -----------------------------------------------------------------------
-sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
+sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
 {
     rSvxLine.SetColor(   Color(rLine.Color));
     rSvxLine.SetInWidth( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth  ));
     rSvxLine.SetOutWidth( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.OuterLineWidth) : rLine.OuterLineWidth  ));
     rSvxLine.SetDistance( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance	)  : rLine.LineDistance	 ));
+    switch ( rLine.LineStyle )
+    {
+        default:
+        case table::BorderLineStyle::SOLID:
+            rSvxLine.SetStyle( SOLID );
+            break;
+        case table::BorderLineStyle::DOTTED:
+            rSvxLine.SetStyle( DOTTED );
+            break;
+        case table::BorderLineStyle::DASHED:
+            rSvxLine.SetStyle( DASHED );
+            break;
+    }
     sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
     return bRet;
 }
@@ -1965,7 +1979,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
                 // 4 Borders and 5 distances
                 sal_Int32 nDist = 0;
                 SvxBorderLine aLine;
-                table::BorderLine aBorderLine;
+                table::BorderLine2 aBorderLine;
                 if ( aSeq[0] >>= aBorderLine )
                 {
                     sal_Bool bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert);
@@ -2067,7 +2081,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
         if( !rVal.hasValue() )
             return sal_False;
 
-        table::BorderLine aBorderLine;
+        table::BorderLine2 aBorderLine;
         if( rVal >>= aBorderLine )
         {
             // usual struct
@@ -2880,7 +2894,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
             if (( rVal >>= aSeq ) && ( aSeq.getLength() == 5 ))
             {
                 // 2 BorderLines, flags, valid flags and distance
-                table::BorderLine aBorderLine;
+                table::BorderLine2 aBorderLine;
                 SvxBorderLine aLine;
                 sal_Int16 nFlags( 0 );
                 sal_Int32 nVal( 0 );
@@ -2928,7 +2942,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
             if( !rVal.hasValue() )
                 return sal_False;
 
-            table::BorderLine aBorderLine;
+            table::BorderLine2 aBorderLine;
             if( rVal >>= aBorderLine )
             {
                 // usual struct
@@ -3305,7 +3319,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId )
     sal_Int32 nVal = 0;
     if ( nMemId == 0 )
     {
-        table::BorderLine aLine;
+        table::BorderLine2 aLine;
         if ( rVal >>= aLine )
         {
             if ( !pLine )


More information about the ooo-build-commit mailing list