diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-17 15:34:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-17 16:39:23 +0100 |
commit | 1bc196059faf2fc53bf0ffce2f634b20da4a4a16 (patch) | |
tree | e9376d4de9099dcd734b56f03b403cc5ee1f3bdd /sw | |
parent | 9d22ab17b75e57d0e98ba1bf387f3274b0065643 (diff) |
coverity#1158079 Unchecked dynamic_cast
Change-Id: Iab2c78af7dcf967ccdf5016266324c805856af0b
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 4f4eca65f6e6..4b327f73ca0c 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1036,13 +1036,13 @@ SwTxtAttr* MakeTxtAttr( case RES_TXTATR_ANNOTATION: { pNew = new SwTxtAnnotationFld( static_cast<SwFmtFld &>(rNew), nStt, rDoc.IsClipBoard() ); - if ( bIsCopy == COPY ) + if (bIsCopy == COPY) { // On copy of the annotation field do not keep the annotated text range by removing // the relation to its annotation mark (relation established via annotation field's name). // If the annotation mark is also copied, the relation and thus the annotated text range will be reestablished, // when the annotation mark is created and inserted into the document. - const_cast<SwPostItField*>(dynamic_cast< const SwPostItField* >(pNew->GetFmtFld().GetField()))->SetName( OUString() ); + const_cast<SwPostItField&>(dynamic_cast<const SwPostItField&>(*(pNew->GetFmtFld().GetField()))).SetName(OUString()); } } break; |