Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / filter / inc / excimp8.hxx
blobfc078b51ce163a2214d6c99a094dafb298380f47
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_EXCIMP8_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_EXCIMP8_HXX
23 #include "imp_op.hxx"
24 #include "root.hxx"
25 #include "excscen.hxx"
26 #include <queryparam.hxx>
28 class ScDBData;
29 class XclImpStream;
31 class ImportExcel8 : public ImportExcel
33 public:
34 ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm );
35 virtual ~ImportExcel8() override;
37 virtual ErrCode Read() override;
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
52 void FeatHdr(); // 0x0867
53 void Feat(); // 0x0868
55 virtual void EndSheet() override;
56 virtual void PostDocLoad() override;
58 private:
59 ExcScenarioList maScenList;
62 // classes AutoFilterData, AutoFilterBuffer
64 class XclImpAutoFilterData : private ExcRoot
66 private:
67 ScDBData* pCurrDBData;
68 ScQueryParam aParam;
69 ScRange aCriteriaRange;
70 bool bActive:1;
71 bool bCriteria:1;
72 bool bAutoOrAdvanced:1;
74 void SetCellAttribs();
75 void InsertQueryParam();
77 protected:
78 public:
79 XclImpAutoFilterData(
80 RootData* pRoot,
81 const ScRange& rRange);
83 bool IsActive() const { return bActive; }
84 bool IsFiltered() const { return bAutoOrAdvanced; }
85 SCTAB Tab() const { return aParam.nTab; }
86 SCCOL StartCol() const { return aParam.nCol1; }
87 SCROW StartRow() const { return aParam.nRow1; }
88 SCCOL EndCol() const { return aParam.nCol2; }
89 SCROW EndRow() const { return aParam.nRow2; }
91 void ReadAutoFilter( XclImpStream& rStrm, svl::SharedStringPool& rPool );
93 void Activate() { bActive = true; }
94 void SetAdvancedRange( const ScRange* pRange );
95 void SetExtractPos( const ScAddress& rAddr );
96 void SetAutoOrAdvanced() { bAutoOrAdvanced = true; }
97 void Apply();
98 void EnableRemoveFilter();
101 class XclImpAutoFilterBuffer
103 public:
105 void Insert( RootData* pRoot, const ScRange& rRange);
106 void AddAdvancedRange( const ScRange& rRange );
107 void AddExtractPos( const ScRange& rRange );
108 void Apply();
110 XclImpAutoFilterData* GetByTab( SCTAB nTab );
112 private:
113 typedef std::shared_ptr<XclImpAutoFilterData> XclImpAutoFilterSharePtr;
114 std::vector<XclImpAutoFilterSharePtr> maFilters;
117 #endif
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */