Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / sidebar / NumberFormatPropertyPanel.hxx
blob2630204fce71cdbf69544ff450a5d371cd8605b3
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef SC_PROPERTYPANEL_NUMFORMAT_HXX
20 #define SC_PROPERTYPANEL_NUMFORMAT_HXX
22 #include <sfx2/sidebar/ControllerItem.hxx>
23 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
24 #include <svx/sidebar/PanelLayout.hxx>
25 #include <boost/scoped_ptr.hpp>
27 class FixedText;
28 class ListBox;
29 class NumericField;
31 namespace sc { namespace sidebar {
33 class NumberFormatPropertyPanel
34 : public PanelLayout,
35 public ::sfx2::sidebar::IContextChangeReceiver,
36 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
38 public:
39 public:
40 static NumberFormatPropertyPanel* Create(
41 Window* pParent,
42 const cssu::Reference<css::frame::XFrame>& rxFrame,
43 SfxBindings* pBindings);
45 virtual void DataChanged(
46 const DataChangedEvent& rEvent);
48 virtual void HandleContextChange(
49 const ::sfx2::sidebar::EnumContext aContext);
51 virtual void NotifyItemUpdate(
52 const sal_uInt16 nSId,
53 const SfxItemState eState,
54 const SfxPoolItem* pState,
55 const bool bIsEnabled);
57 SfxBindings* GetBindings();
59 private:
60 //ui controls
61 ListBox* mpLbCategory;
62 ToolBox* mpTBCategory;
63 NumericField* mpEdDecimals;
64 NumericField* mpEdLeadZeroes;
65 CheckBox* mpBtnNegRed;
66 CheckBox* mpBtnThousand;
68 ::sfx2::sidebar::ControllerItem maNumFormatControl;
69 ::sfx2::sidebar::ControllerItem maFormatControl;
71 sal_uInt16 mnCategorySelected;
73 cssu::Reference<css::frame::XFrame> mxFrame;
74 ::sfx2::sidebar::EnumContext maContext;
75 SfxBindings* mpBindings;
77 DECL_LINK(NumFormatHdl, ToolBox*);
78 DECL_LINK(NumFormatSelectHdl, ListBox*);
79 DECL_LINK(NumFormatValueHdl, void*);
81 // constructor/destuctor
82 NumberFormatPropertyPanel(
83 Window* pParent,
84 const cssu::Reference<css::frame::XFrame>& rxFrame,
85 SfxBindings* pBindings);
86 virtual ~NumberFormatPropertyPanel();
88 void Initialize();
91 } } // end of namespace ::sc::sidebar
93 #endif
95 // eof
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */