diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-05 20:39:20 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-06 00:26:41 +0200 |
commit | 455feac565c124a670d72bdd985e398021fb6ae9 (patch) | |
tree | 178d78cfb2983d347a3620f1949d18225df99f41 | |
parent | e454487d3a7349a1ec19b9785e36ad9e50add542 (diff) |
adapt xls import to new cond formats
Change-Id: Ibf8149d14c1404fc6e82ec285be9389072f24c31
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 0d4319ae7226..c5f6dad50a6a 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -650,19 +650,10 @@ void XclImpCondFormat::Apply() { ScDocument& rDoc = GetDoc(); - sal_uLong nKey = rDoc.AddCondFormat( mxScCondFmt->Clone(), maRanges.front()->aStart.Tab() ); - ScPatternAttr aPattern( rDoc.GetPool() ); - aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nKey ) ); + SCTAB nTab = maRanges.front()->aStart.Tab(); + sal_uLong nKey = rDoc.AddCondFormat( mxScCondFmt->Clone(), nTab ); - // maRanges contains only valid cell ranges - for ( size_t i = 0, nRanges = maRanges.size(); i < nRanges; ++i ) - { - const ScRange* pScRange = maRanges[ i ]; - rDoc.ApplyPatternAreaTab( - pScRange->aStart.Col(), pScRange->aStart.Row(), - pScRange->aEnd.Col(), pScRange->aEnd.Row(), - pScRange->aStart.Tab(), aPattern ); - } + rDoc.AddCondFormatData( maRanges, nTab, nKey ); } } |