Kaydet (Commit) 5e557a5f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

lotuswordpro: std::auto_ptr -> std::unique_ptr

Change-Id: I205b84f6dcb996935bd59ac9927313c6a88066b4
üst 7bc8c92b
......@@ -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();
}
......
......@@ -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();
}
......
......@@ -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);
......
......@@ -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();
}
......
......@@ -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();
}
......
......@@ -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)
{
......
......@@ -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();
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment