summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-28 09:47:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-28 09:47:40 +0100
commita7058d28e5d36778b9f16308632ffb4c9608479c (patch)
tree0a0bc091df284545d7b6a09c85cfc7b05d115ea3
parent10d8c87d7bc49e57d9b85a9d14afd5dc4d4abaad (diff)
Resolves: fdo#37693 it really is a LineBorder not a LineBorder2
-rw-r--r--sw/source/core/unocore/unotbl.cxx21
1 files changed, 8 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index fff58acc04..0444a13599 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;
}