diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-25 11:09:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-21 10:36:39 +0200 |
commit | e26f8d2592a3d7cc5b43b3246b364397dd704f0d (patch) | |
tree | 8677f333ba26a23f2999ab3a083696a8d2e29b74 /sc/source/ui/view/viewfun3.cxx | |
parent | 3dce7bd77c56e61cd9457b03e8cf4137a7630eb9 (diff) |
coverity#1401307 document checked 'Uncaught exception'
markup std::unique_ptr where coverity warns a dtor might throw exceptions which
won't throw in practice, or where std::terminate is an acceptable response if
they do
Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2
Reviewed-on: https://gerrit.libreoffice.org/41561
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 4294c55c1a07..1df722ed79f8 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -309,7 +309,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b // TODO: What's this for? break; - ::std::unique_ptr<ScDocument> pDocClip(new ScDocument(SCDOCMODE_CLIP)); + ScDocumentUniquePtr pDocClip(new ScDocument(SCDOCMODE_CLIP)); // Check for geometrical feasibility of the ranges. bool bValidRanges = true; @@ -926,7 +926,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip ScDocument* pOrigClipDoc = nullptr; - ::std::unique_ptr< ScDocument > xTransClip; + ScDocumentUniquePtr xTransClip; if ( bTranspose ) { SCCOL nX; @@ -1279,7 +1279,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, // copy from clipboard // save original data in case of calculation - std::unique_ptr<ScDocument> pMixDoc; + ScDocumentUniquePtr pMixDoc; if (nFunction != ScPasteFunc::NONE) { bSkipEmpty = false; @@ -1485,7 +1485,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( return false; } - ::std::unique_ptr<ScDocument> pTransClip(new ScDocument(SCDOCMODE_CLIP)); + ScDocumentUniquePtr pTransClip(new ScDocument(SCDOCMODE_CLIP)); pClipDoc->TransposeClip(pTransClip.get(), nFlags, bAsLink); pClipDoc = pTransClip.release(); SCCOL nTempColSize = nColSize; @@ -1542,7 +1542,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( } bool bRowInfo = ( aMarkedRange.aStart.Col()==0 && aMarkedRange.aEnd.Col()==MAXCOL ); - ::std::unique_ptr<ScDocument> pUndoDoc; + ScDocumentUniquePtr pUndoDoc; if (pDoc->IsUndoEnabled()) { pUndoDoc.reset(new ScDocument(SCDOCMODE_UNDO)); @@ -1550,7 +1550,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( pDoc->CopyToDocument(aMarkedRange, nUndoFlags, false, *pUndoDoc, &aMark); } - ::std::unique_ptr<ScDocument> pMixDoc; + ScDocumentUniquePtr pMixDoc; if ( bSkipEmpty || nFunction != ScPasteFunc::NONE) { if ( nFlags & InsertDeleteFlags::CONTENTS ) @@ -1693,7 +1693,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( return false; } - std::unique_ptr<ScDocument> pUndoDoc; + ScDocumentUniquePtr pUndoDoc; if (pDoc->IsUndoEnabled()) { pUndoDoc.reset(new ScDocument(SCDOCMODE_UNDO)); @@ -1705,7 +1705,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( } } - std::unique_ptr<ScDocument> pMixDoc; + ScDocumentUniquePtr pMixDoc; if (bSkipEmpty || nFunction != ScPasteFunc::NONE) { if (nFlags & InsertDeleteFlags::CONTENTS) @@ -1923,7 +1923,7 @@ bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos ) // run with paste ScDocument* pDoc = GetViewData().GetDocument(); - std::unique_ptr<ScDocument> pClipDoc(new ScDocument( SCDOCMODE_CLIP )); + ScDocumentUniquePtr pClipDoc(new ScDocument( SCDOCMODE_CLIP )); pDoc->CopyTabToClip( rSource.aStart.Col(), rSource.aStart.Row(), rSource.aEnd.Col(), rSource.aEnd.Row(), rSource.aStart.Tab(), pClipDoc.get() ); |