LibreOffice Module sc (master)  1
excimp8.hxx
Go to the documentation of this file.
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 "imp_op.hxx"
24 #include "root.hxx"
25 #include "excscen.hxx"
26 #include <queryparam.hxx>
27 
28 class ScDBData;
29 class XclImpStream;
30 
31 class ImportExcel8 : public ImportExcel
32 {
33 public:
35  virtual ~ImportExcel8() override;
36 
37  virtual ErrCode Read() override;
38 
39  void Calccount(); // 0x0C
40  void Precision(); // 0x0E
41  void Delta(); // 0x10
42  void Iteration(); // 0x11
43  void Boundsheet(); // 0x85
44  void FilterMode(); // 0x9B
45  void AutoFilterInfo(); // 0x9D
46  void AutoFilter(); // 0x9E
47  void Scenman(); // 0xAE
48  void Scenario(); // 0xAF
49  void ReadBasic(); // 0xD3
50  void Labelsst(); // 0xFD
51 
52  void FeatHdr(); // 0x0867
53  void Feat(); // 0x0868
54 
55  virtual void EndSheet() override;
56  virtual void PostDocLoad() override;
57 
58 private:
60 };
61 
62 
64 {
65 private:
69  bool bActive:1;
70  bool bCriteria:1;
72 
73  void SetCellAttribs();
74  void InsertQueryParam();
75 
76 protected:
77 public:
79  RootData* pRoot,
80  const ScRange& rRange);
81 
82  bool IsActive() const { return bActive; }
83  bool IsFiltered() const { return bAutoOrAdvanced; }
84  SCTAB Tab() const { return aParam.nTab; }
85  SCCOL StartCol() const { return aParam.nCol1; }
86  SCROW StartRow() const { return aParam.nRow1; }
87  SCCOL EndCol() const { return aParam.nCol2; }
88  SCROW EndRow() const { return aParam.nRow2; }
89 
90  void ReadAutoFilter( XclImpStream& rStrm, svl::SharedStringPool& rPool );
91 
92  void Activate() { bActive = true; }
93  void SetAdvancedRange( const ScRange* pRange );
94  void SetExtractPos( const ScAddress& rAddr );
96  void Apply();
97  void EnableRemoveFilter();
98 };
99 
101 {
102 public:
103 
104  void Insert( RootData* pRoot, const ScRange& rRange);
105  void AddAdvancedRange( const ScRange& rRange );
106  void AddExtractPos( const ScRange& rRange );
107  void Apply();
108 
110 
111 private:
112  typedef std::shared_ptr<XclImpAutoFilterData> XclImpAutoFilterSharePtr;
113  std::vector<XclImpAutoFilterSharePtr> maFilters;
114 };
115 
116 #endif
117 
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void AutoFilterInfo()
Definition: excimp8.cxx:438
SCROW StartRow() const
Definition: excimp8.hxx:86
ExcScenarioList maScenList
Definition: excimp8.hxx:59
Stores global buffers and data needed for Excel import filter.
Definition: xiroot.hxx:64
virtual ErrCode Read() override
Definition: read.cxx:796
void Feat()
Definition: excimp8.cxx:270
SCCOL EndCol() const
Definition: excimp8.hxx:87
void AddExtractPos(const ScRange &rRange)
Definition: excimp8.cxx:790
void Scenman()
Definition: excimp8.cxx:218
void Insert(RootData *pRoot, const ScRange &rRange)
Definition: excimp8.cxx:777
void ReadBasic()
Definition: excimp8.cxx:318
virtual void PostDocLoad() override
Definition: excimp8.cxx:378
void FilterMode()
Definition: excimp8.cxx:425
ImportExcel8(XclImpRootData &rImpData, SvStream &rStrm)
Definition: excimp8.cxx:145
void Calccount()
Definition: excimp8.cxx:157
bool IsActive() const
Definition: excimp8.hxx:82
std::vector< XclImpAutoFilterSharePtr > maFilters
Definition: excimp8.hxx:113
virtual void EndSheet() override
Definition: excimp8.cxx:371
void Scenario()
Definition: excimp8.cxx:228
sal_Int16 SCCOL
Definition: types.hxx:22
Definition: root.hxx:72
XclImpAutoFilterData(RootData *pRoot, const ScRange &rRange)
Definition: excimp8.cxx:459
SCTAB Tab() const
Definition: excimp8.hxx:84
void AutoFilter()
Definition: excimp8.cxx:450
bool IsFiltered() const
Definition: excimp8.hxx:83
void SetExtractPos(const ScAddress &rAddr)
Definition: excimp8.cxx:727
ScDBData * pCurrDBData
Definition: excimp8.hxx:66
ScQueryParam aParam
Definition: excimp8.hxx:67
void Labelsst()
Definition: excimp8.cxx:233
void Precision()
Definition: excimp8.cxx:164
XclImpAutoFilterData * GetByTab(SCTAB nTab)
Definition: excimp8.cxx:803
sal_Int32 SCROW
Definition: types.hxx:18
void Delta()
Definition: excimp8.cxx:171
ScRange aCriteriaRange
Definition: excimp8.hxx:68
virtual ~ImportExcel8() override
Definition: excimp8.cxx:153
void FeatHdr()
Definition: excimp8.cxx:253
SCROW EndRow() const
Definition: excimp8.hxx:88
void EnableRemoveFilter()
Definition: excimp8.cxx:763
std::shared_ptr< XclImpAutoFilterData > XclImpAutoFilterSharePtr
Definition: excimp8.hxx:112
void AddAdvancedRange(const ScRange &rRange)
Definition: excimp8.cxx:783
void Iteration()
Definition: excimp8.cxx:178
This class is used to import record oriented streams.
Definition: xistream.hxx:278
void ReadAutoFilter(XclImpStream &rStrm, svl::SharedStringPool &rPool)
Definition: excimp8.cxx:546
void Boundsheet()
Definition: excimp8.cxx:185
void SvStream & rStrm
void SetAutoOrAdvanced()
Definition: excimp8.hxx:95
void SetAdvancedRange(const ScRange *pRange)
Definition: excimp8.cxx:716
sal_Int16 SCTAB
Definition: types.hxx:23
SCCOL StartCol() const
Definition: excimp8.hxx:85