23#include <osl/diagnose.h>
33#include <printopt.hxx>
36#include <unonames.hxx>
38#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
39#include <com/sun/star/sheet/FunctionArgument.hpp>
46#define SC_ZOOMVAL_OPTIMAL (-1)
47#define SC_ZOOMVAL_WHOLEPAGE (-2)
48#define SC_ZOOMVAL_PAGEWIDTH (-3)
51#define SC_FUNCDESC_PROPCOUNT 5
78 return aSettingsPropertyMap_Impl;
99extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
101 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any>
const&)
130 static uno::Reference<beans::XPropertySetInfo> aRef(
136 const OUString& aPropertyName,
const uno::Any& aValue )
143 bool bSaveApp =
false;
144 bool bSaveInp =
false;
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);
252 uno::Sequence<OUString>
aSeq;
253 if ( pUserList && ( aValue >>=
aSeq ) )
259 for (
const OUString& aEntry : std::as_const(
aSeq))
312 sal_Int16 nZoomVal = 0;
315 case SvxZoomType::PERCENT: nZoomVal = aAppOpt.
GetZoom();
break;
333 OUString* pAry =
aSeq.getArray();
360extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
379 sal_Int32* pAry =
aSeq.getArray();
388 const uno::Sequence<sal_Int32>& aRecentFunctionIds )
391 sal_uInt16
nCount =
static_cast<sal_uInt16
>(std::min( aRecentFunctionIds.getLength(), sal_Int32(
LRU_MAX) ));
392 const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
394 std::unique_ptr<sal_uInt16[]> pFuncs(
nCount ?
new sal_uInt16[
nCount] :
nullptr);
396 pFuncs[
i] =
static_cast<sal_uInt16
>(pAry[
i]);
417extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
431 beans::PropertyValue* pArray = rSequence.getArray();
434 pArray[0].Value <<=
static_cast<sal_Int32
>(rDesc.
nFIndex);
437 pArray[1].Value <<=
static_cast<sal_Int32
>(rDesc.
nCategory);
465 uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount);
466 sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
469 sheet::FunctionArgument aArgument;
473 pArgAry[j++] = aArgument;
475 pArray[4].Value <<= aArgSeq;
485 throw uno::RuntimeException();
487 sal_uInt16
nCount =
static_cast<sal_uInt16
>(pFuncList->
GetCount());
499 throw lang::IllegalArgumentException();
509 throw uno::RuntimeException();
511 sal_uInt16
nCount =
static_cast<sal_uInt16
>(pFuncList->
GetCount());
524 throw container::NoSuchElementException();
544 throw uno::RuntimeException();
557 throw lang::IndexOutOfBoundsException();
565 return new ScIndexEnumeration(
this,
"com.sun.star.sheet.FunctionDescriptionEnumeration");
589 OUString* pAry =
aSeq.getArray();
SfxApplication * SfxGetpApp()
#define SC_ZOOMVAL_WHOLEPAGE
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScFunctionListObj_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * Calc_ScSpreadsheetSettings_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
static void lcl_FillSequence(uno::Sequence< beans::PropertyValue > &rSequence, const ScFuncDesc &rDesc)
#define SC_ZOOMVAL_OPTIMAL
somewhere central
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScRecentFunctionsObj_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
#define SC_ZOOMVAL_PAGEWIDTH
constexpr OUStringLiteral SCSPREADSHEETSETTINGS_SERVICE
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetSettingsPropertyMap()
constexpr OUStringLiteral SCRECENTFUNCTIONSOBJ_SERVICE
#define SC_FUNCDESC_PROPCOUNT
constexpr OUStringLiteral SCFUNCTIONLISTOBJ_SERVICE
void SetStatusFunc(sal_uInt32 nNew)
sal_uInt16 GetLRUFuncListCount() const
SvxZoomType GetZoomType() const
ScLkUpdMode GetLinkMode() const
FieldUnit GetAppMetric() const
void SetLRUFuncList(const sal_uInt16 *pList, const sal_uInt16 nCount)
sal_uInt16 GetZoom() const
void SetZoom(sal_uInt16 nNew)
void SetAutoComplete(bool bNew)
void SetZoomType(SvxZoomType eNew)
void SetAppMetric(FieldUnit eUnit)
void SetLinkMode(ScLkUpdMode nSet)
sal_uInt16 * GetLRUFuncList() const
sal_uInt32 GetStatusFunc() const
bool GetAutoComplete() const
static SC_DLLPUBLIC void Init()
DLL-init/exit-code must be linked to the DLL only.
Stores and generates human readable descriptions for spreadsheet-functions, e.g. functions used in fo...
std::vector< OUString > maDefArgDescs
Description(s) of parameter(s)
sal_uInt16 nArgCount
All parameter count, suppressed and unsuppressed.
virtual void initArgumentInfo() const override
Requests function data from AddInCollection.
std::vector< OUString > maDefArgNames
Parameter name(s)
sal_uInt16 nCategory
Function category.
sal_uInt16 GetSuppressedArgCount() const
Returns the number of non-suppressed arguments.
std::optional< OUString > mxFuncDesc
Description of function.
ParameterFlags * pDefArgFlags
Flags for each parameter.
sal_uInt16 nFIndex
Unique function index.
std::optional< OUString > mxFuncName
Function name.
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getById(sal_Int32 nId) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual ~ScFunctionListObj() override
List of spreadsheet functions.
const ScFuncDesc * GetFunction(sal_uInt32 nIndex) const
sal_uInt32 GetCount() const
static ScFunctionList * GetStarCalcFunctionList()
static SC_DLLPUBLIC ScUserList * GetUserList()
SC_DLLPUBLIC const ScPrintOptions & GetPrintOptions()
void SetPrintOptions(const ScPrintOptions &rOpt)
SC_DLLPUBLIC const ScInputOptions & GetInputOptions()
SC_DLLPUBLIC const ScAppOptions & GetAppOptions()
SC_DLLPUBLIC void SetAppOptions(const ScAppOptions &rOpt)
SC_DLLPUBLIC void SetInputOptions(const ScInputOptions &rOpt)
bool GetSkipEmpty() const
void SetSkipEmpty(bool bVal)
void SetAllSheets(bool bVal)
bool GetAllSheets() const
virtual css::uno::Sequence< sal_Int32 > SAL_CALL getRecentFunctionIds() override
virtual sal_Int32 SAL_CALL getMaxRecentFunctions() override
virtual ~ScRecentFunctionsObj() override
virtual void SAL_CALL setRecentFunctionIds(const css::uno::Sequence< sal_Int32 > &aRecentFunctionIds) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
bool getPropertyBool(const OUString &aPropertyName)
virtual ~ScSpreadsheetSettings() override
sal_Int16 getPropertyInt16(const OUString &aPropertyName)
SfxItemPropertySet aPropSet
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
static sal_Int16 GetInt16FromAny(const css::uno::Any &aAny)
static bool GetBoolFromAny(const css::uno::Any &aAny)
Collection of user-defined sort lists.
void emplace_back(Args &&... args)
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Type const & get()
Sequence< sal_Int8 > aSeq
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
OUString GetString(int nId)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
bool bOptional
Parameter is optional.
constexpr OUStringLiteral SC_UNONAME_MARKHDR
constexpr OUStringLiteral SC_UNONAME_LINKUPD
constexpr OUStringLiteral SC_UNONAME_REPLWARN
constexpr OUStringLiteral SC_UNONAME_CATEGORY
constexpr OUStringLiteral SC_UNONAME_ENTERED
constexpr OUStringLiteral SC_UNONAME_DESCRIPTION
constexpr OUStringLiteral SC_UNONAME_EXPREF
constexpr OUStringLiteral SC_UNONAME_EXTFMT
constexpr OUStringLiteral SC_UNONAME_PREMPTY
constexpr OUStringLiteral SC_UNONAME_SCALE
constexpr OUStringLiteral SC_UNONAME_METRIC
constexpr OUStringLiteral SC_UNONAME_MOVEDIR
constexpr OUStringLiteral SC_UNONAME_STBFUNC
constexpr OUStringLiteral SC_UNONAME_PRMETRICS
constexpr OUStringLiteral SC_UNONAME_ARGUMENTS
constexpr OUStringLiteral SC_UNONAME_NAME
constexpr OUStringLiteral SC_UNONAME_PRALLSH
constexpr OUStringLiteral SC_UNONAME_ULISTS
constexpr OUStringLiteral SC_UNONAME_DOAUTOCP
constexpr OUStringLiteral SC_UNONAME_ID
constexpr OUStringLiteral SC_UNONAME_USETABCOL
constexpr OUStringLiteral SC_UNONAME_RANGEFIN
constexpr OUStringLiteral SC_UNONAME_MOVESEL