diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-30 12:27:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-30 12:28:53 +0200 |
commit | 5e557a5f987b70f064e3381bda45bd882d651546 (patch) | |
tree | cfe628f32ba9442c0a9235077b4daed25152eb61 | |
parent | 7bc8c92bd9a261d81fd48219c2868f2b9ceff56d (diff) |
lotuswordpro: std::auto_ptr -> std::unique_ptr
Change-Id: I205b84f6dcb996935bd59ac9927313c6a88066b4
-rw-r--r-- | lotuswordpro/source/filter/lwpbreaksoverride.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpcharborderoverride.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfilter.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpoverride.cxx | 14 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwppara.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwppara1.cxx | 16 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpparaborderoverride.cxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpparastyle.cxx | 4 |
8 files changed, 19 insertions, 35 deletions
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.cxx b/lotuswordpro/source/filter/lwpbreaksoverride.cxx index bdc689ef2582..12a855ab3748 100644 --- a/lotuswordpro/source/filter/lwpbreaksoverride.cxx +++ b/lotuswordpro/source/filter/lwpbreaksoverride.cxx @@ -73,7 +73,7 @@ LwpBreaksOverride::LwpBreaksOverride(LwpBreaksOverride const& rOther) : LwpOverride(rOther) , m_pNextStyle(0) { - std::auto_ptr<LwpAtomHolder> pNextStyle(::clone(rOther.m_pNextStyle)); + std::unique_ptr<LwpAtomHolder> pNextStyle(::clone(rOther.m_pNextStyle)); m_pNextStyle = pNextStyle.release(); } diff --git a/lotuswordpro/source/filter/lwpcharborderoverride.cxx b/lotuswordpro/source/filter/lwpcharborderoverride.cxx index a65d7dd9debb..bbe4de5fc5cc 100644 --- a/lotuswordpro/source/filter/lwpcharborderoverride.cxx +++ b/lotuswordpro/source/filter/lwpcharborderoverride.cxx @@ -84,8 +84,8 @@ LwpCharacterBorderOverride::LwpCharacterBorderOverride(LwpCharacterBorderOverrid , m_nAboveWidth(rOther.m_nAboveWidth) , m_nBelowWidth(rOther.m_nBelowWidth) { - std::auto_ptr<LwpBorderStuff> pBorderStuff(::clone(rOther.m_pBorderStuff)); - std::auto_ptr<LwpMargins> pMargins(::clone(rOther.m_pMargins)); + std::unique_ptr<LwpBorderStuff> pBorderStuff(::clone(rOther.m_pBorderStuff)); + std::unique_ptr<LwpMargins> pMargins(::clone(rOther.m_pMargins)); m_pBorderStuff = pBorderStuff.release(); m_pMargins = pMargins.release(); } diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index e4d7606e5534..9e66d7b480e2 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -104,7 +104,7 @@ using namespace OpenStormBento; bool Decompress(SvStream *pCompressed, SvStream * & pOutDecompressed) { pCompressed->Seek(0); - std::auto_ptr<SvStream> aDecompressed(new SvMemoryStream(4096, 4096)); + std::unique_ptr<SvStream> aDecompressed(new SvMemoryStream(4096, 4096)); unsigned char buffer[512]; pCompressed->Read(buffer, 16); aDecompressed->Write(buffer, 16); diff --git a/lotuswordpro/source/filter/lwpoverride.cxx b/lotuswordpro/source/filter/lwpoverride.cxx index 1563f9a25b0f..60eea052226f 100644 --- a/lotuswordpro/source/filter/lwpoverride.cxx +++ b/lotuswordpro/source/filter/lwpoverride.cxx @@ -386,12 +386,10 @@ LwpSpacingOverride::LwpSpacingOverride(LwpSpacingOverride const& rOther) , m_pParaSpacingAbove(0) , m_pParaSpacingBelow(0) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpSpacingCommonOverride> pSpacing(::clone(rOther.m_pSpacing)); - std::auto_ptr<LwpSpacingCommonOverride> pAboveLineSpacing(::clone(rOther.m_pAboveLineSpacing)); - std::auto_ptr<LwpSpacingCommonOverride> pParaSpacingAbove(::clone(rOther.m_pParaSpacingAbove)); - std::auto_ptr<LwpSpacingCommonOverride> pParaSpacingBelow(::clone(rOther.m_pParaSpacingBelow)); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr<LwpSpacingCommonOverride> pSpacing(::clone(rOther.m_pSpacing)); + std::unique_ptr<LwpSpacingCommonOverride> pAboveLineSpacing(::clone(rOther.m_pAboveLineSpacing)); + std::unique_ptr<LwpSpacingCommonOverride> pParaSpacingAbove(::clone(rOther.m_pParaSpacingAbove)); + std::unique_ptr<LwpSpacingCommonOverride> pParaSpacingBelow(::clone(rOther.m_pParaSpacingBelow)); m_pSpacing = pSpacing.release(); m_pAboveLineSpacing = pAboveLineSpacing.release(); m_pParaSpacingAbove = pParaSpacingAbove.release(); @@ -469,9 +467,7 @@ LwpAmikakeOverride::LwpAmikakeOverride(LwpAmikakeOverride const& rOther) , m_pBackgroundStuff(0) , m_nType(rOther.m_nType) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpBackgroundStuff> pBackgroundStuff(::clone(rOther.m_pBackgroundStuff)); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr<LwpBackgroundStuff> pBackgroundStuff(::clone(rOther.m_pBackgroundStuff)); m_pBackgroundStuff = pBackgroundStuff.release(); } diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index c18319e7e0e4..8ac7c8cb73f7 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -361,7 +361,7 @@ void LwpPara::RegisterStyle() if (GetParaStyle()->GetIndent()) { - std::auto_ptr<LwpIndentOverride> pIndentOverride(GetParaStyle()->GetIndent()->clone()); + std::unique_ptr<LwpIndentOverride> pIndentOverride(GetParaStyle()->GetIndent()->clone()); delete m_pIndentOverride; m_pIndentOverride = pIndentOverride.release(); } diff --git a/lotuswordpro/source/filter/lwppara1.cxx b/lotuswordpro/source/filter/lwppara1.cxx index b508c6cc01e9..834174f8a816 100644 --- a/lotuswordpro/source/filter/lwppara1.cxx +++ b/lotuswordpro/source/filter/lwppara1.cxx @@ -388,13 +388,11 @@ void LwpPara::OverrideParaBreaks(LwpParaProperty* pProps, XFParaStyle* pOverStyl } LwpOverride* pBreaks = pParaStyle->GetBreaks(); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpBreaksOverride> pFinalBreaks( + std::unique_ptr<LwpBreaksOverride> pFinalBreaks( pBreaks ? polymorphic_downcast<LwpBreaksOverride*>(pBreaks->clone()) : new LwpBreaksOverride) ; - SAL_WNODEPRECATED_DECLARATIONS_POP // get local breaks pBreaks = static_cast<LwpParaBreaksProperty*>(pProps)->GetLocalParaBreaks(); @@ -475,13 +473,11 @@ void LwpPara::OverrideParaBullet(LwpParaProperty* pProps) m_bHasBullet = true; LwpOverride* pBullet= pParaStyle->GetBulletOverride(); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpBulletOverride> pFinalBullet( + std::unique_ptr<LwpBulletOverride> pFinalBullet( pBullet ? polymorphic_downcast<LwpBulletOverride*>(pBullet->clone()) : new LwpBulletOverride) ; - SAL_WNODEPRECATED_DECLARATIONS_POP boost::scoped_ptr<LwpBulletOverride> const pLocalBullet2(pLocalBullet->clone()); pLocalBullet2->Override(pFinalBullet.get()); @@ -515,9 +511,7 @@ void LwpPara::OverrideParaBullet(LwpParaProperty* pProps) m_pSilverBullet->SetFoundry(m_pFoundry); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpBulletOverride> pBulletOverride(pBullOver->clone()); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr<LwpBulletOverride> pBulletOverride(pBullOver->clone()); delete m_pBullOver; m_pBullOver = pBulletOverride.release(); } @@ -537,9 +531,7 @@ void LwpPara::OverrideParaNumbering(LwpParaProperty* pProps) } LwpNumberingOverride* pParaNumbering = pParaStyle->GetNumberingOverride(); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpNumberingOverride> pOver(new LwpNumberingOverride); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr<LwpNumberingOverride> pOver(new LwpNumberingOverride); //Override with the local numbering, if any if (pProps) { diff --git a/lotuswordpro/source/filter/lwpparaborderoverride.cxx b/lotuswordpro/source/filter/lwpparaborderoverride.cxx index 4a3ab50cb631..318ff8d40f4c 100644 --- a/lotuswordpro/source/filter/lwpparaborderoverride.cxx +++ b/lotuswordpro/source/filter/lwpparaborderoverride.cxx @@ -101,12 +101,10 @@ LwpParaBorderOverride::LwpParaBorderOverride(LwpParaBorderOverride const& rOther , m_nRightWidth(rOther.m_nRightWidth) , m_nBetweenMargin(rOther.m_nBetweenMargin) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpBorderStuff> pBorderStuff(::clone(rOther.m_pBorderStuff)); - std::auto_ptr<LwpBorderStuff> pBetweenStuff(::clone(rOther.m_pBetweenStuff)); - std::auto_ptr<LwpShadow> pShadow(::clone(rOther.m_pShadow)); - std::auto_ptr<LwpMargins> pMargins(::clone(rOther.m_pMargins)); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr<LwpBorderStuff> pBorderStuff(::clone(rOther.m_pBorderStuff)); + std::unique_ptr<LwpBorderStuff> pBetweenStuff(::clone(rOther.m_pBetweenStuff)); + std::unique_ptr<LwpShadow> pShadow(::clone(rOther.m_pShadow)); + std::unique_ptr<LwpMargins> pMargins(::clone(rOther.m_pMargins)); m_pBorderStuff = pBorderStuff.release(); m_pBetweenStuff = pBetweenStuff.release(); m_pShadow = pShadow.release(); diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx index 825648a5c91e..244189fd270d 100644 --- a/lotuswordpro/source/filter/lwpparastyle.cxx +++ b/lotuswordpro/source/filter/lwpparastyle.cxx @@ -442,9 +442,7 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden else pParentPara = NULL; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - std::auto_ptr<LwpIndentOverride> pTotalIndent(new LwpIndentOverride); - SAL_WNODEPRECATED_DECLARATIONS_POP + std::unique_ptr<LwpIndentOverride> pTotalIndent(new LwpIndentOverride); if (pIndent->IsUseRelative() && pParentPara) { LwpIndentOverride* pParentIndent = pParentPara->GetIndent(); |