[Libreoffice-commits] core.git: sc/qa sc/source
Caolán McNamara
caolanm at redhat.com
Sun Jan 21 23:45:29 UTC 2018
sc/qa/unit/data/xls/fail/ofz5527-1.xls |binary
sc/source/filter/excel/xicontent.cxx | 4 +++-
2 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit f6eefd96cb16a9b5607fe59bdbf9b1121c9b56e8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jan 21 16:15:30 2018 +0000
copy ScAddress before possibly joining it
Change-Id: Ib1148584b9771da67d3f4b3141184228e1bbe3a2
Reviewed-on: https://gerrit.libreoffice.org/48271
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/qa/unit/data/xls/fail/ofz5527-1.xls b/sc/qa/unit/data/xls/fail/ofz5527-1.xls
new file mode 100644
index 000000000000..334cafe42445
Binary files /dev/null and b/sc/qa/unit/data/xls/fail/ofz5527-1.xls differ
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;
}
More information about the Libreoffice-commits
mailing list