/src/libreoffice/sc/inc/SheetView.hxx
Line | Count | Source |
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 | | |
10 | | #pragma once |
11 | | |
12 | | #include "scdllapi.h" |
13 | | #include "types.hxx" |
14 | | #include <rtl/ustring.hxx> |
15 | | |
16 | | class ScTable; |
17 | | |
18 | | namespace sc |
19 | | { |
20 | | /** Stores information of a sheet view. |
21 | | * |
22 | | * A sheet view is a special view of a sheet that can be filtered and sorted |
23 | | * independently from other views of the sheet. |
24 | | **/ |
25 | | class SC_DLLPUBLIC SheetView |
26 | | { |
27 | | private: |
28 | | ScTable* mpTable = nullptr; |
29 | | bool mbSynced = true; |
30 | | OUString maName; |
31 | | |
32 | | public: |
33 | | SheetView(ScTable* pTable, OUString const& rName); |
34 | | |
35 | | ScTable* getTablePointer() const; |
36 | | SCTAB getTableNumber() const; |
37 | | |
38 | 0 | OUString const& GetName() { return maName; } |
39 | | |
40 | | /** A sheet view is valid if the pointer to the table is set */ |
41 | | bool isValid() const; |
42 | | |
43 | | /** Mark the sheet view as unsynced (not synced). */ |
44 | 0 | void unsync() { mbSynced = false; } |
45 | | |
46 | | /** Is the sheet view synced with its default view. */ |
47 | 0 | bool isSynced() const { return mbSynced; } |
48 | | }; |
49 | | } |
50 | | |
51 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |