summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui/misc/FunctionHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/ui/misc/FunctionHelper.cxx')
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index 9c9c7450f03e..b001bf39440d 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -212,16 +212,22 @@ sal_uInt32 FunctionDescription::getVarArgsStart() const
// Don't use defines/constants that could change in future, parameter count
// could be part of an implicit stable API.
// offapi/com/sun/star/report/meta/XFunctionDescription.idl doesn't tell.
- const sal_uInt32 nVarArgs30 = 30; // ugly hard coded VAR_ARGS of formula::ParaWin
- const sal_uInt32 nPairedVarArgs60 = 60; // ugly hard coded PAIRED_VAR_ARGS of formula::ParaWin
+ const sal_uInt32 nVarArgs30 = 30; // ugly hard coded old VAR_ARGS of formula::ParaWin
+ const sal_uInt32 nPairedVarArgs60 = 60; // ugly hard coded old PAIRED_VAR_ARGS of formula::ParaWin
+ const sal_uInt32 nVarArgs255 = 255; // ugly hard coded new VAR_ARGS of formula::ParaWin
+ const sal_uInt32 nPairedVarArgs510 = 510; // ugly hard coded new PAIRED_VAR_ARGS of formula::ParaWin
sal_uInt32 nLen = m_aParameter.getLength();
// If the value of VAR_ARGS changes then adapt *and* maintain implicit API
// stability, ie. old code using the old VAR_ARGS and PAIRED_VAR_ARGS
// values must still be handled. It is *not* sufficient to simply change
// the values here.
- static_assert(nVarArgs30 == VAR_ARGS && nPairedVarArgs60 == PAIRED_VAR_ARGS,
+ static_assert(nVarArgs255 == VAR_ARGS && nPairedVarArgs510 == PAIRED_VAR_ARGS,
"VAR_ARGS or PAIRED_VAR_ARGS has unexpected value");
- if (nLen >= nPairedVarArgs60)
+ if (nLen >= nPairedVarArgs510)
+ nLen -= nPairedVarArgs510;
+ else if (nLen >= nVarArgs255)
+ nLen -= nVarArgs255;
+ else if (nLen >= nPairedVarArgs60)
nLen -= nPairedVarArgs60;
else if (nLen >= nVarArgs30)
nLen -= nVarArgs30;