diff options
author | Eike Rathke <erack@redhat.com> | 2017-01-05 18:23:04 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-01-06 00:47:43 +0000 |
commit | 049862c9dd426eef74e229aee619facb98c7e7da (patch) | |
tree | dbd5a1da79d9a0dd3b9ce38cd9e6ab3110e61399 /formula | |
parent | a34de7f0e4165db1a64be42044f9d5900d0d3da9 (diff) |
check "#ERRxxx!" constants for accepted error values, tdf#105024 follow-up
Change-Id: I9a11695710baa2f4e022c8e07f01b962cfabe2e7
(cherry picked from commit 6b89bcf85a911d043c9d93e843be12e6f23adedd)
Reviewed-on: https://gerrit.libreoffice.org/32763
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 2 |
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); } } |