summaryrefslogtreecommitdiff
path: root/editeng/source/items/frmitems.cxx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2018-10-08 21:16:07 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2018-10-09 08:23:34 +0200
commit98cc91efd7862d39b3c33b85b744721bec935938 (patch)
tree40be092ce9fcdbb9217f59c4776828602a0d3f7e /editeng/source/items/frmitems.cxx
parent1ab27f9ae6f32c7502884c02c2217bbdcf035c48 (diff)
cppcheck: useInitializationList in editeng ...
and remove some indirections Change-Id: I94088030084683c1a24f904da1c42a01f24f47ce Reviewed-on: https://gerrit.libreoffice.org/61561 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'editeng/source/items/frmitems.cxx')
-rw-r--r--editeng/source/items/frmitems.cxx28
1 files changed, 13 insertions, 15 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index d34b797bc7a2..ba9791f31a52 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1344,17 +1344,16 @@ void SvxShadowItem::dumpAsXml(xmlTextWriterPtr pWriter) const
SvxBoxItem::SvxBoxItem( const SvxBoxItem& rCpy ) :
SfxPoolItem ( rCpy ),
+ pTop ( rCpy.pTop ? new SvxBorderLine( *rCpy.pTop ) : nullptr ),
+ pBottom ( rCpy.pBottom ? new SvxBorderLine( *rCpy.pBottom ) : nullptr ),
+ pLeft ( rCpy.pLeft ? new SvxBorderLine( *rCpy.pLeft ) : nullptr ),
+ pRight ( rCpy.pRight ? new SvxBorderLine( *rCpy.pRight ) : nullptr ),
nTopDist ( rCpy.nTopDist ),
nBottomDist ( rCpy.nBottomDist ),
nLeftDist ( rCpy.nLeftDist ),
nRightDist ( rCpy.nRightDist ),
bRemoveAdjCellBorder ( rCpy.bRemoveAdjCellBorder )
-
{
- pTop.reset( rCpy.GetTop() ? new SvxBorderLine( *rCpy.GetTop() ) : nullptr );
- pBottom.reset( rCpy.GetBottom() ? new SvxBorderLine( *rCpy.GetBottom() ) : nullptr );
- pLeft.reset( rCpy.GetLeft() ? new SvxBorderLine( *rCpy.GetLeft() ) : nullptr );
- pRight.reset( rCpy.GetRight() ? new SvxBorderLine( *rCpy.GetRight() ) : nullptr );
}
@@ -2252,15 +2251,15 @@ SvxBoxInfoItem::SvxBoxInfoItem( const sal_uInt16 nId ) :
SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCpy ) :
SfxPoolItem( rCpy ),
+ pHori( rCpy.pHori ? new SvxBorderLine( *rCpy.pHori ) : nullptr ),
+ pVert( rCpy.pVert ? new SvxBorderLine( *rCpy.pVert ) : nullptr ),
mbEnableHor( rCpy.mbEnableHor ),
- mbEnableVer( rCpy.mbEnableVer )
+ mbEnableVer( rCpy.mbEnableVer ),
+ bDist( rCpy.bDist ),
+ bMinDist ( rCpy.bMinDist ),
+ nValidFlags( rCpy.nValidFlags ),
+ nDefDist( rCpy.nDefDist )
{
- pHori.reset( rCpy.GetHori() ? new SvxBorderLine( *rCpy.GetHori() ) : nullptr );
- pVert.reset( rCpy.GetVert() ? new SvxBorderLine( *rCpy.GetVert() ) : nullptr );
- bDist = rCpy.IsDist();
- bMinDist = rCpy.IsMinDist();
- nValidFlags = rCpy.nValidFlags;
- nDefDist = rCpy.GetDefDist();
}
@@ -2881,10 +2880,9 @@ SvxLineItem::SvxLineItem( const sal_uInt16 nId ) :
SvxLineItem::SvxLineItem( const SvxLineItem& rCpy ) :
- SfxPoolItem ( rCpy )
+ SfxPoolItem ( rCpy ),
+ pLine(rCpy.pLine ? new SvxBorderLine( *rCpy.pLine ) : nullptr)
{
- if (rCpy.GetLine())
- pLine.reset( new SvxBorderLine( *rCpy.GetLine() ) );
}