LCOV - code coverage report
Current view: top level - libreoffice/sc/source/filter/inc - excimp8.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 11 11 100.0 %
Date: 2012-12-27 Functions: 12 12 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef SC_EXCIMP8_HXX
      21             : #define SC_EXCIMP8_HXX
      22             : 
      23             : #include <string.h>
      24             : 
      25             : #include <boost/ptr_container/ptr_vector.hpp>
      26             : 
      27             : #include "imp_op.hxx"
      28             : #include "root.hxx"
      29             : #include "excscen.hxx"
      30             : #include "excdefs.hxx"
      31             : #include "ftools.hxx"
      32             : #include "queryparam.hxx"
      33             : 
      34             : class ScDBData;
      35             : class XclImpStream;
      36             : 
      37             : 
      38             : 
      39             : class ImportExcel8 : public ImportExcel
      40             : {
      41             : public:
      42             :                             ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm );
      43             :     virtual                 ~ImportExcel8( void );
      44             : 
      45             :     virtual FltError        Read( void );
      46             : 
      47             :     void                    Calccount( void );              // 0x0C
      48             :     void                    Precision( void );              // 0x0E
      49             :     void                    Delta( void );                  // 0x10
      50             :     void                    Iteration( void );              // 0x11
      51             :     void                    Boundsheet( void );             // 0x85
      52             :     void                    FilterMode( void );             // 0x9B
      53             :     void                    AutoFilterInfo( void );         // 0x9D
      54             :     void                    AutoFilter( void );             // 0x9E
      55             :     void                    Scenman( void );                // 0xAE
      56             :     void                    Scenario( void );               // 0xAF
      57             :     void                    ReadBasic( void );              // 0xD3
      58             :     void                    Labelsst( void );               // 0xFD
      59             : 
      60             :     void                    Hlink( void );                  // 0x01B8
      61             :     void                    Codename( sal_Bool bWBGlobals );    // 0x01BA
      62             :     void                    SheetProtection( void );        // 0x0867
      63             : 
      64             :     virtual void            EndSheet( void );
      65             :     virtual void            PostDocLoad( void );
      66             : 
      67             : private:
      68             :     void                    LoadDocumentProperties();
      69             : 
      70             : private:
      71             :     // represents codename ( and associated modules )
      72             :     // not speficied directly in the binary format
      73             :     std::vector<rtl::OUString> maAutoGeneratedCodeNames;
      74             :     ExcScenarioList maScenList;
      75             : };
      76             : 
      77             : 
      78             : 
      79             : //___________________________________________________________________
      80             : // classes AutoFilterData, AutoFilterBuffer
      81             : 
      82          23 : class XclImpAutoFilterData : private ExcRoot
      83             : {
      84             : private:
      85             :     ScDBData*                   pCurrDBData;
      86             :     ScQueryParam                aParam;
      87             :     ScRange                     aCriteriaRange;
      88             :     bool                        bActive:1;
      89             :     bool                        bCriteria:1;
      90             :     bool                        bAutoOrAdvanced:1;
      91             : 
      92             :     void                        CreateFromDouble( rtl::OUString& rStr, double fVal );
      93             :     void                        SetCellAttribs();
      94             :     void                        InsertQueryParam();
      95             : 
      96             : protected:
      97             : public:
      98             :                                 XclImpAutoFilterData(
      99             :                                     RootData* pRoot,
     100             :                                     const ScRange& rRange);
     101             : 
     102          23 :     inline bool                 IsActive() const    { return bActive; }
     103           7 :     inline bool                 IsFiltered() const  { return bAutoOrAdvanced; }
     104         307 :     inline SCTAB                Tab() const         { return aParam.nTab; }
     105          19 :     inline SCCOL                StartCol() const    { return aParam.nCol1; }
     106          52 :     inline SCROW                StartRow() const    { return aParam.nRow1; }
     107          34 :     inline SCCOL                EndCol() const      { return aParam.nCol2; }
     108          12 :     inline SCROW                EndRow() const      { return aParam.nRow2; }
     109             : 
     110             :     void                        ReadAutoFilter( XclImpStream& rStrm );
     111             : 
     112           7 :     inline void                 Activate()          { bActive = true; }
     113             :     void                        SetAdvancedRange( const ScRange* pRange );
     114             :     void                        SetExtractPos( const ScAddress& rAddr );
     115           5 :     inline void                 SetAutoOrAdvanced()  { bAutoOrAdvanced = true; }
     116             :     void                        Apply();
     117             :     void                        CreateScDBData();
     118             :     void                        EnableRemoveFilter();
     119             : };
     120             : 
     121             : 
     122          40 : class XclImpAutoFilterBuffer
     123             : {
     124             : public:
     125             : 
     126             :     void                        Insert( RootData* pRoot, const ScRange& rRange);
     127             :     void                        AddAdvancedRange( const ScRange& rRange );
     128             :     void                        AddExtractPos( const ScRange& rRange );
     129             :     void                        Apply();
     130             : 
     131             :     XclImpAutoFilterData*       GetByTab( SCTAB nTab );
     132             : 
     133             : private:
     134             : 
     135             :     boost::ptr_vector<XclImpAutoFilterData> maFilters;
     136             : };
     137             : 
     138             : #endif
     139             : 
     140             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10