diff options
Diffstat (limited to 'svx/source/svdraw/svdouno.cxx')
-rw-r--r-- | svx/source/svdraw/svdouno.cxx | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 6e364c33ade1..4a0e071ca8b9 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -145,9 +145,11 @@ namespace } } - -SdrUnoObj::SdrUnoObj(const OUString& rModelName) -: m_pImpl( new SdrUnoObjDataHolder ) +SdrUnoObj::SdrUnoObj( + SdrModel& rSdrModel, + const OUString& rModelName) +: SdrRectObj(rSdrModel), + m_pImpl( new SdrUnoObjDataHolder ) { bIsUnoObj = true; @@ -158,9 +160,12 @@ SdrUnoObj::SdrUnoObj(const OUString& rModelName) CreateUnoControlModel(rModelName); } -SdrUnoObj::SdrUnoObj(const OUString& rModelName, - const uno::Reference< lang::XMultiServiceFactory >& rxSFac) -: m_pImpl( new SdrUnoObjDataHolder ) +SdrUnoObj::SdrUnoObj( + SdrModel& rSdrModel, + const OUString& rModelName, + const uno::Reference< lang::XMultiServiceFactory >& rxSFac) +: SdrRectObj(rSdrModel), + m_pImpl( new SdrUnoObjDataHolder ) { bIsUnoObj = true; @@ -250,9 +255,9 @@ OUString SdrUnoObj::TakeObjNamePlural() const return ImpGetResStr(STR_ObjNamePluralUno); } -SdrUnoObj* SdrUnoObj::Clone() const +SdrUnoObj* SdrUnoObj::Clone(SdrModel* pTargetModel) const { - return CloneHelper< SdrUnoObj >(); + return CloneHelper< SdrUnoObj >(pTargetModel); } SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj) @@ -328,38 +333,6 @@ bool SdrUnoObj::hasSpecialDrag() const return false; } -bool SdrUnoObj::supportsFullDrag() const -{ - // override to have the possibility to enable/disable in debug and - // to check some things out. Current solution is working, so default is - // enabled - static bool bDoSupportFullDrag(true); - - return bDoSupportFullDrag; -} - -SdrObject* SdrUnoObj::getFullDragClone() const -{ - SdrObject* pRetval = nullptr; - static bool bHandleSpecial(false); - - if(bHandleSpecial) - { - // special handling for SdrUnoObj (FormControl). Create a SdrGrafObj - // for drag containing the graphical representation. This does not work too - // well, so the default is to simply clone - pRetval = new SdrGrafObj(SdrDragView::GetObjGraphic(GetModel(), this), GetLogicRect()); - } - else - { - // call parent (simply clone) - pRetval = SdrRectObj::getFullDragClone(); - } - - return pRetval; -} - - void SdrUnoObj::NbcSetLayer( SdrLayerID _nLayer ) { if ( GetLayer() == _nLayer ) |