LibreOffice Module sc (master)  1
tpformula.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 
20 #pragma once
21 
22 #include <sfx2/tabdlg.hxx>
23 
24 #include <calcconfig.hxx>
25 #include <docoptio.hxx>
26 
28 {
29 public:
30  explicit ScTpFormulaOptions(weld::Container* pPage, weld::DialogController* pController,
31  const SfxItemSet& rCoreSet);
32  static std::unique_ptr<SfxTabPage>
33  Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet);
34  virtual ~ScTpFormulaOptions() override;
35 
36  virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
37  virtual void Reset(const SfxItemSet* rCoreSet) override;
38  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
39 
40 private:
41  void ResetSeparators();
43  void UpdateCustomCalcRadioButtons(bool bDefault);
45 
46  bool IsValidSeparator(const OUString& rSep, bool bArray) const;
47 
48  DECL_LINK(ButtonHdl, weld::Button&, void);
49  DECL_LINK(ToggleHdl, weld::Toggleable&, void);
50  DECL_LINK(SepInsertTextHdl, OUString&, bool);
51  DECL_LINK(ColSepInsertTextHdl, OUString&, bool);
52  DECL_LINK(RowSepInsertTextHdl, OUString&, bool);
53  DECL_LINK(SepModifyHdl, weld::Entry&, void);
54  DECL_LINK(SepEditOnFocusHdl, weld::Widget&, void);
55 
56 private:
59  OUString maOldSepValue;
60 
63 
66 
68 
69  std::unique_ptr<weld::ComboBox> mxLbFormulaSyntax;
70  std::unique_ptr<weld::CheckButton> mxCbEnglishFuncName;
71 
72  std::unique_ptr<weld::RadioButton> mxBtnCustomCalcDefault;
73  std::unique_ptr<weld::RadioButton> mxBtnCustomCalcCustom;
74  std::unique_ptr<weld::Button> mxBtnCustomCalcDetails;
75 
76  std::unique_ptr<weld::Entry> mxEdSepFuncArg;
77  std::unique_ptr<weld::Entry> mxEdSepArrayCol;
78  std::unique_ptr<weld::Entry> mxEdSepArrayRow;
79  std::unique_ptr<weld::Button> mxBtnSepReset;
80 
81  std::unique_ptr<weld::ComboBox> mxLbOOXMLRecalcOptions;
82  std::unique_ptr<weld::ComboBox> mxLbODFRecalcOptions;
83 };
84 
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Unicode mnDecSep
Definition: tpformula.hxx:67
ScCalcConfig maSavedConfig
Definition: tpformula.hxx:61
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
Definition: tpformula.cxx:262
const SfxItemSet * pSet
std::unique_ptr< weld::RadioButton > mxBtnCustomCalcDefault
Definition: tpformula.hxx:72
ScDocOptions maSavedDocOptions
Definition: tpformula.hxx:64
std::unique_ptr< weld::Button > mxBtnSepReset
Definition: tpformula.hxx:79
std::unique_ptr< weld::RadioButton > mxBtnCustomCalcCustom
Definition: tpformula.hxx:73
sal_uInt16 sal_Unicode
std::unique_ptr< weld::CheckButton > mxCbEnglishFuncName
Definition: tpformula.hxx:70
std::unique_ptr< weld::Entry > mxEdSepFuncArg
Definition: tpformula.hxx:76
bool IsValidSeparator(const OUString &rSep, bool bArray) const
Definition: tpformula.cxx:134
std::unique_ptr< weld::ComboBox > mxLbODFRecalcOptions
Definition: tpformula.hxx:82
void LaunchCustomCalcSettings()
Definition: tpformula.cxx:124
std::unique_ptr< weld::Entry > mxEdSepArrayCol
Definition: tpformula.hxx:77
ScCalcConfig maCurrentConfig
Definition: tpformula.hxx:62
virtual void Reset(const SfxItemSet *rCoreSet) override
Definition: tpformula.cxx:326
Configuration options for formula interpreter.
Definition: calcconfig.hxx:43
std::unique_ptr< weld::ComboBox > mxLbFormulaSyntax
Definition: tpformula.hxx:69
ScDocOptions maCurrentDocOptions
Definition: tpformula.hxx:65
std::unique_ptr< weld::Entry > mxEdSepArrayRow
Definition: tpformula.hxx:78
virtual ~ScTpFormulaOptions() override
Definition: tpformula.cxx:83
void OnFocusSeparatorInput(weld::Entry *pEdit)
Definition: tpformula.cxx:96
void UpdateCustomCalcRadioButtons(bool bDefault)
Definition: tpformula.cxx:108
ScTpFormulaOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet)
Definition: tpformula.cxx:34
void ResetSeparators()
Definition: tpformula.cxx:87
DeactivateRC
DECL_LINK(ButtonHdl, weld::Button &, void)
std::unique_ptr< weld::ComboBox > mxLbOOXMLRecalcOptions
Definition: tpformula.hxx:81
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tpformula.cxx:408
OUString maOldSepValue
Stores old separator value of currently focused separator edit box.
Definition: tpformula.hxx:59
std::unique_ptr< weld::Button > mxBtnCustomCalcDetails
Definition: tpformula.hxx:74
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
Definition: tpformula.cxx:257