21#include <osl/diagnose.h> 
   23#include <com/sun/star/uno/Any.hxx> 
   24#include <com/sun/star/uno/Sequence.hxx> 
  121    assert(SfxPoolItem::operator==(rItem));
 
  137#define SCCALCOPT_ITER_ITER         0 
  138#define SCCALCOPT_ITER_STEPS        1 
  139#define SCCALCOPT_ITER_MINCHG       2 
  140#define SCCALCOPT_DATE_DAY          3 
  141#define SCCALCOPT_DATE_MONTH        4 
  142#define SCCALCOPT_DATE_YEAR         5 
  143#define SCCALCOPT_DECIMALS          6 
  144#define SCCALCOPT_CASESENSITIVE     7 
  145#define SCCALCOPT_PRECISION         8 
  146#define SCCALCOPT_SEARCHCRIT        9 
  147#define SCCALCOPT_FINDLABEL         10 
  148#define SCCALCOPT_REGEX             11 
  149#define SCCALCOPT_WILDCARDS         12 
  153#define SCDOCLAYOUTOPT_TABSTOP      0 
  157    return {
"IterativeReference/Iteration",     
 
  158            "IterativeReference/Steps",         
 
  159            "IterativeReference/MinimumChange", 
 
  163            "Other/DecimalPlaces",              
 
  164            "Other/CaseSensitive",              
 
  166            "Other/SearchCriteria",             
 
  168            "Other/RegularExpressions",         
 
  175        return {
"TabStop/Metric"};    
 
  177        return {
"TabStop/NonMetric"}; 
 
  184    sal_Int32 nIntVal = 0;
 
  190    sal_uInt16 nDateDay, nDateMonth;
 
  192    GetDate( nDateDay, nDateMonth, nDateYear );
 
  197    pValues = aValues.getConstArray();
 
  198    OSL_ENSURE(aValues.getLength() == aNames.getLength(), 
"GetProperties failed");
 
  199    if(aValues.getLength() == aNames.getLength())
 
  201        double fDoubleVal = 0;
 
  202        for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
 
  204            OSL_ENSURE(
pValues[nProp].hasValue(), 
"property value missing");
 
  219                        if (
pValues[nProp] >>= nIntVal) nDateDay = 
static_cast<sal_uInt16
>(nIntVal);
 
  222                        if (
pValues[nProp] >>= nIntVal) nDateMonth = 
static_cast<sal_uInt16
>(nIntVal);
 
  225                        if (
pValues[nProp] >>= nIntVal) nDateYear = 
static_cast<sal_Int16
>(nIntVal);
 
  255    SetDate( nDateDay, nDateMonth, nDateYear );
 
  260    pValues = aValues.getConstArray();
 
  261    OSL_ENSURE(aValues.getLength() == aNames.getLength(), 
"GetProperties failed");
 
  262    if(aValues.getLength() == aNames.getLength())
 
  264        for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
 
  266            OSL_ENSURE(
pValues[nProp].hasValue(), 
"property value missing");
 
  273                        if (
pValues[nProp] >>= nIntVal)
 
  289    sal_uInt16 nDateDay, nDateMonth;
 
  291    GetDate( nDateDay, nDateMonth, nDateYear );
 
  293    for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
 
  301                pValues[nProp] <<= 
static_cast<sal_Int32
>(GetIterCount());
 
  304                pValues[nProp] <<= GetIterEps();
 
  307                pValues[nProp] <<= 
static_cast<sal_Int32
>(nDateDay);
 
  310                pValues[nProp] <<= 
static_cast<sal_Int32
>(nDateMonth);
 
  313                pValues[nProp] <<= 
static_cast<sal_Int32
>(nDateYear);
 
  316                pValues[nProp] <<= 
static_cast<sal_Int32
>(GetStdPrecision());
 
  320                pValues[nProp] <<= !IsIgnoreCase();
 
  323                pValues[nProp] <<= IsCalcAsShown();
 
  326                pValues[nProp] <<= IsMatchWholeCell();
 
  329                pValues[nProp] <<= IsLookUpColRowNames();
 
  332                pValues[nProp] <<= IsFormulaRegexEnabled();
 
  335                pValues[nProp] <<= IsFormulaWildcardsEnabled();
 
  339    aCalcItem.PutProperties(aNames, aValues);
 
  348    for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
 
  360    aLayoutItem.PutProperties(aNames, aValues);
 
const PropertyValue * pValues
ScLinkConfigItem aCalcItem
static css::uno::Sequence< OUString > GetCalcPropertyNames()
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
ScLinkConfigItem aLayoutItem
void SetOptions(const ScDocOptions &rNew)
bool bWriteCalcConfig
(subset of) Calc config will be written to user's profile
sal_uInt16 nIterCount
number
bool bMatchWholeCell
search criteria must match the whole cell
void GetDate(sal_uInt16 &rD, sal_uInt16 &rM, sal_Int16 &rY) const
bool bIsIter
iterations for circular refs
bool bDoAutoSpell
auto-spelling
utl::SearchParam::SearchType eFormulaSearchType
wildcards or regular expressions or normal search
void SetTabDistance(sal_uInt16 nTabDist)
void SetFormulaRegexEnabled(bool bVal)
bool bCalcAsShown
calculate as shown (wrt precision)
void SetCalcAsShown(bool bVal)
sal_uInt16 nYear2000
earlier 19YY is assumed, 20YY otherwise (if only YY of year is given)
bool bFormulaRegexEnabled
regular expressions in formulas enabled, only when reading settings
void SetIgnoreCase(bool bVal)
void SetLookUpColRowNames(bool bVal)
bool bIsIgnoreCase
ignore case for comparisons?
void SetFormulaWildcardsEnabled(bool bVal)
void SetIterEps(double fEps)
bool bFormulaWildcardsEnabled
wildcards in formulas enabled, only when reading settings
void SetMatchWholeCell(bool bVal)
void SetStdPrecision(sal_uInt16 n)
void SetDate(sal_uInt16 nD, sal_uInt16 nM, sal_Int16 nY)
bool bLookUpColRowNames
determine column-/row titles automagically
sal_uInt16 nTabDistance
distance of standard tabs
sal_uInt16 nDay
Null date:
void SetIterCount(sal_uInt16 nCount)
sal_uInt16 nPrecStandardFormat
precision for standard format
void SetCommitLink(const Link< ScLinkConfigItem &, void > &rLink)
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
static bool IsMetricSystem()
virtual ~ScTpCalcItem() override
virtual bool operator==(const SfxPoolItem &) const override
virtual ScTpCalcItem * Clone(SfxItemPool *pPool=nullptr) const override
ScTpCalcItem(sal_uInt16 nWhich, const ScDocOptions &rOpt)
static bool GetBoolFromAny(const css::uno::Any &aAny)
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
#define SCCALCOPT_ITER_MINCHG
#define SCCALCOPT_FINDLABEL
static sal_uInt16 lcl_GetDefaultTabDist()
#define SCCALCOPT_CASESENSITIVE
#define SCDOCLAYOUTOPT_TABSTOP
#define SCCALCOPT_DATE_MONTH
constexpr OUStringLiteral CFGPATH_DOCLAYOUT
#define SCCALCOPT_PRECISION
#define SCCALCOPT_DECIMALS
#define SCCALCOPT_ITER_ITER
IMPL_LINK_NOARG(ScDocCfg, CalcCommitHdl, ScLinkConfigItem &, void)
#define SCCALCOPT_DATE_YEAR
constexpr OUStringLiteral CFGPATH_CALC
#define SCCALCOPT_ITER_STEPS
#define SCCALCOPT_WILDCARDS
#define SCCALCOPT_DATE_DAY
#define SCCALCOPT_SEARCHCRIT
#define LINK(Instance, Class, Member)
constexpr auto toTwips(N number, Length from)
constexpr ::tools::Long TwipsToEvenHMM(::tools::Long nTwips)