sc/source/core/data/documen8.cxx | 6 ++++++ sc/source/core/tool/rangenam.cxx | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-)
New commits: commit eae9648e99be53ba441d9d8207aac6f3ce211ef2 Author: Eike Rathke <er...@redhat.com> Date: Mon Jan 29 18:23:22 2018 +0100 CheckLinkFormulaNeedingCheck() for .ods named expressions This is specifically necessary for named expressions that are used in conditional format formulas, for which RPN is generated at a later stage, not during import. Change-Id: Ia8e1d92a3a12f6c226fec56e85f23f122f2fe902 diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 8a6255651b08..5e1c90a3ece7 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. @@ -194,6 +199,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); } } commit 3ddb9a027bb138fd7640abd4ed8d10fda95a94f8 Author: Eike Rathke <er...@redhat.com> Date: Mon Jan 29 18:19:33 2018 +0100 Let CheckLinkFormulaNeedingCheck() return early if found Change-Id: I54ab8dc14f81d6b18b0d17f448187d19d8e396fc diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index eb58eb080213..172d127cc517 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -1186,12 +1186,18 @@ void ScDocument::CheckLinkFormulaNeedingCheck( const ScTokenArray& rCode ) if (rCode.GetCodeLen()) { if (rCode.HasOpCodeRPN(ocDde) || rCode.HasOpCodeRPN(ocWebservice)) + { SetLinkFormulaNeedingCheck(true); + return; + } } else if (rCode.GetLen()) { if (rCode.HasOpCode(ocDde) || rCode.HasOpCode(ocWebservice)) + { SetLinkFormulaNeedingCheck(true); + return; + } } else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits