20#include <com/sun/star/uno/Any.hxx>
21#include <com/sun/star/uno/Sequence.hxx>
28#include <osl/diagnose.h>
131 sal_Int32* pArray =
aSeq.getArray();
133 pArray[
i] = pUShorts[
i];
137 rDest <<= Sequence<sal_Int32>(0);
147 OUString* pArray =
aSeq.getArray();
149 pArray[
i] = (*pUserList)[sal::static_int_cast<sal_uInt16>(
i)].GetString();
153 rDest <<= Sequence<OUString>(0);
158#define SCLAYOUTOPT_MEASURE 0
159#define SCLAYOUTOPT_STATUSBAR 1
160#define SCLAYOUTOPT_ZOOMVAL 2
161#define SCLAYOUTOPT_ZOOMTYPE 3
162#define SCLAYOUTOPT_SYNCZOOM 4
163#define SCLAYOUTOPT_STATUSBARMULTI 5
167#define SCINPUTOPT_LASTFUNCS 0
168#define SCINPUTOPT_AUTOINPUT 1
169#define SCINPUTOPT_DET_AUTO 2
173#define SCREVISOPT_CHANGE 0
174#define SCREVISOPT_INSERTION 1
175#define SCREVISOPT_DELETION 2
176#define SCREVISOPT_MOVEDENTRY 3
180#define SCCONTENTOPT_LINK 0
184#define SCSORTLISTOPT_LIST 0
188#define SCMISCOPT_DEFOBJWIDTH 0
189#define SCMISCOPT_DEFOBJHEIGHT 1
190#define SCMISCOPT_SHOWSHAREDDOCWARN 2
194#define SCCOMPATOPT_KEY_BINDING 0
197#define SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL 514
199#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL 1
202#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY 9
208 for ( sal_uInt32 nFunc = 1; nFunc < 32; ++nFunc )
209 if ( nFuncSet & ( 1U << nFunc ) )
218 return {(bIsMetric ? OUString(
"Other/MeasureUnit/Metric")
219 : OUString(
"Other/MeasureUnit/NonMetric")),
220 "Other/StatusbarFunction",
224 "Other/StatusbarMultiFunction"};
229 return {
"LastFunctions",
254 return {
"DefaultObjectSize/Width",
255 "DefaultObjectSize/Height",
256 "SharedDocument/ShowWarning"};
261 return {
"KeyBindings/BaseGroup"};
313 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
314 if (aValues.getLength() != aNames.getLength())
317 sal_uInt32 nStatusBarFuncSingle = 0;
318 sal_uInt32 nStatusBarFuncMulti = 0;
323 nStatusBarFuncSingle = nUIntVal;
325 nStatusBarFuncMulti = nUIntVal;
327 SetZoom(
static_cast<sal_uInt16
>(nIntVal));
337 if (nStatusBarFuncSingle)
350 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
351 if (aValues.getLength() != aNames.getLength())
359 std::vector<sal_uInt16> pUShorts(
nCount);
374 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
375 if (aValues.getLength() != aNames.getLength())
392 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
393 if (aValues.getLength() != aNames.getLength())
404 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
405 if (aValues.getLength() != aNames.getLength())
414 const bool bDefault = (
aSeq.getLength() == 1 &&
aSeq[0] ==
"NULL");
418 for (
const OUString& rStr : std::as_const(
aSeq))
433 OSL_ENSURE(aValues.getLength() == aNames.getLength(),
"GetProperties failed");
434 if (aValues.getLength() != aNames.getLength())
449 if (aValues.getLength() != aNames.getLength())
452 sal_Int32 nIntVal = 0;
463 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
468 pValues[nProp] <<=
static_cast<sal_Int32
>(GetAppMetric());
474 pValues[nProp] <<=
static_cast<sal_Int32
>(GetZoom());
477 pValues[nProp] <<=
static_cast<sal_Int32
>(GetZoomType());
480 pValues[nProp] <<= GetSynchronizeZoom();
483 pValues[nProp] <<= GetStatusFunc();
487 aLayoutItem.PutProperties(aNames, aValues);
498 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
506 pValues[nProp] <<= GetAutoComplete();
509 pValues[nProp] <<= GetDetectiveAuto();
513 aInputItem.PutProperties(aNames, aValues);
524 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
529 pValues[nProp] <<= GetTrackContentColor();
532 pValues[nProp] <<= GetTrackInsertColor();
535 pValues[nProp] <<= GetTrackDeleteColor();
538 pValues[nProp] <<= GetTrackMoveColor();
542 aRevisionItem.PutProperties(aNames, aValues);
553 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
558 pValues[nProp] <<=
static_cast<sal_Int32
>(GetLinkMode());
562 aContentItem.PutProperties(aNames, aValues);
573 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
582 aSortListItem.PutProperties(aNames, aValues);
593 for(
int nProp = 0; nProp < aNames.getLength(); nProp++)
598 pValues[nProp] <<= GetDefaultObjectSizeWidth();
601 pValues[nProp] <<= GetDefaultObjectSizeHeight();
604 pValues[nProp] <<= GetShowSharedDocumentWarning();
608 aMiscItem.PutProperties(aNames, aValues);
619 for (
int nProp = 0; nProp < aNames.getLength(); ++nProp)
624 pValues[nProp] <<=
static_cast<sal_Int32
>(GetKeyBindingType());
628 aCompatItem.PutProperties(aNames, aValues);
const PropertyValue * pValues
#define SCLAYOUTOPT_STATUSBARMULTI
#define SCLAYOUTOPT_STATUSBAR
#define SCCOMPATOPT_KEY_BINDING
#define SCLAYOUTOPT_SYNCZOOM
#define SCMISCOPT_DEFOBJHEIGHT
#define SCINPUTOPT_LASTFUNCS
#define SCREVISOPT_INSERTION
constexpr OUStringLiteral CFGPATH_SORTLIST
#define SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL
constexpr OUStringLiteral CFGPATH_COMPAT
#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY
#define SCREVISOPT_MOVEDENTRY
constexpr OUStringLiteral CFGPATH_INPUT
#define SCREVISOPT_DELETION
#define SCLAYOUTOPT_MEASURE
#define SCINPUTOPT_DET_AUTO
#define SCREVISOPT_CHANGE
#define SCLAYOUTOPT_ZOOMVAL
#define SCSORTLISTOPT_LIST
constexpr OUStringLiteral CFGPATH_LAYOUT
constexpr OUStringLiteral CFGPATH_CONTENT
#define SCCONTENTOPT_LINK
#define SCMISCOPT_DEFOBJWIDTH
static void lcl_GetSortList(Any &rDest)
IMPL_LINK_NOARG(ScAppCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
#define SCINPUTOPT_AUTOINPUT
static sal_uInt32 lcl_ConvertStatusBarFuncSetToSingle(sal_uInt32 nFuncSet)
#define SCMISCOPT_SHOWSHAREDDOCWARN
#define SCLAYOUTOPT_ZOOMTYPE
#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL
static void lcl_GetLastFunctions(Any &rDest, const ScAppOptions &rOpt)
constexpr OUStringLiteral CFGPATH_REVISION
constexpr OUStringLiteral CFGPATH_MISC
static css::uno::Sequence< OUString > GetInputPropertyNames()
ScLinkConfigItem aCompatItem
static css::uno::Sequence< OUString > GetSortListPropertyNames()
ScLinkConfigItem aInputItem
static css::uno::Sequence< OUString > GetMiscPropertyNames()
void SetOptions(const ScAppOptions &rNew)
ScLinkConfigItem aLayoutItem
split ScAppOptions into different classes
ScLinkConfigItem aContentItem
ScLinkConfigItem aMiscItem
ScLinkConfigItem aSortListItem
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
static css::uno::Sequence< OUString > GetCompatPropertyNames()
ScLinkConfigItem aRevisionItem
static css::uno::Sequence< OUString > GetRevisionPropertyNames()
static css::uno::Sequence< OUString > GetContentPropertyNames()
void SetStatusFunc(sal_uInt32 nNew)
sal_Int32 nDefaultObjectSizeWidth
void SetTrackInsertColor(Color nNew)
sal_uInt16 GetLRUFuncListCount() const
void SetTrackMoveColor(Color nNew)
void SetKeyBindingType(ScOptionsUtil::KeyBindingType e)
ScAppOptions & operator=(const ScAppOptions &rOpt)
void SetLRUFuncList(const sal_uInt16 *pList, const sal_uInt16 nCount)
void SetDetectiveAuto(bool bNew)
void SetZoom(sal_uInt16 nNew)
void SetDefaultObjectSizeHeight(sal_Int32 nNew)
sal_Int32 nDefaultObjectSizeHeight
void SetShowSharedDocumentWarning(bool bNew)
void SetAutoComplete(bool bNew)
void SetTrackDeleteColor(Color nNew)
std::unique_ptr< sal_uInt16[]> pLRUList
ScOptionsUtil::KeyBindingType meKeyBindingType
void SetTrackContentColor(Color nNew)
void SetZoomType(SvxZoomType eNew)
void SetAppMetric(FieldUnit eUnit)
void SetLinkMode(ScLkUpdMode nSet)
sal_uInt16 * GetLRUFuncList() const
void SetDefaultObjectSizeWidth(sal_Int32 nNew)
void SetSynchronizeZoom(bool bNew)
bool mbShowSharedDocumentWarning
static void SetUserList(const ScUserList *pNewList)
static SC_DLLPUBLIC ScUserList * GetUserList()
void SetCommitLink(const Link< ScLinkConfigItem &, void > &rLink)
void SetNotifyLink(const Link< ScLinkConfigItem &, void > &rLink)
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
static bool IsMetricSystem()
static bool GetBoolFromAny(const css::uno::Any &aAny)
Stores individual user-defined sort list.
Collection of user-defined sort lists.
void push_back(ScUserListData *p)
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define SC_OPCODE_AVERAGE
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq