diff options
author | Eike Rathke <erack@redhat.com> | 2020-05-29 15:45:12 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-05-29 18:39:52 +0200 |
commit | 92a87f9f128cf91f6af1fc7c61a85a10d659334d (patch) | |
tree | 34fdc6a25fe9e50409166292ab17ee2748eafa2d /formula | |
parent | edf9aae6f1223398b6c1cff96b5b554128aa680b (diff) |
Related: tdf#131423 CHOOSE() supports only 30 jump targets, limit in dialog
Change-Id: Ic3506ee6194ac4e74e572a10db96f100bc9e6ac2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95149
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/ui/dlg/FormulaHelper.cxx | 1 | ||||
-rw-r--r-- | formula/source/ui/dlg/parawin.cxx | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 5604c315b7f7..709a927e5040 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -48,6 +48,7 @@ namespace formula virtual bool isHidden() const override { return false; } virtual sal_uInt32 getParameterCount() const override { return 0; } virtual sal_uInt32 getVarArgsStart() const override { return 0; } + virtual sal_uInt32 getVarArgsLimit() const override { return 0; } virtual OUString getParameterName(sal_uInt32 ) const override { return OUString(); } virtual OUString getParameterDescription(sal_uInt32 ) const override { return OUString(); } virtual bool isParameterOptional(sal_uInt32 ) const override { return false; } diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 4a3b76838d7b..93b50777c20d 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -318,6 +318,8 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc) } nArgs = pFuncDesc->getSuppressedArgumentCount(); nMaxArgs = std::min( nArgs, kMaxArgCount); + if (sal_uInt16 nVarArgsLimit = pFuncDesc->getVarArgsLimit()) + nMaxArgs = std::min( nVarArgsLimit, nMaxArgs); pFuncDesc->fillVisibleArgumentMapping(aVisibleArgMapping); m_xSlider->set_vpolicy(VclPolicyType::NEVER); m_xSlider->set_size_request(-1, -1); |