summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-19 15:11:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-22 07:33:37 +0100
commit00635fb32c09ab90bff713eb53333de045e301a6 (patch)
tree940ee543bade840a3aeabdc014060b733270c915
parentb9ada4bc6f2de5cd67af460d51af16075cb2894b (diff)
loplugin:useuniqueptr in DrawViewShell
Change-Id: I5125e973fbda75b2c7e52e294db74bc3bd5e0bd9 Reviewed-on: https://gerrit.libreoffice.org/51662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx4
-rw-r--r--sd/source/ui/view/drviews2.cxx74
-rw-r--r--sd/source/ui/view/drviews7.cxx4
-rw-r--r--sd/source/ui/view/drviewsa.cxx16
-rw-r--r--sd/source/ui/view/drviewse.cxx24
5 files changed, 61 insertions, 61 deletions
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 494f96cf5588..1db285351c1b 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -355,7 +355,7 @@ public:
virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController() override;
- DrawView* GetDrawView() const { return mpDrawView; }
+ DrawView* GetDrawView() const { return mpDrawView.get(); }
/** Relocation to a new parent window is not supported for DrawViewShell
objects so this method always returns <FALSE/>.
@@ -369,7 +369,7 @@ public:
//move this method to ViewShell.
//void NotifyAccUpdate();
protected:
- DrawView* mpDrawView;
+ std::unique_ptr<DrawView> mpDrawView;
SdPage* mpActualPage;
::tools::Rectangle maMarkRect;
Point maMousePos;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 6ba5d833ee9b..35d290692da6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -938,7 +938,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
// open zoom dialog
- SetCurrentFunction( FuScale::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuScale::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
}
Cancel();
}
@@ -970,7 +970,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if( mpDrawView->IsVectorizeAllowed() )
{
- SetCurrentFunction( FuVectorize::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuVectorize::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
}
else
{
@@ -1329,7 +1329,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
GraphicObject aGraphicObject( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() );
m_ExternalEdits.push_back(
o3tl::make_unique<SdrExternalToolEdit>(
- mpDrawView, pObj));
+ mpDrawView.get(), pObj));
m_ExternalEdits.back()->Edit( &aGraphicObject );
}
}
@@ -1368,7 +1368,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTRIBUTES_LINE: // BASIC
{
- SetCurrentFunction( FuLine::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuLine::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
if (rReq.GetArgs())
Cancel();
}
@@ -1376,7 +1376,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTRIBUTES_AREA: // BASIC
{
- SetCurrentFunction( FuArea::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuArea::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
if (rReq.GetArgs())
Cancel();
}
@@ -1384,7 +1384,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTR_TRANSFORM:
{
- SetCurrentFunction( FuTransform::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuTransform::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
if (rReq.GetArgs())
{
Invalidate(SID_RULER_OBJECT);
@@ -1396,14 +1396,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG: // BASIC
{
- SetCurrentFunction( FuChar::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuChar::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
case SID_PARA_DLG:
{
- SetCurrentFunction( FuParagraph::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuParagraph::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
@@ -1430,7 +1430,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case FN_SVX_SET_BULLET:
case FN_SVX_SET_NUMBER:
{
- SetCurrentFunction( FuOutlineBullet::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuOutlineBullet::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
@@ -1444,21 +1444,21 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_INSERT_ZWSP:
case SID_CHARMAP:
{
- SetCurrentFunction( FuBullet::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuBullet::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
case SID_PRESENTATION_LAYOUT:
{
- SetCurrentFunction( FuPresentationLayout::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuPresentationLayout::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
break;
case SID_PASTE_SPECIAL:
{
- SetCurrentFunction( FuInsertClipboard::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuInsertClipboard::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}
@@ -1467,7 +1467,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CHANGE_PICTURE:
case SID_INSERT_GRAPHIC:
{
- SetCurrentFunction( FuInsertGraphic::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq,
+ SetCurrentFunction( FuInsertGraphic::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq,
nSId == SID_CHANGE_PICTURE ) );
Cancel();
rReq.Ignore ();
@@ -1476,7 +1476,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_INSERT_AVMEDIA:
{
- SetCurrentFunction( FuInsertAVMedia::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuInsertAVMedia::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
@@ -1489,12 +1489,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_INSERT_DIAGRAM:
case SID_ATTR_TABLE:
{
- SetCurrentFunction( FuInsertOLE::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuInsertOLE::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
// Set the selection tool as the old one. This in particular important for the
// zoom function, in which clicking without dragging zooms as well, and that
// makes exiting the object editing mode impossible.
if (dynamic_cast<FuSelection*>( GetOldFunction().get() ) == nullptr)
- SetOldFunction( FuSelection::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetOldFunction( FuSelection::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}
@@ -1565,7 +1565,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
mpDrawView->SdrEndTextEdit();
}
- SetCurrentFunction( FuCopy::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuCopy::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
}
Cancel();
rReq.Ignore ();
@@ -1575,7 +1575,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_INSERTFILE: // BASIC
{
Broadcast (ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START));
- SetCurrentFunction( FuInsertFile::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuInsertFile::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Broadcast (ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END));
Cancel();
rReq.Done ();
@@ -1588,7 +1588,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTR_PAGE:
case SID_PAGESETUP: // BASIC ??
{
- SetCurrentFunction( FuPage::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuPage::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore (); // we generate independent macros !!
}
@@ -1597,7 +1597,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_BEFORE_OBJ:
case SID_BEHIND_OBJ:
{
- SetCurrentFunction( FuDisplayOrder::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuDisplayOrder::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
rReq.Done();
// finishes itself, no Cancel() needed!
}
@@ -1613,14 +1613,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ANIMATION_EFFECTS:
{
- SetCurrentFunction( FuObjectAnimationParameters::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuObjectAnimationParameters::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
break;
case SID_LINEEND_POLYGON:
{
- SetCurrentFunction( FuLineEnd::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuLineEnd::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
@@ -1631,14 +1631,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SAL_FALLTHROUGH;
case SID_SET_SNAPITEM:
{
- SetCurrentFunction( FuSnapLine::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuSnapLine::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
break;
case SID_MANAGE_LINKS:
{
- SetCurrentFunction( FuLink::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuLink::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}
@@ -1646,7 +1646,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_THESAURUS:
{
- SetCurrentFunction( FuThesaurus::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuThesaurus::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}
@@ -1654,7 +1654,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_TEXTATTR_DLG:
{
- SetCurrentFunction( FuTextAttrDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuTextAttrDlg::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}
@@ -1662,7 +1662,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_MEASURE_DLG:
{
- SetCurrentFunction( FuMeasureDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuMeasureDlg::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
}
@@ -1670,7 +1670,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CONNECTION_DLG:
{
- SetCurrentFunction( FuConnectionDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuConnectionDlg::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
rReq.Done();
}
@@ -1759,7 +1759,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_POLYGON_MORPHING:
{
- SetCurrentFunction( FuMorph::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuMorph::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
@@ -2790,7 +2790,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nCnt) ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView.get(), GetDocSh(), nCount, static_cast<sal_uLong>(nCnt) ));
if( pDlg )
{
pDlg->Execute();
@@ -2991,7 +2991,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( rReq.GetArgs() )
{
- SetCurrentFunction( FuTemplate::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuTemplate::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
if( rReq.GetSlot() == SID_STYLE_APPLY )
GetViewFrame()->GetBindings().Invalidate( SID_STYLE_APPLY );
Cancel();
@@ -3090,7 +3090,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_EXTRUSION_LIGHTING_FLOATER:
case SID_EXTRUSION_SURFACE_FLOATER:
case SID_EXTRUSION_DEPTH_DIALOG:
- svx::ExtrusionBar::execute( mpDrawView, rReq, GetViewFrame()->GetBindings() );
+ svx::ExtrusionBar::execute( mpDrawView.get(), rReq, GetViewFrame()->GetBindings() );
Cancel();
rReq.Ignore ();
break;
@@ -3105,7 +3105,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_FONTWORK_CHARACTER_SPACING_FLOATER:
case SID_FONTWORK_ALIGNMENT_FLOATER:
case SID_FONTWORK_CHARACTER_SPACING_DIALOG:
- svx::FontworkBar::execute( mpDrawView, rReq, GetViewFrame()->GetBindings() );
+ svx::FontworkBar::execute( mpDrawView.get(), rReq, GetViewFrame()->GetBindings() );
Cancel();
rReq.Ignore ();
break;
@@ -3211,7 +3211,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_PRESENTATION_DLG:
{
- SetCurrentFunction( FuSlideShowDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuSlideShowDlg::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
@@ -3232,14 +3232,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CUSTOMSHOW_DLG:
{
- SetCurrentFunction( FuCustomShowDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuCustomShowDlg::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
case SID_EXPAND_PAGE:
{
- SetCurrentFunction( FuExpandPage::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuExpandPage::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
@@ -3247,7 +3247,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_SUMMARY_PAGE:
{
mpDrawView->SdrEndTextEdit();
- SetCurrentFunction( FuSummaryPage::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuSummaryPage::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
Cancel();
}
break;
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 1e18528eadda..b416561ae130 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1679,8 +1679,8 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet)
rSet.DisableItem( SID_NOTES_MASTER_MODE );
}
- svx::ExtrusionBar::getState( mpDrawView, rSet );
- svx::FontworkBar::getState( mpDrawView, rSet );
+ svx::ExtrusionBar::getState( mpDrawView.get(), rSet );
+ svx::FontworkBar::getState( mpDrawView.get(), rSet );
}
void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index d92d1b9eb0fe..f4dc01c89a82 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -183,10 +183,10 @@ DrawViewShell::~DrawViewShell()
mxClipEvtLstnr.clear();
}
- delete mpDrawView;
+ mpDrawView.reset();
// Set mpView to NULL so that the destructor of the ViewShell base class
// does not access it.
- mpView = mpDrawView = nullptr;
+ mpView = nullptr;
mpFrameView->Disconnect();
maTabControl.disposeAndClear();
@@ -212,8 +212,8 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
GetDoc()->CreateFirstPages();
- mpDrawView = new DrawView(pDocSh, GetActiveWindow(), this);
- mpView = mpDrawView; // Pointer of base class ViewShell
+ mpDrawView.reset( new DrawView(pDocSh, GetActiveWindow(), this) );
+ mpView = mpDrawView.get(); // Pointer of base class ViewShell
mpDrawView->SetSwapAsynchron(); // Asynchronous load of graphics
// We do not read the page kind from the frame view anymore so we have
@@ -777,7 +777,7 @@ OUString const & DrawViewShell::GetSidebarContextName() const
void DrawViewShell::ExecGoToNextPage (SfxRequest& rReq)
{
- SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
@@ -792,7 +792,7 @@ void DrawViewShell::GetStateGoToNextPage (SfxItemSet& rSet)
void DrawViewShell::ExecGoToPreviousPage (SfxRequest& rReq)
{
- SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
@@ -807,7 +807,7 @@ void DrawViewShell::GetStateGoToPreviousPage (SfxItemSet& rSet)
void DrawViewShell::ExecGoToFirstPage (SfxRequest& rReq)
{
- SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
@@ -821,7 +821,7 @@ void DrawViewShell::GetStateGoToFirstPage (SfxItemSet& rSet)
void DrawViewShell::ExecGoToLastPage (SfxRequest& rReq)
{
- SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuNavigation::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
Cancel();
}
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 2c917163ace7..c3a63836559b 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -234,7 +234,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_TEXT_FITTOSIZE:
case SID_TEXT_FITTOSIZE_VERTICAL:
{
- SetCurrentFunction( FuText::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuText::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
GetCurrentFunction()->DoExecute(rReq);
SfxBindings& rBindings = GetViewFrame()->GetBindings();
@@ -253,7 +253,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_FM_CREATE_CONTROL:
{
- SetCurrentFunction( FuConstructUnoControl::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent ) );
+ SetCurrentFunction( FuConstructUnoControl::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
rReq.Done();
}
break;
@@ -266,7 +266,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if(pDescriptorItem)
{
// get the form view
- FmFormView* pFormView = dynamic_cast<FmFormView*>( mpDrawView );
+ FmFormView* pFormView = dynamic_cast<FmFormView*>( mpDrawView.get() );
SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : nullptr;
if(pPageView)
@@ -389,7 +389,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
}
}
- SetCurrentFunction( FuSelection::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
+ SetCurrentFunction( FuSelection::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq) );
rReq.Done();
Invalidate( SID_OBJECT_SELECT );
}
@@ -449,7 +449,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_CONNECTOR_LINES_CIRCLE_END:
case SID_CONNECTOR_LINES_CIRCLES:
{
- SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent ) );
+ SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
rReq.Done();
}
break;
@@ -462,7 +462,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_DRAW_BEZIER_FILL: // BASIC
case SID_DRAW_BEZIER_NOFILL: // BASIC
{
- SetCurrentFunction( FuConstructBezierPolygon::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent) );
+ SetCurrentFunction( FuConstructBezierPolygon::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent) );
rReq.Done();
}
break;
@@ -471,7 +471,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
if (nOldSId != SID_GLUE_EDITMODE)
{
- SetCurrentFunction( FuEditGluePoints::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent ) );
+ SetCurrentFunction( FuEditGluePoints::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
}
else
{
@@ -493,7 +493,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_DRAW_CIRCLECUT:
case SID_DRAW_CIRCLECUT_NOFILL:
{
- SetCurrentFunction( FuConstructArc::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent) );
+ SetCurrentFunction( FuConstructArc::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent) );
rReq.Done();
}
break;
@@ -507,7 +507,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_3D_CONE:
case SID_3D_PYRAMID:
{
- SetCurrentFunction( FuConstruct3dObject::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent ) );
+ SetCurrentFunction( FuConstruct3dObject::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
rReq.Done();
}
break;
@@ -520,7 +520,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_DRAWTBX_CS_STAR :
case SID_DRAW_CS_ID :
{
- SetCurrentFunction( FuConstructCustomShape::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, bPermanent ) );
+ SetCurrentFunction( FuConstructCustomShape::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
rReq.Done();
if ( nSId != SID_DRAW_CS_ID )
@@ -534,7 +534,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_FORMATPAINTBRUSH:
{
- SetCurrentFunction( FuFormatPaintBrush::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuFormatPaintBrush::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
rReq.Done();
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate( nSId );
@@ -546,7 +546,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_ZOOM_PANNING:
{
mbZoomOnPage = false;
- SetCurrentFunction( FuZoom::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+ SetCurrentFunction( FuZoom::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
rReq.Done();
}
break;