Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / ui / inc / tpformula.hxx
blob0b0ed6c51b0ae33e3ee7f0850bcb1be1854c6bd8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
24 #include <vcl/fixed.hxx>
25 #include <vcl/lstbox.hxx>
26 #include <vcl/edit.hxx>
27 #include <vcl/button.hxx>
29 #include "calcconfig.hxx"
30 #include "docoptio.hxx"
32 class ScTpFormulaOptions : public SfxTabPage
34 friend class VclPtr<ScTpFormulaOptions>;
35 public:
36 using SfxTabPage::DeactivatePage;
38 static VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreSet);
40 virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
41 virtual void Reset( const SfxItemSet* rCoreSet ) override;
42 virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
44 private:
45 explicit ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet);
46 virtual ~ScTpFormulaOptions();
47 virtual void dispose() override;
48 void ResetSeparators();
49 void OnFocusSeparatorInput(Edit* pEdit);
50 void UpdateCustomCalcRadioButtons(bool bDefault);
51 void LaunchCustomCalcSettings();
53 bool IsValidSeparator(const OUString& rSep) const;
54 bool IsValidSeparatorSet() const;
56 DECL_LINK_TYPED( ButtonHdl, Button*, void );
57 DECL_LINK_TYPED( SepModifyHdl, Edit&, void );
58 DECL_LINK_TYPED( SepEditOnFocusHdl, Control&, void );
60 private:
61 VclPtr<ListBox> mpLbFormulaSyntax;
62 VclPtr<CheckBox> mpCbEnglishFuncName;
64 VclPtr<RadioButton> mpBtnCustomCalcDefault;
65 VclPtr<RadioButton> mpBtnCustomCalcCustom;
66 VclPtr<PushButton> mpBtnCustomCalcDetails;
68 VclPtr<Edit> mpEdSepFuncArg;
69 VclPtr<Edit> mpEdSepArrayCol;
70 VclPtr<Edit> mpEdSepArrayRow;
71 VclPtr<PushButton> mpBtnSepReset;
73 VclPtr<ListBox> mpLbOOXMLRecalcOptions;
74 VclPtr<ListBox> mpLbODFRecalcOptions;
76 /** Stores old separator value of currently focused separator edit box.
77 This value is used to revert undesired value change. */
78 OUString maOldSepValue;
80 ScCalcConfig maSavedConfig;
81 ScCalcConfig maCurrentConfig;
83 ScDocOptions maSavedDocOptions;
84 ScDocOptions maCurrentDocOptions;
86 sal_Unicode mnDecSep;
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */