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/.
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 INCLUDED_SC_SOURCE_UI_SIDEBAR_NUMBERFORMATPROPERTYPANEL_HXX
20 #define INCLUDED_SC_SOURCE_UI_SIDEBAR_NUMBERFORMATPROPERTYPANEL_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>
31 namespace sc
{ namespace sidebar
{
33 class NumberFormatPropertyPanel
35 public ::sfx2::sidebar::IContextChangeReceiver
,
36 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
40 static VclPtr
<vcl::Window
> Create(
42 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
43 SfxBindings
* pBindings
);
45 virtual void DataChanged(
46 const DataChangedEvent
& rEvent
) SAL_OVERRIDE
;
48 virtual void HandleContextChange(
49 const ::sfx2::sidebar::EnumContext
& rContext
) SAL_OVERRIDE
;
51 virtual void NotifyItemUpdate(
52 const sal_uInt16 nSId
,
53 const SfxItemState eState
,
54 const SfxPoolItem
* pState
,
55 const bool bIsEnabled
) SAL_OVERRIDE
;
57 SfxBindings
* GetBindings() { return mpBindings
;}
59 // constructor/destuctor
60 NumberFormatPropertyPanel(
62 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
63 SfxBindings
* pBindings
);
64 virtual ~NumberFormatPropertyPanel();
65 virtual void dispose() SAL_OVERRIDE
;
68 VclPtr
<ListBox
> mpLbCategory
;
69 VclPtr
<ToolBox
> mpTBCategory
;
70 VclPtr
<NumericField
> mpEdDecimals
;
71 VclPtr
<NumericField
> mpEdLeadZeroes
;
72 VclPtr
<CheckBox
> mpBtnNegRed
;
73 VclPtr
<CheckBox
> mpBtnThousand
;
75 OUString maThousandSeparator
;
76 OUString maEngineeringNotation
;
78 ::sfx2::sidebar::ControllerItem maNumFormatControl
;
79 ::sfx2::sidebar::ControllerItem maFormatControl
;
81 sal_uInt16 mnCategorySelected
;
83 css::uno::Reference
<css::frame::XFrame
> mxFrame
;
84 ::sfx2::sidebar::EnumContext maContext
;
85 SfxBindings
* mpBindings
;
87 DECL_LINK_TYPED(NumFormatHdl
, ToolBox
*, void);
88 DECL_LINK(NumFormatSelectHdl
, ListBox
*);
89 DECL_LINK(NumFormatValueHdl
, void*);
94 } } // end of namespace ::sc::sidebar
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */