Right now, you can drag-n-drop elements from the navigator to the document in order to create copies or to insert hyper-links to the selected element. Now, suppose that under the “Drag mode” menu you find an option called “As cross reference”: using it, when you drag-n-drop a heading from the navigator a short menu appears showing some options to insert cross-references. Something like: Insert cross-reference ---------------------- Chapter name Chapter number Page number Before/After All I think this feature could make a big difference when editing long and complex documents, making more easy to perform some easy cross-referencing tasks (for more complex stuff, the Insert → Fields → Other → Cross-reference tab will be always available).
I have missed this feature for a long time. For my work flow (extensively using cross references), creating cross references by dragging from the Navigator would be the most intuitive action, rather than creating hyperlinks or copies. I know that other users may find hyperlink creation or copies more interesting, but I agree in RGB that this would be a very useful feature.
[This is an automated message.] This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it started right out as NEW without ever being explicitly confirmed. The bug is changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases. Details on how to test the 3.5.0 beta1 can be found at: http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1 more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
The feature requested is not implemented on 3.5 beta2.
Please read this message in its entirety before responding. Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed. If you have time please do the following: 1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer). 2) If it is present please leave a comment telling us what version of LibreOffice and your operating system. 3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System Please DO NOT 1) Update the version field 2) Reply via email (please reply directly on the bug tracker) 3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link: https://wiki.documentfoundation.org/QA/BugTriage There are also other ways to get involved including with marketing, UX, documentation, and of course developing - http://www.libreoffice.org/get-help/mailing-lists/. Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
*** Bug 83490 has been marked as a duplicate of this bug. ***
Version: 4.3.6.2 Build ID: 430m0(Build:2) Somewhat related, possibly related to overall fix - the drop down in the Naviator of documents to display does not 'refresh' when a new document is opened. The new document will appear in the Window drop down menu of each open document but the Navigator selector for open documents does not update. The drag mode option selected for a references does stick when changed between link/copy/insert but the drag action appears to be disabled. Without drag-n-drop even a right-click->copy so the reference could be copied and pasted into the current document would be great. Honestly that would be smoother to use than an actual drag-n-drop.
This is an elaboration on RGB's comment of 2011-04-16, which was mistakenly marked as obsolete: Currently, one can do a right click on any position shown in the navigator panel. However, the options offered there are heterogeneous. There is an initial subset of three options (division levels, drag mode, display) which are the same for any spot in the navigator panel that one may click on. The first of them concerns exclusively the section headings and has no business with the other items shown in the navigator panel. The third option does not belong here at all and may instead be offered at some place of the top bar of the navigator panel. Then there is one additional option shown upon right click on some of the items of the navigator panel and which is well-positioned there, together with the 'drag-mode' option. Suggestion: Add a third option to the right click on a section heading in the navigator bar, as follows: insert reference to this section at cursor position. Motivation: This is a shortcut for what otherwise takes the following series of steps: Insert - reference - field commands: cross-references - numbered paragraphs - number (no context) - selection - insert - close; i.e. no less then 8 clicks plus vertical scrolling through what may be hundreds of lines in the selection box. The number of clicks may be abridged to 6 if 'numbered paragraphs' and 'number (no context)' are held constant. However, six clicks plus vertical scrolling is a particularly non-ergonomic solution for such a simple and frequent operation. The suggested shortcut presupposes that the parameter setting in the box 'field commands: cross-references' has been stored and is applied, as it currently is in the six-click solution. See also Bug 113961 and Heiko Tietze's comment 3.
This feature would be more useful than inserting a link or a copy, so I am surprised that it wasn't the first thing invented for use with the drag and drop feature. Maybe the reason it hasn't been implemented is because of the question of what sort of cross-reference should be inserted. RGB's suggestion of popping up a menu after dragging is fine. Alternatively it could just use whatever format was last set in the cross-references window. Shame to see that this feature was requested over 12 years ago!
*** Bug 87078 has been marked as a duplicate of this bug. ***
We discussed the topic in the design meeting and think this idea makes a lot of sense. Dropping an entry from the Navigator should not just insert a hyperlink but offer also cross-references via pop-up menu that shows on drop. The entries should be limited to perhaps only "Page number | Chapter | Reference text || Hyperlink". Jim, something you are interested?
In my work, the types of info associated with a reference - i.e., page number, chapter number, chapter title or what not - are generally kept constant throughout a document. I.o.w., if I refer to another chapter, I do this always in the same format, rather than mentioning its number in one reference and mentioning its title in another reference. The Insert- Cross-reference window with its subwindows stores the user's choice and reapplies it in the next reference unless he changes it. Excellent. For the new feature requested (insert a cross-reference upon right-click on a Navigator item), the above choices could simply be applied in the same way. I.o.w., they need not be offered during this action. If the user wants to change them, he can always do so in the Insert - Cross-reference dialog.
Created attachment 191718 [details] Demo of enhancement to insert cross-reference by dnd from navigator Is what is shown in the demo of three additional drag modes for inserting cross references to headings on the right track? A patch that does this is here for review: https://gerrit.libreoffice.org/c/core/+/161575
(In reply to Jim Raykowski from comment #12) > Created attachment 191718 [details] > Demo of enhancement to insert cross-reference by dnd from navigator Nice work, but I think switching between the reference types via popup menu is tedious. Can we, in addition maybe, have modifier keys so one presses ctrl, for instance, and the target is the title?
Looks highly useful. Much easier than Ctrl-F2. Thanks Jim. A few cosmetic questions: 1. Maybe the "Insert as" can (should?) be dropped for all options? 2. There is a discrepancy between the Navigator bar and the context menu for Drag Mode. (I prefer the Drag Mode version where Page, Chapter, Text appears first). 3. Maybe Reference should be "Cross-reference" 4. What happens if one tries to drag frames, shapes, bookmarks, etc. with the "Text" option?
(In reply to Heiko Tietze from comment #13) > is tedious. Can we, in addition maybe, have modifier keys so one presses > ctrl, for instance, and the target is the title? I didn't know about being able to use modifier keys with the Navigator dnd. While making the patch I was wondering about what use there was for some of things in the code. This explains them! The ctrl modifier makes the drop a hyperlink, ctrl+shifts makes it a section link, and shift makes it a section copy. The current patch ignores these modifiers when the drag mode is set to any of the reference modes.
(In reply to sdc.blanco from comment #14) > 1. Maybe the "Insert as" can (should?) be dropped for all options? Maybe the 'Drag Mode' tool tip could be something like 'Drag Mode Insert Type' or 'Drag Mode Insert As' to eliminate the need for 'Insert as' in each of the options. > 2. There is a discrepancy between the Navigator bar and the context menu > for Drag Mode. (I prefer the Drag Mode version where Page, Chapter, Text > appears first). The order shows the same for me for the Drag Mode drop down control and the context menu Drag Mode sub menu. I think it also shows it that way in the demo. > 3. Maybe Reference should be "Cross-reference" Probably > 4. What happens if one tries to drag frames, shapes, bookmarks, etc. with > the "Text" option? At this point the patch only works for headings.
Created attachment 191775 [details] screenshots of demo video (In reply to Jim Raykowski from comment #15) > The current patch ignores these modifiers when the drag mode is set to > any of the reference modes. afaict the modifiers override the "mode" setting. Also, afaict this feature is not documented in help -- so maybe it is worth considering which modifiers might be used/useful here. (In reply to Jim Raykowski from comment #16) > Maybe the 'Drag Mode' tool tip could be something like 'Drag Mode Insert > Type' or 'Drag Mode Insert As' to eliminate the need for 'Insert as' in each > of the options. For tooltip/Context menu: "Drag-and-drop As..." (and drop "Insert as" for all, so that only the mode is specified) (If the ... violates the UI rules, then as alternative: "Drag-and-drop Mode" ) > The order shows the same for me for the Drag Mode drop down control and the > context menu Drag Mode sub menu. I think it also shows it that way in the > demo. Screenshots attached for what I see in the demo. Also confirmed by looking at: sw/inc/strings.hrc and sw/uiconfig/swriter/ui/navigatorpanel.ui in the patch mentioned in comment 12 -- maybe you have a later version? > At this point the patch only works for headings. Relevant for help page.
(In reply to sdc.blanco from comment #17) > Screenshots attached for what I see in the demo. Also confirmed by looking > at: sw/inc/strings.hrc and sw/uiconfig/swriter/ui/navigatorpanel.ui in the > patch mentioned in comment 12 -- maybe you have a later version? No later version, I just didn't look close enough. Thanks for pointing that out.
(In reply to Jim Raykowski from comment #15) > ...The ctrl modifier makes the drop a > hyperlink, ctrl+shifts makes it a section link, and shift makes it a section > copy. The current patch ignores these modifiers when the drag mode is set to > any of the reference modes. Was it like this before your patch? How about this? STR_HYPERLINK "Insert as Hyperlink (DnD)" STR_LINK_REGION "Insert as Section Link" STR_COPY_REGION "Insert as Section Copy" STR_PAGENUMBER_REFERENCE "Insert as Page Number Reference (Ctrl/Cmd+DnD)" STR_CHAPTER_REFERENCE "Insert as Chapter Reference (Alt+DnD)" STR_TEXT_REFERENCE "Insert as Text Reference (Shift+DnD)" (I don't see much need to link a section neither to copy it.)
(In reply to Heiko Tietze from comment #19) > (In reply to Jim Raykowski from comment #15) > > ...The ctrl modifier makes the drop a > > hyperlink, ctrl+shifts makes it a section link, and shift makes it a section > > copy. The current patch ignores these modifiers when the drag mode is set to > > any of the reference modes. > Was it like this before your patch? Yes, the modifiers worked as described before the patch. I did not know about the modifiers until comment #13 which shed light on why some things in this area of the code are there. But, when doing the patch the light was dim and I didn't provide for the modifiers to override the reference modes. I.o.w if the drag mode is set to any of the reference modes, the modifiers don't work. This will of course be changed.
Created attachment 191808 [details] Drop down and context menus with DnD+modifier keys I poked at adding an Alt key DnD modifier. It seems to involve modification of code in each VCL plugin. There is some code that alludes to having a modifier for Reference action, ACTION_REFERENCE[1][2]. Definitely beyond the scope of this patch. Currently there are three DnD modifiers Ctrl, Shift, and Ctrl+Shift. I have assigned them as shown in the attachment. I assigned the Ctrl+Shift modifier to "Insert as Section Copy" because I don't know if it would be better to be with "Insert as Page Number Reference" or "Insert as Chapter Reference" or maybe not used. [1]https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/datatransfer/dnd/DNDConstants.idl?r=5687eba4#57 [2] https://opengrok.libreoffice.org/xref/core/offapi/type_reference/offapi.idl?r=d0166429#4368
(In reply to Jim Raykowski from comment #21) > I assigned the Ctrl+Shift modifier to "Insert as Section Copy"... Do get why one would (frequently - and therefore worthy an accelerator) create a copy of a section. The "DnD" abbreviation is probably hard to translate and I asked the l10n list for ideas. Would be cool if we could use a hand pointer symbol but this glyph might be not available in all standard fonts. Or an arrow?
Created attachment 191813 [details] cross-reference popup menu on drop demo What is shown in this demo seems to jibe with RGB's original request. Should we continue in this direction and only have one cross-reference drag mode instead of three?
(In reply to Jim Raykowski from comment #23) > Should we continue in this direction and only have one cross-reference drag mode > instead of three? I like the popup menu solution but wonder how the legacy functions (hyperlink and section) could be implemented. My take: drop section (or at least don't put effort in easy use) and keep hyperlink but per modifier. (In reply to Heiko Tietze from comment #22) > Do get why one would... Don't... > The "DnD" abbreviation is probably hard to translate and I asked the l10n > list for ideas. Suggestion was to use just Drag and to start with the modifier, eg. Shift+Drag. Would be cool to use something like “🖰” U+1F5B0 but even the usual hand pointer is not guaranteed to be available in the font.
(In reply to Heiko Tietze from comment #22) > Don't get why one would create a copy of a section. -Use case 1 (in same document): Make a section with a boilerplate / disclaimer/ descriptive text, which you want to use identically in several other parts of the same document. Drag the section (as link) to the other locations in the document. -Use case 2 (in same document): You decide to reuse a heading (and its following text) in the same document. (drag heading as link to document). -Use case 3 (between documents): Want to reuse/use a heading (and text) from another document, use Navigator to select (other) document, drag heading (as link) to new document. (not arguing for an accelerator key, but this is the second time you asked about why section DnD might be needed. Seems like a regression to remove it.)
(In reply to Jim Raykowski from comment #23) > What is shown in this demo seems to jibe with RGB's original request. Should > we continue in this direction and only have one cross-reference drag mode > instead of three? Some thoughts.... a) definitely an advantage to access to all cross-reference options b) would it still be possible to select a "default" in the Drag menu? (e.g., often certain cross-references are used, such as page number. Would be practical to be able to set that default and then add page number cross references without having to go to the menu each time. But still can override default using modifier keys, as in the current version.)
(In reply to Heiko Tietze from comment #19) > STR_COPY_REGION "Insert as Section Copy" iiuc, this copy is not limited to sections. You can DnD a heading. But when it is copied, it is placed into a new section (which can be deleted subsequently), so it does not seem relevant to mention "Section" in this label. I suppose the added section is meant as a convenience to be able to see what has copied into the document.
Created attachment 191834 [details] Demo of cross-reference drag-n-drop popup approach for heading, bookmark, footnote and endnote content Attached is a demo of patchset 4: https://gerrit.libreoffice.org/c/core/+/161575/4 Still to be done, is to make it work for content objects with captions.
I suggest to change the default and have the new cross reference via plain DnD. Actually I wonder how the modifiers work together with the popup menu - you tick a radio button in order to have this option without modifier? Sounds totally wrong. https://help.libreoffice.org/latest/en-US/text/shared/guide/dragdrop.html "If you drag objects out of the Navigator, you can specify in the submenu of the Navigator's Drag Mode icon whether to copy the object, insert it as a link or insert it as a hyperlink." (Testing with 7.6 I cannot drag a heading except the mode is hyperlink; modifier keys work, however, although only only shift does something else but a hyperlink.)
(In reply to Heiko Tietze from comment #29) > I suggest to change the default and have the new cross reference via plain > DnD. Actually I wonder how the modifiers work together with the popup menu - 1:30 of attachment 191834 [details] shows how the Shift modifier changes the DnD to a cross-reference insert. Notice the 'default' drag is set to "Insert as Section Link" before the drag but when the Shift modifier is used during the drag it overrides the default to be a cross-reference insert.
Created attachment 191924 [details] Demo of inserting cross-references to captions by dragging from navigator
The latest version of the patch: - Adds the ability to insert a cross-reference to a 'References' entry by dragging from the Navigator into the document. - Makes dragging entries that only work in one drag mode ignore the set drag mode and use the only mode available, i.e, dragging references, field number range types, footnotes, and endnotes will always result in a cross-reference insert. Dragging hyperlinks will always result in a hyperlink insert. - Removes overriding the set drag mode by using a key modifier during drag. More thought is needed on this.
Created attachment 192078 [details] Demo of modifier keys bypass reference mark type popup menu Patch set 7 introduces a perhaps already suggested use of the modifier keys keys that do not change the insert-as mode (drag mode) but bypass the reference mark type popup menu. For example, when "Insert as Cross-Reference" is the set insert-as mode, holding the Shift key before releasing the mouse button will automatically set the reference mark type inserted as "Page Number (unstyled)", holding the Ctrl key sets the reference mark as "Referenced Text, and holding Ctrl+Shift sets it to "Above"/"Below". This use of the modifier keys seems more useful to me than having them change the insert-as mode. No worries if this isn't what is wanted, there is a patch also ready that makes the modifiers change the insert-as mode. Other behavior change: Content types that only work with one insert-as mode ignore the set insert-as mode and use the mode they work with. Iow, hyperlink content will always insert-as if the insert-as mode is set to "Insert as Hyperlink" and reference, footnote, endnote, and number range type fields will always insert-as if the insert-as mode is set to "Insert as Cross-Reference". Likely the (key modifiers bypass popup) hint could be improved. https://gerrit.libreoffice.org/c/core/+/161575
Created attachment 192159 [details] Demo of popup menu only version In this version drag mode is removed from the Navigator in favor of a popup menu shown on drop with insert items available for the dragged content type. The popup menu is bypassed for content types that can only have a hyperlink insert. https://gerrit.libreoffice.org/c/core/+/161575/10
I like it. But wouldn't it make more sense to always show the popup menu, even when it just allows to insert a hyperlink? And, as always, it's a matter of discussion whether to disable or hide entries that are temporarily not available.
Created attachment 192172 [details] All menu items visible (In reply to Heiko Tietze from comment #35) > I like it. But wouldn't it make more sense to always show the popup menu, > even when it just allows to insert a hyperlink? And, as always, it's a > matter of discussion whether to disable or hide entries that are temporarily > not available. PS11 changes the popup menu to always show the menu and all entries, even when it just allows to insert a hyperlink. Inserts that are not allowed are greyed out.
(In reply to Jim Raykowski from comment #36) > PS11 changes the popup menu to always show the menu and all entries... +1 (last chance for others to comment)
Overall - tremendous improvement in UX and functionality. Thanks for that. A few small comments: 1. The Modifier keys have remained in the patch? (I hope so) 2. I notice (in the patch) that the dropdown menu is manually created in a .ui file. fyi, the labels in cross-reference change sometimes (and there are still some outstanding bugs in relation to some of those labels). Would it be possible (relatively easy?) to construct the cross-reference options dynamically from the current cross-reference labels? -- which would keep this menu up-to-date, without having to notice changes and manually update them. 3. STR_REFNUMBERENTRY and STR_REFONLYSEQNOENTRY both have the same label ("Number") in the dropdown table. Probably they should be labelled differently, but cannot propose anything, because I do not know what they refer to.
(In reply to sdc.blanco from comment #38) > 1. The Modifier keys have remained in the patch? (I hope so) No, the modifier keys are gone in PS11. What functions would you recommend for them? Perhaps to bypass the popup menu for the 3 original 'Insert as' drag modes, Hyperlink, Link, and Copy? And what modifier (Ctrl, Shift, Ctrl+Shift) would be assigned to which? > 2. I notice (in the patch) that the dropdown menu is manually created in a > .ui file. fyi, the labels in cross-reference change sometimes (and there are > still some outstanding bugs in relation to some of those labels). Would it > be possible (relatively easy?) to construct the cross-reference options > dynamically from the current cross-reference labels? -- which would keep > this menu up-to-date, without having to notice changes and manually update > them. PS13 adds the menu items using the same cross reference label as the Cross-references tab page. > > 3. STR_REFNUMBERENTRY and STR_REFONLYSEQNOENTRY both have the same label > ("Number") in the dropdown table. Probably they should be labelled > differently, but cannot propose anything, because I do not know what they > refer to. I took the lable from FMT_REF_NUMBER and FMT_REF_ONLYSEQNO which are both "Number"
(In reply to Jim Raykowski from comment #39) > No, the modifier keys are gone in PS11. What functions would you recommend > for them? Perhaps to bypass the popup menu for the 3 original 'Insert as' > drag modes, Hyperlink, Link, and Copy? And what modifier (Ctrl, Shift, > Ctrl+Shift) would be assigned to which? Actually I would propose using the modifier keys as an override for the insertion of some cross-references. The version of modifier assignments in your demo (attachment 192078 [details]) seemed all right to me. Or maybe I would assign "Chapter" instead of "Above/below" to Ctrl+Shift (because then it is easier to refer to numbered headings, such as: See [chapter] or See Appendix [chapter] ) Seems less relevant to use the overrides with Hyperlink (which happens automatically in many cases), and the section/link (which may not be used so frequently, while cross-references is the issue in the OP. > I took the lable from FMT_REF_NUMBER and FMT_REF_ONLYSEQNO which are both > "Number" Not a problem. They appear in different contexts.
There is an strangeness with the gen (X11) VCL plugin, that on drop, the mouse pointer does not change from a drag pointer to a menu item select pointer for approximately 5 seconds and during that time the popup menu items can't be selected. With other VCL backends I am able to test (Qt5, Gtk3, and Windows) this does not occur. I'll put the patch in as it stands now without modifiers. They can be added after it is decided what they should do.
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/95d1e7f0873a2bbb9ab4b0aa171fec29d36c3f55 tdf#36310 Insert cross reference from Navigator by DnD It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Commit Notification from comment #42) > Jim Raykowski committed a patch related to this issue. > It has been pushed to "master": Set to fixed?
Thanks Jim! Verified in: Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 1f15d097cace14ca6e44e7652f460aa3fa7bd150 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded In release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.8&type=revision&diff=752781&oldid=752780 Please check that it's accurate. The feature definitely deserves an animated illustration, if anyone wants to add that.
(In reply to Stéphane Guillou (stragu) from comment #44) > Thanks Jim! > > Verified in: > > Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community > Build ID: 1f15d097cace14ca6e44e7652f460aa3fa7bd150 > CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 > Locale: en-AU (en_AU.UTF-8); UI: en-US > Calc: CL threaded > > In release notes: > https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24. > 8&type=revision&diff=752781&oldid=752780 > > Please check that it's accurate. The feature definitely deserves an animated > illustration, if anyone wants to add that. Thank you Stéphane for doing these release notes. I think what you wrote for this is accurate. There is one thing that caught me again while testing that might be worth mentioning somewhere. For unsaved documents the feature only works for bookmarks and sections.
(In reply to Jim Raykowski from comment #45) > There is one thing that caught me again while testing that > might be worth mentioning somewhere. For unsaved documents the feature only > works for bookmarks and sections. Thanks, just added that.