diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-11-24 15:51:09 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-11-24 15:56:56 +0100 |
commit | d1def6b029ad941d0b2cbecd8f682ae0d33ddd79 (patch) | |
tree | a5bcadfb7311fcad2fc541f6c84b9d41b04fb59d /sc/source/filter | |
parent | 5c522cf5836b7263981a8f9de38af54c64ef873a (diff) |
don't make 2D refs 3D refs in the cond format import, fdo#36379
Change-Id: I1c190e29ab26fab7e3ae109ea3135d7654a7cb9a
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/excform8.cxx | 18 | ||||
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/formel.hxx | 3 |
3 files changed, 14 insertions, 11 deletions
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx index 35cb3a89d71e..95b4d37f3f9b 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -158,7 +158,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, sal_Bool bError = false; sal_Bool bArrayFormula = false; TokenId nMerk0; - const bool bRangeName = eFT == FT_RangeName; + const bool bCondFormat = eFT == FT_CondFormat; + const bool bRangeName = eFT == FT_RangeName || bCondFormat; const bool bSharedFormula = eFT == FT_SharedFormula; const bool bRNorSF = bRangeName || bSharedFormula; @@ -510,7 +511,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, aSRD.nRow = nRow & 0x3FFF; aSRD.nRelTab = 0; aSRD.SetTabRel( sal_True ); - aSRD.SetFlag3D( bRangeName ); + aSRD.SetFlag3D( bRangeName && !bCondFormat ); ExcRelToScRel8( nRow, nCol, aSRD, bRangeName ); @@ -544,8 +545,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, rSRef1.nRelTab = rSRef2.nRelTab = 0; rSRef1.SetTabRel( sal_True ); rSRef2.SetTabRel( sal_True ); - rSRef1.SetFlag3D( bRangeName ); - rSRef2.SetFlag3D( bRangeName ); + rSRef1.SetFlag3D( bRangeName && !bCondFormat ); + rSRef2.SetFlag3D( bRangeName && !bCondFormat ); ExcRelToScRel8( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -945,7 +946,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa { sal_uInt8 nOp, nLen; sal_Bool bError = false; - const bool bRangeName = eFT == FT_RangeName; + const bool bCondFormat = eFT == FT_CondFormat; + const bool bRangeName = eFT == FT_RangeName || bCondFormat; const bool bSharedFormula = eFT == FT_SharedFormula; const bool bRNorSF = bRangeName || bSharedFormula; @@ -1065,7 +1067,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa aSRD.nRow = nRow & 0x3FFF; aSRD.nRelTab = 0; aSRD.SetTabRel( sal_True ); - aSRD.SetFlag3D( bRangeName ); + aSRD.SetFlag3D( bRangeName && !bCondFormat ); ExcRelToScRel8( nRow, nCol, aSRD, bRangeName ); @@ -1086,8 +1088,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa rSRef1.nRelTab = rSRef2.nRelTab = 0; rSRef1.SetTabRel( sal_True ); rSRef2.SetTabRel( sal_True ); - rSRef1.SetFlag3D( bRangeName ); - rSRef2.SetFlag3D( bRangeName ); + rSRef1.SetFlag3D( bRangeName && !bCondFormat ); + rSRef2.SetFlag3D( bRangeName && !bCondFormat ); ExcRelToScRel8( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRowLast, nColLast, aCRD.Ref2, bRangeName ); diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index edd47173f524..33cac5ad8db1 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -611,7 +611,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) { const ScTokenArray* pTokArr = 0; rFmlaConv.Reset( rPos ); - rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize1, false, FT_RangeName ); + rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize1, false, FT_CondFormat ); // formula converter owns pTokArr -> create a copy of the token array if( pTokArr ) xTokArr1.reset( pTokArr->Clone() ); @@ -624,7 +624,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) { const ScTokenArray* pTokArr = 0; rFmlaConv.Reset( rPos ); - rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize2, false, FT_RangeName ); + rFmlaConv.Convert( pTokArr, rStrm, nFmlaSize2, false, FT_CondFormat ); // formula converter owns pTokArr -> create a copy of the token array if( pTokArr ) pTokArr2.reset( pTokArr->Clone() ); diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx index 04fc46a64270..418fe14bb2b1 100644 --- a/sc/source/filter/inc/formel.hxx +++ b/sc/source/filter/inc/formel.hxx @@ -58,7 +58,8 @@ enum FORMULA_TYPE { FT_CellFormula, FT_RangeName, - FT_SharedFormula + FT_SharedFormula, + FT_CondFormat }; class _ScRangeListTabs |