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/.
12 #include <vcl/dialog.hxx>
13 #include <svtools/svtabbx.hxx>
14 #include <vcl/button.hxx>
15 #include <vcl/fixed.hxx>
16 #include <svtools/headbar.hxx>
18 #include "conditio.hxx"
24 class ScCondFormatManagerWindow
: public SvTabListBox
28 String
createEntryString(const ScConditionalFormat
& rFormat
);
30 HeaderBar maHeaderBar
;
32 ScConditionalFormatList
* mpFormatList
;
33 std::map
<SvTreeListEntry
*, sal_Int32
> maMapLBoxEntryToCondIndex
;
35 DECL_LINK( HeaderEndDragHdl
, void* );
38 ScCondFormatManagerWindow( Window
* pParent
, ScDocument
* pDoc
, ScConditionalFormatList
* pFormatList
);
40 void DeleteSelection();
41 ScConditionalFormat
* GetSelection();
45 class ScCondFormatManagerCtrl
: Control
48 ScCondFormatManagerCtrl(Window
* pParent
, ScDocument
* pDoc
, ScConditionalFormatList
* pFormatList
);
50 ScConditionalFormat
* GetSelection();
51 void DeleteSelection();
53 ScCondFormatManagerWindow
&GetListControl() { return maWdManager
; }
56 ScCondFormatManagerWindow maWdManager
;
59 class ScCondFormatManagerDlg
: public ModalDialog
62 ScCondFormatManagerDlg(Window
* pParent
, ScDocument
* pDoc
, const ScConditionalFormatList
* pFormatList
, const ScAddress
& rPos
);
63 ~ScCondFormatManagerDlg();
65 ScConditionalFormatList
* GetConditionalFormatList();
67 bool CondFormatsChanged();
69 virtual bool IsInRefMode() const;
73 PushButton maBtnRemove
;
77 CancelButton maBtnCancel
;
81 ScConditionalFormatList
* mpFormatList
;
83 ScCondFormatManagerCtrl maCtrlManager
;
88 DECL_LINK(RemoveBtnHdl
, void*);
89 DECL_LINK(EditBtnHdl
, void*);
90 DECL_LINK(AddBtnHdl
, void*);
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */