Version 7.5.1.1, tag libreoffice-7.5.1.1
[LibreOffice.git] / sc / source / filter / inc / excimp8.hxx
blob4096ca0682451c500e57561f2a0ff55673ec12b4
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 #pragma once
22 #include "imp_op.hxx"
23 #include "root.hxx"
24 #include "excscen.hxx"
25 #include <queryparam.hxx>
27 class ScDBData;
28 class XclImpStream;
30 class ImportExcel8 : public ImportExcel
32 public:
33 ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm );
34 virtual ~ImportExcel8() override;
36 virtual ErrCode Read() override;
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
51 void FeatHdr(); // 0x0867
52 void Feat(); // 0x0868
54 virtual void EndSheet() override;
55 virtual void PostDocLoad() override;
57 private:
58 ExcScenarioList maScenList;
62 class XclImpAutoFilterData : private ExcRoot
64 private:
65 ScDBData* pCurrDBData;
66 ScQueryParam aParam;
67 ScRange aCriteriaRange;
68 bool bActive:1;
69 bool bCriteria:1;
70 bool bAutoOrAdvanced:1;
72 void SetCellAttribs();
73 void InsertQueryParam();
75 protected:
76 public:
77 XclImpAutoFilterData(
78 RootData* pRoot,
79 const ScRange& rRange);
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; }
89 void ReadAutoFilter( XclImpStream& rStrm, svl::SharedStringPool& rPool );
91 void Activate() { bActive = true; }
92 void SetAdvancedRange( const ScRange* pRange );
93 void SetExtractPos( const ScAddress& rAddr );
94 void SetAutoOrAdvanced() { bAutoOrAdvanced = true; }
95 void Apply();
96 void EnableRemoveFilter();
99 class XclImpAutoFilterBuffer
101 public:
103 void Insert( RootData* pRoot, const ScRange& rRange);
104 void AddAdvancedRange( const ScRange& rRange );
105 void AddExtractPos( const ScRange& rRange );
106 void Apply();
108 XclImpAutoFilterData* GetByTab( SCTAB nTab );
110 private:
111 typedef std::shared_ptr<XclImpAutoFilterData> XclImpAutoFilterSharePtr;
112 std::vector<XclImpAutoFilterSharePtr> maFilters;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */