[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Fri Mar 27 16:44:38 PDT 2015
sc/source/core/data/document.cxx | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
New commits:
commit 02bea75dd6bc91759e987fafb5dccec6ce92b0c2
Author: Eike Rathke <erack at redhat.com>
Date: Sat Mar 28 00:35:44 2015 +0100
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
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 98ea133..71d56c8 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
More information about the Libreoffice-commits
mailing list