LibreOffice Module sc (master) 1
appoptio.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <com/sun/star/uno/Any.hxx>
21#include <com/sun/star/uno/Sequence.hxx>
22#include <appoptio.hxx>
23#include <global.hxx>
24#include <userlist.hxx>
25#include <formula/compiler.hxx>
26#include <miscuno.hxx>
27#include <vector>
28#include <osl/diagnose.h>
29
30using namespace utl;
31using namespace com::sun::star::uno;
32
33// ScAppOptions - Application Options
34
36{
38}
39
41{
42 *this = rCpy;
43}
44
46{
47}
48
50{
52 eMetric = FieldUnit::CM; // default for countries with metric system
53 else
54 eMetric = FieldUnit::INCH; // default for others
55
56 nZoom = 100;
57 eZoomType = SvxZoomType::PERCENT;
58 bSynchronizeZoom = true;
60 bAutoComplete = true;
61 bDetectiveAuto = true;
62
63 pLRUList.reset( new sal_uInt16[5] ); // sensible initialization
69 nLRUFuncCount = 5;
70
76
79
81
83}
84
86{
87 eMetric = rCpy.eMetric;
88 eZoomType = rCpy.eZoomType;
90 nZoom = rCpy.nZoom;
91 SetLRUFuncList( rCpy.pLRUList.get(), rCpy.nLRUFuncCount );
99 eLinkMode = rCpy.eLinkMode;
104 return *this;
105}
106
107void ScAppOptions::SetLRUFuncList( const sal_uInt16* pList, const sal_uInt16 nCount )
108{
110
111 if ( nLRUFuncCount > 0 )
112 {
113 pLRUList.reset( new sal_uInt16[nLRUFuncCount] );
114
115 for ( sal_uInt16 i=0; i<nLRUFuncCount; i++ )
116 pLRUList[i] = pList[i];
117 }
118 else
119 pLRUList.reset();
120}
121
122// Config Item containing app options
123
124static void lcl_GetLastFunctions( Any& rDest, const ScAppOptions& rOpt )
125{
127 sal_uInt16* pUShorts = rOpt.GetLRUFuncList();
128 if ( nCount && pUShorts )
129 {
131 sal_Int32* pArray = aSeq.getArray();
132 for (tools::Long i=0; i<nCount; i++)
133 pArray[i] = pUShorts[i];
134 rDest <<= aSeq;
135 }
136 else
137 rDest <<= Sequence<sal_Int32>(0); // empty
138}
139
140static void lcl_GetSortList( Any& rDest )
141{
142 const ScUserList* pUserList = ScGlobal::GetUserList();
143 if (pUserList)
144 {
145 size_t nCount = pUserList->size();
147 OUString* pArray = aSeq.getArray();
148 for (size_t i=0; i<nCount; ++i)
149 pArray[i] = (*pUserList)[sal::static_int_cast<sal_uInt16>(i)].GetString();
150 rDest <<= aSeq;
151 }
152 else
153 rDest <<= Sequence<OUString>(0); // empty
154}
155
156constexpr OUStringLiteral CFGPATH_LAYOUT = u"Office.Calc/Layout";
157
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
164
165constexpr OUStringLiteral CFGPATH_INPUT = u"Office.Calc/Input";
166
167#define SCINPUTOPT_LASTFUNCS 0
168#define SCINPUTOPT_AUTOINPUT 1
169#define SCINPUTOPT_DET_AUTO 2
170
171constexpr OUStringLiteral CFGPATH_REVISION = u"Office.Calc/Revision/Color";
172
173#define SCREVISOPT_CHANGE 0
174#define SCREVISOPT_INSERTION 1
175#define SCREVISOPT_DELETION 2
176#define SCREVISOPT_MOVEDENTRY 3
177
178constexpr OUStringLiteral CFGPATH_CONTENT = u"Office.Calc/Content/Update";
179
180#define SCCONTENTOPT_LINK 0
181
182constexpr OUStringLiteral CFGPATH_SORTLIST = u"Office.Calc/SortList";
183
184#define SCSORTLISTOPT_LIST 0
185
186constexpr OUStringLiteral CFGPATH_MISC = u"Office.Calc/Misc";
187
188#define SCMISCOPT_DEFOBJWIDTH 0
189#define SCMISCOPT_DEFOBJHEIGHT 1
190#define SCMISCOPT_SHOWSHAREDDOCWARN 2
191
192constexpr OUStringLiteral CFGPATH_COMPAT = u"Office.Calc/Compatibility";
193
194#define SCCOMPATOPT_KEY_BINDING 0
195
196// Default value of Layout/Other/StatusbarMultiFunction
197#define SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL 514
198// Default value of Layout/Other/StatusbarFunction
199#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL 1
200// Legacy default value of Layout/Other/StatusbarFunction
201// prior to multiple statusbar functions feature addition
202#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY 9
203
204static sal_uInt32 lcl_ConvertStatusBarFuncSetToSingle( sal_uInt32 nFuncSet )
205{
206 if ( !nFuncSet )
207 return 0;
208 for ( sal_uInt32 nFunc = 1; nFunc < 32; ++nFunc )
209 if ( nFuncSet & ( 1U << nFunc ) )
210 return nFunc;
211 return 0;
212}
213
215{
216 const bool bIsMetric = ScOptionsUtil::IsMetricSystem();
217
218 return {(bIsMetric ? OUString("Other/MeasureUnit/Metric")
219 : OUString("Other/MeasureUnit/NonMetric")), // SCLAYOUTOPT_MEASURE
220 "Other/StatusbarFunction", // SCLAYOUTOPT_STATUSBAR
221 "Zoom/Value", // SCLAYOUTOPT_ZOOMVAL
222 "Zoom/Type", // SCLAYOUTOPT_ZOOMTYPE
223 "Zoom/Synchronize", // SCLAYOUTOPT_SYNCZOOM
224 "Other/StatusbarMultiFunction"}; // SCLAYOUTOPT_STATUSBARMULTI
225}
226
228{
229 return {"LastFunctions", // SCINPUTOPT_LASTFUNCS
230 "AutoInput", // SCINPUTOPT_AUTOINPUT
231 "DetectiveAuto"}; // SCINPUTOPT_DET_AUTO
232}
233
235{
236 return {"Change", // SCREVISOPT_CHANGE
237 "Insertion", // SCREVISOPT_INSERTION
238 "Deletion", // SCREVISOPT_DELETION
239 "MovedEntry"}; // SCREVISOPT_MOVEDENTRY
240}
241
243{
244 return {"Link"}; // SCCONTENTOPT_LINK
245}
246
248{
249 return {"List"}; // SCSORTLISTOPT_LIST
250}
251
253{
254 return {"DefaultObjectSize/Width", // SCMISCOPT_DEFOBJWIDTH
255 "DefaultObjectSize/Height", // SCMISCOPT_DEFOBJHEIGHT
256 "SharedDocument/ShowWarning"}; // SCMISCOPT_SHOWSHAREDDOCWARN
257}
258
260{
261 return {"KeyBindings/BaseGroup"}; // SCCOMPATOPT_KEY_BINDING
262}
263
265 aLayoutItem( CFGPATH_LAYOUT ),
266 aInputItem( CFGPATH_INPUT ),
267 aRevisionItem( CFGPATH_REVISION ),
268 aContentItem( CFGPATH_CONTENT ),
269 aSortListItem( CFGPATH_SORTLIST ),
270 aMiscItem( CFGPATH_MISC ),
271 aCompatItem( CFGPATH_COMPAT )
272{
275 aLayoutItem.SetCommitLink( LINK( this, ScAppCfg, LayoutCommitHdl ) );
276 aLayoutItem.SetNotifyLink( LINK( this, ScAppCfg, LayoutNotifyHdl ) );
277
279 ReadInputCfg();
280 aInputItem.SetCommitLink( LINK( this, ScAppCfg, InputCommitHdl ) );
281 aInputItem.SetNotifyLink( LINK( this, ScAppCfg, InputNotifyHdl ) );
282
285 aRevisionItem.SetCommitLink( LINK( this, ScAppCfg, RevisionCommitHdl ) );
286 aRevisionItem.SetNotifyLink( LINK( this, ScAppCfg, RevisionNotifyHdl ) );
287
290 aContentItem.SetCommitLink( LINK( this, ScAppCfg, ContentCommitHdl ) );
291 aContentItem.SetNotifyLink( LINK( this, ScAppCfg, ContentNotifyHdl ) );
292
295 aSortListItem.SetCommitLink( LINK( this, ScAppCfg, SortListCommitHdl ) );
296 aSortListItem.SetNotifyLink( LINK( this, ScAppCfg, SortListNotifyHdl ) );
297
299 ReadMiscCfg();
300 aMiscItem.SetCommitLink( LINK( this, ScAppCfg, MiscCommitHdl ) );
301 aMiscItem.SetNotifyLink( LINK( this, ScAppCfg, MiscNotifyHdl ) );
302
305 aCompatItem.SetCommitLink( LINK(this, ScAppCfg, CompatCommitHdl) );
306 aCompatItem.SetNotifyLink( LINK(this, ScAppCfg, CompatNotifyHdl) );
307}
308
310{
312 const Sequence<Any> aValues = aLayoutItem.GetProperties(aNames);
313 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
314 if (aValues.getLength() != aNames.getLength())
315 return;
316
317 sal_uInt32 nStatusBarFuncSingle = 0;
318 sal_uInt32 nStatusBarFuncMulti = 0;
319
320 if (sal_Int32 nIntVal; aValues[SCLAYOUTOPT_MEASURE] >>= nIntVal)
321 SetAppMetric(static_cast<FieldUnit>(nIntVal));
322 if (sal_uInt32 nUIntVal; aValues[SCLAYOUTOPT_STATUSBAR] >>= nUIntVal)
323 nStatusBarFuncSingle = nUIntVal;
324 if (sal_uInt32 nUIntVal; aValues[SCLAYOUTOPT_STATUSBARMULTI] >>= nUIntVal)
325 nStatusBarFuncMulti = nUIntVal;
326 if (sal_Int32 nIntVal; aValues[SCLAYOUTOPT_ZOOMVAL] >>= nIntVal)
327 SetZoom(static_cast<sal_uInt16>(nIntVal));
328 if (sal_Int32 nIntVal; aValues[SCLAYOUTOPT_ZOOMTYPE] >>= nIntVal)
329 SetZoomType(static_cast<SvxZoomType>(nIntVal));
331
332 if (nStatusBarFuncMulti != SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL)
333 SetStatusFunc(nStatusBarFuncMulti);
334 else if (nStatusBarFuncSingle != SCLAYOUTOPT_STATUSBAR_DEFAULTVAL
335 && nStatusBarFuncSingle != SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY)
336 {
337 if (nStatusBarFuncSingle)
338 SetStatusFunc(1 << nStatusBarFuncSingle);
339 else
340 SetStatusFunc(0);
341 }
342 else
344}
345
347{
349 const Sequence<Any> aValues = aInputItem.GetProperties(aNames);
350 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
351 if (aValues.getLength() != aNames.getLength())
352 return;
353
355 {
356 sal_Int32 nCount = aSeq.getLength();
358 {
359 std::vector<sal_uInt16> pUShorts(nCount);
360 for (sal_Int32 i = 0; i < nCount; i++)
361 pUShorts[i] = aSeq[i];
362
363 SetLRUFuncList(pUShorts.data(), nCount);
364 }
365 }
368}
369
371{
373 const Sequence<Any> aValues = aRevisionItem.GetProperties(aNames);
374 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
375 if (aValues.getLength() != aNames.getLength())
376 return;
377
378 if (sal_Int32 nIntVal; aValues[SCREVISOPT_CHANGE] >>= nIntVal)
380 if (sal_Int32 nIntVal; aValues[SCREVISOPT_INSERTION] >>= nIntVal)
382 if (sal_Int32 nIntVal; aValues[SCREVISOPT_DELETION] >>= nIntVal)
384 if (sal_Int32 nIntVal; aValues[SCREVISOPT_MOVEDENTRY] >>= nIntVal)
386}
387
389{
391 const Sequence<Any> aValues = aContentItem.GetProperties(aNames);
392 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
393 if (aValues.getLength() != aNames.getLength())
394 return;
395
396 if (sal_Int32 nIntVal; aValues[SCCONTENTOPT_LINK] >>= nIntVal)
397 SetLinkMode(static_cast<ScLkUpdMode>(nIntVal));
398}
399
401{
403 const Sequence<Any> aValues = aSortListItem.GetProperties(aNames);
404 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
405 if (aValues.getLength() != aNames.getLength())
406 return;
407
409 {
410 ScUserList aList(false); // Do not init defaults
411
412 // if setting is "default", keep default values
413 //TODO: mark "default" in a safe way
414 const bool bDefault = (aSeq.getLength() == 1 && aSeq[0] == "NULL");
415
416 if (bDefault)
417 {
418 aList.AddDefaults();
419 }
420 else
421 {
422 for (const OUString& rStr : std::as_const(aSeq))
423 {
424 aList.emplace_back(rStr);
425 }
426 }
427
428 ScGlobal::SetUserList(&aList);
429 }
430}
431
433{
435 const Sequence<Any> aValues = aMiscItem.GetProperties(aNames);
436 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
437 if (aValues.getLength() != aNames.getLength())
438 return;
439
440 if (sal_Int32 nIntVal; aValues[SCMISCOPT_DEFOBJWIDTH] >>= nIntVal)
442 if (sal_Int32 nIntVal; aValues[SCMISCOPT_DEFOBJHEIGHT] >>= nIntVal)
446}
447
449{
451 const Sequence<Any> aValues = aCompatItem.GetProperties(aNames);
452 if (aValues.getLength() != aNames.getLength())
453 return;
454
455 sal_Int32 nIntVal = 0; // 0 = 'Default'
456 aValues[SCCOMPATOPT_KEY_BINDING] >>= nIntVal;
458}
459
461{
462 Sequence<OUString> aNames = GetLayoutPropertyNames();
463 Sequence<Any> aValues(aNames.getLength());
464 Any* pValues = aValues.getArray();
465
466 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
467 {
468 switch(nProp)
469 {
471 pValues[nProp] <<= static_cast<sal_Int32>(GetAppMetric());
472 break;
474 pValues[nProp] <<= lcl_ConvertStatusBarFuncSetToSingle( GetStatusFunc() );
475 break;
477 pValues[nProp] <<= static_cast<sal_Int32>(GetZoom());
478 break;
480 pValues[nProp] <<= static_cast<sal_Int32>(GetZoomType());
481 break;
483 pValues[nProp] <<= GetSynchronizeZoom();
484 break;
486 pValues[nProp] <<= GetStatusFunc();
487 break;
488 }
489 }
490 aLayoutItem.PutProperties(aNames, aValues);
491}
492
493IMPL_LINK_NOARG(ScAppCfg, LayoutNotifyHdl, ScLinkConfigItem&, void) { ReadLayoutCfg(); }
494
496{
497 Sequence<OUString> aNames = GetInputPropertyNames();
498 Sequence<Any> aValues(aNames.getLength());
499 Any* pValues = aValues.getArray();
500
501 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
502 {
503 switch(nProp)
504 {
506 lcl_GetLastFunctions( pValues[nProp], *this );
507 break;
509 pValues[nProp] <<= GetAutoComplete();
510 break;
512 pValues[nProp] <<= GetDetectiveAuto();
513 break;
514 }
515 }
516 aInputItem.PutProperties(aNames, aValues);
517}
518
519IMPL_LINK_NOARG(ScAppCfg, InputNotifyHdl, ScLinkConfigItem&, void) { ReadInputCfg(); }
520
521IMPL_LINK_NOARG(ScAppCfg, RevisionCommitHdl, ScLinkConfigItem&, void)
522{
523 Sequence<OUString> aNames = GetRevisionPropertyNames();
524 Sequence<Any> aValues(aNames.getLength());
525 Any* pValues = aValues.getArray();
526
527 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
528 {
529 switch(nProp)
530 {
532 pValues[nProp] <<= GetTrackContentColor();
533 break;
535 pValues[nProp] <<= GetTrackInsertColor();
536 break;
538 pValues[nProp] <<= GetTrackDeleteColor();
539 break;
541 pValues[nProp] <<= GetTrackMoveColor();
542 break;
543 }
544 }
545 aRevisionItem.PutProperties(aNames, aValues);
546}
547
548IMPL_LINK_NOARG(ScAppCfg, RevisionNotifyHdl, ScLinkConfigItem&, void) { ReadRevisionCfg(); }
549
550IMPL_LINK_NOARG(ScAppCfg, ContentCommitHdl, ScLinkConfigItem&, void)
551{
552 Sequence<OUString> aNames = GetContentPropertyNames();
553 Sequence<Any> aValues(aNames.getLength());
554 Any* pValues = aValues.getArray();
555
556 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
557 {
558 switch(nProp)
559 {
561 pValues[nProp] <<= static_cast<sal_Int32>(GetLinkMode());
562 break;
563 }
564 }
565 aContentItem.PutProperties(aNames, aValues);
566}
567
568IMPL_LINK_NOARG(ScAppCfg, ContentNotifyHdl, ScLinkConfigItem&, void) { ReadContentCfg(); }
569
570IMPL_LINK_NOARG(ScAppCfg, SortListCommitHdl, ScLinkConfigItem&, void)
571{
572 Sequence<OUString> aNames = GetSortListPropertyNames();
573 Sequence<Any> aValues(aNames.getLength());
574 Any* pValues = aValues.getArray();
575
576 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
577 {
578 switch(nProp)
579 {
581 lcl_GetSortList( pValues[nProp] );
582 break;
583 }
584 }
585 aSortListItem.PutProperties(aNames, aValues);
586}
587
588IMPL_LINK_NOARG(ScAppCfg, SortListNotifyHdl, ScLinkConfigItem&, void) { ReadSortListCfg(); }
589
591{
592 Sequence<OUString> aNames = GetMiscPropertyNames();
593 Sequence<Any> aValues(aNames.getLength());
594 Any* pValues = aValues.getArray();
595
596 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
597 {
598 switch(nProp)
599 {
601 pValues[nProp] <<= GetDefaultObjectSizeWidth();
602 break;
604 pValues[nProp] <<= GetDefaultObjectSizeHeight();
605 break;
607 pValues[nProp] <<= GetShowSharedDocumentWarning();
608 break;
609 }
610 }
611 aMiscItem.PutProperties(aNames, aValues);
612}
613
614IMPL_LINK_NOARG(ScAppCfg, MiscNotifyHdl, ScLinkConfigItem&, void) { ReadMiscCfg(); }
615
617{
618 Sequence<OUString> aNames = GetCompatPropertyNames();
619 Sequence<Any> aValues(aNames.getLength());
620 Any* pValues = aValues.getArray();
621
622 for (int nProp = 0; nProp < aNames.getLength(); ++nProp)
623 {
624 switch(nProp)
625 {
627 pValues[nProp] <<= static_cast<sal_Int32>(GetKeyBindingType());
628 break;
629 }
630 }
631 aCompatItem.PutProperties(aNames, aValues);
632}
633
634IMPL_LINK_NOARG(ScAppCfg, CompatNotifyHdl, ScLinkConfigItem&, void) { ReadCompatCfg(); }
635
637{
638 *static_cast<ScAppOptions*>(this) = rNew;
639
647
655}
656
657/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
#define SCLAYOUTOPT_STATUSBARMULTI
Definition: appoptio.cxx:163
#define SCLAYOUTOPT_STATUSBAR
Definition: appoptio.cxx:159
#define SCCOMPATOPT_KEY_BINDING
Definition: appoptio.cxx:194
#define SCLAYOUTOPT_SYNCZOOM
Definition: appoptio.cxx:162
#define SCMISCOPT_DEFOBJHEIGHT
Definition: appoptio.cxx:189
#define SCINPUTOPT_LASTFUNCS
Definition: appoptio.cxx:167
#define SCREVISOPT_INSERTION
Definition: appoptio.cxx:174
constexpr OUStringLiteral CFGPATH_SORTLIST
Definition: appoptio.cxx:182
#define SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL
Definition: appoptio.cxx:197
constexpr OUStringLiteral CFGPATH_COMPAT
Definition: appoptio.cxx:192
#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY
Definition: appoptio.cxx:202
#define SCREVISOPT_MOVEDENTRY
Definition: appoptio.cxx:176
constexpr OUStringLiteral CFGPATH_INPUT
Definition: appoptio.cxx:165
#define SCREVISOPT_DELETION
Definition: appoptio.cxx:175
#define SCLAYOUTOPT_MEASURE
Definition: appoptio.cxx:158
#define SCINPUTOPT_DET_AUTO
Definition: appoptio.cxx:169
#define SCREVISOPT_CHANGE
Definition: appoptio.cxx:173
#define SCLAYOUTOPT_ZOOMVAL
Definition: appoptio.cxx:160
#define SCSORTLISTOPT_LIST
Definition: appoptio.cxx:184
constexpr OUStringLiteral CFGPATH_LAYOUT
Definition: appoptio.cxx:156
constexpr OUStringLiteral CFGPATH_CONTENT
Definition: appoptio.cxx:178
#define SCCONTENTOPT_LINK
Definition: appoptio.cxx:180
#define SCMISCOPT_DEFOBJWIDTH
Definition: appoptio.cxx:188
static void lcl_GetSortList(Any &rDest)
Definition: appoptio.cxx:140
IMPL_LINK_NOARG(ScAppCfg, LayoutCommitHdl, ScLinkConfigItem &, void)
Definition: appoptio.cxx:460
#define SCINPUTOPT_AUTOINPUT
Definition: appoptio.cxx:168
static sal_uInt32 lcl_ConvertStatusBarFuncSetToSingle(sal_uInt32 nFuncSet)
Definition: appoptio.cxx:204
#define SCMISCOPT_SHOWSHAREDDOCWARN
Definition: appoptio.cxx:190
#define SCLAYOUTOPT_ZOOMTYPE
Definition: appoptio.cxx:161
#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL
Definition: appoptio.cxx:199
static void lcl_GetLastFunctions(Any &rDest, const ScAppOptions &rOpt)
Definition: appoptio.cxx:124
constexpr OUStringLiteral CFGPATH_REVISION
Definition: appoptio.cxx:171
constexpr OUStringLiteral CFGPATH_MISC
Definition: appoptio.cxx:186
static css::uno::Sequence< OUString > GetInputPropertyNames()
Definition: appoptio.cxx:227
ScLinkConfigItem aCompatItem
Definition: appoptio.hxx:117
void ReadCompatCfg()
Definition: appoptio.cxx:448
static css::uno::Sequence< OUString > GetSortListPropertyNames()
Definition: appoptio.cxx:247
ScLinkConfigItem aInputItem
Definition: appoptio.hxx:112
static css::uno::Sequence< OUString > GetMiscPropertyNames()
Definition: appoptio.cxx:252
void SetOptions(const ScAppOptions &rNew)
Definition: appoptio.cxx:636
ScLinkConfigItem aLayoutItem
split ScAppOptions into different classes
Definition: appoptio.hxx:111
ScLinkConfigItem aContentItem
Definition: appoptio.hxx:114
ScLinkConfigItem aMiscItem
Definition: appoptio.hxx:116
ScLinkConfigItem aSortListItem
Definition: appoptio.hxx:115
static css::uno::Sequence< OUString > GetLayoutPropertyNames()
Definition: appoptio.cxx:214
void ReadMiscCfg()
Definition: appoptio.cxx:432
static css::uno::Sequence< OUString > GetCompatPropertyNames()
Definition: appoptio.cxx:259
void ReadSortListCfg()
Definition: appoptio.cxx:400
void ReadLayoutCfg()
Definition: appoptio.cxx:309
void ReadInputCfg()
Definition: appoptio.cxx:346
void ReadRevisionCfg()
Definition: appoptio.cxx:370
ScLinkConfigItem aRevisionItem
Definition: appoptio.hxx:113
static css::uno::Sequence< OUString > GetRevisionPropertyNames()
Definition: appoptio.cxx:234
void ReadContentCfg()
Definition: appoptio.cxx:388
static css::uno::Sequence< OUString > GetContentPropertyNames()
Definition: appoptio.cxx:242
bool bAutoComplete
Definition: appoptio.hxx:91
sal_uInt16 nZoom
Definition: appoptio.hxx:88
void SetStatusFunc(sal_uInt32 nNew)
Definition: appoptio.hxx:51
sal_Int32 nDefaultObjectSizeWidth
Definition: appoptio.hxx:98
void SetTrackInsertColor(Color nNew)
Definition: appoptio.hxx:60
sal_uInt16 GetLRUFuncListCount() const
Definition: appoptio.hxx:47
bool bDetectiveAuto
Definition: appoptio.hxx:92
void SetTrackMoveColor(Color nNew)
Definition: appoptio.hxx:64
sal_uInt16 nLRUFuncCount
Definition: appoptio.hxx:84
void SetKeyBindingType(ScOptionsUtil::KeyBindingType e)
Definition: appoptio.hxx:78
Color nTrackContentColor
Definition: appoptio.hxx:93
ScAppOptions & operator=(const ScAppOptions &rOpt)
Definition: appoptio.cxx:85
void SetLRUFuncList(const sal_uInt16 *pList, const sal_uInt16 nCount)
Definition: appoptio.cxx:107
void SetDetectiveAuto(bool bNew)
Definition: appoptio.hxx:55
void SetZoom(sal_uInt16 nNew)
Definition: appoptio.hxx:41
void SetDefaultObjectSizeHeight(sal_Int32 nNew)
Definition: appoptio.hxx:72
FieldUnit eMetric
Definition: appoptio.hxx:83
sal_Int32 nDefaultObjectSizeHeight
Definition: appoptio.hxx:99
Color nTrackInsertColor
Definition: appoptio.hxx:94
ScLkUpdMode eLinkMode
Definition: appoptio.hxx:97
void SetShowSharedDocumentWarning(bool bNew)
Definition: appoptio.hxx:75
void SetAutoComplete(bool bNew)
Definition: appoptio.hxx:53
SvxZoomType eZoomType
Definition: appoptio.hxx:87
void SetTrackDeleteColor(Color nNew)
Definition: appoptio.hxx:62
std::unique_ptr< sal_uInt16[]> pLRUList
Definition: appoptio.hxx:86
ScOptionsUtil::KeyBindingType meKeyBindingType
Definition: appoptio.hxx:101
void SetTrackContentColor(Color nNew)
Definition: appoptio.hxx:58
void SetZoomType(SvxZoomType eNew)
Definition: appoptio.hxx:43
void SetAppMetric(FieldUnit eUnit)
Definition: appoptio.hxx:39
sal_uInt32 nStatusFunc
Definition: appoptio.hxx:90
void SetLinkMode(ScLkUpdMode nSet)
Definition: appoptio.hxx:68
Color nTrackDeleteColor
Definition: appoptio.hxx:95
Color nTrackMoveColor
Definition: appoptio.hxx:96
sal_uInt16 * GetLRUFuncList() const
Definition: appoptio.hxx:48
void SetDefaults()
Definition: appoptio.cxx:49
void SetDefaultObjectSizeWidth(sal_Int32 nNew)
Definition: appoptio.hxx:70
void SetSynchronizeZoom(bool bNew)
Definition: appoptio.hxx:45
bool mbShowSharedDocumentWarning
Definition: appoptio.hxx:100
bool bSynchronizeZoom
Definition: appoptio.hxx:89
static void SetUserList(const ScUserList *pNewList)
Definition: global.cxx:299
static SC_DLLPUBLIC ScUserList * GetUserList()
Definition: global.cxx:288
void SetCommitLink(const Link< ScLinkConfigItem &, void > &rLink)
Definition: optutil.cxx:47
void SetNotifyLink(const Link< ScLinkConfigItem &, void > &rLink)
Definition: optutil.cxx:52
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
Definition: optutil.hxx:53
static bool IsMetricSystem()
Definition: optutil.cxx:25
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:139
Collection of user-defined sort lists.
Definition: userlist.hxx:62
void emplace_back(Args &&... args)
Definition: userlist.hxx:85
size_t size() const
Definition: userlist.hxx:84
void AddDefaults()
Definition: userlist.cxx:151
bool EnableNotification(const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
ColorTransparency
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define SC_OPCODE_IF
#define SC_OPCODE_SUM
#define SC_OPCODE_MAX
#define SC_OPCODE_AVERAGE
#define SC_OPCODE_MIN
int nCount
float u
FieldUnit
ScLkUpdMode
Definition: global.hxx:410
@ LM_ON_DEMAND
Definition: global.hxx:413
@ SUBTOTAL_FUNC_SUM
Definition: global.hxx:870
Sequence< sal_Int8 > aSeq
int i
long Long
#define SAL_MAX_UINT16
SvxZoomType