Author: hdu
Date: Fri May 17 10:56:19 2013
New Revision: 1483732
URL: http://svn.apache.org/r1483732
Log:
#i122208# const SC containers cannot provide non-const iterators
Modified:
openoffice/branches/rejuvenate01/main/sc/source/core/data/bcaslot.cxx
openoffice/branches/rejuvenate01/main/sc/source/core/inc/bcaslot.hxx
openoffice/branches/rejuvenate01/main/sc/source/filter/excel/xeescher.cxx
Modified: openoffice/branches/rejuvenate01/main/sc/source/core/data/bcaslot.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sc/source/core/data/bcaslot.cxx?rev=1483732&r1=1483731&r2=1483732&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sc/source/core/data/bcaslot.cxx
(original)
+++ openoffice/branches/rejuvenate01/main/sc/source/core/data/bcaslot.cxx Fri
May 17 10:56:19 2013
@@ -232,7 +232,7 @@ void ScBroadcastAreaSlot::EndListeningAr
DBG_ASSERT(pListener, "EndListeningArea: pListener Null");
if ( !rpArea )
{
- ScBroadcastAreas::iterator aIter( FindBroadcastArea( rRange));
+ ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange));
if (aIter == aBroadcastAreaTbl.end())
return;
rpArea = *aIter;
@@ -251,7 +251,7 @@ void ScBroadcastAreaSlot::EndListeningAr
{
if ( !rpArea->GetBroadcaster().HasListeners() )
{
- ScBroadcastAreas::iterator aIter( FindBroadcastArea( rRange));
+ ScBroadcastAreas::const_iterator aIter( FindBroadcastArea(
rRange));
if (aIter == aBroadcastAreaTbl.end())
return;
DBG_ASSERT( *aIter == rpArea, "EndListeningArea: area pointer
mismatch");
@@ -266,7 +266,7 @@ void ScBroadcastAreaSlot::EndListeningAr
}
-ScBroadcastAreas::iterator ScBroadcastAreaSlot::FindBroadcastArea(
+ScBroadcastAreas::const_iterator ScBroadcastAreaSlot::FindBroadcastArea(
const ScRange& rRange ) const
{
aTmpSeekBroadcastArea.UpdateRange( rRange);
Modified: openoffice/branches/rejuvenate01/main/sc/source/core/inc/bcaslot.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sc/source/core/inc/bcaslot.hxx?rev=1483732&r1=1483731&r2=1483732&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sc/source/core/inc/bcaslot.hxx
(original)
+++ openoffice/branches/rejuvenate01/main/sc/source/core/inc/bcaslot.hxx Fri
May 17 10:56:19 2013
@@ -128,7 +128,7 @@ private:
ScDocument* pDoc;
ScBroadcastAreaSlotMachine* pBASM;
- ScBroadcastAreas::iterator FindBroadcastArea( const ScRange& rRange )
const;
+ ScBroadcastAreas::const_iterator FindBroadcastArea( const ScRange& rRange
) const;
/**
More hypothetical (memory would probably be doomed anyway) check
Modified:
openoffice/branches/rejuvenate01/main/sc/source/filter/excel/xeescher.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/sc/source/filter/excel/xeescher.cxx?rev=1483732&r1=1483731&r2=1483732&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/sc/source/filter/excel/xeescher.cxx
(original)
+++ openoffice/branches/rejuvenate01/main/sc/source/filter/excel/xeescher.cxx
Fri May 17 10:56:19 2013
@@ -1149,12 +1149,13 @@ void XclExpComments::SaveXml( XclExpXmlS
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::const_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 );
}