diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-13 09:37:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-13 11:49:29 +0100 |
commit | 441f0434714a98b64b7956ce6cf44723eadc0883 (patch) | |
tree | 048d94a3847997f44136d70035dd6165938ee4ec /svx | |
parent | b017f869e80993679d17e27b76c5c0edc1a22452 (diff) |
coverity#1371335 Self assignment
these copy ctors are seriously confused
Change-Id: I07b2d8cc16ba983cd74782207260b3057f8e7d7d
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 217febee5ab8..bae449981ea6 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -250,21 +250,6 @@ BulletsTypeMgr::BulletsTypeMgr() Init(); } -BulletsTypeMgr::BulletsTypeMgr(const BulletsTypeMgr& aTypeMgr): - NBOTypeMgrBase(aTypeMgr) -{ - for (sal_uInt16 i=0; i < DEFAULT_BULLET_TYPES; ++i) - { - const BulletsSettings_Impl* pSrcBullet = BulletsTypeMgr::pActualBullets[i]; - BulletsSettings_Impl* pTargetBullet = pActualBullets[i]; - pTargetBullet->bIsCustomized = pSrcBullet->bIsCustomized; - pTargetBullet->cBulletChar = pSrcBullet->cBulletChar; - pTargetBullet->aFont = pSrcBullet->aFont; - pTargetBullet->sDescription = pSrcBullet->sDescription; - pTargetBullet->eType = pSrcBullet->eType; - } -} - class theBulletsTypeMgr : public rtl::Static<BulletsTypeMgr, theBulletsTypeMgr> {}; BulletsTypeMgr& BulletsTypeMgr::GetInstance() @@ -515,26 +500,6 @@ GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr() Init(); } -GraphyicBulletsTypeMgr::GraphyicBulletsTypeMgr(const GraphyicBulletsTypeMgr& aTypeMgr): - NBOTypeMgrBase(aTypeMgr) -{ - for (const GrfBulDataRelation* pSrcEntry : aTypeMgr.aGrfDataLst) - { - GrfBulDataRelation* pEntry = new GrfBulDataRelation(eNBType::GRAPHICBULLETS); - if (pSrcEntry) - { - pEntry->bIsCustomized = pSrcEntry->bIsCustomized; - pEntry->nTabIndex = pSrcEntry->nTabIndex; - pEntry->nGallaryIndex = pSrcEntry->nGallaryIndex; - pEntry->sGrfName = pSrcEntry->sGrfName; - pEntry->sDescription = pSrcEntry->sDescription; - aGrfDataLst.push_back(pEntry); - } - else - delete pEntry; - } -} - GraphyicBulletsTypeMgr::~GraphyicBulletsTypeMgr() { for (const GrfBulDataRelation* p : aGrfDataLst) @@ -771,41 +736,6 @@ MixBulletsTypeMgr& MixBulletsTypeMgr::GetInstance() return theMixBulletsTypeMgr::get(); } -MixBulletsTypeMgr::MixBulletsTypeMgr(const MixBulletsTypeMgr& aTypeMgr): - NBOTypeMgrBase(aTypeMgr) -{ - for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++) - { - if ( MixBulletsTypeMgr::pActualBullets[i]->eType == eNBType::BULLETS ) - { - pActualBullets[i]->eType = MixBulletsTypeMgr::pActualBullets[i]->eType; - pActualBullets[i]->nIndex = MixBulletsTypeMgr::pActualBullets[i]->nIndex; //index in the tab page display - pActualBullets[i]->nIndexDefault = MixBulletsTypeMgr::pActualBullets[i]->nIndexDefault; - pActualBullets[i]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->cBulletChar = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->cBulletChar; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->aFont = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->aFont; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->sDescription = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->sDescription; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->bIsCustomized = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->bIsCustomized; - static_cast<BulletsSettings_Impl*>(pActualBullets[i]->pBullets)->eType = static_cast<BulletsSettings_Impl*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->eType; - } - else if ( MixBulletsTypeMgr::pActualBullets[i]->eType == eNBType::GRAPHICBULLETS ) - { - pActualBullets[i]->eType = MixBulletsTypeMgr::pActualBullets[i]->eType; - pActualBullets[i]->nIndex = MixBulletsTypeMgr::pActualBullets[i]->nIndex; //index in the tab page display - pActualBullets[i]->nIndexDefault = MixBulletsTypeMgr::pActualBullets[i]->nIndexDefault; - pActualBullets[i]->pBullets = new GrfBulDataRelation(eNBType::GRAPHICBULLETS) ; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->sGrfName = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->sGrfName; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->sDescription = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->sDescription; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->bIsCustomized = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->bIsCustomized; - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->eType = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->eType; - if ( static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->bIsCustomized && static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->pGrfObj != nullptr) - { - static_cast<GrfBulDataRelation*>(pActualBullets[i]->pBullets)->pGrfObj = static_cast<GrfBulDataRelation*>(MixBulletsTypeMgr::pActualBullets[i]->pBullets)->pGrfObj; - } - } - } - ImplLoad("standard.sya"); -} void MixBulletsTypeMgr::Init() { BulletsTypeMgr &rBTMgr = BulletsTypeMgr::GetInstance(); @@ -1251,14 +1181,6 @@ NumberingTypeMgr::NumberingTypeMgr() ImplLoad("standard.syb"); } -NumberingTypeMgr::NumberingTypeMgr(const NumberingTypeMgr& rTypeMgr) - : NBOTypeMgrBase(rTypeMgr) - , pNumberSettingsArr (new NumberSettingsArr_Impl) - , pDefaultNumberSettingsArr(nullptr) -{ - ImplLoad("standard.syb"); -} - NumberingTypeMgr::~NumberingTypeMgr() { delete pNumberSettingsArr; @@ -1447,19 +1369,6 @@ OutlineTypeMgr::OutlineTypeMgr() ImplLoad("standard.syc"); } -OutlineTypeMgr::OutlineTypeMgr(const OutlineTypeMgr& aTypeMgr) - : NBOTypeMgrBase(aTypeMgr) -{ - Init(); - for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ ) - { - pDefaultOutlineSettingsArrs[nItem] = pOutlineSettingsArrs[nItem]; - } - //Initial the first time to store the default value. Then do it again for customized value - Init(); - ImplLoad("standard.syc"); -} - class theOutlineTypeMgr : public rtl::Static<OutlineTypeMgr, theOutlineTypeMgr> {}; OutlineTypeMgr& OutlineTypeMgr::GetInstance() |