diff options
author | Joseph Powers <jpowers27@cox.net> | 2010-12-08 22:38:24 -0800 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-12-09 18:05:21 -0500 |
commit | 6eefbb4beea48b007e0a6e8ceeaa800319b9f5d8 (patch) | |
tree | b1b9bb47248baf395774fca931443997e23e5c9a /sc/source/filter/excel/xistyle.cxx | |
parent | bf9ed0595b1ec5900523f7a2f322c8310f8b6772 (diff) |
Remove another DECLARE_LIST() from Calc
Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
Diffstat (limited to 'sc/source/filter/excel/xistyle.cxx')
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 62541f992da7..e459ed1ddd6b 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1763,7 +1763,7 @@ void XclImpXFRangeBuffer::Initialize() { maColumns.clear(); maHyperlinks.clear(); - maMergeList.RemoveAll(); + maMergeList.clear(); } void XclImpXFRangeBuffer::SetXF( const ScAddress& rScPos, sal_uInt16 nXFIndex, XclImpXFInsertMode eMode ) @@ -1788,10 +1788,15 @@ void XclImpXFRangeBuffer::SetXF( const ScAddress& rScPos, sal_uInt16 nXFIndex, X if( pXF && ((pXF->GetHorAlign() == EXC_XF_HOR_CENTER_AS) || (pXF->GetHorAlign() == EXC_XF_HOR_FILL)) ) { // expand last merged range if this attribute is set repeatedly - ScRange* pRange = maMergeList.Last(); - if( pRange && (pRange->aEnd.Row() == nScRow) && (pRange->aEnd.Col() + 1 == nScCol) - && (eMode == xlXFModeBlank) ) - pRange->aEnd.IncCol(); + if ( !maMergeList.empty() ) + { + ScRange* pRange = maMergeList.back(); + if( (pRange->aEnd.Row() == nScRow) + && (pRange->aEnd.Col() + 1 == nScCol) + && (eMode == xlXFModeBlank) + ) + pRange->aEnd.IncCol(); + } else if( eMode != xlXFModeBlank ) // #108781# do not merge empty cells SetMerge( nScCol, nScRow ); } @@ -1913,8 +1918,9 @@ void XclImpXFRangeBuffer::Finalize() XclImpHyperlink::InsertUrl( GetRoot(), aLIt->first, aLIt->second ); // apply cell merging - for( const ScRange* pRange = maMergeList.First(); pRange; pRange = maMergeList.Next() ) + for ( size_t i = 0, nRange = maMergeList.size(); i < nRange; ++i ) { + const ScRangePtr pRange = maMergeList[ i ]; const ScAddress& rStart = pRange->aStart; const ScAddress& rEnd = pRange->aEnd; bool bMultiCol = rStart.Col() != rEnd.Col(); |