LCOV - code coverage report
Current view: top level - sc/source/filter/inc - excimp8.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 11 11 100.0 %
Date: 2015-06-13 12:38:46 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 INCLUDED_SC_SOURCE_FILTER_INC_EXCIMP8_HXX
      21             : #define INCLUDED_SC_SOURCE_FILTER_INC_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             : class ImportExcel8 : public ImportExcel
      38             : {
      39             : public:
      40             :                             ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm );
      41             :     virtual                 ~ImportExcel8();
      42             : 
      43             :     virtual FltError        Read() SAL_OVERRIDE;
      44             : 
      45             :     void                    Calccount();              // 0x0C
      46             :     void                    Precision();              // 0x0E
      47             :     void                    Delta();                  // 0x10
      48             :     void                    Iteration();              // 0x11
      49             :     void                    Boundsheet();             // 0x85
      50             :     void                    FilterMode();             // 0x9B
      51             :     void                    AutoFilterInfo();         // 0x9D
      52             :     void                    AutoFilter();             // 0x9E
      53             :     void                    Scenman();                // 0xAE
      54             :     void                    Scenario();               // 0xAF
      55             :     void                    ReadBasic();              // 0xD3
      56             :     void                    Labelsst();               // 0xFD
      57             : 
      58             :     void                    Hlink();                  // 0x01B8
      59             :     void                    FeatHdr();                // 0x0867
      60             :     void                    Feat();                   // 0x0868
      61             : 
      62             :     virtual void            EndSheet() SAL_OVERRIDE;
      63             :     virtual void            PostDocLoad() SAL_OVERRIDE;
      64             : 
      65             : private:
      66             :     void                    LoadDocumentProperties();
      67             : 
      68             : private:
      69             :     // represents codename ( and associated modules )
      70             :     // not speficied directly in the binary format
      71             :     std::vector<OUString> maAutoGeneratedCodeNames;
      72             :     ExcScenarioList maScenList;
      73             : };
      74             : 
      75             : // classes AutoFilterData, AutoFilterBuffer
      76             : 
      77          26 : class XclImpAutoFilterData : private ExcRoot
      78             : {
      79             : private:
      80             :     ScDBData*                   pCurrDBData;
      81             :     ScQueryParam                aParam;
      82             :     ScRange                     aCriteriaRange;
      83             :     bool                        bActive:1;
      84             :     bool                        bCriteria:1;
      85             :     bool                        bAutoOrAdvanced:1;
      86             : 
      87             :     void                        SetCellAttribs();
      88             :     void                        InsertQueryParam();
      89             : 
      90             : protected:
      91             : public:
      92             :                                 XclImpAutoFilterData(
      93             :                                     RootData* pRoot,
      94             :                                     const ScRange& rRange);
      95             : 
      96          26 :     inline bool                 IsActive() const    { return bActive; }
      97           8 :     inline bool                 IsFiltered() const  { return bAutoOrAdvanced; }
      98         327 :     inline SCTAB                Tab() const         { return aParam.nTab; }
      99          21 :     inline SCCOL                StartCol() const    { return aParam.nCol1; }
     100          61 :     inline SCROW                StartRow() const    { return aParam.nRow1; }
     101          40 :     inline SCCOL                EndCol() const      { return aParam.nCol2; }
     102          13 :     inline SCROW                EndRow() const      { return aParam.nRow2; }
     103             : 
     104             :     void ReadAutoFilter( XclImpStream& rStrm, svl::SharedStringPool& rPool );
     105             : 
     106           8 :     inline void                 Activate()          { bActive = true; }
     107             :     void                        SetAdvancedRange( const ScRange* pRange );
     108             :     void                        SetExtractPos( const ScAddress& rAddr );
     109           5 :     inline void                 SetAutoOrAdvanced()  { bAutoOrAdvanced = true; }
     110             :     void                        Apply();
     111             :     void                        CreateScDBData();
     112             :     void                        EnableRemoveFilter();
     113             : };
     114             : 
     115         162 : class XclImpAutoFilterBuffer
     116             : {
     117             : public:
     118             : 
     119             :     void                        Insert( RootData* pRoot, const ScRange& rRange);
     120             :     void                        AddAdvancedRange( const ScRange& rRange );
     121             :     void                        AddExtractPos( const ScRange& rRange );
     122             :     void                        Apply();
     123             : 
     124             :     XclImpAutoFilterData*       GetByTab( SCTAB nTab );
     125             : 
     126             : private:
     127             : 
     128             :     boost::ptr_vector<XclImpAutoFilterData> maFilters;
     129             : };
     130             : 
     131             : #endif
     132             : 
     133             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11