[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Eike Rathke erack at kemper.freedesktop.org
Fri Dec 9 14:51:52 PST 2011


 sc/source/filter/excel/xistyle.cxx |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 53757e9d714d6b3cde83d5b4c390e9e2739bfb2c
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Dec 7 10:38:25 2011 -0500

    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.
    
    Signed-off-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 1f6e680..045e753 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1833,15 +1833,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 );
         }


More information about the Libreoffice-commits mailing list