LCOV - code coverage report
Current view: top level - sc/source/filter/inc - lotimpop.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 33 0.0 %
Date: 2012-08-25 Functions: 0 9 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SC_LOTIMPOP_HXX
      30                 :            : #define SC_LOTIMPOP_HXX
      31                 :            : 
      32                 :            : #include <tools/string.hxx>
      33                 :            : 
      34                 :            : #include "imp_op.hxx"
      35                 :            : #include "flttypes.hxx"
      36                 :            : #include "ftools.hxx"
      37                 :            : #include "lotform.hxx"
      38                 :            : #include "lotattr.hxx"
      39                 :            : 
      40                 :            : class ScFormulaCell;
      41                 :            : class LotusFontBuffer;
      42                 :            : 
      43                 :            : 
      44                 :            : class ImportLotus : public ImportTyp
      45                 :            : {
      46                 :            : private:
      47                 :            :     SvStream*           pIn;            // benoetigt wegen multiplem Read()!
      48                 :            :     LotusToSc           aConv;
      49                 :            :     sal_uInt16              nTab;           // z.Zt. bearbeitete Tabelle
      50                 :            :     sal_Int32               nExtTab;
      51                 :            :     // -------------------------------------------------------------------
      52                 :            :     // in WK?-Datei
      53                 :            :     void                Bof( void );                        // 0x0000   00
      54                 :            :     sal_Bool                BofFm3( void );                     // 0x0000   00
      55                 :            :     void                Columnwidth( sal_uInt16 nRecLen );      // 0x0007   07
      56                 :            :     void                Hiddencolumn( sal_uInt16 nRecLen );     // 0x0008   08
      57                 :            :     void                Userrange( void );                  // 0x0009   09
      58                 :            :     void                Errcell( void );                    // 0x0014   20
      59                 :            :     void                Nacell( void );                     // 0x0015   21
      60                 :            :     void                Labelcell( void );                  // 0x0016   22
      61                 :            :     void                Numbercell( void );                 // 0x0017   23
      62                 :            :     void                Smallnumcell( void );               // 0x0018   24
      63                 :            :     ScFormulaCell*      Formulacell( sal_uInt16 nRecLen );      // 0x0019   25
      64                 :            :     void                Formulastring( ScFormulaCell& );    // 0x001a   26
      65                 :            :                                                             // 0x001b   27 special
      66                 :            :     void                NamedSheet( void );                 //          14000
      67                 :            :     void                RowPresentation( sal_uInt16 nRecLen );  //           2007
      68                 :            : 
      69                 :            :     // -------------------------------------------------------------------
      70                 :            :     // in FM?-Datei
      71                 :            :     void                Font_Face( void );                  // 174
      72                 :            :     void                Font_Type( void );                  // 176
      73                 :            :     void                Font_Ysize( void );                 // 177
      74                 :            :     void                _Row( const sal_uInt16 nRecLen );       // 197 ?
      75                 :            :     // -------------------------------------------------------------------
      76                 :            :     inline void         Read( ScAddress& );
      77                 :            :     inline void         Read( ScRange& );
      78                 :            :         // fuer Addresses/Ranges im Format Row(16)/Tab(8)/Col(8)
      79                 :            :     inline void         Read( sal_Char& );
      80                 :            :     inline void         Read( sal_uInt8& );
      81                 :            :     inline void         Read( sal_uInt16& );
      82                 :            :     inline void         Read( sal_Int16& );
      83                 :            :     inline void         Read( sal_uInt32& );
      84                 :            :     inline void         Read( double& );                    // 10-Byte-IEEE lesen
      85                 :            :     inline void         Read( LotAttrWK3& );
      86                 :            :     void                Read( String& );                    // 0-terminierten String einlesen
      87                 :            :     inline void         Skip( const sal_uInt16 nNumBytes );
      88                 :            :     // -------------------------------------------------------------------
      89                 :            : public:
      90                 :            :                         ImportLotus( SvStream&, ScDocument*, CharSet eSrc );
      91                 :            : 
      92                 :            :     virtual             ~ImportLotus();
      93                 :            : 
      94                 :            :     FltError            Read();
      95                 :            :     FltError            Read( SvStream& );                  // special for *.fm3-Dateien
      96                 :            : };
      97                 :            : 
      98                 :            : 
      99                 :          0 : inline void ImportLotus::Read( ScAddress& rAddr )
     100                 :            : {
     101                 :            :     sal_uInt16 nRow;
     102         [ #  # ]:          0 :     *pIn >> nRow;
     103                 :          0 :     rAddr.SetRow( static_cast<SCROW>(nRow) );
     104                 :            :     sal_uInt8 nByte;
     105         [ #  # ]:          0 :     *pIn >> nByte;
     106                 :          0 :     rAddr.SetTab( static_cast<SCTAB>(nByte) );
     107         [ #  # ]:          0 :     *pIn >> nByte;
     108                 :          0 :     rAddr.SetCol( static_cast<SCCOL>(nByte) );
     109                 :          0 : }
     110                 :            : 
     111                 :            : 
     112                 :          0 : inline void ImportLotus::Read( ScRange& rRange )
     113                 :            : {
     114                 :          0 :     Read( rRange.aStart );
     115                 :          0 :     Read( rRange.aEnd );
     116                 :          0 : }
     117                 :            : 
     118                 :            : 
     119                 :          0 : inline void ImportLotus::Read( sal_Char& r )
     120                 :            : {
     121                 :          0 :     *pIn >> r;
     122                 :          0 : }
     123                 :            : 
     124                 :            : 
     125                 :          0 : inline void ImportLotus::Read( sal_uInt8& r )
     126                 :            : {
     127                 :          0 :     *pIn >> r;
     128                 :          0 : }
     129                 :            : 
     130                 :            : 
     131                 :          0 : inline void ImportLotus::Read( sal_uInt16& r )
     132                 :            : {
     133                 :          0 :     *pIn >> r;
     134                 :          0 : }
     135                 :            : 
     136                 :            : 
     137                 :          0 : inline void ImportLotus::Read( sal_Int16& r )
     138                 :            : {
     139                 :          0 :     *pIn >> r;
     140                 :          0 : }
     141                 :            : 
     142                 :            : 
     143                 :            : inline void ImportLotus::Read( sal_uInt32& r )
     144                 :            : {
     145                 :            :     *pIn >> r;
     146                 :            : }
     147                 :            : 
     148                 :            : 
     149                 :          0 : inline void ImportLotus::Read( double& r )
     150                 :            : {
     151                 :          0 :     r = ScfTools::ReadLongDouble( *pIn );
     152                 :          0 : }
     153                 :            : 
     154                 :            : 
     155                 :          0 : inline void ImportLotus::Read( LotAttrWK3& r )
     156                 :            : {
     157                 :          0 :     *pIn >> r.nFont >> r.nFontCol >> r.nBack >> r.nLineStyle;
     158                 :          0 : }
     159                 :            : 
     160                 :            : 
     161                 :          0 : inline void ImportLotus::Skip( const sal_uInt16 n )
     162                 :            : {
     163                 :          0 :     pIn->SeekRel( n );
     164                 :          0 : }
     165                 :            : 
     166                 :            : 
     167                 :            : 
     168                 :            : #endif
     169                 :            : 
     170                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10