summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-01-05 18:23:04 +0100
committerEike Rathke <erack@redhat.com>2017-01-05 18:23:45 +0100
commit6b89bcf85a911d043c9d93e843be12e6f23adedd (patch)
treed6d1fcee4baa85970a9725934c4c1d1b8c6b7cfe /formula
parent44021bd4018f4f97d9f0f6b6e1f0a256e8853537 (diff)
check "#ERRxxx!" constants for accepted error values, tdf#105024 follow-up
Change-Id: I9a11695710baa2f4e022c8e07f01b962cfabe2e7
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 9e23149d2dd4..66c92fb08e3f 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1192,7 +1192,7 @@ FormulaError FormulaCompiler::GetErrorConstant( const OUString& rName ) const
if (rName.startsWithIgnoreAsciiCase("#ERR") && rName[rName.getLength()-1] == '!')
{
sal_uInt32 nErr = rName.copy( 4, rName.getLength() - 5).toUInt32();
- if (0 < nErr && nErr <= SAL_MAX_UINT16)
+ if (0 < nErr && nErr <= SAL_MAX_UINT16 && isPublishedFormulaError(static_cast<FormulaError>(nErr)))
nError = static_cast<FormulaError>(nErr);
}
}