diff options
Diffstat (limited to 'sd/source/ui/view/drviewse.cxx')
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b082d9e18a9..8b69d3616037 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1458,7 +1458,9 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText, pOutl->QuickInsertField( aURLItem, ESelection() ); OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject(); - SdrRectObj* pRectObj = new SdrRectObj(OBJ_TEXT); + SdrRectObj* pRectObj = new SdrRectObj( + GetView()->getSdrModelFromSdrView(), + OBJ_TEXT); pOutl->UpdateFields(); pOutl->SetUpdateMode( true ); @@ -1534,8 +1536,12 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, if (bNewObj) try { - SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( SdrObjFactory::MakeNewObject(SdrInventor::FmForm, OBJ_FM_BUTTON, - mpDrawView->GetSdrPageView()->GetPage(), GetDoc()) ); + SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( + SdrObjFactory::MakeNewObject( + GetView()->getSdrModelFromSdrView(), + SdrInventor::FmForm, + OBJ_FM_BUTTON, + mpDrawView->GetSdrPageView()->GetPage())); Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_QUERY_THROW ); Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW ); |