fd#44621 : OSX DND opens drawer Query

Manik Malhotra manik10044 at iiitd.ac.in
Tue May 7 04:52:25 PDT 2013


It is now confirmed that this is the function that is called when an image
is dragged. Now the problem, I think there's something wrong with


 DropTargetDropEvent
<http://opengrok.libreoffice.org/s?defs=DropTargetDropEvent&project=core>
dtde <http://opengrok.libreoffice.org/s?defs=dtde&project=core>(static_cast
<http://opengrok.libreoffice.org/s?defs=static_cast&project=core><OWeakObject
<http://opengrok.libreoffice.org/s?defs=OWeakObject&project=core>*>(this
<http://opengrok.libreoffice.org/s?defs=this&project=core>),    345
<http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#345>
                              0,    346
<http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#346>
                              this
<http://opengrok.libreoffice.org/s?defs=this&project=core>,    347
<http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#347>
                              mSelectedDropAction
<http://opengrok.libreoffice.org/s?refs=mSelectedDropAction&project=core>,
   348  <http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#348>
                              posX
<http://opengrok.libreoffice.org/s?refs=posX&project=core>,    349
<http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#349>
                              posY
<http://opengrok.libreoffice.org/s?refs=posY&project=core>,    350
<http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#350>
                              mDragSourceSupportedActions
<http://opengrok.libreoffice.org/s?refs=mDragSourceSupportedActions&project=core>,
   351  <http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx#351>
                              xTransferable
<http://opengrok.libreoffice.org/s?refs=xTransferable&project=core>);


The 3rd argument is the current drop context.


I've tried using static_cast
<http://opengrok.libreoffice.org/s?defs=static_cast&project=core><XDropTargetDragContext
<http://opengrok.libreoffice.org/s?defs=XDropTargetDragContext&project=core>*>(
this <http://opengrok.libreoffice.org/s?defs=this&project=core>)

Which gives an error and next step would be to use static_cast
<http://opengrok.libreoffice.org/s?defs=static_cast&project=core><XDropTargetDropContext
<http://opengrok.libreoffice.org/s?defs=XDropTargetDragContext&project=core>*>(
this <http://opengrok.libreoffice.org/s?defs=this&project=core>)

Anyway,

Class DropTarget has a private field

    149  <http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.hxx#149>
 com <http://opengrok.libreoffice.org/s?defs=com&project=core>::sun
<http://opengrok.libreoffice.org/s?defs=sun&project=core>::star
<http://opengrok.libreoffice.org/s?defs=star&project=core>::uno
<http://opengrok.libreoffice.org/s?defs=uno&project=core>::Reference
<http://opengrok.libreoffice.org/s?defs=Reference&project=core>< com
<http://opengrok.libreoffice.org/s?defs=com&project=core>::sun
<http://opengrok.libreoffice.org/s?defs=sun&project=core>::star
<http://opengrok.libreoffice.org/s?defs=star&project=core>::datatransfer
<http://opengrok.libreoffice.org/s?defs=datatransfer&project=core>::dnd
<http://opengrok.libreoffice.org/s?defs=dnd&project=core>::XDropTargetDropContext
<http://opengrok.libreoffice.org/s?defs=XDropTargetDropContext&project=core>
> mXCurrentDropContext
<http://opengrok.libreoffice.org/s?refs=mXCurrentDropContext&project=core>;

Shouldn't this be passed to the constructor.

I've tried it and what happens is that drag drop operation doesn't
work anymore (Draw isn't opened either).


It is also really annoying to build everything every time since
building vcl doesn't work, is there any other way than building
dev-install ?




On Mon, May 6, 2013 at 11:15 AM, Thorsten Behrens <
thb at documentfoundation.org> wrote:

> Manik Malhotra wrote:
> > I'm not really sure which module is taking care of this, I found
> > these two files:
> >
> http://opengrok.libreoffice.org/xref/core/vcl/aqua/source/dtrans/DropTarget.cxx
> >
> Yep, that sounds about right - DropTarget::performDragOperation seems
> to be the method performing the actual drop. I'd start with a
> breakpoint there.
>
> HTH,
>
> -- Thorsten
>



-- 
Manik Malhotra
<Space For Ad>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130507/db9b1613/attachment.html>


More information about the LibreOffice mailing list