diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-06 22:32:24 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-06 22:32:24 +0200 |
commit | eba4d5b2b76cefde90cb3d6638c736f435023a45 (patch) | |
tree | 43befa620475c11f3dde00e5ea141e1efd95a334 /sd/source/ui/view | |
parent | 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91 (diff) |
Revert "SOSAW080: Added first bunch of basic changes to helpers"
This reverts commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91.
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/drviews8.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/drviews9.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/frmview.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 20 |
10 files changed, 29 insertions, 81 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 432146681d78..c89213c5880d 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1526,10 +1526,7 @@ private: std::vector< ::tools::Rectangle >::iterator iter( aAreas.begin() ); while( iter != aAreas.end() ) { - pHandout->NbcInsertObject( - new SdrPageObj( - rModel, - (*iter++))); + pHandout->NbcInsertObject( new SdrPageObj((*iter++)) ); if( bDrawLines && (iter != aAreas.end()) ) { @@ -1549,10 +1546,7 @@ private: aPathPoly.append( aPoly ); } - SdrPathObj* pPathObj = new SdrPathObj( - rModel, - OBJ_PATHLINE, - aPathPoly); + SdrPathObj* pPathObj = new SdrPathObj(OBJ_PATHLINE, aPathPoly ); pPathObj->SetMergedItem(XLineStyleItem(drawing::LineStyle_SOLID)); pPathObj->SetMergedItem(XLineColorItem(OUString(), COL_BLACK)); diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 95a4807e43c3..56a07fdb6486 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -78,15 +78,12 @@ namespace sd { * that there is no page a page is created. */ -DrawView::DrawView( - DrawDocShell* pDocSh, - OutputDevice* pOutDev, - DrawViewShell* pShell) -: ::sd::View(*pDocSh->GetDoc(), pOutDev, pShell) - ,mpDocShell(pDocSh) - ,mpDrawViewShell(pShell) - ,mpVDev(nullptr) - ,mnPOCHSmph(0) +DrawView::DrawView( DrawDocShell* pDocSh, OutputDevice* pOutDev, DrawViewShell* pShell) +: ::sd::View(*pDocSh->GetDoc(), pOutDev, pShell) +, mpDocShell(pDocSh) +, mpDrawViewShell(pShell) +, mpVDev(nullptr) +, mnPOCHSmph(0) { SetCurrentObj(OBJ_RECT); } diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index bbfd4e0d3d23..f61052b4cb68 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -520,9 +520,7 @@ public: if (!pMasterPage) continue; - SdrRectObj* pObject = new SdrRectObj( - *m_rDrawViewShell.GetDoc(), // TTTT should be reference - OBJ_TEXT); + SdrRectObj* pObject = new SdrRectObj(OBJ_TEXT); pObject->SetMergedItem(makeSdrTextAutoGrowWidthItem(true)); pObject->SetOutlinerParaObject(pOutliner->CreateParaObject()); pMasterPage->InsertObject(pObject); @@ -1087,9 +1085,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } // create new object - SdrGrafObj* pGraphicObj = new SdrGrafObj( - *GetDoc(), - aGraphic); + SdrGrafObj* pGraphicObj = new SdrGrafObj (aGraphic); // get some necessary info and ensure it const SdrMarkList& rMarkList(mpDrawView->GetMarkedObjectList()); @@ -2343,9 +2339,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) pOutl->QuickInsertField( *pFieldItem, ESelection() ); OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject(); - SdrRectObj* pRectObj = new SdrRectObj( - *GetDoc(), - OBJ_TEXT); + SdrRectObj* pRectObj = new SdrRectObj( OBJ_TEXT ); pRectObj->SetMergedItem(makeSdrTextAutoGrowWidthItem(true)); pOutl->UpdateFields(); diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index e396b8ec6ea8..1181d6c7d820 100644 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx @@ -120,10 +120,7 @@ void DrawViewShell::ScannerEvent() if( bInsertNewObject ) { - auto pGrafObj = new SdrGrafObj( - GetView()->getSdrModelFromSdrView(), - Graphic(aScanBmp), - aRect); + auto pGrafObj = new SdrGrafObj( Graphic( aScanBmp ), aRect ); SdrPageView* pPV = GetView()->GetSdrPageView(); GetView()->InsertObjectAtView( pGrafObj, *pPV, SdrInsertFlags::SETDEFLAYER ); } diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index afc151b29a96..4c2e6b1c3203 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -169,10 +169,7 @@ void DrawViewShell::ExecGallery(SfxRequest const & rReq) if( bInsertNewObject ) { - pGrafObj = new SdrGrafObj( - GetView()->getSdrModelFromSdrView(), - aGraphic, - aRect); + pGrafObj = new SdrGrafObj(aGraphic, aRect); SdrPageView* pPV = mpDrawView->GetSdrPageView(); mpDrawView->InsertObjectAtView(pGrafObj, *pPV, SdrInsertFlags::SETDEFLAYER); } diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 8b69d3616037..0b082d9e18a9 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1458,9 +1458,7 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText, pOutl->QuickInsertField( aURLItem, ESelection() ); OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject(); - SdrRectObj* pRectObj = new SdrRectObj( - GetView()->getSdrModelFromSdrView(), - OBJ_TEXT); + SdrRectObj* pRectObj = new SdrRectObj(OBJ_TEXT); pOutl->UpdateFields(); pOutl->SetUpdateMode( true ); @@ -1536,12 +1534,8 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, if (bNewObj) try { - SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( - SdrObjFactory::MakeNewObject( - GetView()->getSdrModelFromSdrView(), - SdrInventor::FmForm, - OBJ_FM_BUTTON, - mpDrawView->GetSdrPageView()->GetPage())); + SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( SdrObjFactory::MakeNewObject(SdrInventor::FmForm, OBJ_FM_BUTTON, + mpDrawView->GetSdrPageView()->GetPage(), GetDoc()) ); Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW ); Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW ); diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index b08896abf358..3795f9e09b4f 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -51,7 +51,7 @@ using namespace ::std; namespace sd { FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK */) -: SdrView(*pDrawDoc, nullptr), // TTTT SdDrawDocument* -> should be reference + : SdrView(pDrawDoc, nullptr), mnRefCount(0), mnPresViewShellId(SID_VIEWSHELL0), mbIsNavigatorShowingAllShapes(false) diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 7bff93080e61..d0344d2ab4e5 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -104,11 +104,10 @@ using namespace com::sun::star::uno; using namespace sdr::table; namespace sd { -View::View( - SdDrawDocument& rDrawDoc, - OutputDevice* pOutDev, - ViewShell* pViewShell) -: FmFormView(rDrawDoc, pOutDev), + +View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev, + ViewShell* pViewShell) + : FmFormView(&rDrawDoc, pOutDev), mrDoc(rDrawDoc), mpDocSh(rDrawDoc.GetDocSh()), mpViewSh(pViewShell), @@ -659,7 +658,7 @@ bool View::SdrBeginTextEdit( EventMultiplexerEventId::BeginTextEdit, static_cast<void*>(pObj) ); if( pOutl==nullptr && pObj ) - pOutl = SdrMakeOutliner(OutlinerMode::TextObject, pObj->getSdrModelFromSdrObject()); + pOutl = SdrMakeOutliner(OutlinerMode::TextObject, *pObj->GetModel()); // make draw&impress specific initialisations if( pOutl ) diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index cf6f72870045..c0f5f5e19413 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -797,11 +797,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, aNewSet.Put( pObj->GetMergedItemSet() ); if( bUndo ) - AddUndo( - new E3dAttributesUndoAction( - *static_cast< E3dObject* >(pPickObj), - aNewSet, - aOldSet)); + AddUndo( new E3dAttributesUndoAction( mrDoc, static_cast<E3dObject*>(pPickObj), aNewSet, aOldSet ) ); pPickObj->SetMergedItemSetAndBroadcast( aNewSet ); } @@ -999,11 +995,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.AdjustY( -(std::min( aSize.Height(), aMaxSize.Height() ) >> 1) ); ::tools::Rectangle aRect( maDropPos, aSize ); - SdrOle2Obj* pObj = new SdrOle2Obj( - getSdrModelFromSdrView(), - aObjRef, - aName, - aRect); + SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = GetSdrPageView(); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; @@ -1173,11 +1165,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.AdjustY( -(std::min( aSize.Height(), aMaxSize.Height() ) >> 1) ); ::tools::Rectangle aRect( maDropPos, aSize ); - SdrOle2Obj* pObj = new SdrOle2Obj( - getSdrModelFromSdrView(), - aObjRef, - aName, - aRect); + SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = GetSdrPageView(); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index fb17fcc2df24..f98a8ab1b216 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -116,10 +116,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, } else { - pNewGrafObj = new SdrGrafObj( - getSdrModelFromSdrView(), - rGraphic, - pPickObj->GetLogicRect()); + pNewGrafObj = new SdrGrafObj( rGraphic, pPickObj->GetLogicRect() ); pNewGrafObj->SetEmptyPresObj(true); } @@ -192,10 +189,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, MapMode( MapUnit::Map100thMM ) ); } - pNewGrafObj = new SdrGrafObj( - getSdrModelFromSdrView(), - rGraphic, - ::tools::Rectangle(rPos, aSize)); + pNewGrafObj = new SdrGrafObj( rGraphic, ::tools::Rectangle( rPos, aSize ) ); SdrPage* pPage = pPV->GetPage(); Size aPageSize( pPage->GetSize() ); aPageSize.AdjustWidth( -(pPage->GetLeftBorder() + pPage->GetRightBorder()) ); @@ -335,9 +329,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM pUserCall = pPickObj->GetUserCall(); // ReplaceObjectAtView can free pPickObj } - pNewMediaObj = new SdrMediaObj( - getSdrModelFromSdrView(), - aRect); + pNewMediaObj = new SdrMediaObj( aRect ); bool bIsPres = false; if( pPickObj ) @@ -537,11 +529,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) aRect = ::tools::Rectangle( maDropPos, aSize ); - SdrOle2Obj* pOleObj = new SdrOle2Obj( - getSdrModelFromSdrView(), - svt::EmbeddedObjectRef(xObj, nAspect), - aName, - aRect); + SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect ); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; if (mpViewSh != nullptr) |