diff options
Diffstat (limited to 'sw/source/core/undo/unfmco.cxx')
-rw-r--r-- | sw/source/core/undo/unfmco.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx index dd73605fa8fe..458b400860f9 100644 --- a/sw/source/core/undo/unfmco.cxx +++ b/sw/source/core/undo/unfmco.cxx @@ -72,10 +72,9 @@ void SwUndoFmtColl::DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM) { // Only one TextFrmColl can be applied to a section, thus request only in // this array. - sal_uInt16 const nPos = rDoc.GetTxtFmtColls()->GetPos( - static_cast<SwTxtFmtColl*>(pFmtColl) ); + // does the format still exist? - if( USHRT_MAX != nPos ) + if( rDoc.GetTxtFmtColls()->Contains(static_cast<SwTxtFmtColl*>(pFmtColl)) ) { rDoc.SetTxtFmtColl(rPaM, static_cast<SwTxtFmtColl*>(pFmtColl), mbReset, mbResetListAttrs); |