20#undef SC_DLLIMPLEMENTATION
29#include <officecfg/Office/Calc.hxx>
35 :
SfxTabPage(pPage, pController,
"modules/scalc/ui/optformula.ui",
"OptFormula", &rCoreAttrs)
37 , mxLbFormulaSyntax(m_xBuilder->weld_combo_box(
"formulasyntax"))
38 , mxCbEnglishFuncName(m_xBuilder->weld_check_button(
"englishfuncname"))
39 , mxBtnCustomCalcDefault(m_xBuilder->weld_radio_button(
"calcdefault"))
40 , mxBtnCustomCalcCustom(m_xBuilder->weld_radio_button(
"calccustom"))
41 , mxBtnCustomCalcDetails(m_xBuilder->weld_button(
"details"))
42 , mxEdSepFuncArg(m_xBuilder->weld_entry(
"function"))
43 , mxEdSepArrayCol(m_xBuilder->weld_entry(
"arraycolumn"))
44 , mxEdSepArrayRow(m_xBuilder->weld_entry(
"arrayrow"))
45 , mxBtnSepReset(m_xBuilder->weld_button(
"reset"))
46 , mxLbOOXMLRecalcOptions(m_xBuilder->weld_combo_box(
"ooxmlrecalc"))
47 , mxLbODFRecalcOptions(m_xBuilder->weld_combo_box(
"odfrecalc"))
77 mnDecSep = aSep.isEmpty() ?
u'.' : aSep[0];
88 OUString aFuncArg, aArrayCol, aArrayRow;
102 OUString sSepValue = pEdit->
get_text();
103 if (!sSepValue.isEmpty())
135 if (aSep.size() != 1)
145 if (c <= 0x20 || c == 0x7f)
149 if ((
'a' <= c && c <=
'z') || (
'A' <= c && c <=
'Z') || (
'0' <= c && c <=
'9'))
206 if (&rBtn == mxBtnSepReset.get())
208 else if (&rBtn == mxBtnCustomCalcDetails.get())
209 LaunchCustomCalcSettings();
214 if (!rBtn.get_active())
216 if (mxBtnCustomCalcDefault->get_active())
217 UpdateCustomCalcRadioButtons(
true);
218 else if (mxBtnCustomCalcCustom->get_active())
219 UpdateCustomCalcRadioButtons(
false);
224 if (!IsValidSeparator(rTest,
false) && !maOldSepValue.isEmpty())
226 rTest = maOldSepValue;
233 if ((!IsValidSeparator(rTest,
true) || rTest == mxEdSepArrayCol->get_text()) && !maOldSepValue.isEmpty())
234 rTest = maOldSepValue;
241 if ((!IsValidSeparator(rTest,
true) || rTest == mxEdSepArrayRow->get_text()) && !maOldSepValue.isEmpty())
242 rTest = maOldSepValue;
248 OnFocusSeparatorInput(&rEdit);
253 OnFocusSeparatorInput(
dynamic_cast<weld::Entry*
>(&rControl));
258 return std::make_unique<ScTpFormulaOptions>(pPage, pController, *rCoreSet);
329 aOpt = pItem->GetFormulaOptions();
336 case ::formula::FormulaGrammar::GRAM_NATIVE:
339 case ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1:
342 case ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1:
350 mxLbFormulaSyntax->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::Grammar::isReadOnly() );
355 mxLbOOXMLRecalcOptions->set_sensitive( !officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::isReadOnly() );
360 mxLbODFRecalcOptions->set_sensitive( !officecfg::Office::Calc::Formula::Load::ODFRecalcMode::isReadOnly() );
365 mxCbEnglishFuncName->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::EnglishFunctionName::isReadOnly() );
386 mxEdSepFuncArg->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::SeparatorArg::isReadOnly() );
387 mxEdSepArrayCol->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayCol::isReadOnly() );
388 mxEdSepArrayRow->set_sensitive( !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayRow::isReadOnly() );
389 mxBtnSepReset->set_sensitive ( !officecfg::Office::Calc::Formula::Syntax::SeparatorArg::isReadOnly() &&
390 !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayCol::isReadOnly() &&
391 !officecfg::Office::Calc::Formula::Syntax::SeparatorArrayRow::isReadOnly() );
408 return DeactivateRC::KeepPage;
const OUString & getNumDecimalSep() const
bool GetWriteCalcConfig() const
const ScCalcConfig & GetConfig() const
bool IsWriteCalcConfig() const
void SetWriteCalcConfig(bool bVal)
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
weld::Window * GetFrameWeld() const
virtual void select_region(int nStartPos, int nEndPos)=0
virtual OUString get_text() const=0
#define LINK(Instance, Class, Member)
OUString ScResId(TranslateId aId)