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 9bf9b6d6f751bc1c6c3e12caf91c6e8eee3650ac
Author: Caolán McNamara <caol...@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 <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit f6eefd96cb16a9b5607fe59bdbf9b1121c9b56e8)
    Reviewed-on: https://gerrit.libreoffice.org/48296
    Reviewed-by: Eike Rathke <er...@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 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;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to