summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-03 16:34:47 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-03 18:50:58 +0100
commitde0a3e8d5ad56e1cff049b4d6edb71ae15b7b9a5 (patch)
tree12c277cbe8481bdd884c9b4e1d229e70a301c09e
parentb82055f9d8a39bcf76b83e97451ae51829bcb219 (diff)
coverity#1240253 unchecked return value
Change-Id: I0262cb51fbc0b8e4bb6d6aabbd59a7c271768a99
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx34
1 files changed, 18 insertions, 16 deletions
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index ebb8c04feb1b..0d2633c71b37 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -498,22 +498,24 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
const SwOutlineNodes& rOutlNds = m_rDoc.GetNodes().GetOutLineNds();
sal_uInt16 nTmpPos;
- rOutlNds.Seek_Entry( pNd, &nTmpPos );
- rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
-
- // look for the section's end, now
- for( ++nTmpPos;
- nTmpPos < rOutlNds.size() &&
- nLvl < rOutlNds[ nTmpPos ]->GetTxtNode()->
- GetAttrOutlineLevel()-1;
- ++nTmpPos )
- ; // there is no block
-
- if( nTmpPos < rOutlNds.size() )
- rpRange->aEnd = *rOutlNds[ nTmpPos ];
- else
- rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
- return true;
+ if ( rOutlNds.Seek_Entry( pNd, &nTmpPos ) )
+ {
+ rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
+
+ // look for the section's end, now
+ for( ++nTmpPos;
+ nTmpPos < rOutlNds.size() &&
+ nLvl < rOutlNds[ nTmpPos ]->GetTxtNode()->
+ GetAttrOutlineLevel()-1;
+ ++nTmpPos )
+ ; // there is no block
+
+ if( nTmpPos < rOutlNds.size() )
+ rpRange->aEnd = *rOutlNds[ nTmpPos ];
+ else
+ rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
+ return true;
+ }
}
}