diff options
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/drawvie3.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshg.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun7.cxx | 21 |
6 files changed, 13 insertions, 35 deletions
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx index bbe58cda31c9..4be43b1354d1 100644 --- a/sc/source/ui/view/drawvie3.cxx +++ b/sc/source/ui/view/drawvie3.cxx @@ -34,10 +34,8 @@ #include <tabvwsh.hxx> #include <docsh.hxx> -ScDrawView::ScDrawView( - OutputDevice* pOut, - ScViewData* pData ) -: FmFormView(*pData->GetDocument()->GetDrawLayer(), pOut), +ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData ) : + FmFormView( pData->GetDocument()->GetDrawLayer(), pOut ), pViewData( pData ), pDev( pOut ), pDoc( pData->GetDocument() ), diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 0561a41c3d9f..de4ff2c7e003 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1197,10 +1197,7 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice, ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (pModel) { - mpLOKDrawView.reset( - new FmFormView( - *pModel, - &rDevice)); + mpLOKDrawView.reset(new FmFormView(pModel, &rDevice)); mpLOKDrawView->ShowSdrPage(mpLOKDrawView->GetModel()->GetPage(nTab)); aOutputData.SetDrawView(mpLOKDrawView.get()); aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get()); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 11596ac08e5d..ae4a3fc029cf 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -165,9 +165,7 @@ void ScPreview::UpdateDrawView() // nTab must be right if ( !pDrawView ) // New Drawing? { - pDrawView = new FmFormView( - *pModel, - this); + pDrawView = new FmFormView( pModel, this ); // The DrawView takes over the Design-Mode from the Model // (Settings "In opening Draftmode"), therefore to restore here diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 58316cf16907..cdafc4580165 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -564,10 +564,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr if( pModel ) { - pDrawView.reset( - new FmFormView( - *pModel, - pDev)); + pDrawView.reset(new FmFormView( pModel, pDev )); pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); pDrawView->SetPrintPreview(); aOutputData.SetDrawView( pDrawView.get() ); diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index d081c875c4cb..ba44266d31b0 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -60,11 +60,8 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR ScDrawView* pDrView = pView->GetScDrawView(); SdrModel* pModel = pDrView->GetModel(); - SdrObject* pObj = SdrObjFactory::MakeNewObject( - *pModel, - SdrInventor::FmForm, - OBJ_FM_BUTTON, - pDrView->GetSdrPageView()->GetPage()); + SdrObject* pObj = SdrObjFactory::MakeNewObject(SdrInventor::FmForm, OBJ_FM_BUTTON, + pDrView->GetSdrPageView()->GetPage(), pModel); SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObj ); OSL_ENSURE( pUnoCtrl, "no SdrUnoObj"); if( !pUnoCtrl ) diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index cfbd4bed996f..e1f521ce992f 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -153,12 +153,11 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, const SdrMark* pM=aMark.GetMark(nm); const SdrObject* pObj=pM->GetMarkedSdrObj(); - // Directly Clone to taget SdrModel - SdrObject* pNewObj(pObj->Clone(pDrawModel)); + SdrObject* pNewObj=pObj->Clone(); if (pNewObj!=nullptr) { - // pNewObj->SetModel(pDrawModel); + pNewObj->SetModel(pDrawModel); pNewObj->SetPage(pDestPage); // copy graphics within the same model - always needs new name @@ -194,9 +193,8 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, else { bPasteIsMove = false; // no internal move happened - // TTTT hide all non-direct SdrView constr to disable construct - // in-between classes in one of the next steps (!) - SdrView aView(*pModel); // #i71529# never create a base class of SdrView directly! + + SdrView aView(pModel); // #i71529# never create a base class of SdrView directly! SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0)); aView.MarkAllObj(pPv); Size aSize = aView.GetAllMarkedRect().GetSize(); @@ -355,11 +353,7 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X tools::Rectangle aRect( aInsPos, aSize ); ScDrawView* pDrView = GetScDrawView(); - SdrOle2Obj* pSdrObj = new SdrOle2Obj( - pDrView->getSdrModelFromSdrView(), - aObjRef, - aName, - aRect); + SdrOle2Obj* pSdrObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = pDrView->GetSdrPageView(); pDrView->InsertObjectSafe( pSdrObj, *pPV ); // don't mark if OLE @@ -438,10 +432,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, GetViewData().GetViewShell()->SetDrawShell( true ); tools::Rectangle aRect(aPos, aSize); - SdrGrafObj* pGrafObj = new SdrGrafObj( - pScDrawView->getSdrModelFromSdrView(), - rGraphic, - aRect); + SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect); // path was the name of the graphic in history |