[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jul 28 01:47:53 PDT 2011


 sw/source/core/unocore/unotbl.cxx |   21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

New commits:
commit a7058d28e5d36778b9f16308632ffb4c9608479c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 28 09:47:40 2011 +0100

    Resolves: fdo#37693 it really is a LineBorder not a LineBorder2

diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index fff58ac..0444a13 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -74,6 +74,7 @@
 #include <com/sun/star/table/ShadowFormat.hpp>
 #include <com/sun/star/table/TableBorder.hpp>
 #include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
 #include <com/sun/star/table/TableBorderDistances.hpp>
 #include <com/sun/star/style/PageStyleLayout.hpp>
 #include <com/sun/star/style/BreakType.hpp>
@@ -136,20 +137,14 @@ table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine)
 
 sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine)
 {
-    const table::BorderLine2& rLine2 = static_cast< const table::BorderLine2& >( rLine );
-    rSvxLine.SetColor(   Color(rLine.Color));
+    rSvxLine.SetColor(Color(rLine.Color));
 
-    if ( rLine2.LineWidth > 0 )
-    {
-        rSvxLine.SetStyle( editeng::SvxBorderStyle( rLine2.LineStyle ) );
-        rSvxLine.SetWidth( MM100_TO_TWIP_UNSIGNED( rLine2.LineWidth ) );
-    }
-    else
-        rSvxLine.GuessLinesWidths( editeng::SvxBorderStyle( rLine2.LineStyle ),
-                                    MM100_TO_TWIP( rLine.OuterLineWidth ),
-                                    MM100_TO_TWIP( rLine.InnerLineWidth ),
-                                    MM100_TO_TWIP( rLine.LineDistance	) );
-    sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0 || rLine2.LineWidth > 0;
+    rSvxLine.GuessLinesWidths( editeng::SvxBorderStyle(table::BorderLineStyle::SOLID),
+                                MM100_TO_TWIP( rLine.OuterLineWidth ),
+                                MM100_TO_TWIP( rLine.InnerLineWidth ),
+                                MM100_TO_TWIP( rLine.LineDistance ) );
+
+    sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
     return bRet;
 }
 


More information about the Libreoffice-commits mailing list