[Libreoffice-commits] core.git: 2 commits - sc/source
Eike Rathke
erack at redhat.com
Wed Jan 25 10:48:02 UTC 2017
sc/source/core/data/colorscale.cxx | 5 ++++-
sc/source/core/data/conditio.cxx | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 657eea01046c7f39ee8ca4545241372177385946
Author: Eike Rathke <erack at redhat.com>
Date: Wed Jan 25 11:40:52 2017 +0100
Resolves: tdf#104675 ScConditionalFormat ranges needed to start listening
Conditional format manager dialog holds a cloned list of
ScConditionalFormat and sets that at the document on OK. The ranges of a
format need to be set before ScFormatEntry/ScConditionEntry are added to
start their listeners.
Change-Id: I903553b1f6a8298838ee8753315a6ea263b29b08
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 0f8764b..6657dcf 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1776,6 +1776,7 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
pNewDoc = pDoc;
ScConditionalFormat* pNew = new ScConditionalFormat(nKey, pNewDoc);
+ pNew->SetRange( maRanges ); // prerequisite for listeners
for (CondFormatContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
@@ -1783,7 +1784,6 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
pNew->maEntries.push_back( std::unique_ptr<ScFormatEntry>(pNewEntry) );
pNewEntry->SetParent(pNew);
}
- pNew->SetRange( maRanges );
return pNew;
}
commit 81845445de26111eb0b7e30f45b3708389fd76cf
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jan 24 21:23:22 2017 +0100
ScFormulaListener: do not start listening to clipboard or Undo docs
Change-Id: Ic00e30eccc64cc85ee877572ef8df042899f45f5
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 2690be1..dbce784 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -36,7 +36,7 @@ ScFormulaListener::ScFormulaListener(ScDocument* pDoc):
void ScFormulaListener::startListening(ScTokenArray* pArr, const ScRange& rRange)
{
- if (!pArr)
+ if (!pArr || mpDoc->IsClipOrUndo())
return;
pArr->Reset();
@@ -123,6 +123,9 @@ private:
void ScFormulaListener::stopListening()
{
+ if (mpDoc->IsClipOrUndo())
+ return;
+
std::for_each(maCells.begin(), maCells.end(), StopListeningCell(mpDoc, this));
}
More information about the Libreoffice-commits
mailing list