summaryrefslogtreecommitdiffstats
path: root/editeng/source/items/paraitem.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-16 09:59:17 +0200
committerNoel Grandin <noel@peralex.com>2016-08-17 08:45:15 +0200
commita49eeecd2372c620caa66428acaf27ebc7d70e92 (patch)
treece9b6ec88766662272f517710a62a831b02592a8 /editeng/source/items/paraitem.cxx
parentconvert SvxSpecialLineSpace to scoped enum (diff)
downloadcore-a49eeecd2372c620caa66428acaf27ebc7d70e92.tar.gz
core-a49eeecd2372c620caa66428acaf27ebc7d70e92.zip
convert SvxInterLineSpaceRule to scoped enum
and rename it to be more explicit Change-Id: I3f8bd7928495dba1e94b785cdda06d9819ee66bf
Diffstat (limited to 'editeng/source/items/paraitem.cxx')
-rw-r--r--editeng/source/items/paraitem.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index e27e3a281553..83b6f4d91bb2 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -85,7 +85,7 @@ SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId
nInterLineSpace = 0;
nLineHeight = nHeight;
eLineSpace = SVX_LINE_SPACE_AUTO;
- eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+ eInterLineSpaceRule = SvxInterLineSpaceRule::Off;
}
@@ -101,12 +101,12 @@ bool SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const
&& (eLineSpace == SVX_LINE_SPACE_AUTO ||
nLineHeight == rLineSpace.nLineHeight)
// Same Linespacing Rule?
- && ( eInterLineSpace == rLineSpace.eInterLineSpace )
+ && ( eInterLineSpaceRule == rLineSpace.eInterLineSpaceRule )
// Either set proportional or additive.
- && (( eInterLineSpace == SVX_INTER_LINE_SPACE_OFF)
- || (eInterLineSpace == SVX_INTER_LINE_SPACE_PROP
+ && (( eInterLineSpaceRule == SvxInterLineSpaceRule::Off)
+ || (eInterLineSpaceRule == SvxInterLineSpaceRule::Prop
&& nPropLineSpace == rLineSpace.nPropLineSpace)
- || (eInterLineSpace == SVX_INTER_LINE_SPACE_FIX
+ || (eInterLineSpaceRule == SvxInterLineSpaceRule::Fix
&& (nInterLineSpace == rLineSpace.nInterLineSpace)));
}
@@ -124,12 +124,12 @@ bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
switch( eLineSpace )
{
case SVX_LINE_SPACE_AUTO:
- if(eInterLineSpace == SVX_INTER_LINE_SPACE_FIX)
+ if(eInterLineSpaceRule == SvxInterLineSpaceRule::Fix)
{
aLSp.Mode = style::LineSpacingMode::LEADING;
aLSp.Height = ( bConvert ? (short)convertTwipToMm100(nInterLineSpace) : nInterLineSpace);
}
- else if(eInterLineSpace == SVX_INTER_LINE_SPACE_OFF)
+ else if(eInterLineSpaceRule == SvxInterLineSpaceRule::Off)
{
aLSp.Mode = style::LineSpacingMode::PROP;
aLSp.Height = 100;
@@ -186,7 +186,7 @@ bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
case style::LineSpacingMode::LEADING:
{
- eInterLineSpace = SVX_INTER_LINE_SPACE_FIX;
+ eInterLineSpaceRule = SvxInterLineSpaceRule::Fix;
eLineSpace = SVX_LINE_SPACE_AUTO;
nInterLineSpace = aLSp.Height;
if(bConvert)
@@ -199,15 +199,15 @@ bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
eLineSpace = SVX_LINE_SPACE_AUTO;
nPropLineSpace = (sal_Int16)aLSp.Height;
if(100 == aLSp.Height)
- eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+ eInterLineSpaceRule = SvxInterLineSpaceRule::Off;
else
- eInterLineSpace = SVX_INTER_LINE_SPACE_PROP;
+ eInterLineSpaceRule = SvxInterLineSpaceRule::Prop;
}
break;
case style::LineSpacingMode::FIX:
case style::LineSpacingMode::MINIMUM:
{
- eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+ eInterLineSpaceRule = SvxInterLineSpaceRule::Off;
eLineSpace = aLSp.Mode == style::LineSpacingMode::FIX ? SVX_LINE_SPACE_FIX : SVX_LINE_SPACE_MIN;
nLineHeight = aLSp.Height;
if(bConvert)
@@ -261,7 +261,7 @@ SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const
pAttr->SetInterLineSpace( nInterSpace );
pAttr->SetPropLineSpace( nPropSpace );
pAttr->GetLineSpaceRule() = (SvxLineSpace)nRule;
- pAttr->GetInterLineSpaceRule() = (SvxInterLineSpace)nInterRule;
+ pAttr->SetInterLineSpaceRule( (SvxInterLineSpaceRule)nInterRule );
return pAttr;
}
@@ -272,7 +272,7 @@ SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*
.WriteInt16( GetInterLineSpace() )
.WriteUInt16( GetLineHeight() )
.WriteSChar( GetLineSpaceRule() )
- .WriteSChar( GetInterLineSpaceRule() );
+ .WriteSChar( (char) GetInterLineSpaceRule() );
return rStrm;
}