summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-03-20 14:58:43 +0100
committerEike Rathke <erack@redhat.com>2018-03-20 14:59:33 +0100
commit682e2891409ca87ad89e8df43d577dc8d85c48b3 (patch)
treec114b5e73f80cf7ed5239bdf9e98e9f46aae7f99 /formula
parent4abe5391803146e27fc7c2494f4dea87cb13b477 (diff)
Avoid creating a compiler for matrix check if there is no matrix support
... as indicated by m_pBtnMatrix hidden for reportdesign. tdf#116468 cleansing. Change-Id: I1727dcc9875f0728805bac63cc6c1f1533394c6c
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/formula.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 9bbc4afd4f0b..eeefd5b625f8 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -567,16 +567,15 @@ void FormulaDlg_Impl::UpdateValues( bool bForceRecalcStruct )
// Take a force-array context into account. RPN creation propagated those
// to tokens that are ref-counted so also available in the token array.
bool bForceArray = false;
- // Only necessary if it's not a matrix formula anyway.
- if (!m_pBtnMatrix->IsChecked())
+ // Only necessary if it's not a matrix formula anyway and matrix evaluation
+ // is supported, i.e. the button is visible.
+ if (m_pBtnMatrix->IsVisible() && !m_pBtnMatrix->IsChecked())
{
- /* TODO: we probably don't even need to ask a compiler instance if
- * m_pBtnMatrix is hidden. */
std::unique_ptr<FormulaCompiler> pCompiler( m_pHelper->createCompiler( *m_pTokenArray.get()));
// In the case of the reportdesign dialog there is no currently active
// OpCode symbol mapping that could be used to create strings from
// tokens, it's all dreaded API mapping. However, in that case there's
- // no array/matrix support anyway.
+ // no array/matrix support anyway, but ensure checking.
if (pCompiler->GetCurrentOpCodeMap().get())
{
const sal_Int32 nPos = m_aFuncSel.Min();