LibreOffice Module sc (master) 1
appluno.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 <appluno.hxx>
21#include <sal/types.h>
22#include <o3tl/safeint.hxx>
23#include <osl/diagnose.h>
24#include <formula/funcvarargs.h>
25
26#include <vcl/svapp.hxx>
27#include <sfx2/app.hxx>
29#include <miscuno.hxx>
30#include <scmod.hxx>
31#include <appoptio.hxx>
32#include <inputopt.hxx>
33#include <printopt.hxx>
34#include <userlist.hxx>
35#include <scdll.hxx>
36#include <unonames.hxx>
37#include <funcdesc.hxx>
38#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
39#include <com/sun/star/sheet/FunctionArgument.hpp>
40#include <memory>
41
42using namespace com::sun::star;
43
44// Special value for zoom
46#define SC_ZOOMVAL_OPTIMAL (-1)
47#define SC_ZOOMVAL_WHOLEPAGE (-2)
48#define SC_ZOOMVAL_PAGEWIDTH (-3)
49
50// Number of PropertyValues in a function description
51#define SC_FUNCDESC_PROPCOUNT 5
52
53// everything without Which-ID, map only for PropertySetInfo
54
56{
57 static const SfxItemPropertyMapEntry aSettingsPropertyMap_Impl[] =
58 {
77 };
78 return aSettingsPropertyMap_Impl;
79}
80
81constexpr OUStringLiteral SCFUNCTIONLISTOBJ_SERVICE = u"com.sun.star.sheet.FunctionDescriptions";
82constexpr OUStringLiteral SCRECENTFUNCTIONSOBJ_SERVICE = u"com.sun.star.sheet.RecentFunctions";
83constexpr OUStringLiteral SCSPREADSHEETSETTINGS_SERVICE = u"com.sun.star.sheet.GlobalSheetSettings";
84
85SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, "stardiv.StarCalc.ScFunctionListObj", SCFUNCTIONLISTOBJ_SERVICE )
86SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, "stardiv.StarCalc.ScRecentFunctionsObj", SCRECENTFUNCTIONSOBJ_SERVICE )
87SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "stardiv.StarCalc.ScSpreadsheetSettings", SCSPREADSHEETSETTINGS_SERVICE )
88
89
91 aPropSet( lcl_GetSettingsPropertyMap() )
92{
93}
94
96{
97}
98
99extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
101 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
102{
103 SolarMutexGuard aGuard;
104 ScDLL::Init();
105 return cppu::acquire(new ScSpreadsheetSettings());
106}
107
108
109bool ScSpreadsheetSettings::getPropertyBool(const OUString& aPropertyName)
110{
111 uno::Any any = getPropertyValue(aPropertyName);
112 bool b = false;
113 any >>= b;
114 return b;
115}
116
117sal_Int16 ScSpreadsheetSettings::getPropertyInt16(const OUString& aPropertyName)
118{
119 uno::Any any = getPropertyValue(aPropertyName);
120 sal_Int16 b = 0;
121 any >>= b;
122 return b;
123}
124
125// XPropertySet
126
127uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSpreadsheetSettings::getPropertySetInfo()
128{
129 SolarMutexGuard aGuard;
130 static uno::Reference<beans::XPropertySetInfo> aRef(
132 return aRef;
133}
134
136 const OUString& aPropertyName, const uno::Any& aValue )
137{
138 SolarMutexGuard aGuard;
139
140 ScModule* pScMod = SC_MOD();
141 ScAppOptions aAppOpt(pScMod->GetAppOptions());
142 ScInputOptions aInpOpt(pScMod->GetInputOptions());
143 bool bSaveApp = false;
144 bool bSaveInp = false;
145 // print options aren't loaded until needed
146
147 if (aPropertyName == SC_UNONAME_DOAUTOCP)
148 {
150 bSaveApp = true;
151 }
152 else if (aPropertyName == SC_UNONAME_ENTERED)
153 {
155 bSaveInp = true;
156 }
157 else if (aPropertyName == SC_UNONAME_EXPREF)
158 {
160 bSaveInp = true;
161 }
162 else if (aPropertyName == SC_UNONAME_EXTFMT)
163 {
165 bSaveInp = true;
166 }
167 else if (aPropertyName == SC_UNONAME_LINKUPD)
168 {
169 // XXX NOTE: this is not css::document::Settings property
170 // LinkUpdateMode but css::sheet::XGlobalSheetSettings attribute
171 // LinkUpdateMode.
172 sal_Int16 n;
173 if (!(aValue >>= n) || n < 0 || n >= ScLkUpdMode::LM_UNKNOWN)
174 {
175 throw css::lang::IllegalArgumentException(
176 ("LinkUpdateMode property value must be a SHORT with a value in the range of 0--2"
177 " as documented for css::sheet::XGlobalSheetSettings attribute LinkUpdateMode"),
178 css::uno::Reference<css::uno::XInterface>(), -1);
179 }
180 aAppOpt.SetLinkMode( static_cast<ScLkUpdMode>(n) );
181 bSaveApp = true;
182 }
183 else if (aPropertyName == SC_UNONAME_MARKHDR)
184 {
186 bSaveInp = true;
187 }
188 else if (aPropertyName == SC_UNONAME_MOVESEL)
189 {
191 bSaveInp = true;
192 }
193 else if (aPropertyName == SC_UNONAME_RANGEFIN)
194 {
196 bSaveInp = true;
197 }
198 else if (aPropertyName == SC_UNONAME_USETABCOL)
199 {
201 bSaveInp = true;
202 }
203 else if (aPropertyName == SC_UNONAME_PRMETRICS)
204 {
206 bSaveInp = true;
207 }
208 else if (aPropertyName == SC_UNONAME_REPLWARN)
209 {
211 bSaveInp = true;
212 }
213 else if (aPropertyName == SC_UNONAME_METRIC)
214 {
215 aAppOpt.SetAppMetric( static_cast<FieldUnit>(ScUnoHelpFunctions::GetInt16FromAny( aValue )) );
216 bSaveApp = true;
217 }
218 else if (aPropertyName == SC_UNONAME_MOVEDIR)
219 {
221 bSaveInp = true;
222 }
223 else if (aPropertyName == SC_UNONAME_SCALE)
224 {
225 short nVal = ScUnoHelpFunctions::GetInt16FromAny( aValue );
226 if ( nVal < 0 )
227 {
228 SvxZoomType eType = SvxZoomType::PERCENT;
229 switch (nVal)
230 {
231 case SC_ZOOMVAL_OPTIMAL: eType = SvxZoomType::OPTIMAL; break;
232 case SC_ZOOMVAL_WHOLEPAGE: eType = SvxZoomType::WHOLEPAGE; break;
233 case SC_ZOOMVAL_PAGEWIDTH: eType = SvxZoomType::PAGEWIDTH; break;
234 }
235 aAppOpt.SetZoomType( eType );
236 }
237 else if ( nVal >= MINZOOM && nVal <= MAXZOOM )
238 {
239 aAppOpt.SetZoom( nVal );
240 aAppOpt.SetZoomType( SvxZoomType::PERCENT );
241 }
242 bSaveApp = true;
243 }
244 else if (aPropertyName == SC_UNONAME_STBFUNC)
245 {
247 bSaveApp = true;
248 }
249 else if (aPropertyName == SC_UNONAME_ULISTS)
250 {
251 ScUserList* pUserList = ScGlobal::GetUserList();
252 uno::Sequence<OUString> aSeq;
253 if ( pUserList && ( aValue >>= aSeq ) )
254 {
255 // directly change the active list
256 // ScGlobal::SetUseTabCol does not do much else
257
258 pUserList->clear();
259 for (const OUString& aEntry : std::as_const(aSeq))
260 {
261 ScUserListData* pData = new ScUserListData(aEntry);
262 pUserList->push_back(pData);
263 }
264 bSaveApp = true; // List with App-Options are saved
265 }
266 }
267 else if (aPropertyName == SC_UNONAME_PRALLSH)
268 {
269 ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
271 pScMod->SetPrintOptions( aPrintOpt );
272 }
273 else if (aPropertyName == SC_UNONAME_PREMPTY)
274 {
275 ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
276 aPrintOpt.SetSkipEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); // reversed
277 pScMod->SetPrintOptions( aPrintOpt );
278 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScPrintOptions ) ); // update previews
279 }
280
281 if ( bSaveApp )
282 pScMod->SetAppOptions( aAppOpt );
283 if ( bSaveInp )
284 pScMod->SetInputOptions( aInpOpt );
285}
286
287uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aPropertyName )
288{
289 SolarMutexGuard aGuard;
290 uno::Any aRet;
291
292 ScModule* pScMod = SC_MOD();
293 ScAppOptions aAppOpt = pScMod->GetAppOptions();
294 const ScInputOptions& aInpOpt = pScMod->GetInputOptions();
295 // print options aren't loaded until needed
296
297 if (aPropertyName == SC_UNONAME_DOAUTOCP) aRet <<= aAppOpt.GetAutoComplete();
298 else if (aPropertyName == SC_UNONAME_ENTERED ) aRet <<= aInpOpt.GetEnterEdit();
299 else if (aPropertyName == SC_UNONAME_EXPREF ) aRet <<= aInpOpt.GetExpandRefs();
300 else if (aPropertyName == SC_UNONAME_EXTFMT ) aRet <<= aInpOpt.GetExtendFormat();
301 else if (aPropertyName == SC_UNONAME_LINKUPD ) aRet <<= static_cast<sal_Int16>(aAppOpt.GetLinkMode());
302 else if (aPropertyName == SC_UNONAME_MARKHDR ) aRet <<= aInpOpt.GetMarkHeader();
303 else if (aPropertyName == SC_UNONAME_MOVESEL ) aRet <<= aInpOpt.GetMoveSelection();
304 else if (aPropertyName == SC_UNONAME_RANGEFIN ) aRet <<= aInpOpt.GetRangeFinder();
305 else if (aPropertyName == SC_UNONAME_USETABCOL ) aRet <<= aInpOpt.GetUseTabCol();
306 else if (aPropertyName == SC_UNONAME_PRMETRICS ) aRet <<= aInpOpt.GetTextWysiwyg();
307 else if (aPropertyName == SC_UNONAME_REPLWARN ) aRet <<= aInpOpt.GetReplaceCellsWarn();
308 else if (aPropertyName == SC_UNONAME_METRIC ) aRet <<= static_cast<sal_Int16>(aAppOpt.GetAppMetric());
309 else if (aPropertyName == SC_UNONAME_MOVEDIR ) aRet <<= static_cast<sal_Int16>(aInpOpt.GetMoveDir());
310 else if (aPropertyName == SC_UNONAME_STBFUNC ) aRet <<= static_cast<sal_Int16>(aAppOpt.GetStatusFunc());
311 else if (aPropertyName == SC_UNONAME_SCALE )
312 {
313 sal_Int16 nZoomVal = 0;
314 switch ( aAppOpt.GetZoomType() )
315 {
316 case SvxZoomType::PERCENT: nZoomVal = aAppOpt.GetZoom(); break;
317 case SvxZoomType::OPTIMAL: nZoomVal = SC_ZOOMVAL_OPTIMAL; break;
318 case SvxZoomType::WHOLEPAGE: nZoomVal = SC_ZOOMVAL_WHOLEPAGE; break;
319 case SvxZoomType::PAGEWIDTH: nZoomVal = SC_ZOOMVAL_PAGEWIDTH; break;
320 default:
321 {
322 // added to avoid warnings
323 }
324 }
325 aRet <<= nZoomVal;
326 }
327 else if (aPropertyName == SC_UNONAME_ULISTS )
328 {
329 ScUserList* pUserList = ScGlobal::GetUserList();
330 if (pUserList)
331 {
332 size_t nCount = pUserList->size();
333 uno::Sequence<OUString> aSeq(nCount);
334 OUString* pAry = aSeq.getArray();
335 for (size_t i=0; i<nCount; ++i)
336 {
337 OUString aEntry((*pUserList)[i].GetString());
338 pAry[i] = aEntry;
339 }
340 aRet <<= aSeq;
341 }
342 }
343 else if (aPropertyName == SC_UNONAME_PRALLSH )
344 aRet <<= pScMod->GetPrintOptions().GetAllSheets();
345 else if (aPropertyName == SC_UNONAME_PREMPTY )
346 aRet <<= !pScMod->GetPrintOptions().GetSkipEmpty(); // reversed
347
348 return aRet;
349}
350
352
354{
355}
356
358{
359}
360
361extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
362ScRecentFunctionsObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &)
363{
364 SolarMutexGuard aGuard;
365 ScDLL::Init();
366 return cppu::acquire(new ScRecentFunctionsObj());
367}
368
369// XRecentFunctions
370
371uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds()
372{
373 SolarMutexGuard aGuard;
374 const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
375 sal_uInt16 nCount = rOpt.GetLRUFuncListCount();
376 const sal_uInt16* pFuncs = rOpt.GetLRUFuncList();
377 if (pFuncs)
378 {
379 uno::Sequence<sal_Int32> aSeq(nCount);
380 sal_Int32* pAry = aSeq.getArray();
381 for (sal_uInt16 i=0; i<nCount; i++)
382 pAry[i] = pFuncs[i];
383 return aSeq;
384 }
385 return {};
386}
387
389 const uno::Sequence<sal_Int32>& aRecentFunctionIds )
390{
391 SolarMutexGuard aGuard;
392 sal_uInt16 nCount = static_cast<sal_uInt16>(std::min( aRecentFunctionIds.getLength(), sal_Int32(LRU_MAX) ));
393 const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
394
395 std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : nullptr);
396 for (sal_uInt16 i=0; i<nCount; i++)
397 pFuncs[i] = static_cast<sal_uInt16>(pAry[i]);
398
399 ScModule* pScMod = SC_MOD();
400 ScAppOptions aNewOpts(pScMod->GetAppOptions());
401 aNewOpts.SetLRUFuncList(pFuncs.get(), nCount);
402 pScMod->SetAppOptions(aNewOpts);
403}
404
406{
407 return LRU_MAX;
408}
409
411{
412}
413
415{
416}
417
418extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
419ScFunctionListObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &)
420{
421 SolarMutexGuard aGuard;
422 ScDLL::Init();
423 return cppu::acquire(new ScFunctionListObj());
424}
425
426static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, const ScFuncDesc& rDesc )
427{
428 rDesc.initArgumentInfo(); // full argument info is needed
429
430 OSL_ENSURE( rSequence.getLength() == SC_FUNCDESC_PROPCOUNT, "Wrong count" );
431
432 beans::PropertyValue* pArray = rSequence.getArray();
433
434 pArray[0].Name = SC_UNONAME_ID;
435 pArray[0].Value <<= static_cast<sal_Int32>(rDesc.nFIndex);
436
437 pArray[1].Name = SC_UNONAME_CATEGORY;
438 pArray[1].Value <<= static_cast<sal_Int32>(rDesc.nCategory);
439
440 pArray[2].Name = SC_UNONAME_NAME;
441 if (rDesc.mxFuncName)
442 pArray[2].Value <<= *rDesc.mxFuncName;
443
444 pArray[3].Name = SC_UNONAME_DESCRIPTION;
445 if (rDesc.mxFuncDesc)
446 pArray[3].Value <<= *rDesc.mxFuncDesc;
447
448 pArray[4].Name = SC_UNONAME_ARGUMENTS;
449 if (rDesc.maDefArgNames.empty() || rDesc.maDefArgDescs.empty() || !rDesc.pDefArgFlags)
450 return;
451
452 sal_uInt16 nCount = rDesc.nArgCount;
453 if (nCount >= PAIRED_VAR_ARGS)
454 nCount -= PAIRED_VAR_ARGS - 2;
455 else if (nCount >= VAR_ARGS)
456 nCount -= VAR_ARGS - 1;
457 sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount();
458 if (nSeqCount >= PAIRED_VAR_ARGS)
459 nSeqCount -= PAIRED_VAR_ARGS - 2;
460 else if (nSeqCount >= VAR_ARGS)
461 nSeqCount -= VAR_ARGS - 1;
462
463 if (!nSeqCount)
464 return;
465
466 uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount);
467 sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
468 for (sal_uInt16 i=0, j=0; i<nCount; i++)
469 {
470 sheet::FunctionArgument aArgument;
471 aArgument.Name = rDesc.maDefArgNames[i];
472 aArgument.Description = rDesc.maDefArgDescs[i];
473 aArgument.IsOptional = rDesc.pDefArgFlags[i].bOptional;
474 pArgAry[j++] = aArgument;
475 }
476 pArray[4].Value <<= aArgSeq;
477}
478
479// XFunctionDescriptions
480
481uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int32 nId )
482{
483 SolarMutexGuard aGuard;
485 if ( !pFuncList )
486 throw uno::RuntimeException(); // should not happen
487
488 sal_uInt16 nCount = static_cast<sal_uInt16>(pFuncList->GetCount());
489 for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
490 {
491 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
492 if ( pDesc && pDesc->nFIndex == nId )
493 {
494 uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT );
495 lcl_FillSequence( aSeq, *pDesc );
496 return aSeq;
497 }
498 }
499
500 throw lang::IllegalArgumentException(); // not found
501}
502
503// XNameAccess
504
505uno::Any SAL_CALL ScFunctionListObj::getByName( const OUString& aName )
506{
507 SolarMutexGuard aGuard;
509 if ( !pFuncList )
510 throw uno::RuntimeException(); // should not happen
511
512 sal_uInt16 nCount = static_cast<sal_uInt16>(pFuncList->GetCount());
513 for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
514 {
515 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
517 if ( pDesc && pDesc->mxFuncName && aName == *pDesc->mxFuncName )
518 {
519 uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT );
520 lcl_FillSequence( aSeq, *pDesc );
521 return uno::Any(aSeq);
522 }
523 }
524
525 throw container::NoSuchElementException(); // not found
526}
527
528// XIndexAccess
529
530sal_Int32 SAL_CALL ScFunctionListObj::getCount()
531{
532 SolarMutexGuard aGuard;
533 sal_Int32 nCount = 0;
535 if ( pFuncList )
536 nCount = static_cast<sal_Int32>(pFuncList->GetCount());
537 return nCount;
538}
539
540uno::Any SAL_CALL ScFunctionListObj::getByIndex( sal_Int32 nIndex )
541{
542 SolarMutexGuard aGuard;
544 if ( !pFuncList )
545 throw uno::RuntimeException(); // should not happen
546
547 if ( nIndex >= 0 && o3tl::make_unsigned(nIndex) < pFuncList->GetCount() )
548 {
549 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
550 if ( pDesc )
551 {
552 uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT );
553 lcl_FillSequence( aSeq, *pDesc );
554 return uno::Any(aSeq);
555 }
556 }
557
558 throw lang::IndexOutOfBoundsException(); // illegal index
559}
560
561// XEnumerationAccess
562
563uno::Reference<container::XEnumeration> SAL_CALL ScFunctionListObj::createEnumeration()
564{
565 SolarMutexGuard aGuard;
566 return new ScIndexEnumeration(this, "com.sun.star.sheet.FunctionDescriptionEnumeration");
567}
568
569// XElementAccess
570
572{
574}
575
577{
578 SolarMutexGuard aGuard;
579 return ( getCount() > 0 );
580}
581
582uno::Sequence<OUString> SAL_CALL ScFunctionListObj::getElementNames()
583{
584 SolarMutexGuard aGuard;
586 if ( pFuncList )
587 {
588 sal_uInt32 nCount = pFuncList->GetCount();
589 uno::Sequence<OUString> aSeq(nCount);
590 OUString* pAry = aSeq.getArray();
591 for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex)
592 {
593 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
594 if ( pDesc && pDesc->mxFuncName )
595 pAry[nIndex] = *pDesc->mxFuncName;
596 }
597 return aSeq;
598 }
599 return {};
600}
601
602sal_Bool SAL_CALL ScFunctionListObj::hasByName( const OUString& aName )
603{
604 SolarMutexGuard aGuard;
606 if ( pFuncList )
607 {
608 sal_uInt32 nCount = pFuncList->GetCount();
609 for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex)
610 {
611 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
613 if ( pDesc && pDesc->mxFuncName && aName == *pDesc->mxFuncName )
614 return true;
615 }
616 }
617 return false;
618}
619
620/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const Any & any
SfxApplication * SfxGetpApp()
#define SC_ZOOMVAL_WHOLEPAGE
Definition: appluno.cxx:47
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScFunctionListObj_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: appluno.cxx:419
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * Calc_ScSpreadsheetSettings_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: appluno.cxx:100
static void lcl_FillSequence(uno::Sequence< beans::PropertyValue > &rSequence, const ScFuncDesc &rDesc)
Definition: appluno.cxx:426
#define SC_ZOOMVAL_OPTIMAL
somewhere central
Definition: appluno.cxx:46
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScRecentFunctionsObj_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: appluno.cxx:362
#define SC_ZOOMVAL_PAGEWIDTH
Definition: appluno.cxx:48
constexpr OUStringLiteral SCSPREADSHEETSETTINGS_SERVICE
Definition: appluno.cxx:83
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetSettingsPropertyMap()
Definition: appluno.cxx:55
constexpr OUStringLiteral SCRECENTFUNCTIONSOBJ_SERVICE
Definition: appluno.cxx:82
#define SC_FUNCDESC_PROPCOUNT
Definition: appluno.cxx:51
constexpr OUStringLiteral SCFUNCTIONLISTOBJ_SERVICE
Definition: appluno.cxx:81
void SetStatusFunc(sal_uInt32 nNew)
Definition: appoptio.hxx:51
sal_uInt16 GetLRUFuncListCount() const
Definition: appoptio.hxx:47
SvxZoomType GetZoomType() const
Definition: appoptio.hxx:44
ScLkUpdMode GetLinkMode() const
Definition: appoptio.hxx:67
FieldUnit GetAppMetric() const
Definition: appoptio.hxx:40
void SetLRUFuncList(const sal_uInt16 *pList, const sal_uInt16 nCount)
Definition: appoptio.cxx:107
sal_uInt16 GetZoom() const
Definition: appoptio.hxx:42
void SetZoom(sal_uInt16 nNew)
Definition: appoptio.hxx:41
void SetAutoComplete(bool bNew)
Definition: appoptio.hxx:53
void SetZoomType(SvxZoomType eNew)
Definition: appoptio.hxx:43
void SetAppMetric(FieldUnit eUnit)
Definition: appoptio.hxx:39
void SetLinkMode(ScLkUpdMode nSet)
Definition: appoptio.hxx:68
sal_uInt16 * GetLRUFuncList() const
Definition: appoptio.hxx:48
sal_uInt32 GetStatusFunc() const
Definition: appoptio.hxx:52
bool GetAutoComplete() const
Definition: appoptio.hxx:54
static SC_DLLPUBLIC void Init()
DLL-init/exit-code must be linked to the DLL only.
Definition: scdll.cxx:100
Stores and generates human readable descriptions for spreadsheet-functions, e.g. functions used in fo...
Definition: funcdesc.hxx:41
std::vector< OUString > maDefArgDescs
Description(s) of parameter(s)
Definition: funcdesc.hxx:219
sal_uInt16 nArgCount
All parameter count, suppressed and unsuppressed.
Definition: funcdesc.hxx:223
virtual void initArgumentInfo() const override
Requests function data from AddInCollection.
Definition: funcdesc.cxx:327
std::vector< OUString > maDefArgNames
Parameter name(s)
Definition: funcdesc.hxx:218
sal_uInt16 nCategory
Function category.
Definition: funcdesc.hxx:222
sal_uInt16 GetSuppressedArgCount() const
Returns the number of non-suppressed arguments.
Definition: funcdesc.cxx:278
std::optional< OUString > mxFuncDesc
Description of function.
Definition: funcdesc.hxx:217
ParameterFlags * pDefArgFlags
Flags for each parameter.
Definition: funcdesc.hxx:220
sal_uInt16 nFIndex
Unique function index.
Definition: funcdesc.hxx:221
std::optional< OUString > mxFuncName
Function name.
Definition: funcdesc.hxx:216
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: appluno.cxx:540
virtual sal_Bool SAL_CALL hasElements() override
Definition: appluno.cxx:576
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: appluno.cxx:602
virtual sal_Int32 SAL_CALL getCount() override
Definition: appluno.cxx:530
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: appluno.cxx:582
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: appluno.cxx:505
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: appluno.cxx:563
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getById(sal_Int32 nId) override
Definition: appluno.cxx:481
virtual css::uno::Type SAL_CALL getElementType() override
Definition: appluno.cxx:571
virtual ~ScFunctionListObj() override
Definition: appluno.cxx:414
List of spreadsheet functions.
Definition: funcdesc.hxx:242
const ScFuncDesc * GetFunction(sal_uInt32 nIndex) const
Definition: funcdesc.cxx:1010
sal_uInt32 GetCount() const
Definition: funcdesc.hxx:247
static ScFunctionList * GetStarCalcFunctionList()
Definition: global.cxx:624
static SC_DLLPUBLIC ScUserList * GetUserList()
Definition: global.cxx:288
void SetTextWysiwyg(bool bSet)
Definition: inputopt.hxx:62
sal_uInt16 GetMoveDir() const
Definition: inputopt.hxx:45
void SetExpandRefs(bool bSet)
Definition: inputopt.hxx:54
void SetEnterEdit(bool bSet)
Definition: inputopt.hxx:48
void SetExtendFormat(bool bSet)
Definition: inputopt.hxx:50
bool GetUseTabCol() const
Definition: inputopt.hxx:61
void SetMarkHeader(bool bSet)
Definition: inputopt.hxx:58
void SetMoveDir(sal_uInt16 nNew)
Definition: inputopt.hxx:44
bool GetTextWysiwyg() const
Definition: inputopt.hxx:63
void SetRangeFinder(bool bSet)
Definition: inputopt.hxx:52
bool GetMarkHeader() const
Definition: inputopt.hxx:59
void SetUseTabCol(bool bSet)
Definition: inputopt.hxx:60
void SetReplaceCellsWarn(bool bSet)
Definition: inputopt.hxx:64
void SetMoveSelection(bool bSet)
Definition: inputopt.hxx:46
bool GetEnterEdit() const
Definition: inputopt.hxx:49
bool GetReplaceCellsWarn() const
Definition: inputopt.hxx:65
bool GetExtendFormat() const
Definition: inputopt.hxx:51
bool GetRangeFinder() const
Definition: inputopt.hxx:53
bool GetExpandRefs() const
Definition: inputopt.hxx:55
bool GetMoveSelection() const
Definition: inputopt.hxx:47
SC_DLLPUBLIC const ScPrintOptions & GetPrintOptions()
Definition: scmod.cxx:838
void SetPrintOptions(const ScPrintOptions &rOpt)
Definition: scmod.cxx:830
SC_DLLPUBLIC const ScInputOptions & GetInputOptions()
Definition: scmod.cxx:822
SC_DLLPUBLIC const ScAppOptions & GetAppOptions()
Definition: scmod.cxx:774
SC_DLLPUBLIC void SetAppOptions(const ScAppOptions &rOpt)
Definition: scmod.cxx:761
SC_DLLPUBLIC void SetInputOptions(const ScInputOptions &rOpt)
Definition: scmod.cxx:814
bool GetSkipEmpty() const
Definition: printopt.hxx:36
void SetSkipEmpty(bool bVal)
Definition: printopt.hxx:37
void SetAllSheets(bool bVal)
Definition: printopt.hxx:39
bool GetAllSheets() const
Definition: printopt.hxx:38
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getRecentFunctionIds() override
Definition: appluno.cxx:371
virtual sal_Int32 SAL_CALL getMaxRecentFunctions() override
Definition: appluno.cxx:405
virtual ~ScRecentFunctionsObj() override
Definition: appluno.cxx:357
virtual void SAL_CALL setRecentFunctionIds(const css::uno::Sequence< sal_Int32 > &aRecentFunctionIds) override
Definition: appluno.cxx:388
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: appluno.cxx:127
bool getPropertyBool(const OUString &aPropertyName)
Definition: appluno.cxx:109
virtual ~ScSpreadsheetSettings() override
Definition: appluno.cxx:95
sal_Int16 getPropertyInt16(const OUString &aPropertyName)
Definition: appluno.cxx:117
SfxItemPropertySet aPropSet
Definition: appluno.hxx:53
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: appluno.cxx:135
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: appluno.cxx:287
static sal_Int16 GetInt16FromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:145
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:139
Stores individual user-defined sort list.
Definition: userlist.hxx:33
Collection of user-defined sort lists.
Definition: userlist.hxx:67
void clear()
Definition: userlist.cxx:341
void push_back(ScUserListData *p)
Definition: userlist.cxx:351
size_t size() const
Definition: userlist.cxx:346
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Type const & get()
int nCount
float u
FieldUnit
DocumentType eType
#define LRU_MAX
Definition: funcdesc.hxx:34
#define VAR_ARGS
#define PAIRED_VAR_ARGS
const sal_uInt16 MINZOOM
Definition: global.hxx:79
ScLkUpdMode
Definition: global.hxx:409
@ LM_UNKNOWN
Definition: global.hxx:413
const sal_uInt16 MAXZOOM
Definition: global.hxx:80
sal_Int32 nIndex
OUString aName
sal_Int64 n
Sequence< sal_Int8 > aSeq
std::unique_ptr< sal_Int32[]> pData
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
Definition: miscuno.hxx:63
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:72
OUString GetString(int nId)
int i
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
sal_Int16 nId
#define SC_MOD()
Definition: scmod.hxx:249
bool bOptional
Parameter is optional.
Definition: funcdesc.hxx:211
unsigned char sal_Bool
constexpr OUStringLiteral SC_UNONAME_MARKHDR
Definition: unonames.hxx:240
constexpr OUStringLiteral SC_UNONAME_LINKUPD
Definition: unonames.hxx:239
constexpr OUStringLiteral SC_UNONAME_REPLWARN
Definition: unonames.hxx:252
constexpr OUStringLiteral SC_UNONAME_CATEGORY
Definition: unonames.hxx:229
constexpr OUStringLiteral SC_UNONAME_ENTERED
Definition: unonames.hxx:236
constexpr OUStringLiteral SC_UNONAME_DESCRIPTION
Definition: unonames.hxx:230
constexpr OUStringLiteral SC_UNONAME_EXPREF
Definition: unonames.hxx:237
constexpr OUStringLiteral SC_UNONAME_EXTFMT
Definition: unonames.hxx:238
constexpr OUStringLiteral SC_UNONAME_PREMPTY
Definition: unonames.hxx:251
constexpr OUStringLiteral SC_UNONAME_SCALE
Definition: unonames.hxx:245
constexpr OUStringLiteral SC_UNONAME_METRIC
Definition: unonames.hxx:241
constexpr OUStringLiteral SC_UNONAME_MOVEDIR
Definition: unonames.hxx:242
constexpr OUStringLiteral SC_UNONAME_STBFUNC
Definition: unonames.hxx:246
constexpr OUStringLiteral SC_UNONAME_PRMETRICS
Definition: unonames.hxx:249
constexpr OUStringLiteral SC_UNONAME_ARGUMENTS
Definition: unonames.hxx:228
constexpr OUStringLiteral SC_UNONAME_NAME
Definition: unonames.hxx:232
constexpr OUStringLiteral SC_UNONAME_PRALLSH
Definition: unonames.hxx:250
constexpr OUStringLiteral SC_UNONAME_ULISTS
Definition: unonames.hxx:247
constexpr OUStringLiteral SC_UNONAME_DOAUTOCP
Definition: unonames.hxx:235
constexpr OUStringLiteral SC_UNONAME_ID
Definition: unonames.hxx:231
constexpr OUStringLiteral SC_UNONAME_USETABCOL
Definition: unonames.hxx:248
constexpr OUStringLiteral SC_UNONAME_RANGEFIN
Definition: unonames.hxx:244
constexpr OUStringLiteral SC_UNONAME_MOVESEL
Definition: unonames.hxx:243
SvxZoomType