Kaydet (Commit) 99c1de27 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

BOOST_FOREACH and constness

Change-Id: I832bc8fcdfb4997c2eaae3f0cb5d7014df20f2fd
üst 958492d4
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <MarkManager.hxx> #include <MarkManager.hxx>
#include <bookmrk.hxx> #include <bookmrk.hxx>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <cntfrm.hxx> #include <cntfrm.hxx>
#include <crossrefbookmark.hxx> #include <crossrefbookmark.hxx>
#include <annotationmark.hxx> #include <annotationmark.hxx>
...@@ -2057,17 +2058,14 @@ void CntntIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nOf ...@@ -2057,17 +2058,14 @@ void CntntIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nOf
{ {
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
SwCntntNode* pCNd = pDoc->GetNodes()[ nNode ]->GetCntntNode(); SwCntntNode* pCNd = pDoc->GetNodes()[ nNode ]->GetCntntNode();
for( BOOST_FOREACH(const BkmkEntry& aEntry, m_aBkmkEntries)
std::vector<BkmkEntry>::const_iterator pEntry = m_aBkmkEntries.begin();
pEntry != m_aBkmkEntries.end();
++pEntry)
{ {
if (MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[pEntry->m_nBkmkIdx].get())) if (MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[aEntry.m_nBkmkIdx].get()))
{ {
SwPosition aNewPos(GetRightMarkPos(pMark, pEntry->m_bOther)); SwPosition aNewPos(GetRightMarkPos(pMark, aEntry.m_bOther));
aNewPos.nNode = *pCNd; aNewPos.nNode = *pCNd;
aNewPos.nContent.Assign(pCNd, pEntry->m_nCntnt + nOffset); aNewPos.nContent.Assign(pCNd, aEntry.m_nCntnt + nOffset);
SetRightMarkPos(pMark, pEntry->m_bOther, &aNewPos); SetRightMarkPos(pMark, aEntry.m_bOther, &aNewPos);
} }
} }
} }
......
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