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 pUserList->emplace_back(aEntry);
262 }
263 bSaveApp = true; // List with App-Options are saved
264 }
265 }
266 else if (aPropertyName == SC_UNONAME_PRALLSH)
267 {
268 ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
270 pScMod->SetPrintOptions( aPrintOpt );
271 }
272 else if (aPropertyName == SC_UNONAME_PREMPTY)
273 {
274 ScPrintOptions aPrintOpt(pScMod->GetPrintOptions());
275 aPrintOpt.SetSkipEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); // reversed
276 pScMod->SetPrintOptions( aPrintOpt );
277 SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScPrintOptions ) ); // update previews
278 }
279
280 if ( bSaveApp )
281 pScMod->SetAppOptions( aAppOpt );
282 if ( bSaveInp )
283 pScMod->SetInputOptions( aInpOpt );
284}
285
286uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aPropertyName )
287{
288 SolarMutexGuard aGuard;
289 uno::Any aRet;
290
291 ScModule* pScMod = SC_MOD();
292 ScAppOptions aAppOpt = pScMod->GetAppOptions();
293 const ScInputOptions& aInpOpt = pScMod->GetInputOptions();
294 // print options aren't loaded until needed
295
296 if (aPropertyName == SC_UNONAME_DOAUTOCP) aRet <<= aAppOpt.GetAutoComplete();
297 else if (aPropertyName == SC_UNONAME_ENTERED ) aRet <<= aInpOpt.GetEnterEdit();
298 else if (aPropertyName == SC_UNONAME_EXPREF ) aRet <<= aInpOpt.GetExpandRefs();
299 else if (aPropertyName == SC_UNONAME_EXTFMT ) aRet <<= aInpOpt.GetExtendFormat();
300 else if (aPropertyName == SC_UNONAME_LINKUPD ) aRet <<= static_cast<sal_Int16>(aAppOpt.GetLinkMode());
301 else if (aPropertyName == SC_UNONAME_MARKHDR ) aRet <<= aInpOpt.GetMarkHeader();
302 else if (aPropertyName == SC_UNONAME_MOVESEL ) aRet <<= aInpOpt.GetMoveSelection();
303 else if (aPropertyName == SC_UNONAME_RANGEFIN ) aRet <<= aInpOpt.GetRangeFinder();
304 else if (aPropertyName == SC_UNONAME_USETABCOL ) aRet <<= aInpOpt.GetUseTabCol();
305 else if (aPropertyName == SC_UNONAME_PRMETRICS ) aRet <<= aInpOpt.GetTextWysiwyg();
306 else if (aPropertyName == SC_UNONAME_REPLWARN ) aRet <<= aInpOpt.GetReplaceCellsWarn();
307 else if (aPropertyName == SC_UNONAME_METRIC ) aRet <<= static_cast<sal_Int16>(aAppOpt.GetAppMetric());
308 else if (aPropertyName == SC_UNONAME_MOVEDIR ) aRet <<= static_cast<sal_Int16>(aInpOpt.GetMoveDir());
309 else if (aPropertyName == SC_UNONAME_STBFUNC ) aRet <<= static_cast<sal_Int16>(aAppOpt.GetStatusFunc());
310 else if (aPropertyName == SC_UNONAME_SCALE )
311 {
312 sal_Int16 nZoomVal = 0;
313 switch ( aAppOpt.GetZoomType() )
314 {
315 case SvxZoomType::PERCENT: nZoomVal = aAppOpt.GetZoom(); break;
316 case SvxZoomType::OPTIMAL: nZoomVal = SC_ZOOMVAL_OPTIMAL; break;
317 case SvxZoomType::WHOLEPAGE: nZoomVal = SC_ZOOMVAL_WHOLEPAGE; break;
318 case SvxZoomType::PAGEWIDTH: nZoomVal = SC_ZOOMVAL_PAGEWIDTH; break;
319 default:
320 {
321 // added to avoid warnings
322 }
323 }
324 aRet <<= nZoomVal;
325 }
326 else if (aPropertyName == SC_UNONAME_ULISTS )
327 {
328 ScUserList* pUserList = ScGlobal::GetUserList();
329 if (pUserList)
330 {
331 size_t nCount = pUserList->size();
332 uno::Sequence<OUString> aSeq(nCount);
333 OUString* pAry = aSeq.getArray();
334 for (size_t i=0; i<nCount; ++i)
335 {
336 OUString aEntry((*pUserList)[i].GetString());
337 pAry[i] = aEntry;
338 }
339 aRet <<= aSeq;
340 }
341 }
342 else if (aPropertyName == SC_UNONAME_PRALLSH )
343 aRet <<= pScMod->GetPrintOptions().GetAllSheets();
344 else if (aPropertyName == SC_UNONAME_PREMPTY )
345 aRet <<= !pScMod->GetPrintOptions().GetSkipEmpty(); // reversed
346
347 return aRet;
348}
349
351
353{
354}
355
357{
358}
359
360extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
361ScRecentFunctionsObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &)
362{
363 SolarMutexGuard aGuard;
364 ScDLL::Init();
365 return cppu::acquire(new ScRecentFunctionsObj());
366}
367
368// XRecentFunctions
369
370uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds()
371{
372 SolarMutexGuard aGuard;
373 const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
374 sal_uInt16 nCount = rOpt.GetLRUFuncListCount();
375 const sal_uInt16* pFuncs = rOpt.GetLRUFuncList();
376 if (pFuncs)
377 {
378 uno::Sequence<sal_Int32> aSeq(nCount);
379 sal_Int32* pAry = aSeq.getArray();
380 for (sal_uInt16 i=0; i<nCount; i++)
381 pAry[i] = pFuncs[i];
382 return aSeq;
383 }
384 return {};
385}
386
388 const uno::Sequence<sal_Int32>& aRecentFunctionIds )
389{
390 SolarMutexGuard aGuard;
391 sal_uInt16 nCount = static_cast<sal_uInt16>(std::min( aRecentFunctionIds.getLength(), sal_Int32(LRU_MAX) ));
392 const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
393
394 std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : nullptr);
395 for (sal_uInt16 i=0; i<nCount; i++)
396 pFuncs[i] = static_cast<sal_uInt16>(pAry[i]);
397
398 ScModule* pScMod = SC_MOD();
399 ScAppOptions aNewOpts(pScMod->GetAppOptions());
400 aNewOpts.SetLRUFuncList(pFuncs.get(), nCount);
401 pScMod->SetAppOptions(aNewOpts);
402}
403
405{
406 return LRU_MAX;
407}
408
410{
411}
412
414{
415}
416
417extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
418ScFunctionListObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &)
419{
420 SolarMutexGuard aGuard;
421 ScDLL::Init();
422 return cppu::acquire(new ScFunctionListObj());
423}
424
425static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, const ScFuncDesc& rDesc )
426{
427 rDesc.initArgumentInfo(); // full argument info is needed
428
429 OSL_ENSURE( rSequence.getLength() == SC_FUNCDESC_PROPCOUNT, "Wrong count" );
430
431 beans::PropertyValue* pArray = rSequence.getArray();
432
433 pArray[0].Name = SC_UNONAME_ID;
434 pArray[0].Value <<= static_cast<sal_Int32>(rDesc.nFIndex);
435
436 pArray[1].Name = SC_UNONAME_CATEGORY;
437 pArray[1].Value <<= static_cast<sal_Int32>(rDesc.nCategory);
438
439 pArray[2].Name = SC_UNONAME_NAME;
440 if (rDesc.mxFuncName)
441 pArray[2].Value <<= *rDesc.mxFuncName;
442
443 pArray[3].Name = SC_UNONAME_DESCRIPTION;
444 if (rDesc.mxFuncDesc)
445 pArray[3].Value <<= *rDesc.mxFuncDesc;
446
447 pArray[4].Name = SC_UNONAME_ARGUMENTS;
448 if (rDesc.maDefArgNames.empty() || rDesc.maDefArgDescs.empty() || !rDesc.pDefArgFlags)
449 return;
450
451 sal_uInt16 nCount = rDesc.nArgCount;
452 if (nCount >= PAIRED_VAR_ARGS)
453 nCount -= PAIRED_VAR_ARGS - 2;
454 else if (nCount >= VAR_ARGS)
455 nCount -= VAR_ARGS - 1;
456 sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount();
457 if (nSeqCount >= PAIRED_VAR_ARGS)
458 nSeqCount -= PAIRED_VAR_ARGS - 2;
459 else if (nSeqCount >= VAR_ARGS)
460 nSeqCount -= VAR_ARGS - 1;
461
462 if (!nSeqCount)
463 return;
464
465 uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount);
466 sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
467 for (sal_uInt16 i=0, j=0; i<nCount; i++)
468 {
469 sheet::FunctionArgument aArgument;
470 aArgument.Name = rDesc.maDefArgNames[i];
471 aArgument.Description = rDesc.maDefArgDescs[i];
472 aArgument.IsOptional = rDesc.pDefArgFlags[i].bOptional;
473 pArgAry[j++] = aArgument;
474 }
475 pArray[4].Value <<= aArgSeq;
476}
477
478// XFunctionDescriptions
479
480uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int32 nId )
481{
482 SolarMutexGuard aGuard;
484 if ( !pFuncList )
485 throw uno::RuntimeException(); // should not happen
486
487 sal_uInt16 nCount = static_cast<sal_uInt16>(pFuncList->GetCount());
488 for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
489 {
490 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
491 if ( pDesc && pDesc->nFIndex == nId )
492 {
493 uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT );
494 lcl_FillSequence( aSeq, *pDesc );
495 return aSeq;
496 }
497 }
498
499 throw lang::IllegalArgumentException(); // not found
500}
501
502// XNameAccess
503
504uno::Any SAL_CALL ScFunctionListObj::getByName( const OUString& aName )
505{
506 SolarMutexGuard aGuard;
508 if ( !pFuncList )
509 throw uno::RuntimeException(); // should not happen
510
511 sal_uInt16 nCount = static_cast<sal_uInt16>(pFuncList->GetCount());
512 for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++)
513 {
514 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
516 if ( pDesc && pDesc->mxFuncName && aName == *pDesc->mxFuncName )
517 {
518 uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT );
519 lcl_FillSequence( aSeq, *pDesc );
520 return uno::Any(aSeq);
521 }
522 }
523
524 throw container::NoSuchElementException(); // not found
525}
526
527// XIndexAccess
528
529sal_Int32 SAL_CALL ScFunctionListObj::getCount()
530{
531 SolarMutexGuard aGuard;
532 sal_Int32 nCount = 0;
534 if ( pFuncList )
535 nCount = static_cast<sal_Int32>(pFuncList->GetCount());
536 return nCount;
537}
538
539uno::Any SAL_CALL ScFunctionListObj::getByIndex( sal_Int32 nIndex )
540{
541 SolarMutexGuard aGuard;
543 if ( !pFuncList )
544 throw uno::RuntimeException(); // should not happen
545
546 if ( nIndex >= 0 && o3tl::make_unsigned(nIndex) < pFuncList->GetCount() )
547 {
548 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
549 if ( pDesc )
550 {
551 uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT );
552 lcl_FillSequence( aSeq, *pDesc );
553 return uno::Any(aSeq);
554 }
555 }
556
557 throw lang::IndexOutOfBoundsException(); // illegal index
558}
559
560// XEnumerationAccess
561
562uno::Reference<container::XEnumeration> SAL_CALL ScFunctionListObj::createEnumeration()
563{
564 SolarMutexGuard aGuard;
565 return new ScIndexEnumeration(this, "com.sun.star.sheet.FunctionDescriptionEnumeration");
566}
567
568// XElementAccess
569
571{
573}
574
576{
577 SolarMutexGuard aGuard;
578 return ( getCount() > 0 );
579}
580
581uno::Sequence<OUString> SAL_CALL ScFunctionListObj::getElementNames()
582{
583 SolarMutexGuard aGuard;
585 if ( pFuncList )
586 {
587 sal_uInt32 nCount = pFuncList->GetCount();
588 uno::Sequence<OUString> aSeq(nCount);
589 OUString* pAry = aSeq.getArray();
590 for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex)
591 {
592 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
593 if ( pDesc && pDesc->mxFuncName )
594 pAry[nIndex] = *pDesc->mxFuncName;
595 }
596 return aSeq;
597 }
598 return {};
599}
600
601sal_Bool SAL_CALL ScFunctionListObj::hasByName( const OUString& aName )
602{
603 SolarMutexGuard aGuard;
605 if ( pFuncList )
606 {
607 sal_uInt32 nCount = pFuncList->GetCount();
608 for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex)
609 {
610 const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex);
612 if ( pDesc && pDesc->mxFuncName && aName == *pDesc->mxFuncName )
613 return true;
614 }
615 }
616 return false;
617}
618
619/* 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:418
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:425
#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:361
#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:310
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:261
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:539
virtual sal_Bool SAL_CALL hasElements() override
Definition: appluno.cxx:575
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: appluno.cxx:601
virtual sal_Int32 SAL_CALL getCount() override
Definition: appluno.cxx:529
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: appluno.cxx:581
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: appluno.cxx:504
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: appluno.cxx:562
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getById(sal_Int32 nId) override
Definition: appluno.cxx:480
virtual css::uno::Type SAL_CALL getElementType() override
Definition: appluno.cxx:570
virtual ~ScFunctionListObj() override
Definition: appluno.cxx:413
List of spreadsheet functions.
Definition: funcdesc.hxx:242
const ScFuncDesc * GetFunction(sal_uInt32 nIndex) const
Definition: funcdesc.cxx:993
sal_uInt32 GetCount() const
Definition: funcdesc.hxx:247
static ScFunctionList * GetStarCalcFunctionList()
Definition: global.cxx:626
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:863
void SetPrintOptions(const ScPrintOptions &rOpt)
Definition: scmod.cxx:855
SC_DLLPUBLIC const ScInputOptions & GetInputOptions()
Definition: scmod.cxx:847
SC_DLLPUBLIC const ScAppOptions & GetAppOptions()
Definition: scmod.cxx:799
SC_DLLPUBLIC void SetAppOptions(const ScAppOptions &rOpt)
Definition: scmod.cxx:786
SC_DLLPUBLIC void SetInputOptions(const ScInputOptions &rOpt)
Definition: scmod.cxx:839
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:370
virtual sal_Int32 SAL_CALL getMaxRecentFunctions() override
Definition: appluno.cxx:404
virtual ~ScRecentFunctionsObj() override
Definition: appluno.cxx:356
virtual void SAL_CALL setRecentFunctionIds(const css::uno::Sequence< sal_Int32 > &aRecentFunctionIds) override
Definition: appluno.cxx:387
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:286
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
Collection of user-defined sort lists.
Definition: userlist.hxx:62
void clear()
Definition: userlist.hxx:83
void emplace_back(Args &&... args)
Definition: userlist.hxx:85
size_t size() const
Definition: userlist.hxx:84
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:410
@ LM_UNKNOWN
Definition: global.hxx:414
const sal_uInt16 MAXZOOM
Definition: global.hxx:80
sal_Int32 nIndex
OUString aName
sal_Int64 n
Sequence< sal_Int8 > aSeq
#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:247
bool bOptional
Parameter is optional.
Definition: funcdesc.hxx:211
unsigned char sal_Bool
constexpr OUStringLiteral SC_UNONAME_MARKHDR
Definition: unonames.hxx:248
constexpr OUStringLiteral SC_UNONAME_LINKUPD
Definition: unonames.hxx:247
constexpr OUStringLiteral SC_UNONAME_REPLWARN
Definition: unonames.hxx:260
constexpr OUStringLiteral SC_UNONAME_CATEGORY
Definition: unonames.hxx:237
constexpr OUStringLiteral SC_UNONAME_ENTERED
Definition: unonames.hxx:244
constexpr OUStringLiteral SC_UNONAME_DESCRIPTION
Definition: unonames.hxx:238
constexpr OUStringLiteral SC_UNONAME_EXPREF
Definition: unonames.hxx:245
constexpr OUStringLiteral SC_UNONAME_EXTFMT
Definition: unonames.hxx:246
constexpr OUStringLiteral SC_UNONAME_PREMPTY
Definition: unonames.hxx:259
constexpr OUStringLiteral SC_UNONAME_SCALE
Definition: unonames.hxx:253
constexpr OUStringLiteral SC_UNONAME_METRIC
Definition: unonames.hxx:249
constexpr OUStringLiteral SC_UNONAME_MOVEDIR
Definition: unonames.hxx:250
constexpr OUStringLiteral SC_UNONAME_STBFUNC
Definition: unonames.hxx:254
constexpr OUStringLiteral SC_UNONAME_PRMETRICS
Definition: unonames.hxx:257
constexpr OUStringLiteral SC_UNONAME_ARGUMENTS
Definition: unonames.hxx:236
constexpr OUStringLiteral SC_UNONAME_NAME
Definition: unonames.hxx:240
constexpr OUStringLiteral SC_UNONAME_PRALLSH
Definition: unonames.hxx:258
constexpr OUStringLiteral SC_UNONAME_ULISTS
Definition: unonames.hxx:255
constexpr OUStringLiteral SC_UNONAME_DOAUTOCP
Definition: unonames.hxx:243
constexpr OUStringLiteral SC_UNONAME_ID
Definition: unonames.hxx:239
constexpr OUStringLiteral SC_UNONAME_USETABCOL
Definition: unonames.hxx:256
constexpr OUStringLiteral SC_UNONAME_RANGEFIN
Definition: unonames.hxx:252
constexpr OUStringLiteral SC_UNONAME_MOVESEL
Definition: unonames.hxx:251
SvxZoomType