diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-21 16:15:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-22 00:45:04 +0100 |
commit | f6eefd96cb16a9b5607fe59bdbf9b1121c9b56e8 (patch) | |
tree | 62c7005e6d000cad9eafcdc3cb2dc0a4272d9d62 /sc | |
parent | 8aa37ca1b94a340c0ca3dc4edebdc501edc25cf5 (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>
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 b0d5b7284feb..626963c3a2a2 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -678,6 +678,8 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) // *** create the Calc conditional formatting *** + const ScAddress aPos(rPos); //in case maRanges.Join invalidates it + if( !mxScCondFmt.get() ) { mxScCondFmt.reset( new ScConditionalFormat( 0/*nKey*/, &GetDocRef() ) ); @@ -686,7 +688,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; } |