Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | insert graphic from gallery is inserted as linked graphic by default | ||||||
---|---|---|---|---|---|---|---|
Product: | Impress | Reporter: | jsc | ||||
Component: | editing | Assignee: | AOO issues mailing list <issues> | ||||
Status: | ACCEPTED --- | QA Contact: | |||||
Severity: | Normal | ||||||
Priority: | P3 | CC: | Armin.Le.Grand, hdu | ||||
Version: | 4.0.1 | ||||||
Target Milestone: | --- | ||||||
Hardware: | All | ||||||
OS: | Mac OS X, all | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | 4.1.0 | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
jsc
2014-05-21 15:31:56 UTC
Already reproducible with 4.0.1 (don't have older versions to test). Checked Writer and Calc, happens only in Draw/Impress. Checking what happens on insertion... Found a significannt difference; while on win the insertion happens using View::ExecuteDrop on the mac the View::DropInsertFileHdl is used which indeed gets an nAction==5 which means ACTION_COPY|ACTION_LINK. This is triggered using DropInsertFileHdl using the timer maDropInsertFileTimer, thus triggered from sd::View::InsertData. Both OSes execute using sd::View::InsertData, the diff is that for mac the given rDnDAction==5 and for Win it's 1. Patching the mac version to 1 executes the same as the in version. Thus the question is where the '5' comes from... Reason is that the ExecuteDropEvent feeded to Window::ExecuteDrop has mnAction==5 already set. The mechanism starts at GalleryTheme::StartDrag where as 2nd parameter the allowed actions (here DND_ACTION_COPY|DND_ACTION_LINK) is used which is 5. On Windows there is system-dependent code in project transfer which filters this allowed actions using the current pressed keys (see dtrans/source/win32.dnd:461 DropTarget::Drop and how it uses 'getFilteredActions' to reduce the allowed DND_ACTION* to the concrete ones depending on pressed keys). @Herbert: On Mac I could *not* find system-dependent code to reduce from the allowed flags to the current flags, thus '5' (or copy *and* link) stay and will be used in the drop implementations. What needs to be filled somewhere with the filtered value is a ::com::sun::star::datatransfer::dnd::DropTargetDropEvent.DropAction. Maybe that code is missing...? I found DropTarget::performDragOperation in vcl where mSelectedDropAction seems to be used, but I do not know if the mentioned filtering is done. Created attachment 83673 [details]
first shot of adjusting the DND flags on Mac
@alg: The patch doesn't yet fully work, but it gives a good idea on how to filter drag-and-drop actions on Mac depending on the status of the keyboard-modifier keys.
Reset the assignee to the default "issues@openoffice.apache.org". |