[Libreoffice-commits] .: sc/source

Joseph Powers jpowers at kemper.freedesktop.org
Mon May 23 07:19:33 PDT 2011


 sc/source/filter/rtf/rtfparse.cxx |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 551cca5872a7dff96016e964a602c17a516b2ef3
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon May 23 07:19:28 2011 -0700

    Fix an old remove DECLARE_LIST bug. Could be related to fdo#37429
    
    Thanks for finding this go to npcdoom.

diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 1243138..beeb479 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -239,15 +239,21 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
         ScRTFCellDefault* pD;
         bNewDef = false;
         // rechts nicht buendig? => neue Tabelle
-        if (  nLastWidth
-           && ( (pD = &(pDefaultList->back())) != 0 )
-           && pD->nTwips != nLastWidth
-           )
+        if ( nLastWidth && !pDefaultList->empty() )
         {
-            SCCOL n1, n2;
-            if ( !( SeekTwips( nLastWidth, &n1 )
-                && SeekTwips( pD->nTwips, &n2 ) && n1 == n2) )
-                ColAdjust();
+            pD = &(pDefaultList->back());
+            if (pD->nTwips != nLastWidth )
+            {
+                SCCOL n1, n2;
+                if ( !(  SeekTwips( nLastWidth, &n1 )
+                      && SeekTwips( pD->nTwips, &n2 )
+                      && n1 == n2
+                      )
+                )
+                {
+                    ColAdjust();
+                }
+            }
         }
         // TwipCols aufbauen, erst nach nLastWidth Vergleich!
         for ( size_t i = 0, nListSize = pDefaultList->size(); i < nListSize; ++i )


More information about the Libreoffice-commits mailing list