summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-11 14:50:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-12 17:36:55 +0200
commitb0dc3c644ffc3726b3616377950df25dc09d1a35 (patch)
treebcc227dc47323c41a77a49568812e8fe0f499019 /sc/source/ui
parentff1bd0f189635a6efe84337f8c6b4a366e7501e2 (diff)
coverity#1440239 Uncaught exception
Change-Id: I2b744d70ab426fbf26bcb3762aafaa569d0aafc7 Reviewed-on: https://gerrit.libreoffice.org/61675 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/inc/tabview.hxx4
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/tabview5.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 7dfcaea6de79..8ce857b54d20 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -174,7 +174,7 @@ private:
std::unique_ptr<ScPageBreakData> pPageBreakData;
std::vector<ScHighlightEntry> maHighlightRanges;
- std::unique_ptr<ScDocument> pBrushDocument; // cell formats for format paint brush
+ ScDocumentUniquePtr pBrushDocument; // cell formats for format paint brush
std::unique_ptr<SfxItemSet> pDrawBrushSet; // drawing object attributes for paint brush
Timer aScrollTimer;
@@ -600,7 +600,7 @@ public:
ScDocument* GetBrushDocument() const { return pBrushDocument.get(); }
SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet.get(); }
bool IsPaintBrushLocked() const { return bLockPaintBrush; }
- void SetBrushDocument( std::unique_ptr<ScDocument> pNew, bool bLock );
+ void SetBrushDocument( ScDocumentUniquePtr pNew, bool bLock );
void SetDrawBrushSet( std::unique_ptr<SfxItemSet> pNew, bool bLock );
void ResetBrushDocument();
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index cd52cbd4aaf9..4b9e14c3c59a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2780,7 +2780,7 @@ void ScFormatShell::ExecFormatPaintbrush( const SfxRequest& rReq )
if ( pViewData->GetSimpleArea(aDummy) != SC_MARK_SIMPLE )
pView->Unmark();
- std::unique_ptr<ScDocument> pBrushDoc(new ScDocument( SCDOCMODE_CLIP ));
+ ScDocumentUniquePtr pBrushDoc(new ScDocument( SCDOCMODE_CLIP ));
pView->CopyToClip( pBrushDoc.get(), false, true );
pView->SetBrushDocument( std::move(pBrushDoc), bLock );
}
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index c4e7768da626..4262c03a1e17 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -616,7 +616,7 @@ void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect )
}
}
-void ScTabView::SetBrushDocument( std::unique_ptr<ScDocument> pNew, bool bLock )
+void ScTabView::SetBrushDocument( ScDocumentUniquePtr pNew, bool bLock )
{
pDrawBrushSet.reset();
pBrushDocument = std::move(pNew);