diff options
author | Eike Rathke <erack@redhat.com> | 2012-08-27 22:02:45 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-08-27 22:03:49 +0200 |
commit | 0bb0937b65200382d3d8ad8f36472067ff0cbb40 (patch) | |
tree | f1f8b29b185bb6bae42da462044855556450b1d4 | |
parent | 34091bc0e33a0aa6e839f5474e53d22a79960e68 (diff) |
do not silently ignore a token API error, fdo#51926 related
Change-Id: Ie187dad84bd55bb76c795b5c4807566e80349b56
-rw-r--r-- | formula/source/core/api/token.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 4649732a1eb1..c18ca4fdc8de 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -328,7 +328,12 @@ bool FormulaTokenArray::Fill(const uno::Sequence< sheet::FormulaToken >& _aSeque const sal_Int32 nCount = _aSequence.getLength(); for (sal_Int32 nPos=0; nPos<nCount; nPos++) { - bError |= AddFormulaToken( _aSequence[nPos] ,_pRef); + bool bOneError = AddFormulaToken( _aSequence[nPos] ,_pRef); + if (bOneError) + { + AddOpCode( ocErrName); // add something that indicates an error + bError = true; + } } return bError; } diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 00e17c092779..c7e936753aad 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1162,6 +1162,8 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a AddRangeName(aTokenData.Index, aTokenData.Global); else if (eOpCode == ocDBArea) AddDBRange(aTokenData.Index); + else + bError = true; } else if ( aType.equals( cppu::UnoType<sheet::ExternalReference>::get() ) ) { |