Bug 123395 - NAVIGATOR, "copy outline to clipboard" should be available in context menu
Summary: NAVIGATOR, "copy outline to clipboard" should be available in context menu
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Wenzhe Pei
URL:
Whiteboard: target:6.3.0
Keywords: difficultyBeginner, easyHack, skillCpp, skillUI, topicUI
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2019-02-12 08:40 UTC by peter josvai
Modified: 2019-07-21 04:48 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peter josvai 2019-02-12 08:40:37 UTC
NAVIGATOR right click / context menu should include copy outline to clipboard...

why?
cause that is the place where you see the outline...
therefore, that's where you would like to "grab it" somehow...

sure, you can go "file / send / copy outline to clipboard" ...
but that doesn't come so intuitively

- - - thanks for developing LibreOffice - - - -
Comment 1 Heiko Tietze 2019-02-13 14:19:40 UTC
At what exact position do you expect the context with the full outline? I mean clicking one heading wouldn't be the right place for all headings.
Comment 2 Heiko Tietze 2019-02-21 10:13:14 UTC
We discussed the idea in the design meeting and welcome the idea. There is the root node "Headings" that could be used for this context. 

Could be an easyhack.
Comment 3 Michael Stahl (allotropia) 2019-02-21 16:34:30 UTC
the dispatch command to execute is:

UNO dispatch:
".uno:SendOutlineToClipboard"
SDI definition:
sw/sdi/swriter.sdi:SfxVoidItem SendOutlineToClipboard FN_OUTLINE_TO_CLIPBOARD

the navigator content tree is in this file:

sw/source/uibase/utlui/content.cxx:

this function creates the entries in the context menu:
SwContentTree::CreateContextMenu()
need to add a new one of course!

this function is called when the context menu is clicked:
SwContentTree::ExecuteContextMenuAction()
on the new action, it should get a SfxDispatcher from the "m_pActiveShell",
and dispatch the SendOutlineToClipboard command.

some docs about dispatch-api:
https://wiki.openoffice.org/wiki/Framework/Article/Implementation_of_the_Dispatch_API_In_SFX2

=> easy-hack
Comment 4 Wenzhe Pei 2019-03-07 20:04:15 UTC
Hi, I am new to this community, I will take this as a start, the instruction from  Michael seems pretty informative, hopefully can be done soon.
Comment 5 Commit Notification 2019-03-11 18:08:53 UTC
Wenzhe Pei committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9ccdb944a6bfde317febbf7cfc37ae8e6e6df8c9%5E%21

tdf#123395 Add "Send Outline to Clipboard" to Navigator->Context menu

It will be available in 6.3.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.
Comment 6 Michael Stahl (allotropia) 2019-03-11 18:09:45 UTC
thanks to Wenzhe Pei for the patch!
Comment 7 Commit Notification 2019-03-12 10:50:05 UTC
heiko tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/eed07fd50e35fcbfef4debe5f0046c4a0ba47f60%5E%21

Beautification to tdf#123395

It will be available in 6.3.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.
Comment 8 Xisco Faulí 2019-03-12 20:00:47 UTC
@Wenzhe Pei, thanks for patch! Would you mind adding a line about this new enhancement to https://wiki.documentfoundation.org/ReleaseNotes/6.3 ?
Comment 9 Wenzhe Pei 2019-03-12 20:56:36 UTC
(In reply to Xisco Faulí from comment #8)
> @Wenzhe Pei, thanks for patch! Would you mind adding a line about this new
> enhancement to https://wiki.documentfoundation.org/ReleaseNotes/6.3 ?

Of course, I'll do it as soon as possible. BTW, I'm new here, is it a normal thing to update release note after the patch is merged, or only when I'm told to?
Comment 10 Xisco Faulí 2019-03-13 09:33:36 UTC
(In reply to Wenzhe Pei from comment #9)
> (In reply to Xisco Faulí from comment #8)
> > @Wenzhe Pei, thanks for patch! Would you mind adding a line about this new
> > enhancement to https://wiki.documentfoundation.org/ReleaseNotes/6.3 ?
> 
> Of course, I'll do it as soon as possible. BTW, I'm new here, is it a normal
> thing to update release note after the patch is merged, or only when I'm
> told to?

You can do it once the enhancement has been implemented. no need to wait for someone to tell you. Thank a lot!
Comment 11 Wenzhe Pei 2019-03-15 16:06:41 UTC
(In reply to Xisco Faulí from comment #10)
> (In reply to Wenzhe Pei from comment #9)
> > (In reply to Xisco Faulí from comment #8)
> > > @Wenzhe Pei, thanks for patch! Would you mind adding a line about this new
> > > enhancement to https://wiki.documentfoundation.org/ReleaseNotes/6.3 ?
> > 
> > Of course, I'll do it as soon as possible. BTW, I'm new here, is it a normal
> > thing to update release note after the patch is merged, or only when I'm
> > told to?
> 
> You can do it once the enhancement has been implemented. no need to wait for
> someone to tell you. Thank a lot!

I've updated release note, thanks for the explanation.
Comment 12 Dieter 2019-07-21 04:48:14 UTC
Verified with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2f2f4767089512c34514896bc37823f9310e9dd4
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-10_02:13:57
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Wenzhe Pei, thanks for fixing it!