summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-22 15:00:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-22 15:01:05 +0100
commit871426533f7afe31bc451fa6b407b83db8e52827 (patch)
treeed60cee61ebee91994eaffc9c9a3638836ed2ab4 /sw
parent5a849bb5317ad73bb43b2b618b14bc0e8751fff6 (diff)
just silence the auto_ptr deprecations in isolation
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unoport.hxx2
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx8
-rw-r--r--sw/source/core/access/accpara.cxx6
-rw-r--r--sw/source/core/crsr/swcrsr.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx8
-rw-r--r--sw/source/core/docnode/ndsect.cxx2
-rw-r--r--sw/source/core/inc/UndoAttribute.hxx20
-rw-r--r--sw/source/core/inc/rolbck.hxx10
-rw-r--r--sw/source/core/inc/unometa.hxx4
-rw-r--r--sw/source/core/text/txttab.cxx4
-rw-r--r--sw/source/core/undo/docundo.cxx2
-rw-r--r--sw/source/core/undo/unsect.cxx4
-rw-r--r--sw/source/core/unocore/unoobj.cxx12
-rw-r--r--sw/source/core/unocore/unoobj2.cxx12
-rw-r--r--sw/source/core/unocore/unoportenum.cxx8
-rw-r--r--sw/source/core/unocore/unoredline.cxx4
-rw-r--r--sw/source/core/unocore/unorefmk.cxx6
-rw-r--r--sw/source/core/unocore/unosect.cxx12
-rw-r--r--sw/source/core/unocore/unotext.cxx12
-rw-r--r--sw/source/ui/dialog/regionsw.cxx7
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx6
21 files changed, 143 insertions, 10 deletions
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
index 12f93f6fcb56..59cb35ebc562 100644
--- a/sw/inc/unoport.hxx
+++ b/sw/inc/unoport.hxx
@@ -116,10 +116,12 @@ private:
m_xTextField;
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
m_xMeta;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyText;
::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyStyle;
::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyAdjust;
::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyIsAbove;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const SwDepend m_FrameDepend;
SwFrmFmt * m_pFrameFmt;
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index c3c1a37a4c43..dd38bc0ad63f 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -766,7 +766,7 @@ public:
releaseBigPtrArrayContent(bparr);
}
- CPPUNIT_TEST_SUITE(BigPtrArrayUnittest);
+ SAL_CPPUNIT_TEST_SUITE(BigPtrArrayUnittest);
CPPUNIT_TEST(test_ctor);
CPPUNIT_TEST(test_insert_entries_at_front);
CPPUNIT_TEST(test_insert_entries_in_the_middle);
@@ -784,7 +784,7 @@ public:
CPPUNIT_TEST(test_for_some1);
CPPUNIT_TEST(test_for_some2);
CPPUNIT_TEST(test_for_some3);
- CPPUNIT_TEST_SUITE_END();
+ SAL_CPPUNIT_TEST_SUITE_END();
};
const char* START = "START: ";
@@ -849,7 +849,7 @@ public:
void test_insert_at_front_1000000()
{ test_insert_at_front("1000000"); }
- CPPUNIT_TEST_SUITE(BigPtrArrayPerformanceTest);
+ SAL_CPPUNIT_TEST_SUITE(BigPtrArrayPerformanceTest);
CPPUNIT_TEST(test_insert_at_end_1000);
CPPUNIT_TEST(test_insert_at_end_10000);
CPPUNIT_TEST(test_insert_at_end_100000);
@@ -858,7 +858,7 @@ public:
CPPUNIT_TEST(test_insert_at_front_10000);
CPPUNIT_TEST(test_insert_at_front_100000);
CPPUNIT_TEST(test_insert_at_front_1000000);
- CPPUNIT_TEST_SUITE_END();
+ SAL_CPPUNIT_TEST_SUITE_END();
private:
void test_insert_at_end(const char* numElements)
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 8496b06ff13c..ac5f18020aa6 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2391,7 +2391,9 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMar
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr<SwTextMarkupHelper> pTextMarkupHelper;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
switch ( nTextMarkupType )
{
case text::TextMarkupType::TRACK_CHANGE_INSERTION:
@@ -2419,7 +2421,9 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMar
lang::IllegalArgumentException,
uno::RuntimeException)
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr<SwTextMarkupHelper> pTextMarkupHelper;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
switch ( nTextMarkupType )
{
case text::TextMarkupType::TRACK_CHANGE_INSERTION:
@@ -2454,7 +2458,9 @@ uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL
throw lang::IndexOutOfBoundsException();
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr<SwTextMarkupHelper> pTextMarkupHelper;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
switch ( nTextMarkupType )
{
case text::TextMarkupType::TRACK_CHANGE_INSERTION:
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index b0388fd3da7c..a6fea0d76a54 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -968,7 +968,9 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
{
// Cursor als Kopie vom akt. und in den Ring aufnehmen
// Verkettung zeigt immer auf den zuerst erzeugten, also vorwaerts
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr< SwCursor > pSav( Create( this ) ); // save the current cursor
+ SAL_WNODEPRECATED_DECLARATIONS_POP
// wenn schon ausserhalb vom Bodytext, suche von der Position,
// ansonsten beginne mit der 1. GrundSection
@@ -1026,7 +1028,9 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
}
else if( FND_IN_SELALL & eFndRngs )
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< SwCursor> pSav( Create( this ) ); // save the current cursor
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const SwNode* pSttNd = ( FND_IN_BODYONLY & eFndRngs )
? rNds.GetEndOfContent().StartOfSectionNode()
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a190c68a42ac..a867f991b965 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -102,17 +102,20 @@ namespace
pMark);
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
static inline auto_ptr<SwPosition> lcl_PositionFromCntntNode(SwCntntNode * const pCntntNode, const bool bAtEnd=false)
{
auto_ptr<SwPosition> pResult(new SwPosition(*pCntntNode));
pResult->nContent.Assign(pCntntNode, bAtEnd ? pCntntNode->Len() : 0);
return pResult;
}
+ SAL_WNODEPRECATED_DECLARATIONS_POP
// return a position at the begin of rEnd, if it is a CntntNode
// else set it to the begin of the Node after rEnd, if there is one
// else set it to the end of the node before rStt
// else set it to the CntntNode of the Pos outside the Range
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
static inline auto_ptr<SwPosition> lcl_FindExpelPosition(const SwNodeIndex& rStt,
const SwNodeIndex& rEnd,
const SwPosition& rOtherPosition)
@@ -128,7 +131,8 @@ namespace
if(pNode)
return lcl_PositionFromCntntNode(pNode, bAtEnd);
return auto_ptr<SwPosition>(new SwPosition(rOtherPosition));
- };
+ }
+ SAL_WNODEPRECATED_DECLARATIONS_POP
static IMark* lcl_getMarkAfter(const IDocumentMarkAccess::container_t& rMarks, const SwPosition& rPos)
{
@@ -632,6 +636,7 @@ namespace sw { namespace mark
{
// the bookmark is partitially in the range
// move position of that is in the range out of it
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<SwPosition> pNewPos;
if(pEndIdx)
pNewPos = auto_ptr<SwPosition>(new SwPosition(
@@ -642,6 +647,7 @@ namespace sw { namespace mark
rStt,
rEnd,
isPosInRange ? pMark->GetOtherMarkPos() : pMark->GetMarkPos());
+ SAL_WNODEPRECATED_DECLARATIONS_POP
// #i92125#
// no move of position for cross-reference bookmarks,
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 50555660c6e0..aa5d5ec2d265 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -1265,7 +1265,9 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
SwSectionFmt* pSectFmt = pDoc->MakeSectionFmt( 0 );
pSectFmt->CopyAttrs( *GetSection().GetFmt() );
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwTOXBase> pTOXBase;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if (TOX_CONTENT_SECTION == GetSection().GetType())
{
OSL_ENSURE( GetSection().ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx
index 3566eb8687de..2ad17e49498a 100644
--- a/sw/source/core/inc/UndoAttribute.hxx
+++ b/sw/source/core/inc/UndoAttribute.hxx
@@ -52,9 +52,11 @@ class SwEndNoteInfo;
class SwUndoAttr : public SwUndo, private SwUndRng
{
SfxItemSet m_AttrSet; // attributes for Redo
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
sal_uLong m_nNodeIndex; // Offset: for Redlining
const SetAttrMode m_nInsertFlags; // insert flags
@@ -78,7 +80,9 @@ public:
class SwUndoResetAttr : public SwUndo, private SwUndRng
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwHistory> m_pHistory;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
std::set<sal_uInt16> m_Ids;
const sal_uInt16 m_nFormatId; // Format-Id for Redo
@@ -102,7 +106,9 @@ class SwUndoFmtAttr : public SwUndo
{
friend class SwUndoDefaultAttr;
SwFmt * m_pFmt;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
+ SAL_WNODEPRECATED_DECLARATIONS_POP
sal_uLong m_nNodeIndex;
const sal_uInt16 m_nFmtWhich;
const bool m_bSaveDrawPt;
@@ -160,7 +166,9 @@ class SwUndoFmtResetAttr : public SwUndo
// which ID of the reset attribute
const sal_uInt16 m_nWhichId;
// old attribute which has been reset - needed for undo.
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxPoolItem> m_pOldItem;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
};
class SwUndoDontExpandFmt : public SwUndo
@@ -179,7 +187,9 @@ public:
// helper class to receive changed attribute sets
class SwUndoFmtAttrHelper : public SwClient
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const bool m_bSaveDrawPt;
public:
@@ -195,7 +205,9 @@ public:
class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwHistory> m_pHistory;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const bool m_bModulus;
public:
@@ -216,8 +228,10 @@ public:
class SwUndoDefaultAttr : public SwUndo
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxItemSet> m_pOldSet; // the old attributes
::std::auto_ptr<SvxTabStopItem> m_pTabStop;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
public:
// registers at the format and saves old attributes
@@ -234,7 +248,9 @@ public:
class SwUndoChangeFootNote : public SwUndo, private SwUndRng
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwHistory> m_pHistory;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const String m_Text;
const sal_uInt16 m_nNumber;
const bool m_bEndNote;
@@ -253,7 +269,9 @@ public:
class SwUndoFootNoteInfo : public SwUndo
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwFtnInfo> m_pFootNoteInfo;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
public:
SwUndoFootNoteInfo( const SwFtnInfo &rInfo );
@@ -266,7 +284,9 @@ public:
class SwUndoEndNoteInfo : public SwUndo
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwEndNoteInfo> m_pEndNoteInfo;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
public:
SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo );
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 8d914afde64c..c0187acd06b8 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -106,7 +106,9 @@ public:
class SwHistorySetFmt : public SwHistoryHint
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxPoolItem> m_pAttr;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const sal_uLong m_nNodeIndex;
public:
@@ -130,7 +132,9 @@ public:
class SwHistorySetTxt : public SwHistoryHint
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxPoolItem> m_pAttr;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
@@ -144,10 +148,12 @@ public:
class SwHistorySetTxtFld : public SwHistoryHint
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
//!! beware of the order for the declation of the auto_ptrs.
//!! If they get destroyed in the wrong order sw may crash (namely mail-merge as well)
::std::auto_ptr<SwFieldType> m_pFldType;
const ::std::auto_ptr<SwFmtFld> m_pFld;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
sal_uLong m_nNodeIndex;
xub_StrLen m_nPos;
@@ -211,7 +217,9 @@ public:
class SwHistorySetFootnote : public SwHistoryHint
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwUndoSaveSection> m_pUndo;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const String m_FootnoteNumber;
sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
@@ -241,7 +249,9 @@ public:
class SwHistoryTxtFlyCnt : public SwHistoryHint
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUndoDelLayFmt> m_pUndo;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
public:
SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt );
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 92333a46ca8a..1eb6587265d8 100644
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -101,6 +101,7 @@ public:
SwXMeta(SwDoc *const pDoc);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
static ::com::sun::star::uno::Reference<
::com::sun::star::rdf::XMetadatable >
CreateXMeta(
@@ -109,6 +110,7 @@ public:
const& xParentText = 0,
::std::auto_ptr<TextRangeList_t const> pPortions =
::std::auto_ptr<TextRangeList_t const>(0));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
/// init params with position of the attribute content (w/out CH_TXTATR)
bool SetContentRange(
@@ -256,12 +258,14 @@ private:
virtual ~SwXMetaField();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
friend ::com::sun::star::uno::Reference<
::com::sun::star::rdf::XMetadatable >
SwXMeta::CreateXMeta(::sw::Meta &,
::com::sun::star::uno::Reference< ::com::sun::star::text::XText>
const&,
::std::auto_ptr<TextRangeList_t const> pPortions);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta,
::com::sun::star::uno::Reference< ::com::sun::star::text::XText> const&
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index f2646c2b4a9a..7ed18741304d 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -398,7 +398,9 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
// #i89179#
// tab portion representing the list tab of a list label gets the
// same font as the corresponding number portion
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr< SwFontSave > pSave( 0 );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if ( GetLen() == 0 &&
rInf.GetLast() && rInf.GetLast()->InNumberGrp() &&
static_cast<SwNumberPortion*>(rInf.GetLast())->HasFont() )
@@ -584,7 +586,9 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
// #i89179#
// tab portion representing the list tab of a list label gets the
// same font as the corresponding number portion
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr< SwFontSave > pSave( 0 );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if ( GetLen() == 0 )
{
const SwLinePortion* pPrevPortion =
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index b4a89a34cf24..0bcbbb5a27c2 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -61,6 +61,7 @@ using namespace ::com::sun::star;
namespace sw {
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
UndoManager::UndoManager(::std::auto_ptr<SwNodes> pUndoNodes,
IDocumentDrawModelAccess & rDrawModelAccess,
IDocumentRedlineAccess & rRedlineAccess,
@@ -79,6 +80,7 @@ UndoManager::UndoManager(::std::auto_ptr<SwNodes> pUndoNodes,
// Undo is enabled by SwEditShell constructor
SfxUndoManager::EnableUndo(false);
}
+SAL_WNODEPRECATED_DECLARATIONS_POP
SwNodes const& UndoManager::GetUndoNodes() const
{
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index dd9a6ce93c62..3f71c4640bfc 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -287,9 +287,11 @@ class SwUndoDelSection
: public SwUndo
{
private:
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwSectionData> const m_pSectionData; /// section not TOX
::std::auto_ptr<SwTOXBase> const m_pTOXBase; /// set iff section is TOX
::std::auto_ptr<SfxItemSet> const m_pAttrSet;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
::boost::shared_ptr< ::sfx2::MetadatableUndo > const m_pMetadataUndo;
sal_uLong const m_nStartNode;
sal_uLong const m_nEndNode;
@@ -400,8 +402,10 @@ class SwUndoUpdateSection
: public SwUndo
{
private:
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwSectionData> m_pSectionData;
::std::auto_ptr<SfxItemSet> m_pAttrSet;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
sal_uLong const m_nStartNode;
bool const m_bOnlyAttrChanged;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 776ffff8b75d..18df109424cd 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -339,7 +339,9 @@ SwUnoCursorHelper::SetPageDesc(
{
return false;
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwFmtPageDesc> pNewDesc;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
@@ -461,7 +463,9 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet,
{
throw lang::IllegalArgumentException();
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwFmtDrop> pDrop;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
SfxPoolItem const* pItem(0);
if (SFX_ITEM_SET ==
rItemSet.GetItemState(RES_PARATR_DROP, sal_True, &pItem))
@@ -486,7 +490,9 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue)
throw lang::IllegalArgumentException();
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwFmtRuby> pRuby;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const SfxPoolItem* pItem;
if (SFX_ITEM_SET ==
rItemSet.GetItemState(RES_TXTATR_CJK_RUBY, sal_True, &pItem))
@@ -1928,8 +1934,10 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
uno::Sequence< beans::PropertyState > aRet(rPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
SfxItemPropertyMap const*const pMap = rPropSet.getPropertyMap();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxItemSet> pSet;
::std::auto_ptr<SfxItemSet> pSetParent;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
for (sal_Int32 i = 0, nEnd = rPropertyNames.getLength(); i < nEnd; i++)
{
@@ -2049,7 +2057,9 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
// if we are reseting paragraph attributes, we need to select the full paragraph first
SwPosition aStart = *rPaM.Start();
SwPosition aEnd = *rPaM.End();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< SwUnoCrsr > pTemp ( rDoc.CreateUnoCrsr(aStart, sal_False) );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if(!SwUnoCursorHelper::IsStartOfPara(*pTemp))
{
pTemp->MovePara(fnParaCurr, fnParaStart);
@@ -2913,8 +2923,10 @@ SwXTextCursor::createEnumeration() throw (uno::RuntimeException)
throw uno::RuntimeException();
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUnoCrsr> pNewCrsr(
rUnoCursor.GetDoc()->CreateUnoCrsr(*rUnoCursor.GetPoint()) );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if (rUnoCursor.HasMark())
{
pNewCrsr->SetMark();
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 58a435f73259..3887efc13183 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -465,6 +465,7 @@ public:
bool m_bFirstParagraph;
uno::Reference< text::XTextContent > m_xNextPara;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
Impl( uno::Reference< text::XText > const& xParent,
::std::auto_ptr<SwUnoCrsr> pCursor,
const CursorType eType,
@@ -500,6 +501,7 @@ public:
rCursor.DeleteMark();
}
}
+ SAL_WNODEPRECATED_DECLARATIONS_POP
~Impl() {
// Impl owns the cursor; delete it here: SolarMutex is locked
@@ -525,6 +527,7 @@ void SwXParagraphEnumeration::Impl::Modify( const SfxPoolItem *pOld, const SfxPo
ClientModify(this, pOld, pNew);
}
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
SwXParagraphEnumeration::SwXParagraphEnumeration(
uno::Reference< text::XText > const& xParent,
::std::auto_ptr<SwUnoCrsr> pCursor,
@@ -534,6 +537,7 @@ SwXParagraphEnumeration::SwXParagraphEnumeration(
pStartNode, pTable) )
{
}
+SAL_WNODEPRECATED_DECLARATIONS_POP
SwXParagraphEnumeration::~SwXParagraphEnumeration()
{
@@ -628,8 +632,10 @@ throw (container::NoSuchElementException, lang::WrappedTargetException,
(CURSOR_SELECTION_IN_TABLE == m_eCursorType)))
{
SwPosition* pStart = pUnoCrsr->Start();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwUnoCrsr> aNewCrsr(
pUnoCrsr->GetDoc()->CreateUnoCrsr(*pStart, sal_False) );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
// one may also go into tables here
if ((CURSOR_TBLTEXT != m_eCursorType) &&
(CURSOR_SELECTION_IN_TABLE != m_eCursorType))
@@ -1183,8 +1189,10 @@ SwXTextRange::CreateXTextRange(
{
const uno::Reference<text::XText> xParentText(
::sw::CreateParentXText(rDoc, rPos));
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwUnoCrsr> pNewCrsr(
rDoc.CreateUnoCrsr(rPos, sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if(pMark)
{
pNewCrsr->SetMark();
@@ -1319,8 +1327,10 @@ throw (uno::RuntimeException)
throw uno::RuntimeException();
}
const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent());
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwUnoCrsr> pNewCrsr(
m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if (!GetPositions(*pNewCrsr))
{
throw uno::RuntimeException();
@@ -1341,8 +1351,10 @@ SwXTextRange::createEnumeration() throw (uno::RuntimeException)
throw uno::RuntimeException();
}
const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent());
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUnoCrsr> pNewCrsr(
m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if (!GetPositions(*pNewCrsr))
{
throw uno::RuntimeException();
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 75ec0c841f5e..f7fb0a499657 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -172,7 +172,9 @@ namespace
const SwPosition& rEndPos = pBkmk->GetMarkEnd();
if(rEndPos.nNode == nOwnNode)
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
auto_ptr<SwPosition> pCrossRefEndPos;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
const SwPosition* pEndPos = NULL;
if(hasOther)
{
@@ -181,7 +183,9 @@ namespace
else if (pCrossRefMark)
{
// Crossrefbookmarks only remember the start position but have to span the whole paragraph
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
pCrossRefEndPos = auto_ptr<SwPosition>(new SwPosition(rEndPos));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
pCrossRefEndPos->nContent = pCrossRefEndPos->nNode.GetNode().GetTxtNode()->Len();
pEndPos = pCrossRefEndPos.get();
}
@@ -466,6 +470,7 @@ lcl_CreateTOXMarkPortion(
return pPortion;
}
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
static uno::Reference<text::XTextRange>
lcl_CreateMetaPortion(
uno::Reference<text::XText> const& xParent,
@@ -491,6 +496,7 @@ lcl_CreateMetaPortion(
}
return pPortion;
}
+SAL_WNODEPRECATED_DECLARATIONS_POP
static void
lcl_ExportBookmark(
@@ -685,8 +691,10 @@ lcl_ExportHints(
}
else
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<const TextRangeList_t>
pCurrentPortions(Top.first);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
rPortionStack.pop();
const uno::Reference<text::XTextRange> xPortion(
lcl_CreateMetaPortion(xParent, pUnoCrsr,
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 74f96b3d1101..5242cdf1cd1b 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -176,8 +176,10 @@ uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration(void)
SolarMutexGuard aGuard;
SwPaM aPam(aNodeIndex);
aPam.Move(fnMoveForward, fnGoNode);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(*aPam.Start(), sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
return new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_REDLINE);
}
@@ -578,8 +580,10 @@ uno::Reference< container::XEnumeration > SwXRedline::createEnumeration(void) t
{
SwPaM aPam(*pNodeIndex);
aPam.Move(fnMoveForward, fnGoNode);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(*aPam.Start(), sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
xRet = new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_REDLINE);
}
return xRet;
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 88321b587dc3..bca571021b2f 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -335,10 +335,12 @@ SwXReferenceMark::getAnchor() throw (uno::RuntimeException)
&m_pImpl->m_pDoc->GetNodes()))
{
SwTxtNode const& rTxtNode = pTxtMark->GetTxtNode();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
const ::std::auto_ptr<SwPaM> pPam( (pTxtMark->GetEnd())
? new SwPaM( rTxtNode, *pTxtMark->GetEnd(),
rTxtNode, *pTxtMark->GetStart())
: new SwPaM( rTxtNode, *pTxtMark->GetStart()) );
+ SAL_WNODEPRECATED_DECLARATIONS_POP
return SwXTextRange::CreateXTextRange(
*m_pImpl->m_pDoc, *pPam->Start(), pPam->End());
@@ -675,7 +677,9 @@ class SwXMeta::Impl
public:
SwEventListenerContainer m_ListenerContainer;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<const TextRangeList_t> m_pTextPortions;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
// 3 possible states: not attached, attached, disposed
bool m_bIsDisposed;
bool m_bIsDescriptor;
@@ -747,6 +751,7 @@ SwXMeta::~SwXMeta()
{
}
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
uno::Reference<rdf::XMetadatable>
SwXMeta::CreateXMeta(::sw::Meta & rMeta,
uno::Reference<text::XText> const& i_xParent,
@@ -802,6 +807,7 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta,
rMeta.SetXMeta(xMeta);
return xMeta;
}
+SAL_WNODEPRECATED_DECLARATIONS_POP
bool SwXMeta::SetContentRange(
SwTxtNode *& rpNode, xub_StrLen & rStart, xub_StrLen & rEnd ) const
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 9290344c4022..a4f3d9e5a131 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -79,6 +79,7 @@ struct SwTextSectionProperties_Impl
::rtl::OUString m_sSectionFilter;
::rtl::OUString m_sSectionRegion;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwFmtCol> m_pColItem;
::std::auto_ptr<SvxBrushItem> m_pBrushItem;
::std::auto_ptr<SwFmtFtnAtTxtEnd> m_pFtnItem;
@@ -87,6 +88,7 @@ struct SwTextSectionProperties_Impl
::std::auto_ptr<SwFmtNoBalancedColumns> m_pNoBalanceItem;
::std::auto_ptr<SvxFrameDirectionItem> m_pFrameDirItem;
::std::auto_ptr<SvxLRSpaceItem> m_pLRSpaceItem;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
bool m_bDDE;
bool m_bHidden;
@@ -119,7 +121,9 @@ public:
const bool m_bIndexHeader;
bool m_bIsDescriptor;
::rtl::OUString m_sName;
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwTextSectionProperties_Impl> m_pProps;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
Impl( SwXTextSection & rThis,
SwSectionFmt *const pFmt, const bool bIndexHeader)
@@ -514,6 +518,7 @@ lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true)
}
}
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
static void
lcl_UpdateSection(SwSectionFmt *const pFmt,
::std::auto_ptr<SwSectionData> const& pSectionData,
@@ -548,6 +553,7 @@ lcl_UpdateSection(SwSectionFmt *const pFmt,
}
}
}
+SAL_WNODEPRECATED_DECLARATIONS_POP
void SwXTextSection::Impl::SetPropertyValues_Impl(
const uno::Sequence< OUString >& rPropertyNames,
@@ -566,12 +572,16 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
throw uno::RuntimeException();
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwSectionData> const pSectionData(
(pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
OUString const*const pPropertyNames = rPropertyNames.getConstArray();
uno::Any const*const pValues = rValues.getConstArray();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SfxItemSet> pItemSet;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
sal_Bool bLinkModeChanged = sal_False;
sal_Bool bLinkMode = sal_False;
@@ -1501,10 +1511,12 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
static_cast<cppu::OWeakObject *>(this));
}
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwSectionData> const pSectionData(
(pFmt) ? new SwSectionData(*pFmt->GetSection()) : 0);
::std::auto_ptr<SfxItemSet> pNewAttrSet;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
bool bLinkModeChanged = false;
switch (pEntry->nWID)
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 860ffc71cd0f..594c3cf2d159 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -121,6 +121,7 @@ public:
bool CheckForOwnMember(const SwPaM & rPaM)
throw (lang::IllegalArgumentException, uno::RuntimeException);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
void ConvertCell(
const bool bFirstCell,
const uno::Sequence< uno::Reference< text::XTextRange > > & rCell,
@@ -128,6 +129,7 @@ public:
::std::auto_ptr< SwPaM > & rpFirstPaM,
SwPaM & rLastPaM,
bool & rbExcept);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
};
@@ -1552,7 +1554,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
uno::Reference< text::XTextContent > xRet;
SwUnoInternalPaM aStartPam(*GetDoc());
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr< SwUnoInternalPaM > pEndPam(new SwUnoInternalPaM(*GetDoc()));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
if (!::sw::XTextRangeToSwPaM(aStartPam, xStart) ||
!::sw::XTextRangeToSwPaM(*pEndPam, xEnd))
{
@@ -1779,6 +1783,7 @@ static bool lcl_SimilarPosition( const sal_Int32 nPos1, const sal_Int32 nPos2 )
return abs( nPos1 - nPos2 ) < COL_POS_FUZZY;
}
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
void SwXText::Impl::ConvertCell(
const bool bFirstCell,
const uno::Sequence< uno::Reference< text::XTextRange > > & rCell,
@@ -1938,6 +1943,7 @@ void SwXText::Impl::ConvertCell(
rpFirstPaM.reset(new SwPaM(*aStartCellPam.Start()));
}
}
+SAL_WNODEPRECATED_DECLARATIONS_POP
typedef uno::Sequence< text::TableColumnSeparator > TableColumnSeparators;
@@ -2169,7 +2175,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
//at first collect the text ranges as SwPaMs
const uno::Sequence< uno::Sequence< uno::Reference< text::XTextRange > > >*
pTableRanges = rTableRanges.getConstArray();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
std::auto_ptr < SwPaM > pFirstPaM;
+ SAL_WNODEPRECATED_DECLARATIONS_POP
std::vector< std::vector<SwNodeRange> > aTableNodes;
bool bExcept = false;
SwPaM aLastPaM(m_pImpl->m_pDoc->GetNodes());
@@ -2509,8 +2517,10 @@ throw (uno::RuntimeException)
SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent();
SwPosition aPos(rNode);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(aPos, sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
pUnoCursor->Move(fnMoveBackward, fnGoDoc);
const uno::Reference< container::XEnumeration > xRet
= new SwXParagraphEnumeration(this, pUnoCursor, CURSOR_BODY);
@@ -2785,8 +2795,10 @@ throw (uno::RuntimeException)
const SwFmtCntnt& rFlyCntnt = rHeadFootFmt.GetCntnt();
const SwNode& rNode = rFlyCntnt.GetCntntIdx()->GetNode();
SwPosition aPos(rNode);
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<SwUnoCrsr> pUnoCursor(
GetDoc()->CreateUnoCrsr(aPos, sal_False));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
pUnoCursor->Move(fnMoveForward, fnGoNode);
aRef = new SwXParagraphEnumeration(this, pUnoCursor,
(m_pImpl->m_bIsHeader) ? CURSOR_HEADER : CURSOR_FOOTER);
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 74f1e206c7f2..a6948c28f587 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -67,6 +67,7 @@
#include <svx/htmlmode.hxx>
#include <svx/dlgutil.hxx>
#include "swabstdlg.hxx"
+#include <boost/scoped_ptr.hpp>
void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
{
@@ -189,8 +190,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
{
- ::std::auto_ptr<SwSectionData> pSectionData(pSect);
- if (pSectionData.get())
+ boost::scoped_ptr<SwSectionData> xSectionData(pSect);
+ if (xSectionData.get())
{
SfxItemSet aSet(pThis->GetView().GetPool(),
RES_COL, RES_COL,
@@ -209,7 +210,7 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION,
&pThis->GetView().GetViewFrame()->GetWindow(),aSet , *pThis);
OSL_ENSURE(aTabDlg, "Dialogdiet fail!");
- aTabDlg->SetSectionData(*pSectionData);
+ aTabDlg->SetSectionData(*xSectionData);
aTabDlg->Execute();
delete aTabDlg;
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
index e936496374e3..7431c3e847d8 100644
--- a/sw/source/ui/docvw/AnnotationWin.cxx
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -62,6 +62,8 @@
#include <IDocumentUndoRedo.hxx>
#include <SwUndoField.hxx>
+#include <boost/scoped_ptr.hpp>
+
namespace sw { namespace annotation {
@@ -111,7 +113,7 @@ void SwAnnotationWin::UpdateData()
{
IDocumentUndoRedo & rUndoRedo(
DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo());
- ::std::auto_ptr<SwField> pOldField;
+ boost::scoped_ptr<SwField> pOldField;
if (rUndoRedo.DoesUndo())
{
pOldField.reset(mpFld->Copy());
@@ -250,7 +252,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
Engine()->SetModifyHdl( Link() );
IDocumentUndoRedo & rUndoRedo(
DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo());
- ::std::auto_ptr<SwField> pOldField;
+ boost::scoped_ptr<SwField> pOldField;
if (rUndoRedo.DoesUndo())
{
pOldField.reset(mpFld->Copy());