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