diff options
author | Radek Doulik <rodo@novell.com> | 2012-05-10 16:21:45 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2012-05-10 16:25:20 +0200 |
commit | ea923cd424f6426d69a7fb375f5ac9e19ec2246a (patch) | |
tree | db21d081156b7d999277e2143ac8aa30c9d1b93e /filter | |
parent | resolved fdo#46233 value >12 with AM/PM can't be clock time (diff) | |
download | core-ea923cd424f6426d69a7fb375f5ac9e19ec2246a.tar.gz core-ea923cd424f6426d69a7fb375f5ac9e19ec2246a.zip |
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
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index d61ab392aed3..0501d4a0aaa2 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; } |