summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdouno.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-06 22:32:24 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-06 22:32:24 +0200
commiteba4d5b2b76cefde90cb3d6638c736f435023a45 (patch)
tree43befa620475c11f3dde00e5ea141e1efd95a334 /svx/source/svdraw/svdouno.cxx
parent6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91 (diff)
Revert "SOSAW080: Added first bunch of basic changes to helpers"
This reverts commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91.
Diffstat (limited to 'svx/source/svdraw/svdouno.cxx')
-rw-r--r--svx/source/svdraw/svdouno.cxx53
1 files changed, 40 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index 4a0e071ca8b9..6e364c33ade1 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -145,11 +145,9 @@ namespace
}
}
-SdrUnoObj::SdrUnoObj(
- SdrModel& rSdrModel,
- const OUString& rModelName)
-: SdrRectObj(rSdrModel),
- m_pImpl( new SdrUnoObjDataHolder )
+
+SdrUnoObj::SdrUnoObj(const OUString& rModelName)
+: m_pImpl( new SdrUnoObjDataHolder )
{
bIsUnoObj = true;
@@ -160,12 +158,9 @@ SdrUnoObj::SdrUnoObj(
CreateUnoControlModel(rModelName);
}
-SdrUnoObj::SdrUnoObj(
- SdrModel& rSdrModel,
- const OUString& rModelName,
- const uno::Reference< lang::XMultiServiceFactory >& rxSFac)
-: SdrRectObj(rSdrModel),
- m_pImpl( new SdrUnoObjDataHolder )
+SdrUnoObj::SdrUnoObj(const OUString& rModelName,
+ const uno::Reference< lang::XMultiServiceFactory >& rxSFac)
+: m_pImpl( new SdrUnoObjDataHolder )
{
bIsUnoObj = true;
@@ -255,9 +250,9 @@ OUString SdrUnoObj::TakeObjNamePlural() const
return ImpGetResStr(STR_ObjNamePluralUno);
}
-SdrUnoObj* SdrUnoObj::Clone(SdrModel* pTargetModel) const
+SdrUnoObj* SdrUnoObj::Clone() const
{
- return CloneHelper< SdrUnoObj >(pTargetModel);
+ return CloneHelper< SdrUnoObj >();
}
SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj)
@@ -333,6 +328,38 @@ 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 )