Resolves: rhbz#1233420 crash on auto-fill

f41
David Tardon 10 years ago
parent 0817d1e736
commit ee19d30f6e

@ -0,0 +1,97 @@
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

@ -51,7 +51,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.0
Release: 7%{?libo_prerelease}%{?dist}
Release: 8%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0
Group: Applications/Productivity
URL: http://www.libreoffice.org/
@ -327,6 +327,7 @@ Patch16: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch
# upstreamed
Patch17: 0001-Resolves-tdf-89905-don-t-copy-palettes-from-shared-t.patch
Patch18: 0001-Resolves-tdf-49407-enable-CaseMap-property-in-impres.patch
Patch19: 0001-rhbz-1233420-handle-inexistent-cond.-format.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -2441,6 +2442,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Fri Jun 19 2015 David Tardon <dtardon@redhat.com> - 1:5.0.0.0-8.beta3
- Resolves: rhbz#1233420 crash on auto-fill
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:5.0.0.0-7.beta3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

Loading…
Cancel
Save