summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-07-24 20:55:12 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-07-25 09:47:50 +0200
commitf009c21242dcb964af455e755b1511330f9bffaa (patch)
treed32a76699cf9312a4a4cb3efc7ff67abd8f91afc
parente5de683032e8a4314925f070b4c58eb41b87a1da (diff)
expand and kill once-used macro
Change-Id: I5f02a821e7898e687f566970c2e12ce1a3788094
-rw-r--r--sw/source/core/doc/docbm.cxx46
1 files changed, 18 insertions, 28 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 93be9f8a7686..4e8b9b7a02c7 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1111,19 +1111,6 @@ namespace sw { namespace mark
}} // namespace ::sw::mark
-#define PCURSH ((SwCrsrShell*)_pStartShell)
-#define FOREACHSHELL_START( pEShell ) \
- {\
- SwViewShell *_pStartShell = pEShell; \
- do { \
- if( _pStartShell->IsA( TYPE( SwCrsrShell )) ) \
- {
-
-#define FOREACHSHELL_END( pEShell ) \
- } \
- } while((_pStartShell=(SwViewShell*)_pStartShell->GetNext())!= pEShell ); \
- }
-
namespace
{
// #i59534: If a paragraph will be splitted we have to restore some redline positions
@@ -1823,21 +1810,24 @@ void CntntIdxStoreImpl::SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 n
SwCrsrShell* pShell = pDoc->GetEditShell();
if( !pShell )
return;
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *_pStkCrsr, true);
- lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *_pStkCrsr, false);
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *PCURCRSR, true);
- lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *PCURCRSR, false);
- FOREACHPAM_END()
-
- FOREACHSHELL_END( pShell )
+ SwViewShell *_pStartShell = pShell;
+ do {
+ if( _pStartShell->IsA( TYPE( SwCrsrShell )) )
+ {
+ SwPaM *_pStkCrsr = ((SwCrsrShell*)_pStartShell)->GetStkCrsr();
+ if( _pStkCrsr )
+ do {
+ lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *_pStkCrsr, true);
+ lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *_pStkCrsr, false);
+ } while ( (_pStkCrsr != 0 ) &&
+ ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != ((SwCrsrShell*)_pStartShell)->GetStkCrsr()) );
+
+ FOREACHPAM_START( ((SwCrsrShell*)_pStartShell)->_GetCrsr() )
+ lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *PCURCRSR, true);
+ lcl_ChkPaM( m_aShellCrsrEntries, nNode, nCntnt, *PCURCRSR, false);
+ FOREACHPAM_END()
+ }
+ } while((_pStartShell=(SwViewShell*)_pStartShell->GetNext())!= pShell );
}
void CntntIdxStoreImpl::RestoreShellCrsrs(SwDoc* /* pDoc */, updater_t& rUpdater)