summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-01-17 22:22:55 +0100
committerEike Rathke <erack@redhat.com>2018-01-17 22:23:48 +0100
commit55e484c7bcd3ef218e08d3fd93f97bf98fd8cb7f (patch)
tree05d0435c162a126aa1c5749ad504547397b92a17 /sc/source
parent34f1883e35ef9d8c35502b092b75b39ab47d221c (diff)
Move implementation to CheckLinkFormulaNeedingCheck() for further reuse
Change-Id: I541d2b6e12a88371c064b901b00e71206ee0c18e
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen8.cxx10
-rw-r--r--sc/source/core/data/formulacell.cxx3
2 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index fc38d5add74e..eb75f2be076c 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -88,6 +88,7 @@
#include <stringutil.hxx>
#include <documentlinkmgr.hxx>
#include <scopetools.hxx>
+#include <tokenarray.hxx>
#include <memory>
#include <utility>
@@ -1176,6 +1177,15 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
}
}
+void ScDocument::CheckLinkFormulaNeedingCheck( const ScTokenArray& rCode )
+{
+ if (HasLinkFormulaNeedingCheck())
+ return;
+
+ if (rCode.HasOpCodeRPN(ocDde) || rCode.HasOpCodeRPN(ocWebservice))
+ SetLinkFormulaNeedingCheck(true);
+}
+
// TimerDelays etc.
void ScDocument::KeyInput()
{
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index c280d7276681..21d8dd015d59 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1360,8 +1360,7 @@ void ScFormulaCell::CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rPr
// After loading, it must be known if ocDde/ocWebservice is in any formula
// (for external links warning, CompileXML is called at the end of loading XML file)
- if (!pDocument->HasLinkFormulaNeedingCheck() && (pCode->HasOpCodeRPN(ocDde) || pCode->HasOpCodeRPN(ocWebservice)))
- pDocument->SetLinkFormulaNeedingCheck(true);
+ pDocument->CheckLinkFormulaNeedingCheck(*pCode);
//volatile cells must be added here for import
if( pCode->IsRecalcModeAlways() || pCode->IsRecalcModeForced() ||