tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / filter / xml / cachedattraccess.hxx
blob1af7c8b6b64f1f9b2ab8f33d7a0ca51806453ef7
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/.
8 */
10 #pragma once
12 #include <sal/types.h>
14 class ScDocument;
16 /**
17 * Wrapper for accessing hidden and filtered row attributes. It caches last
18 * accessed values for a current range, to avoid fetching values for every
19 * single row.
21 class ScXMLCachedRowAttrAccess
23 struct Cache
25 sal_Int32 mnTab;
26 sal_Int32 mnRow1;
27 sal_Int32 mnRow2;
28 bool mbValue;
29 Cache();
30 bool hasCache(sal_Int32 nTab, sal_Int32 nRow) const;
33 public:
34 explicit ScXMLCachedRowAttrAccess(ScDocument* pDoc);
36 bool rowHidden(sal_Int32 nTab, sal_Int32 nRow, sal_Int32& nEndRow);
37 bool rowFiltered(sal_Int32 nTab, sal_Int32 nRow, sal_Int32& nEndRow);
38 private:
39 Cache maHidden;
40 Cache maFiltered;
41 ScDocument* mpDoc;
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */