diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-28 09:47:40 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-08-01 15:06:14 +0200 |
commit | a0ee5c4518d7634c328909a1988ab2d69b2c317f (patch) | |
tree | 1627f8a27663b1f1b966f034dab86ca09300ce35 | |
parent | 2ecdbd900bfceef0aa8419b71cfbb3622cc00d32 (diff) |
Resolves: fdo#37693 it really is a LineBorder not a LineBorder2
Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 64034bb0d8..898adef141 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> @@ -135,20 +136,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; } |