summaryrefslogtreecommitdiff
path: root/sw/source/filter/rtf/rtftbl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/rtf/rtftbl.cxx')
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index 1aa7071765e0..5266b565b3da 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -194,6 +194,11 @@ void SwRTFParser::ReadTable( int nToken )
sal_Int16 eVerOrient = text::VertOrientation::NONE;
long nLineHeight = 0;
+ if (aMergeBoxes.empty()) // can this actually happen?
+ {
+ OSL_ASSERT(false);
+ aMergeBoxes.push_back(sal_False);
+ }
SwBoxFrmFmts aBoxFmts;
SwTableBoxFmt* pBoxFmt = pDoc->MakeTableBoxFmt();
SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP;
@@ -283,8 +288,11 @@ void SwRTFParser::ReadTable( int nToken )
{
--m_nCurrentBox;
}
- pFmt = static_cast<SwTableBoxFmt*>(
- pLine->GetTabBoxes()[ m_nCurrentBox ]->GetFrmFmt());
+ if (m_nCurrentBox < pLine->GetTabBoxes().size())
+ {
+ pFmt = static_cast<SwTableBoxFmt*>(
+ pLine->GetTabBoxes()[m_nCurrentBox]->GetFrmFmt());
+ }
}
else
pFmt = aBoxFmts.back();
@@ -553,12 +561,6 @@ void SwRTFParser::ReadTable( int nToken )
pOldTblNd = pTableNode;
bNewTbl = sal_False;
-
- {
- //TabellenUmrandungen optimieren
- void* p = pFmt;
- aTblFmts.Insert( p, aTblFmts.Count() );
- }
}
else
{
@@ -653,12 +655,6 @@ void SwRTFParser::ReadTable( int nToken )
m_nCurrentBox = 0;
pOldTblNd = pTableNode;
-
- {
- // TabellenUmrandungen optimieren
- void* p = pFmt;
- aTblFmts.Insert( p, aTblFmts.Count() );
- }
}
}