diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-06 14:48:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-13 17:45:57 +0200 |
commit | af5ebbf7835441c767f91a620f109ee6722e57bd (patch) | |
tree | c72b2a1ddb5aa0a0a369be7babd516a5592d5fac /editeng/source/items | |
parent | 1156d11ef0bb2bc3d71ae9299656db4fed66f073 (diff) |
create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution. (Unfortunately MSVC 2012
does not support explicit conversion operators. Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)
Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/borderline.cxx | 8 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 4bea25c9df17..c921c05b4385 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -163,7 +163,7 @@ ConvertBorderStyleFromWord(int const nWordLineStyle) case 27: return INSET; default: - return NONE; + return css::table::BorderLineStyle::NONE; } } @@ -302,7 +302,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle ) switch ( nStyle ) { // No line: no width - case NONE: + case css::table::BorderLineStyle::NONE: aImpl = BorderWidthImpl( 0, 0.0 ); break; @@ -431,7 +431,7 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv ) void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist ) { - if (NONE == nStyle) + if (css::table::BorderLineStyle::NONE == nStyle) { nStyle = SOLID; if ( nOut > 0 && nIn > 0 ) @@ -454,7 +454,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa static size_t const len = SAL_N_ELEMENTS(aDoubleStyles); long nWidth = 0; - SvxBorderStyle nTestStyle(NONE); + SvxBorderStyle nTestStyle(css::table::BorderLineStyle::NONE); for (size_t i = 0; i < len && nWidth == 0; ++i) { nTestStyle = aDoubleStyles[i]; diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 9eb3a253a6b5..ce635812ceaa 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -118,7 +118,7 @@ namespace SvxBorderLine CreateBorderLine(SvStream &stream, sal_uInt16 version) { sal_uInt16 nOutline, nInline, nDistance; - sal_uInt16 nStyle = NONE; + sal_uInt16 nStyle = css::table::BorderLineStyle::NONE; Color aColor; ReadColor( stream, aColor ).ReadUInt16( nOutline ).ReadUInt16( nInline ).ReadUInt16( nDistance ); @@ -1905,7 +1905,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { drawing::LineStyle eDrawingStyle; rVal >>= eDrawingStyle; - editeng::SvxBorderStyle eBorderStyle = NONE; + editeng::SvxBorderStyle eBorderStyle = css::table::BorderLineStyle::NONE; switch ( eDrawingStyle ) { default: @@ -2643,7 +2643,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const Color aColor; ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance ); SvxBorderLine aBorder( &aColor ); - aBorder.GuessLinesWidths(NONE, nOutline, nInline, nDistance); + aBorder.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance); switch( cLine ) { @@ -3239,7 +3239,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const if( nOutline ) { SvxBorderLine aLine( &aColor ); - aLine.GuessLinesWidths(NONE, nOutline, nInline, nDistance); + aLine.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance); _pLine->SetLine( &aLine ); } return _pLine; |