diff options
-rw-r--r-- | sc/source/core/tool/rangenam.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xiname.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/oox/defnamesbuffer.cxx | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 4235ef772f22..f1f8b9d56052 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -63,9 +63,14 @@ ScRangeData::ScRangeData( ScDocument* pDok, mnMaxCol (-1) { if (!rSymbol.isEmpty()) - CompileRangeData( rSymbol, pDoc->IsImportingXML()); + { // Let the compiler set an error on unknown names for a subsequent // CompileUnresolvedXML(). + const bool bImporting = pDoc->IsImportingXML(); + CompileRangeData( rSymbol, bImporting); + if (bImporting) + pDoc->CheckLinkFormulaNeedingCheck( *pCode); + } else { // #i63513#/#i65690# don't leave pCode as NULL. @@ -198,6 +203,7 @@ void ScRangeData::CompileUnresolvedXML( sc::CompileFormulaContext& rCxt ) // Don't let the compiler set an error for unknown names on final // compile, errors are handled by the interpreter thereafter. CompileRangeData( aSymbol, false); + rCxt.getDoc()->CheckLinkFormulaNeedingCheck( *pCode); } } diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index c1bee5af50f6..344ecb6a8787 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -264,7 +264,10 @@ void XclImpName::InsertName(const ScTokenArray* pArray) } } if (pData) + { + GetDoc().CheckLinkFormulaNeedingCheck( *pData->GetCode()); mpScData = pData; // cache for later use + } } XclImpNameManager::XclImpNameManager( const XclImpRoot& rRoot ) : diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx index fa2a0cf6b685..c4cb011d0a54 100644 --- a/sc/source/filter/oox/defnamesbuffer.cxx +++ b/sc/source/filter/oox/defnamesbuffer.cxx @@ -38,6 +38,7 @@ #include "tokenarray.hxx" #include "tokenuno.hxx" #include "compiler.hxx" +#include "document.hxx" namespace oox { namespace xls { @@ -392,6 +393,7 @@ std::unique_ptr<ScTokenArray> DefinedName::getScTokens() // after, a resulting error must be reset. sal_uInt16 nErr = pArray->GetCodeError(); aCompiler.CompileTokenArray(); + getScDocument().CheckLinkFormulaNeedingCheck( *pArray); pArray->DelRPN(); pArray->SetCodeError(nErr); |