1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
27 #include "excscen.hxx"
28 #include "excdefs.hxx"
30 #include "queryparam.hxx"
35 class ImportExcel8
: public ImportExcel
38 ImportExcel8( XclImpRootData
& rImpData
, SvStream
& rStrm
);
39 virtual ~ImportExcel8();
41 virtual FltError
Read() override
;
43 void Calccount(); // 0x0C
44 void Precision(); // 0x0E
46 void Iteration(); // 0x11
47 void Boundsheet(); // 0x85
48 void FilterMode(); // 0x9B
49 void AutoFilterInfo(); // 0x9D
50 void AutoFilter(); // 0x9E
51 void Scenman(); // 0xAE
52 void Scenario(); // 0xAF
53 void ReadBasic(); // 0xD3
54 void Labelsst(); // 0xFD
56 void FeatHdr(); // 0x0867
57 void Feat(); // 0x0868
59 virtual void EndSheet() override
;
60 virtual void PostDocLoad() override
;
63 void LoadDocumentProperties();
66 // represents codename ( and associated modules )
67 // not speficied directly in the binary format
68 std::vector
<OUString
> maAutoGeneratedCodeNames
;
69 ExcScenarioList maScenList
;
72 // classes AutoFilterData, AutoFilterBuffer
74 class XclImpAutoFilterData
: private ExcRoot
77 ScDBData
* pCurrDBData
;
79 ScRange aCriteriaRange
;
82 bool bAutoOrAdvanced
:1;
84 void SetCellAttribs();
85 void InsertQueryParam();
91 const ScRange
& rRange
);
93 inline bool IsActive() const { return bActive
; }
94 inline bool IsFiltered() const { return bAutoOrAdvanced
; }
95 inline SCTAB
Tab() const { return aParam
.nTab
; }
96 inline SCCOL
StartCol() const { return aParam
.nCol1
; }
97 inline SCROW
StartRow() const { return aParam
.nRow1
; }
98 inline SCCOL
EndCol() const { return aParam
.nCol2
; }
99 inline SCROW
EndRow() const { return aParam
.nRow2
; }
101 void ReadAutoFilter( XclImpStream
& rStrm
, svl::SharedStringPool
& rPool
);
103 inline void Activate() { bActive
= true; }
104 void SetAdvancedRange( const ScRange
* pRange
);
105 void SetExtractPos( const ScAddress
& rAddr
);
106 inline void SetAutoOrAdvanced() { bAutoOrAdvanced
= true; }
108 void CreateScDBData();
109 void EnableRemoveFilter();
112 class XclImpAutoFilterBuffer
116 void Insert( RootData
* pRoot
, const ScRange
& rRange
);
117 void AddAdvancedRange( const ScRange
& rRange
);
118 void AddExtractPos( const ScRange
& rRange
);
121 XclImpAutoFilterData
* GetByTab( SCTAB nTab
);
124 typedef std::shared_ptr
<XclImpAutoFilterData
> XclImpAutoFilterSharePtr
;
125 std::vector
<XclImpAutoFilterSharePtr
> maFilters
;
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */