summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/sdtreelb.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-13 21:30:25 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-13 21:34:17 +0100
commit06ecf7d2aebe64226142ee27c2512351960f8bb1 (patch)
tree5bcdc8fad264ee9fd2855d3b8d1cf9d1d751f8c7 /sd/source/ui/dlg/sdtreelb.cxx
parent0811de12ee6727bbb9d4265217833ba02301eed8 (diff)
tdf#91125 - unwind horrendous SvTreeListBox drag&drop code.
This removes a horrible mess of shoving various process pointers into byte arrays and (potentially) pushing them across a process boundary in a gross fashion. Killed the SvLBoxDDInfo struct, and its many un-used members. Instead use the existing (also non-ideal) global variable to track the relevant state. Change-Id: I0b694bd530e7019042d22e46db831b5a4aae0e23
Diffstat (limited to 'sd/source/ui/dlg/sdtreelb.cxx')
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index d0c786403de6..485f3924c72e 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -87,15 +87,14 @@ SdPageObjsTLB::SdPageObjsTransferable::SdPageObjsTransferable(
SdPageObjsTLB& rParent,
const INetBookmark& rBookmark,
::sd::DrawDocShell& rDocShell,
- NavigatorDragType eDragType,
- const ::com::sun::star::uno::Any& rTreeListBoxData )
+ NavigatorDragType eDragType)
: SdTransferable(rDocShell.GetDoc(), NULL, true),
mrParent( rParent ),
maBookmark( rBookmark ),
mrDocShell( rDocShell ),
- meDragType( eDragType ),
- maTreeListBoxData( rTreeListBoxData )
+ meDragType( eDragType )
{
+ rParent.SetupDragOrigin();
}
VCL_BUILDER_DECL_FACTORY(SdPageObjsTLB)
@@ -128,8 +127,11 @@ bool SdPageObjsTLB::SdPageObjsTransferable::GetData( const css::datatransfer::Da
return true;
case SotClipboardFormatId::TREELISTBOX:
- SetAny(maTreeListBoxData, rFlavor);
+ {
+ css::uno::Any aTreeListBoxData; // empty for now
+ SetAny(aTreeListBoxData, rFlavor);
return true;
+ }
default:
return false;
@@ -1204,18 +1206,10 @@ void SdPageObjsTLB::DoDrag()
bIsInDrag = true;
- SvLBoxDDInfo aDDInfo;
- memset(&aDDInfo,0,sizeof(SvLBoxDDInfo));
- aDDInfo.pApp = GetpApp();
- aDDInfo.pSource = this;
- // aDDInfo.pDDStartEntry = pEntry;
- ::com::sun::star::uno::Sequence<sal_Int8> aSequence (sizeof(SvLBoxDDInfo));
- memcpy(aSequence.getArray(), &aDDInfo, sizeof(SvLBoxDDInfo));
- ::com::sun::star::uno::Any aTreeListBoxData (aSequence);
-
// object is destroyed by internal reference mechanism
- SdTransferable* pTransferable = new SdPageObjsTLB::SdPageObjsTransferable(
- *this, aBookmark, *pDocShell, eDragType, aTreeListBoxData);
+ SdTransferable* pTransferable =
+ new SdPageObjsTLB::SdPageObjsTransferable(
+ *this, aBookmark, *pDocShell, eDragType);
// Get the view.
::sd::ViewShell* pViewShell = GetViewShellForDocShell(*pDocShell);