summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/Excel.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-sheet/Excel.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/Excel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-sheet/Excel.cpp b/noncore/apps/opie-sheet/Excel.cpp
index 51fe707..27080e9 100644
--- a/noncore/apps/opie-sheet/Excel.cpp
+++ b/noncore/apps/opie-sheet/Excel.cpp
@@ -368,25 +368,27 @@ ExcelBREC* ExcelBook::PeekBREC(void)
368 int oldpos; 368 int oldpos;
369 ExcelBREC* NextRec; 369 ExcelBREC* NextRec;
370 oldpos=Position; 370 oldpos=Position;
371 NextRec=GetBREC(); 371 NextRec=GetBREC();
372 SeekPosition(oldpos); 372 SeekPosition(oldpos);
373 return NextRec; 373 return NextRec;
374}; 374};
375 375
376char* ExcelBook::GetDataOfBREC(ExcelBREC* record) 376char* ExcelBook::GetDataOfBREC(ExcelBREC* record)
377{ 377{
378 if(record->data==NULL) 378 if(record->data==NULL)
379 { 379 {
380 ConvertCharToArray(record,Read(record->position,record->length),record->length); 380 char* readData = Read(record->position,record->length);
381 ConvertCharToArray(record,readData,record->length);
382 delete [] readData;
381 }; 383 };
382 return record->data;//new? 384 return record->data;//new?
383}; 385};
384 386
385void ExcelBook::ConvertCharToArray(ExcelBREC* record, char* chars, int length) 387void ExcelBook::ConvertCharToArray(ExcelBREC* record, char* chars, int length)
386{ 388{
387 record->data=new char[length]; 389 record->data=new char[length];
388 for(int w1=0;w1<=length-1;w1++) 390 for(int w1=0;w1<=length-1;w1++)
389 record->data[w1]=chars[w1]; 391 record->data[w1]=chars[w1];
390}; 392};
391 393
392 394