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/.
10 #ifndef SC_CONDFORMATMGR_HXX
11 #define SC_CONDFORMATMGR_HXX
15 #include <vcl/dialog.hxx>
16 #include <svtools/svtabbx.hxx>
17 #include <vcl/button.hxx>
18 #include <vcl/fixed.hxx>
19 #include <svtools/headbar.hxx>
21 #include "conditio.hxx"
27 class ScCondFormatManagerWindow
: public SvTabListBox
31 OUString
createEntryString(const ScConditionalFormat
& rFormat
);
33 HeaderBar maHeaderBar
;
35 ScConditionalFormatList
* mpFormatList
;
36 std::map
<SvTreeListEntry
*, sal_Int32
> maMapLBoxEntryToCondIndex
;
38 DECL_LINK( HeaderEndDragHdl
, void* );
41 ScCondFormatManagerWindow( Window
* pParent
, ScDocument
* pDoc
, ScConditionalFormatList
* pFormatList
);
43 void DeleteSelection();
44 ScConditionalFormat
* GetSelection();
48 class ScCondFormatManagerCtrl
: Control
51 ScCondFormatManagerCtrl(Window
* pParent
, ScDocument
* pDoc
, ScConditionalFormatList
* pFormatList
);
53 ScConditionalFormat
* GetSelection();
54 void DeleteSelection();
56 ScCondFormatManagerWindow
&GetListControl() { return maWdManager
; }
59 ScCondFormatManagerWindow maWdManager
;
62 class ScCondFormatManagerDlg
: public ModalDialog
65 ScCondFormatManagerDlg(Window
* pParent
, ScDocument
* pDoc
, const ScConditionalFormatList
* pFormatList
, const ScAddress
& rPos
);
66 ~ScCondFormatManagerDlg();
68 ScConditionalFormatList
* GetConditionalFormatList();
70 bool CondFormatsChanged();
72 virtual bool IsInRefMode() const;
76 PushButton maBtnRemove
;
80 CancelButton maBtnCancel
;
84 ScConditionalFormatList
* mpFormatList
;
86 ScCondFormatManagerCtrl maCtrlManager
;
91 DECL_LINK(RemoveBtnHdl
, void*);
92 DECL_LINK(EditBtnHdl
, void*);
93 DECL_LINK(AddBtnHdl
, void*);
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */