Kaydet (Commit) a5bff392 authored tarafından Eike Rathke's avatar Eike Rathke

Move definition of VAR_ARGS and PAIRED_VAR_ARGS to formula/funcvarargs.h

... to have it at one central place instead of two. And add comments why
changing the value is not just easily done.

Change-Id: I266ea55c79c02a653a0704c33f9fa712bbcd104e
üst 9f442103
......@@ -25,12 +25,11 @@
#include "parawin.hxx"
#include "formula/formdata.hxx"
#include "formula/IFunctionDescription.hxx"
#include <formula/funcvarargs.h>
#include "ModuleHelper.hxx"
#include "ForResId.hrc"
#include "bitmaps.hlst"
#define VAR_ARGS 30
#define PAIRED_VAR_ARGS (VAR_ARGS + VAR_ARGS)
namespace formula
{
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_FORMULA_FUNCVARARGS_H
#define INCLUDED_FORMULA_FUNCVARARGS_H
/** Used to indicate a variable number of parameters for the Function Wizard.
VAR_ARGS if variable number of parameters, or VAR_ARGS+number if number of
fixed parameters and variable arguments following.
@see formula::ParaWin
@see ScFuncDescCore
@NOTE: the value can't be easily changed. If changed then
reportdesign/source/ui/misc/FunctionHelper.cxx
FunctionDescription::getVarArgsStart() has to provide some backward
compatibility for implicit API stability.
@NOTE: also
reportbuilder/java/org/libreoffice/report/pentaho/StarFunctionDescription.java
uses a hard coded value in StarFunctionDescription::getArguments() for
functionDescription.isInfiniteParameterCount() which though looks like it
could be easily adapted.
*/
#define VAR_ARGS 30
/** Used to indicate a variable number of paired parameters for the Function Wizard.
PAIRED_VAR_ARGS if variable number of paired parameters, or
PAIRED_VAR_ARGS+number if number of fixed parameters and variable paired
arguments following.
@see VAR_ARGS
*/
#define PAIRED_VAR_ARGS (VAR_ARGS + VAR_ARGS)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
......@@ -26,9 +26,6 @@
#include "svx/svxcommands.h"
#include "helpids.h"
#define VAR_ARGS 30 // variable Parameter in scfuncs.src
#define PAIRED_VAR_ARGS (VAR_ARGS + VAR_ARGS)
// areas
#define SC_VIEW_START (SID_SC_START)
......
......@@ -34,6 +34,7 @@
#include <tools/resid.hxx>
#include <tools/resmgr.hxx>
#include <unotools/collatorwrapper.hxx>
#include <formula/funcvarargs.h>
#include <memory>
#include <numeric>
......
......@@ -44,6 +44,7 @@
#include "scmatrix.hxx"
#include "addinlis.hxx"
#include <formula/errorcodes.hxx>
#include <formula/funcvarargs.h>
#include "scfuncs.hrc"
#include "optutil.hxx"
#include "addincfg.hxx"
......
......@@ -32,8 +32,8 @@
// the documentation thingy
#include <com/sun/star/sheet/FormulaLanguage.hpp>
#include <rtl/strbuf.hxx>
#include <formula/funcvarargs.h>
#include "compiler.hxx"
#include "sc.hrc"
#endif
using namespace formula;
......
......@@ -54,6 +54,7 @@
#include <tools/urlobj.hxx>
#include <comphelper/string.hxx>
#include <formula/formulahelper.hxx>
#include <formula/funcvarargs.h>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
#include <o3tl/make_unique.hxx>
......
......@@ -23,6 +23,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewsh.hxx>
#include <formula/funcvarargs.h>
#include "sc.hrc"
#include "global.hxx"
......
......@@ -21,6 +21,7 @@
#include <sal/types.h>
#include <osl/diagnose.h>
#include <cppuhelper/factory.hxx>
#include <formula/funcvarargs.h>
#include <sfx2/app.hxx>
#include <sfx2/sfxmodelfactory.hxx>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment