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 .
22 #include <sfx2/tabdlg.hxx>
24 #include <calcconfig.hxx>
25 #include <docoptio.hxx>
27 class ScTpFormulaOptions
: public SfxTabPage
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
;
36 virtual OUString
GetAllStrings() override
;
38 virtual bool FillItemSet(SfxItemSet
* rCoreSet
) override
;
39 virtual void Reset(const SfxItemSet
* rCoreSet
) override
;
40 virtual DeactivateRC
DeactivatePage(SfxItemSet
* pSet
) override
;
43 void ResetSeparators();
44 void OnFocusSeparatorInput(weld::Entry
* pEdit
);
45 void UpdateCustomCalcRadioButtons(bool bDefault
);
46 void LaunchCustomCalcSettings();
48 bool IsValidSeparator(std::u16string_view aSep
, bool bArray
) const;
50 DECL_LINK(ButtonHdl
, weld::Button
&, void);
51 DECL_LINK(ToggleHdl
, weld::Toggleable
&, void);
52 DECL_LINK(SepInsertTextHdl
, OUString
&, bool);
53 DECL_LINK(ColSepInsertTextHdl
, OUString
&, bool);
54 DECL_LINK(RowSepInsertTextHdl
, OUString
&, bool);
55 DECL_LINK(SepModifyHdl
, weld::Entry
&, void);
56 DECL_LINK(SepEditOnFocusHdl
, weld::Widget
&, void);
59 /** Stores old separator value of currently focused separator edit box.
60 This value is used to revert undesired value change. */
61 OUString maOldSepValue
;
63 ScCalcConfig maSavedConfig
;
64 ScCalcConfig maCurrentConfig
;
66 ScDocOptions maSavedDocOptions
;
67 ScDocOptions maCurrentDocOptions
;
71 std::unique_ptr
<weld::ComboBox
> mxLbFormulaSyntax
;
72 std::unique_ptr
<weld::CheckButton
> mxCbEnglishFuncName
;
74 std::unique_ptr
<weld::RadioButton
> mxBtnCustomCalcDefault
;
75 std::unique_ptr
<weld::RadioButton
> mxBtnCustomCalcCustom
;
76 std::unique_ptr
<weld::Button
> mxBtnCustomCalcDetails
;
78 std::unique_ptr
<weld::Entry
> mxEdSepFuncArg
;
79 std::unique_ptr
<weld::Entry
> mxEdSepArrayCol
;
80 std::unique_ptr
<weld::Entry
> mxEdSepArrayRow
;
81 std::unique_ptr
<weld::Button
> mxBtnSepReset
;
83 std::unique_ptr
<weld::ComboBox
> mxLbOOXMLRecalcOptions
;
84 std::unique_ptr
<weld::ComboBox
> mxLbODFRecalcOptions
;
85 std::unique_ptr
<weld::ComboBox
> mxLbRowHeightReCalcOptions
;
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */