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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_TPFORMULA_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_TPFORMULA_HXX
23 #include <sfx2/tabdlg.hxx>
25 #include <calcconfig.hxx>
26 #include <docoptio.hxx>
28 class ScTpFormulaOptions
: public SfxTabPage
31 explicit ScTpFormulaOptions(weld::Container
* pPage
, weld::DialogController
* pController
,
32 const SfxItemSet
& rCoreSet
);
33 static std::unique_ptr
<SfxTabPage
>
34 Create(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rCoreSet
);
35 virtual ~ScTpFormulaOptions() override
;
37 virtual bool FillItemSet(SfxItemSet
* rCoreSet
) override
;
38 virtual void Reset(const SfxItemSet
* rCoreSet
) override
;
39 virtual DeactivateRC
DeactivatePage(SfxItemSet
* pSet
) override
;
42 void ResetSeparators();
43 void OnFocusSeparatorInput(weld::Entry
* pEdit
);
44 void UpdateCustomCalcRadioButtons(bool bDefault
);
45 void LaunchCustomCalcSettings();
47 bool IsValidSeparator(const OUString
& rSep
, bool bArray
) const;
49 DECL_LINK(ButtonHdl
, weld::Button
&, 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);
57 /** Stores old separator value of currently focused separator edit box.
58 This value is used to revert undesired value change. */
59 OUString maOldSepValue
;
61 ScCalcConfig maSavedConfig
;
62 ScCalcConfig maCurrentConfig
;
64 ScDocOptions maSavedDocOptions
;
65 ScDocOptions maCurrentDocOptions
;
69 std::unique_ptr
<weld::ComboBox
> mxLbFormulaSyntax
;
70 std::unique_ptr
<weld::CheckButton
> mxCbEnglishFuncName
;
72 std::unique_ptr
<weld::RadioButton
> mxBtnCustomCalcDefault
;
73 std::unique_ptr
<weld::RadioButton
> mxBtnCustomCalcCustom
;
74 std::unique_ptr
<weld::Button
> mxBtnCustomCalcDetails
;
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
;
81 std::unique_ptr
<weld::ComboBox
> mxLbOOXMLRecalcOptions
;
82 std::unique_ptr
<weld::ComboBox
> mxLbODFRecalcOptions
;
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */