diff options
Diffstat (limited to 'sw/source/filter/rtf/rtffly.cxx')
-rw-r--r-- | sw/source/filter/rtf/rtffly.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index e31d4d3d1bd2..7876c16c9c5b 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -274,7 +274,8 @@ void SwRTFParser::SetFlysInDoc() // liegt Ende und Start vom Naechsten im gleichen Node, dann muss // gesplittet werden - if( n + 1 < (sal_uInt16)aFlyArr.size() && pFlySave->nEndCnt && + if (((static_cast<size_t>(n) + 1) < aFlyArr.size()) && + pFlySave->nEndCnt && pFlySave->nEndNd == aFlyArr[ n + 1 ]->nSttNd ) { SwCntntNode *const pCNd = pFlySave->nEndNd.GetNode().GetCntntNode(); @@ -1226,6 +1227,10 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf, // #i83368# - Assure that graphic node is enclosed by fly frame node. if ( bReadSwFly && !mbReadCellWhileReadSwFly ) { + OSL_ENSURE(!aFlyArr.empty(), + "SwRTFParser::InsPicture: fly array empty."); + if (!aFlyArr.empty()) + { // erzeuge nur einen normalen GrafikNode und ersetze diesen gegen // den vorhandenen Textnode SwNodeIndex& rIdx = pPam->GetPoint()->nNode; @@ -1246,6 +1251,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf, if( pFlySave->nEndNd == rIdx ) pFlySave->nEndNd = rIdx.GetIndex() - 1; } + } } else { |