Tag: cws_src680_dba24d
User: oj      
Date: 2007-11-08 13:47:09+0000
Modified:
   dba/connectivity/source/drivers/dbase/DTable.cxx

Log:
 #i83401# fix anz if it is zero but the data tells a different story

File Changes:

Directory: /dba/connectivity/source/drivers/dbase/
==================================================

File [changed]: DTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/dbase/DTable.cxx?r1=1.103&r2=1.103.20.1
Delta lines:  +7 -4
-------------------
--- DTable.cxx  2007-09-26 14:28:34+0000        1.103
+++ DTable.cxx  2007-11-08 13:47:06+0000        1.103.20.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DTable.cxx,v $
  *
- *  $Revision: 1.103 $
+ *  $Revision: 1.103.20.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:28:34 $
+ *  last change: $Author: oj $ $Date: 2007/11/08 13:47:06 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -399,6 +399,8 @@
                m_pFileStream->Seek(STREAM_SEEK_TO_END);
                UINT32 nFileSize = m_pFileStream->Tell();
                m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
+        if ( m_aHeader.db_anz == 0 && 
((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng) > 0) // seems to be empty or 
someone wrote bullshit into the dbase file
+            m_aHeader.db_anz = 
((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng);
 
                // Buffersize abhaengig von der Filegroesse
                m_pFileStream->SetBufferSize(nFileSize > 1000000 ? 32768 :
@@ -2270,6 +2272,7 @@
 // 
-----------------------------------------------------------------------------
 void ODbaseTable::refreshHeader()
 {
+    if ( m_aHeader.db_anz == 0 )
        readHeader();
 }
 //------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to