[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Tue Dec 2 02:39:37 PST 2014
sw/source/core/edit/autofmt.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 2b433d87525918bf8d51fe164ffea9c9099b52ce
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Tue Dec 2 11:38:34 2014 +0100
kill FOREACHPAM_START/FOREACHPAM_END
Change-Id: I8dd98e92ac01735446d8b8f0f4f168108e1481d9
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index b639009..93beffdb 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -67,6 +67,7 @@
#include <numrule.hxx>
#include <boost/scoped_ptr.hpp>
+#include <boost/foreach.hpp>
using namespace ::com::sun::star;
@@ -2537,13 +2538,14 @@ void SwEditShell::AutoFormat( const SvxSwAutoFmtFlags* pAFlags )
// There are more than one or a selection is open
if( pCrsr->GetNext() != pCrsr || pCrsr->HasMark() )
{
- FOREACHPAM_START(GetCrsr())
- if( PCURCRSR->HasMark() )
+ BOOST_FOREACH(SwPaM& rPaM, GetCrsr()->rangeRing())
+ {
+ if( rPaM.HasMark() )
{
- SwAutoFormat aFmt( this, aAFFlags, &PCURCRSR->Start()->nNode,
- &PCURCRSR->End()->nNode );
+ SwAutoFormat aFmt( this, aAFFlags, &(rPaM.Start()->nNode),
+ &(rPaM.End()->nNode) );
}
- FOREACHPAM_END()
+ }
}
else
{
More information about the Libreoffice-commits
mailing list