LibreOffice Module sc (master)  1
NumberFormatPropertyPanel.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #pragma once
20 
23 #include <sfx2/weldutils.hxx>
25 #include <vcl/EnumContext.hxx>
26 
27 namespace sc::sidebar {
28 
30 : public PanelLayout,
33 {
34 public:
35 public:
36  static std::unique_ptr<PanelLayout> Create(
37  weld::Widget* pParent,
38  const css::uno::Reference<css::frame::XFrame>& rxFrame,
39  SfxBindings* pBindings);
40 
41  virtual void HandleContextChange(
42  const vcl::EnumContext& rContext) override;
43 
44  virtual void NotifyItemUpdate(
45  const sal_uInt16 nSId,
46  const SfxItemState eState,
47  const SfxPoolItem* pState) override;
48 
49  virtual void GetControlState(
50  const sal_uInt16 /*nSId*/,
51  boost::property_tree::ptree& /*rState*/) override {};
52 
54 
55  // constructor/destructor
57  weld::Widget* pParent,
58  const css::uno::Reference<css::frame::XFrame>& rxFrame,
59  SfxBindings* pBindings);
60  virtual ~NumberFormatPropertyPanel() override;
61 private:
62  //ui controls
63  std::unique_ptr<weld::ComboBox> mxLbCategory;
64  std::unique_ptr<weld::Toolbar> mxTBCategory;
65  std::unique_ptr<ToolbarUnoDispatcher> mxCategoryDispatch;
66  std::unique_ptr<weld::Label> mxFtDecimals;
67  std::unique_ptr<weld::SpinButton> mxEdDecimals;
68  std::unique_ptr<weld::Label> mxFtDenominator;
69  std::unique_ptr<weld::SpinButton> mxEdDenominator;
70  std::unique_ptr<weld::Label> mxFtLeadZeroes;
71  std::unique_ptr<weld::SpinButton> mxEdLeadZeroes;
72  std::unique_ptr<weld::CheckButton> mxBtnNegRed;
73  std::unique_ptr<weld::CheckButton> mxBtnThousand;
74  std::unique_ptr<weld::CheckButton> mxBtnEngineering;
75 
78 
79  sal_Int32 mnCategorySelected;
80 
83 
84  DECL_LINK(NumFormatSelectHdl, weld::ComboBox&, void);
85  DECL_LINK(NumFormatValueHdl, weld::SpinButton&, void);
86  DECL_LINK(NumFormatValueClickHdl, weld::Toggleable&, void);
87 
88  void Initialize();
89  void DisableControls();
90 };
91 
92 } // end of namespace ::sc::sidebar
93 
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
::sfx2::sidebar::ControllerItem maNumFormatControl
std::unique_ptr< ToolbarUnoDispatcher > mxCategoryDispatch
std::unique_ptr< weld::CheckButton > mxBtnNegRed
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
std::unique_ptr< weld::CheckButton > mxBtnEngineering
std::unique_ptr< weld::ComboBox > mxLbCategory
std::unique_ptr< weld::SpinButton > mxEdLeadZeroes
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::sfx2::sidebar::ControllerItem maFormatControl
std::unique_ptr< weld::SpinButton > mxEdDenominator
NumberFormatPropertyPanel(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< weld::Label > mxFtDenominator
SfxItemState
DECL_LINK(NumFormatSelectHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Toolbar > mxTBCategory
std::unique_ptr< weld::CheckButton > mxBtnThousand
std::unique_ptr< weld::SpinButton > mxEdDecimals