summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-03-28 00:35:44 +0100
committerEike Rathke <erack@redhat.com>2015-03-28 00:43:33 +0100
commit02bea75dd6bc91759e987fafb5dccec6ce92b0c2 (patch)
treef668b9b4c4e4a08e23b96383a1ac99bd0b5eb0d4 /sc
parentc79bdd062f657d1be98aa815d9b882d144f35e04 (diff)
only handle formula group if useful, tdf#90042 related
Same as in ScDocument::SetString() as changed with c79bdd062f657d1be98aa815d9b882d144f35e04, do it similar in ScDocument::SetValue() Change-Id: I7c666b176062c81a8a74cb49f345408c1060d973
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/document.cxx26
1 files changed, 17 insertions, 9 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 98ea133bb569..71d56c8bf425 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3323,18 +3323,26 @@ void ScDocument::SetValue( const ScAddress& rPos, double fVal )
if (!pTab)
return;
- // In case setting this string affects an existing formula group, record
- // its above and below position for later listening.
+ const ScFormulaCell* pCurCellFormula = pTab->GetFormulaCell(rPos.Col(), rPos.Row());
+ if (pCurCellFormula && pCurCellFormula->IsShared())
+ {
+ // In case setting this string affects an existing formula group, record
+ // its above and below position for later listening.
- std::vector<ScAddress> aGroupPos;
- sc::EndListeningContext aCxt(*this);
- EndListeningIntersectedGroup(aCxt, rPos, &aGroupPos);
- aCxt.purgeEmptyBroadcasters();
+ std::vector<ScAddress> aGroupPos;
+ sc::EndListeningContext aCxt(*this);
+ EndListeningIntersectedGroup(aCxt, rPos, &aGroupPos);
+ aCxt.purgeEmptyBroadcasters();
- pTab->SetValue(rPos.Col(), rPos.Row(), fVal);
+ pTab->SetValue(rPos.Col(), rPos.Row(), fVal);
- SetNeedsListeningGroups(aGroupPos);
- StartNeededListeners();
+ SetNeedsListeningGroups(aGroupPos);
+ StartNeededListeners();
+ }
+ else
+ {
+ pTab->SetValue(rPos.Col(), rPos.Row(), fVal);
+ }
}
OUString ScDocument::GetString( SCCOL nCol, SCROW nRow, SCTAB nTab ) const