summaryrefslogtreecommitdiff
path: root/sc/source/core/data/conditio.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-14 01:21:59 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-14 10:28:03 +0200
commit1ce2d70bc29b348f2f819d616a897e1dcb6a1a9f (patch)
tree7e51fe672a128ab42fc1e61ec3ef70623c8c1677 /sc/source/core/data/conditio.cxx
parent064c86b817c5d122af13f1bde26b51a992bf1fd9 (diff)
tdf#91385, recalc cond format formulas during hard recalc
Change-Id: I54b650d228c89a15eb37294eb108ab736163a000 Reviewed-on: https://gerrit.libreoffice.org/57409 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/core/data/conditio.cxx')
-rw-r--r--sc/source/core/data/conditio.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 018d9757c058..a13ccf622e4c 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1532,6 +1532,18 @@ ScFormatEntry* ScCondFormatEntry::Clone( ScDocument* pDoc ) const
return new ScCondFormatEntry( pDoc, *this );
}
+void ScConditionEntry::CalcAll()
+{
+ if (pFCell1 || pFCell2)
+ {
+ if (pFCell1)
+ pFCell1->SetDirty();
+ if (pFCell2)
+ pFCell2->SetDirty();
+ pCondFormat->DoRepaint();
+ }
+}
+
ScCondDateFormatEntry::ScCondDateFormatEntry( ScDocument* pDoc )
: ScFormatEntry( pDoc )
, meType(condformat::TODAY)
@@ -2028,6 +2040,18 @@ void ScConditionalFormat::endRendering()
}
}
+void ScConditionalFormat::CalcAll()
+{
+ for(auto itr = maEntries.cbegin(); itr != maEntries.cend(); ++itr)
+ {
+ if ((*itr)->GetType() == ScFormatEntry::Type::Condition)
+ {
+ ScCondFormatEntry& rFormat = static_cast<ScCondFormatEntry&>(**itr);
+ rFormat.CalcAll();
+ }
+ }
+}
+
ScConditionalFormatList::ScConditionalFormatList(const ScConditionalFormatList& rList)
{
for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
@@ -2281,4 +2305,13 @@ sal_uInt32 ScConditionalFormatList::getMaxKey() const
return nMax;
}
+void ScConditionalFormatList::CalcAll()
+{
+ for (const auto& aEntry : m_ConditionalFormats)
+ {
+ aEntry->CalcAll();
+ }
+
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */