On Mon, 2011-02-07 at 15:30 +0000, Michael Meeks wrote: > Perhaps you can build your patch on top of Andrey's to capture that > goodness ?
OK. Attached. > I'm busy adding a few more easy hacks to try to make such > conflicts less likely: it can help to add your name and a date vs. an > easy hack (with perhaps a sub-portion of what you're working on). I shall try and remember to do this in future. Nigel
>From 00f1b9804c1f19c1bb7e6c790910f9005f89321b Mon Sep 17 00:00:00 2001 From: Nigel Hawkins <n.hawk...@gmx.com> Date: Mon, 7 Feb 2011 16:19:59 +0000 Subject: [PATCH] Replace std::pair with more descriptive names in SwUndoDelNum --- sw/inc/undobj.hxx | 10 +++++++--- sw/source/core/undo/unnum.cxx | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index e6ea274..ae86015 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -1371,9 +1371,13 @@ public: class SwUndoDelNum : public SwUndo, private SwUndRng { - typedef std::vector< std::pair< ULONG, int > > SvNode; - SvNode aNodes; - SvBools aRstLRSpaces; + struct NodeLevel + { + ULONG index; + int level; + inline NodeLevel(ULONG idx, int lvl) : index(idx), level(lvl) {}; + }; + std::vector<NodeLevel> aNodes; SwHistory* pHistory; public: SwUndoDelNum( const SwPaM& rPam ); diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index d5afd1f..f13f94c 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -214,11 +214,11 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter ) pHistory->TmpRollback( &rDoc, 0 ); pHistory->SetTmpEnd( pHistory->Count() ); - for( SvNode::const_iterator i = aNodes.begin(); i != aNodes.end(); ++i ) + for( std::vector<NodeLevel>::const_iterator i = aNodes.begin(); i != aNodes.end(); ++i ) { - SwTxtNode* pNd = rDoc.GetNodes()[ i->first ]->GetTxtNode(); - OSL_ENSURE( pNd, "wo ist der TextNode geblieben?" ); - pNd->SetAttrListLevel( i->second ); + SwTxtNode* pNd = rDoc.GetNodes()[ i->index ]->GetTxtNode(); + OSL_ENSURE( pNd, "Where has the TextNode gone?" ); + pNd->SetAttrListLevel( i->level ); if( pNd->GetCondFmtColl() ) pNd->ChkCondColl(); @@ -246,7 +246,7 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL ) { if( rNd.GetNumRule() ) { - aNodes.push_back( SvNode::value_type( rNd.GetIndex(), rNd.GetActualListLevel() ) ); + aNodes.push_back( NodeLevel( rNd.GetIndex(), rNd.GetActualListLevel() ) ); } } -- 1.7.0.4
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice