Author: hdu
Date: Mon May 27 11:27:43 2013
New Revision: 1486582

URL: http://svn.apache.org/r1486582
Log:
#i122208# const SC containers cannot provide non-const iterators

Modified:
    openoffice/trunk/main/sc/source/core/data/bcaslot.cxx
    openoffice/trunk/main/sc/source/core/inc/bcaslot.hxx
    openoffice/trunk/main/sc/source/filter/excel/xeescher.cxx

Modified: openoffice/trunk/main/sc/source/core/data/bcaslot.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/data/bcaslot.cxx?rev=1486582&r1=1486581&r2=1486582&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/data/bcaslot.cxx (original)
+++ openoffice/trunk/main/sc/source/core/data/bcaslot.cxx Mon May 27 11:27:43 
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/trunk/main/sc/source/core/inc/bcaslot.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/inc/bcaslot.hxx?rev=1486582&r1=1486581&r2=1486582&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/inc/bcaslot.hxx (original)
+++ openoffice/trunk/main/sc/source/core/inc/bcaslot.hxx Mon May 27 11:27:43 
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/trunk/main/sc/source/filter/excel/xeescher.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/filter/excel/xeescher.cxx?rev=1486582&r1=1486581&r2=1486582&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/filter/excel/xeescher.cxx (original)
+++ openoffice/trunk/main/sc/source/filter/excel/xeescher.cxx Mon May 27 
11:27:43 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 );
     }
 


Reply via email to