summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-29 06:01:27 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-29 06:28:43 +0100
commit1a81d22a320319f57be7ac6105ffff8997fa61ad (patch)
tree895e00549523037d2e3f87854d5dad1ff1878fcd
parent28099820d2eca510f946e38e7d0973aec829e850 (diff)
handle relative refs correctly in xls import, fdo#80091
Change-Id: Ia70f96e1d31e71c56f03c828be0a4e49fff4b198
-rw-r--r--sc/source/filter/excel/excform8.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index f2c29388efff..d283616dbc28 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -611,9 +611,12 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
ExcRelToScRel8( nRowFirst, nColFirst, aCRD.Ref1, bRNorSF );
ExcRelToScRel8( nRowLast, nColLast, aCRD.Ref2, bRNorSF );
- if( IsComplColRange( nColFirst, nColLast ) )
+ bool bColRel = aCRD.Ref1.IsColRel() || aCRD.Ref2.IsColRel();
+ bool bRowRel = aCRD.Ref1.IsRowRel() || aCRD.Ref2.IsRowRel();
+
+ if( !bColRel && IsComplColRange( nColFirst, nColLast ) )
SetComplCol( aCRD );
- else if( IsComplRowRange( nRowFirst, nRowLast ) )
+ else if( !bRowRel && IsComplRowRange( nRowFirst, nRowLast ) )
SetComplRow( aCRD );
aStack << aPool.Store( aCRD );