You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
5.1 KiB
98 lines
5.1 KiB
From b12cd99fd46e81e710479e2530e80c75404f3443 Mon Sep 17 00:00:00 2001
|
|
From: David Tardon <dtardon@redhat.com>
|
|
Date: Fri, 19 Jun 2015 13:52:49 +0200
|
|
Subject: [PATCH] rhbz#1233420 handle inexistent cond. format
|
|
|
|
Change-Id: I3fbbd0f3b42a3be1c2a9c54eb8f35dd18f550b16
|
|
---
|
|
sc/source/core/data/table4.cxx | 45 ++++++++++++++++++++++++++++--------------
|
|
1 file changed, 30 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
|
|
index a1bc8ee5..bc8e40e 100644
|
|
--- a/sc/source/core/data/table4.cxx
|
|
+++ b/sc/source/core/data/table4.cxx
|
|
@@ -618,9 +618,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
|
itr != itrEnd; ++itr)
|
|
{
|
|
ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr);
|
|
- ScRangeList aRange = pCondFormat->GetRange();
|
|
- aRange.Join(ScRange(nCol, nY1, nTab, nCol, nY2, nTab));
|
|
- pCondFormat->SetRange(aRange);
|
|
+ if (pCondFormat)
|
|
+ {
|
|
+ ScRangeList aRange = pCondFormat->GetRange();
|
|
+ aRange.Join(ScRange(nCol, nY1, nTab, nCol, nY2, nTab));
|
|
+ pCondFormat->SetRange(aRange);
|
|
+ }
|
|
}
|
|
}
|
|
|
|
@@ -648,9 +651,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
|
itr != itrEnd; ++itr)
|
|
{
|
|
ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr);
|
|
- ScRangeList aRange = pCondFormat->GetRange();
|
|
- aRange.Join(ScRange(nCol, nRow, nTab, nCol, nRow, nTab));
|
|
- pCondFormat->SetRange(aRange);
|
|
+ if (pCondFormat)
|
|
+ {
|
|
+ ScRangeList aRange = pCondFormat->GetRange();
|
|
+ aRange.Join(ScRange(nCol, nRow, nTab, nCol, nRow, nTab));
|
|
+ pCondFormat->SetRange(aRange);
|
|
+ }
|
|
}
|
|
}
|
|
|
|
@@ -1568,9 +1574,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
|
itr != itrEnd; ++itr)
|
|
{
|
|
ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr);
|
|
- ScRangeList aRange = pCondFormat->GetRange();
|
|
- aRange.Join(ScRange(nCol, nIMin, nTab, nCol, nIMax, nTab));
|
|
- pCondFormat->SetRange(aRange);
|
|
+ if (pCondFormat)
|
|
+ {
|
|
+ ScRangeList aRange = pCondFormat->GetRange();
|
|
+ aRange.Join(ScRange(nCol, nIMin, nTab, nCol, nIMax, nTab));
|
|
+ pCondFormat->SetRange(aRange);
|
|
+ }
|
|
}
|
|
}
|
|
else
|
|
@@ -1585,9 +1594,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
|
itr != itrEnd; ++itr)
|
|
{
|
|
ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr);
|
|
- ScRangeList aRange = pCondFormat->GetRange();
|
|
- aRange.Join(ScRange(nCol, nAtRow, nTab, nCol, nAtRow, nTab));
|
|
- pCondFormat->SetRange(aRange);
|
|
+ if (pCondFormat)
|
|
+ {
|
|
+ ScRangeList aRange = pCondFormat->GetRange();
|
|
+ aRange.Join(ScRange(nCol, nAtRow, nTab, nCol, nAtRow, nTab));
|
|
+ pCondFormat->SetRange(aRange);
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
@@ -1603,9 +1615,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
|
itr != itrEnd; ++itr)
|
|
{
|
|
ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr);
|
|
- ScRangeList aRange = pCondFormat->GetRange();
|
|
- aRange.Join(ScRange(nAtCol, static_cast<SCROW>(nRow), nTab, nAtCol, static_cast<SCROW>(nRow), nTab));
|
|
- pCondFormat->SetRange(aRange);
|
|
+ if (pCondFormat)
|
|
+ {
|
|
+ ScRangeList aRange = pCondFormat->GetRange();
|
|
+ aRange.Join(ScRange(nAtCol, static_cast<SCROW>(nRow), nTab, nAtCol, static_cast<SCROW>(nRow), nTab));
|
|
+ pCondFormat->SetRange(aRange);
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
--
|
|
2.4.2
|
|
|