Kaydet (Commit) 311325ee authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

Dotted - dashed borders: Fix build breakage in svx

üst 36c8126b
...@@ -107,7 +107,7 @@ public: ...@@ -107,7 +107,7 @@ public:
// keine Line gesetzt ist // keine Line gesetzt ist
USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const; USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const;
static com::sun::star::table::BorderLine2 SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert ); static com::sun::star::table::BorderLine2 SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert );
static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert); static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
}; };
inline void SvxBoxItem::SetDistance( USHORT nNew ) inline void SvxBoxItem::SetDistance( USHORT nNew )
......
...@@ -1938,24 +1938,30 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const ...@@ -1938,24 +1938,30 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert) sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
{ {
rSvxLine.SetColor( Color(rLine.Color)); rSvxLine.SetColor( Color(rLine.Color));
rSvxLine.SetInWidth( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth )); 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.SetOutWidth( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.OuterLineWidth) : rLine.OuterLineWidth ));
rSvxLine.SetDistance( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance )); rSvxLine.SetDistance( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance ));
switch ( rLine.LineStyle )
const table::BorderLine2* pLine2 = static_cast< const table::BorderLine2* >( &rLine );
if ( pLine2 )
{ {
default: switch ( pLine2->LineStyle )
case table::BorderLineStyle::SOLID: {
rSvxLine.SetStyle( SOLID ); default:
break; case table::BorderLineStyle::SOLID:
case table::BorderLineStyle::DOTTED: rSvxLine.SetStyle( SOLID );
rSvxLine.SetStyle( DOTTED ); break;
break; case table::BorderLineStyle::DOTTED:
case table::BorderLineStyle::DASHED: rSvxLine.SetStyle( DOTTED );
rSvxLine.SetStyle( DASHED ); break;
break; case table::BorderLineStyle::DASHED:
rSvxLine.SetStyle( DASHED );
break;
}
} }
sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0; sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
return bRet; return bRet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment