Kaydet (Commit) 17c77119 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

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.
üst a0afe6f3
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment