Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello Noel, all,

I have attached a test document and a diff. I don't understand why this
still crashs calc even if there is nothing anymore that can create any
problems.

How to reproduce:

open test document in calc
fix formula: =#NAME to =a
save with button in the toolbar

Regards,
Markus

Attachment: xlsx name import.xlsx
Description: MS-Excel 2007 spreadsheet

diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index f87b18c..5b80965 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -3306,16 +3306,18 @@ void EscherPersistTable::PtInsert( sal_uInt32 nID, sal_uInt32 nOfs )
 
 sal_uInt32 EscherPersistTable::PtDelete( sal_uInt32 nID )
 {
-    for(
-        EscherPersistTable_impl::iterator it = maPersistTable.begin();
-        it < maPersistTable.end();
-        ++it
-    ) {
+    EscherPersistTable_impl::iterator it = maPersistTable.begin();
+    for( ; it != maPersistTable.end() ; ++it )
+    {
         if ( (*it)->mnID == nID ) {
-            delete *it;
-            maPersistTable.erase( it );
+            break;
         }
     }
+    if (it != maPersistTable.end())
+    {
+        delete *it;
+        maPersistTable.erase( it );
+    }
     return 0;
 }
 

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.