summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-05-27 11:27:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-28 18:40:36 +0100
commit4074c441bf3d959cfeb30f6d0eb5c73f7bf89b1f (patch)
treef1a586054c368a39b961be9540a12d98c03d3ba0 /sc
parent183db520892b887eda8ecfe1cc2af1bc3dd5d2d7 (diff)
Related: #i122208# const SC containers cannot provide non-const iterators
(cherry picked from commit c6f4bbfa54bd0fbef6bbc048cbd930c2781b2137) Conflicts: sc/source/core/data/bcaslot.cxx Change-Id: I774235d445192833031f99211639f23116e37bb4
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/bcaslot.cxx6
-rw-r--r--sc/source/core/inc/bcaslot.hxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx3
3 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 0f5b657fcb55..e55c1836bf15 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -219,7 +219,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
OSL_ENSURE(pListener, "EndListeningArea: pListener Null");
if ( !rpArea )
{
- ScBroadcastAreas::iterator aIter( FindBroadcastArea( rRange));
+ ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange));
if (aIter == aBroadcastAreaTbl.end() || isMarkedErased( aIter))
return;
rpArea = (*aIter).mpArea;
@@ -235,7 +235,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
{
if ( !rpArea->GetBroadcaster().HasListeners() )
{
- ScBroadcastAreas::iterator aIter( FindBroadcastArea( rRange));
+ ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange));
if (aIter == aBroadcastAreaTbl.end() || isMarkedErased( aIter))
return;
OSL_ENSURE( (*aIter).mpArea == rpArea, "EndListeningArea: area pointer mismatch");
@@ -247,7 +247,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange,
}
-ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
+ScBroadcastAreas::const_iterator ScBroadcastAreaSlot::FindBroadcastArea(
const ScRange& rRange ) const
{
aTmpSeekBroadcastArea.UpdateRange( rRange);
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 4fbbb850b15a..53e13d62735c 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -132,7 +132,7 @@ private:
ScBroadcastAreaSlotMachine* pBASM;
bool mbInBroadcastIteration;
- ScBroadcastAreas::iterator FindBroadcastArea( const ScRange& rRange ) const;
+ ScBroadcastAreas::const_iterator FindBroadcastArea( const ScRange& rRange ) const;
/**
More hypothetical (memory would probably be doomed anyway) check
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 6acbf4ded5eb..5c23ba3dfe7e 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1512,12 +1512,13 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
rComments->endElement( XML_authors );
rComments->startElement( XML_commentList, FSEND );
+ Authors::const_iterator aAuthorsBegin = aAuthors.begin();
for( size_t i = 0; i < nNotes; ++i )
{
XclExpNoteList::RecordRefType xNote = mrNotes.GetRecord( i );
Authors::iterator aAuthor = aAuthors.find(
XclXmlUtils::ToOUString( xNote->GetAuthor() ) );
- sal_Int32 nAuthorId = distance( aAuthors.begin(), aAuthor );
+ sal_Int32 nAuthorId = distance( aAuthorsBegin, aAuthor );
xNote->WriteXml( nAuthorId, rStrm );
}