/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INCLUDED_SC_INC_FORMULAOPT_HXX #define INCLUDED_SC_INC_FORMULAOPT_HXX #include #include #include #include #include #include "scdllapi.h" #include "global.hxx" #include "calcconfig.hxx" class SC_DLLPUBLIC ScFormulaOptions { private: bool bUseEnglishFuncName; // use English function name even if the locale is not English. formula::FormulaGrammar::Grammar eFormulaGrammar; // formula grammar used to switch different formula syntax ScCalcConfig aCalcConfig; bool mbWriteCalcConfig; OUString aFormulaSepArg; OUString aFormulaSepArrayRow; OUString aFormulaSepArrayCol; ScRecalcOptions meOOXMLRecalc; ScRecalcOptions meODFRecalc; public: ScFormulaOptions(); ScFormulaOptions( const ScFormulaOptions& rCpy ); ~ScFormulaOptions(); void SetDefaults(); void SetFormulaSyntax( ::formula::FormulaGrammar::Grammar eGram ) { eFormulaGrammar = eGram; } ::formula::FormulaGrammar::Grammar GetFormulaSyntax() const { return eFormulaGrammar; } ScCalcConfig& GetCalcConfig() { return aCalcConfig; } const ScCalcConfig& GetCalcConfig() const { return aCalcConfig; } void SetCalcConfig(const ScCalcConfig& rConfig) { aCalcConfig = rConfig; } void SetUseEnglishFuncName( bool bVal ) { bUseEnglishFuncName = bVal; } bool GetUseEnglishFuncName() const { return bUseEnglishFuncName; } void SetWriteCalcConfig( bool bVal ) { mbWriteCalcConfig = bVal; } bool GetWriteCalcConfig() const { return mbWriteCalcConfig; } void SetFormulaSepArg(const OUString& rSep) { aFormulaSepArg = rSep; } const OUString& GetFormulaSepArg() const { return aFormulaSepArg; } void SetFormulaSepArrayRow(const OUString& rSep) { aFormulaSepArrayRow = rSep; } const OUString& GetFormulaSepArrayRow() const { return aFormulaSepArrayRow; } void SetFormulaSepArrayCol(const OUString& rSep) { aFormulaSepArrayCol = rSep; } const OUString& GetFormulaSepArrayCol() const { return aFormulaSepArrayCol; } void SetOOXMLRecalcOptions( ScRecalcOptions eOpt ) { meOOXMLRecalc = eOpt; } ScRecalcOptions GetOOXMLRecalcOptions() const { return meOOXMLRecalc; } void SetODFRecalcOptions( ScRecalcOptions eOpt ) { meODFRecalc = eOpt; } ScRecalcOptions GetODFRecalcOptions() const { return meODFRecalc; } void ResetFormulaSeparators(); static void GetDefaultFormulaSeparators(OUString& rSepArg, OUString& rSepArrayCol, OUString& rSepArrayRow); ScFormulaOptions& operator= ( const ScFormulaOptions& rCpy ); bool operator== ( const ScFormulaOptions& rOpt ) const; bool operator!= ( const ScFormulaOptions& rOpt ) const; }; // item for the dialog / options page class SC_DLLPUBLIC ScTpFormulaItem : public SfxPoolItem { public: ScTpFormulaItem( const ScFormulaOptions& rOpt ); ScTpFormulaItem( const ScTpFormulaItem& rItem ); virtual ~ScTpFormulaItem() override; virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; const ScFormulaOptions& GetFormulaOptions() const { return theOptions; } private: ScFormulaOptions theOptions; }; // config item class ScFormulaCfg : public ScFormulaOptions, public utl::ConfigItem { typedef std::map PropsToIds; static css::uno::Sequence GetPropertyNames(); static ScFormulaCfg::PropsToIds GetPropNamesToId(); void UpdateFromProperties( const css::uno::Sequence& rNames ); virtual void ImplCommit() override; public: ScFormulaCfg(); void SetOptions( const ScFormulaOptions& rNew ); virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override; }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ labora/cp-6.2'>distro/collabora/cp-6.2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2019-12-20tdf#122280: Hide Block selection mode from CalcAditya
2019-04-23Revert "tdf#122280: Hide Block selection mode from Calc"Jim Raykowski
2019-04-20tdf#122280: Hide Block selection mode from CalcAditya
2019-04-01tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*Gabor Kelemen
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
2018-12-08use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin
2018-04-25tdf#42949 Remove unnecessary localization headers of svxGabor Kelemen
2018-01-22tdf#100370 Selection icon now working properly on mouse clickKshitij Pathania
2017-10-23loplugin:includeform: svxStephan Bergmann
2017-07-21migrate to boost::gettextCaolán McNamara
2017-04-27remove svx bitmaps from .src filesCaolán McNamara
2017-04-12convert selection menu to .uiCaolán McNamara
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
2017-01-19svx: load BitmapEx resources instead of Image onesCaolán McNamara
2016-10-29HiDPI: remove unneeded image scaling when HiDPI is enabledTomaž Vajngerl
2016-06-23tdf#97527 - vcl: reference-count MenuNoel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2015-10-31com::sun::star->css in svxNoel Grandin
2015-10-01tdf#94559: third step to remove rtti.hxxOliver Specht
2015-08-11loplugin: defaultparamsNoel Grandin
2015-06-19rendercontext: Fix crash with double-buffering in the Styles combo box.Jan Holesovsky
2015-05-27cppcheck: noExplicitConstructorCaolán McNamara
2015-05-06convert BMP_SCALE constant to scoped enumNoel Grandin
2015-03-19loplugin:constantfunction: sfx2Noel Grandin
2014-10-20loplugin: cstylecastNoel Grandin
2014-09-12Turn SfxItemState into a C++11 scoped enumerationStephan Bergmann
2014-09-10Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULTStephan Bergmann
2014-08-19svx: Cleanup ASCII art and useless commentsChris Laplante
2014-08-18drop unnecessary shl.hxx includesCaolán McNamara
2014-03-27sfx2/stbitem.hxx: sal_Bool->boolNoel Grandin
2014-03-11remove osolete ifdefNorbert Thiebaud
2014-02-23Remove unneccessary commentsAlexander Wilms
2014-02-14protect macosx against the HiDPI hacksNorbert Thiebaud
2014-01-02hidpi: Really use BMP_SCALE_FAST when scaling the images.Keith Curtis
2013-12-20hidpi: Use the default scaling algorithm.Jan Holesovsky
2013-12-20hidpi: Make many places Hi-DPI aware.Keith Curtis
2013-09-05convert svx/source/stbctrls/*.cxx from String to OUStringNoel Grandin
2012-11-27re-base on ALv2 code. Includes:Michael Meeks