summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-11 14:16:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-11 21:23:42 +0100
commitb0597ba5d745974fce752e1b677451a19350d351 (patch)
tree3cd7e5414ff1d0dcf05c5bb936737dd2bcad952f /sc
parent78b60654ffc612df794c630ddb690e4242e99c94 (diff)
only call GetHasMacroFunc to set SetHasMacroFunc
and bHasMacroFunc is not accessed any other way, so this is an oxbow Change-Id: Iada84c1c4cbc2a914b78693347fa1a3521c85e6d Reviewed-on: https://gerrit.libreoffice.org/47757 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/document.hxx5
-rw-r--r--sc/qa/unit/ucalc.cxx1
-rw-r--r--sc/source/core/data/documen2.cxx1
-rw-r--r--sc/source/core/data/formulacell.cxx5
4 files changed, 0 insertions, 12 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 834783c0bff3..3d13fd4d649f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -500,8 +500,6 @@ private:
// for detective update, is set for each change of a formula
bool bDetectiveDirty;
- bool bHasMacroFunc; // valid only after loading
-
CharCompressType nAsianCompression;
sal_uInt8 nAsianKerning;
@@ -1990,9 +1988,6 @@ public:
bool IsDetectiveDirty() const { return bDetectiveDirty; }
void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
- bool GetHasMacroFunc() const { return bHasMacroFunc; }
- void SetHasMacroFunc(bool bSet) { bHasMacroFunc = bSet; }
-
void SetRangeOverflowType(ErrCode nType) { nRangeOverflowType = nType; }
bool HasRangeOverflow() const { return nRangeOverflowType != ERRCODE_NONE; }
SC_DLLPUBLIC const ErrCode& GetRangeOverflowType() const { return nRangeOverflowType; }
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 6c21736a19b0..36572e564cb5 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6548,7 +6548,6 @@ void Test::testEmptyCalcDocDefaults()
CPPUNIT_ASSERT_EQUAL( false, m_pDoc->IdleCalcTextWidth() );
CPPUNIT_ASSERT_EQUAL( true, m_pDoc->IsIdleEnabled() );
CPPUNIT_ASSERT_EQUAL( false, m_pDoc->IsDetectiveDirty() );
- CPPUNIT_ASSERT_EQUAL( false, m_pDoc->GetHasMacroFunc() );
CPPUNIT_ASSERT_EQUAL( false, m_pDoc->IsChartListenerCollectionNeedsUpdate() );
CPPUNIT_ASSERT_EQUAL( false, m_pDoc->HasRangeOverflow() );
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 373e3f6b73b2..bd0f72e76658 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -203,7 +203,6 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
bInDtorClear( false ),
bExpandRefs( false ),
bDetectiveDirty( false ),
- bHasMacroFunc( false ),
nAsianCompression(CharCompressType::Invalid),
nAsianKerning(SC_ASIANKERNING_INVALID),
bPastingDrawFromOtherDoc( false ),
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index d46bf53cb8c3..efab5fa09cf3 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1358,11 +1358,6 @@ void ScFormulaCell::CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rPr
bChanged = true;
}
- // Same as in Load: after loading, it must be known if ocMacro is in any formula
- // (for macro warning, CompileXML is called at the end of loading XML file)
- if ( !pDocument->GetHasMacroFunc() && pCode->HasOpCodeRPN( ocMacro ) )
- pDocument->SetHasMacroFunc( true );
-
//volatile cells must be added here for import
if( pCode->IsRecalcModeAlways() || pCode->IsRecalcModeForced() ||
pCode->IsRecalcModeOnLoad() || pCode->IsRecalcModeOnLoadOnce() )