diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-21 16:15:30 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-01-22 13:38:54 +0100 |
commit | 9bf9b6d6f751bc1c6c3e12caf91c6e8eee3650ac (patch) | |
tree | faa495c343bd2f432d961ca48d58fa88a83ff64d /sc/source | |
parent | a3c053172da5979c8a03fd43f58fc04abbfaf776 (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/48296
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 4db48555220a..3d0de0d1413c 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; } |