summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/conditio.cxx5
-rw-r--r--sc/source/core/data/documen7.cxx5
2 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 172556fa9d80..214217e0d64e 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -2321,6 +2321,11 @@ size_t ScConditionalFormatList::size() const
return maConditionalFormats.size();
}
+bool ScConditionalFormatList::empty() const
+{
+ return maConditionalFormats.empty();
+}
+
void ScConditionalFormatList::erase( sal_uLong nIndex )
{
for( iterator itr = begin(); itr != end(); ++itr )
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 216bec2cabce..c60619e74f24 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -141,8 +141,11 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uLong nHint, bool bB
continue;
ScConditionalFormatList* pCondFormList = GetCondFormList(nTab);
- if (pCondFormList)
+ if (pCondFormList && !pCondFormList->empty())
{
+ /* TODO: looping over all possible cells is a terrible bottle neck,
+ * for each cell looping over all conditional formats even worse,
+ * this certainly needs a better method. */
ScAddress aAddress( 0, 0, nTab);
for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
{