LibreOffice Module sc (master)  1
dwfunctr.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 #ifndef INCLUDED_SC_SOURCE_UI_INC_DWFUNCTR_HXX
20 #define INCLUDED_SC_SOURCE_UI_INC_DWFUNCTR_HXX
21 
24 
25 class ScFuncDesc;
26 namespace formula { class IFunctionDescription; }
27 
28 class ScFunctionWin;
29 
31 {
33 protected:
34  virtual void setProperty(const css::uno::Any &rProperty) override;
35 public:
37  : ConfigurationListenerProperty(rListener, "EnglishFunctionName")
38  , m_xFunctionWin(pFunctionWin)
39  {
40  }
41 };
42 
43 class ScFunctionWin : public PanelLayout
44 {
45 
46 private:
47  std::unique_ptr<weld::ComboBox> xCatBox;
48  std::unique_ptr<weld::TreeView> xFuncList;
49  std::unique_ptr<weld::Button> xInsertButton;
50  std::unique_ptr<weld::Label> xFiFuncDesc;
51 
53  std::unique_ptr<EnglishFunctionNameChange> xConfigChange;
55  sal_uInt16 nArgs;
56 
57  ::std::vector< const formula::IFunctionDescription*> aLRUList;
58 
59  void UpdateLRUList();
60  void DoEnter();
61  void SetDescription();
62 
63  DECL_LINK( SetRowActivatedHdl, weld::TreeView&, bool );
64  DECL_LINK( SetSelectionClickHdl, weld::Button&, void );
65  DECL_LINK( SelComboHdl, weld::ComboBox&, void );
66  DECL_LINK( SelTreeHdl, weld::TreeView&, void );
67 
68 public:
69  ScFunctionWin(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame> &rFrame);
70 
71  virtual ~ScFunctionWin() override;
72  virtual void dispose() override;
73 
74  void InitLRUList();
75  void UpdateFunctionList();
76 };
77 
78 #endif
79 
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void InitLRUList()
Definition: dwfunctr.cxx:123
VclPtr< ScFunctionWin > m_xFunctionWin
Definition: dwfunctr.hxx:32
void SetDescription()
Definition: dwfunctr.cxx:171
virtual void setProperty(const css::uno::Any &rProperty) override
Definition: dwfunctr.cxx:411
ScFunctionWin(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: dwfunctr.cxx:47
std::unique_ptr< weld::TreeView > xFuncList
Definition: dwfunctr.hxx:48
std::unique_ptr< EnglishFunctionNameChange > xConfigChange
Definition: dwfunctr.hxx:53
DECL_LINK(SetRowActivatedHdl, weld::TreeView &, bool)
std::unique_ptr< weld::Button > xInsertButton
Definition: dwfunctr.hxx:49
virtual ~ScFunctionWin() override
Definition: dwfunctr.cxx:89
void UpdateLRUList()
Definition: dwfunctr.cxx:148
rtl::Reference< comphelper::ConfigurationListener > xConfigListener
Definition: dwfunctr.hxx:52
virtual void dispose() override
Definition: dwfunctr.cxx:94
const ScFuncDesc * pFuncDesc
Definition: dwfunctr.hxx:54
std::unique_ptr< weld::ComboBox > xCatBox
Definition: dwfunctr.hxx:47
std::unique_ptr< weld::Label > xFiFuncDesc
Definition: dwfunctr.hxx:50
void DoEnter()
Definition: dwfunctr.cxx:263
sal_uInt16 nArgs
Definition: dwfunctr.hxx:55
Stores and generates human readable descriptions for spreadsheet-functions, e.g. functions used in fo...
Definition: funcdesc.hxx:41
void UpdateFunctionList()
Definition: dwfunctr.cxx:204
::std::vector< const formula::IFunctionDescription * > aLRUList
Definition: dwfunctr.hxx:57
ConfigurationListenerProperty(const rtl::Reference< ConfigurationListener > &xListener, const OUString &rProp)
EnglishFunctionNameChange(const rtl::Reference< comphelper::ConfigurationListener > &rListener, ScFunctionWin *pFunctionWin)
Definition: dwfunctr.hxx:36