diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-12-07 10:38:25 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-12-07 10:42:58 -0500 |
commit | 561f082041c5ede44d9443e534761a79953aedad (patch) | |
tree | 616a057cce0c3610dc2b76d1570909db3117763b /sc/source/filter/excel/xistyle.cxx | |
parent | ac40f7d6503533954127e818f2bf009200c1e3f2 (diff) |
fdo#43308: Set the logic straight for "center across selection" setting.
Another unfortunate logic change introduced via DECLARE_LIST removal.
Reverting the logic to the original one.
Diffstat (limited to 'sc/source/filter/excel/xistyle.cxx')
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index d2d44670100d..21310951bd31 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1824,15 +1824,9 @@ 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 - if ( !maMergeList.empty() ) - { - ScRange* pRange = maMergeList.back(); - if( (pRange->aEnd.Row() == nScRow) - && (pRange->aEnd.Col() + 1 == nScCol) - && (eMode == xlXFModeBlank) - ) - pRange->aEnd.IncCol(); - } + ScRange* pRange = maMergeList.empty() ? NULL : maMergeList.back(); + if (pRange && (pRange->aEnd.Row() == nScRow) && (pRange->aEnd.Col() + 1 == nScCol) && (eMode == xlXFModeBlank)) + pRange->aEnd.IncCol(); else if( eMode != xlXFModeBlank ) // do not merge empty cells SetMerge( nScCol, nScRow ); } |