diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-21 16:15:30 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-06 14:49:23 +0100 |
commit | 65b393685e62d2f685273b1a23d0cff7d299603d (patch) | |
tree | 084fdcc57a4eef0d34a351f479721e88120d9026 /sc | |
parent | 49b75728ec6f998d0695fe7a68470082c9ab1a0a (diff) |
copy ScAddress before possibly joining it
Change-Id: Ib1148584b9771da67d3f4b3141184228e1bbe3a2
Reviewed-on: https://gerrit.libreoffice.org/48271
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit f6eefd96cb16a9b5607fe59bdbf9b1121c9b56e8)
Reviewed-on: https://gerrit.libreoffice.org/48298
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 915ce86d14eb219fee467443fe57a984648f3836)
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xls/fail/ofz5527-1.xls | bin | 0 -> 6657 bytes | |||
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 4 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sc/qa/unit/data/xls/fail/ofz5527-1.xls b/sc/qa/unit/data/xls/fail/ofz5527-1.xls Binary files differnew file mode 100644 index 000000000000..334cafe42445 --- /dev/null +++ b/sc/qa/unit/data/xls/fail/ofz5527-1.xls diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 1c0503e3fa7c..0e9335f387cf 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -684,6 +684,8 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) // *** create the Calc conditional formatting *** + const ScAddress aPos(rPos); //in case maRanges.Join invalidates it + if( !mxScCondFmt.get() ) { sal_uLong nKey = 0; @@ -693,7 +695,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) mxScCondFmt->SetRange(maRanges); } - ScCondFormatEntry* pEntry = new ScCondFormatEntry( eMode, xTokArr1.get(), pTokArr2.get(), &GetDocRef(), rPos, aStyleName ); + ScCondFormatEntry* pEntry = new ScCondFormatEntry(eMode, xTokArr1.get(), pTokArr2.get(), &GetDocRef(), aPos, aStyleName); mxScCondFmt->AddEntry( pEntry ); ++mnCondIndex; } |