Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / ui / inc / condformatdlgitem.hxx
blobd974b2c102137417c6c54eb50f0965dcb327b68a
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 #ifndef INCLUDED_SC_SOURCE_UI_INC_CONDFORMATDLGITEM_HXX
11 #define INCLUDED_SC_SOURCE_UI_INC_CONDFORMATDLGITEM_HXX
13 #include <svl/poolitem.hxx>
15 #include <memory>
17 namespace condformat {
19 namespace dialog {
21 enum ScCondFormatDialogType
23 NONE,
24 CONDITION,
25 COLORSCALE,
26 DATABAR,
27 ICONSET,
28 DATE
35 class ScConditionalFormatList;
37 class ScCondFormatDlgItem : public SfxPoolItem
39 public:
41 ScCondFormatDlgItem();
42 ScCondFormatDlgItem(std::shared_ptr<ScConditionalFormatList> pCondFormats, sal_Int32 nItem, bool bManaged);
44 virtual ~ScCondFormatDlgItem() override;
46 virtual bool operator==(const SfxPoolItem&) const override;
47 virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override;
48 virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVer) const override;
50 bool IsManaged() const;
51 condformat::dialog::ScCondFormatDialogType GetDialogType() const;
52 sal_Int32 GetIndex() const;
54 void SetDialogType(condformat::dialog::ScCondFormatDialogType eType);
56 ScConditionalFormatList* GetConditionalFormatList();
58 private:
60 std::shared_ptr<ScConditionalFormatList> mpCondFormats;
61 sal_Int32 mnItem;
62 condformat::dialog::ScCondFormatDialogType meDialogType;
63 bool mbManaged;
66 #endif
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */