diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 10:58:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 11:13:50 +0000 |
commit | 83f2bb7ef645ea01fea021dc5beba5000a5aa359 (patch) | |
tree | 80f289038206ecff141c834eadd06de46f2c0867 /xmloff | |
parent | f5a725abcead37ea63a370d55d6b0d63f25cd271 (diff) |
coverity#704115 Unchecked return value
Change-Id: Ic76d930f3f7a76c93c7b034570297b398497e9b4
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index e54b8ea2c2f5..31a4a979ccc2 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -3654,24 +3654,28 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext( { try { + bool bOK = true; if ( !mxField.is() ) - CreateField( mxField, sServicePrefix + GetServiceName() ); - Any aAny = mxField->getPropertyValue( sPropertyTextRange ); - Reference< XText > xText; - aAny >>= xText; - if( xText.is() ) + bOK = CreateField( mxField, sServicePrefix + GetServiceName() ); + if (bOK) { - UniReference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); - if( !mxCursor.is() ) + Any aAny = mxField->getPropertyValue( sPropertyTextRange ); + Reference< XText > xText; + aAny >>= xText; + if( xText.is() ) { - mxOldCursor = xTxtImport->GetCursor(); - mxCursor = xText->createTextCursor(); - } + UniReference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); + if( !mxCursor.is() ) + { + mxOldCursor = xTxtImport->GetCursor(); + mxCursor = xText->createTextCursor(); + } - if( mxCursor.is() ) - { - xTxtImport->SetCursor( mxCursor ); - pContext = xTxtImport->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList ); + if( mxCursor.is() ) + { + xTxtImport->SetCursor( mxCursor ); + pContext = xTxtImport->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList ); + } } } } |