summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-05-23 07:19:28 -0700
committerJoseph Powers <jpowers27@cox.net>2011-05-23 07:19:28 -0700
commit551cca5872a7dff96016e964a602c17a516b2ef3 (patch)
tree298e14586c451b255a5865e26e8d4a49ce8ca107
parenta40d55fb96728318eac7964ff069795f810ea4de (diff)
Fix an old remove DECLARE_LIST bug. Could be related to fdo#37429
Thanks for finding this go to npcdoom.
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 12431383f..beeb47932 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 )