Bug Hunting Session
Bug 119411 - Contextmenu Writer: Paste Special should be available in all popupmenu files
Summary: Contextmenu Writer: Paste Special should be available in all popupmenu files
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on:
Blocks: Context-Menu Paste-Special
  Show dependency treegraph
 
Reported: 2018-08-21 23:07 UTC by andreas_k
Modified: 2018-10-01 18:53 UTC (History)
5 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 andreas_k 2018-08-21 23:07:29 UTC
Some writer contextmenus have cut, copy and past and some cut, copy, paste and paste special. For better condistancy and as writer is focused on text formating Paste Special should be available in all popupmenu files.

reproduce:

1. open writer
2. right click on image, shape, table, ... will show the contextmenu where the first group is cut, copy, paste, (paste special)
Comment 1 Heiko Tietze 2018-08-22 15:27:20 UTC
Tables do have Paste Special, Shapes don't accept text unless you go into edit mode and then you get the Paste Special > Unformatted Text option, which is not working, and (raster) Images do also not well go with paste.
 
So yes to consistency but I don't see where exactly it's missing.
Comment 2 andreas_k 2018-08-26 13:20:34 UTC
Thanks for the feedback. I will check where Paste Special could be available to have consistency with different apps.
Comment 3 Xisco Faulí 2018-08-27 14:48:11 UTC
(In reply to andreas_k from comment #2)
> Thanks for the feedback. I will check where Paste Special could be available
> to have consistency with different apps.

Put it back to UNCONFIRMED once you check it...
Comment 4 andreas_k 2018-08-29 21:57:05 UTC
drawtext contextmenu can use Paste Special cause you can past formated text to a drawtext box (in writer, calc, draw and impress)
Comment 5 Xisco Faulí 2018-08-30 09:50:08 UTC
(In reply to andreas_k from comment #4)
> drawtext contextmenu can use Paste Special cause you can past formated text
> to a drawtext box (in writer, calc, draw and impress)

@Heiko, What do you think ?
Comment 6 Heiko Tietze 2018-08-31 08:26:29 UTC
(In reply to andreas_k from comment #4)
> drawtext contextmenu can use Paste Special cause you can past formated text
> to a drawtext box (in writer, calc, draw and impress)

You get Paste when in edit mode which inserts the formatted text. And you also have Paste Special but that is not working. When in "view mode", i.e. the frame is selected, the Paste operation puts the content into the document and not the textbox. That's likely not what users expect and another paste option will not help. Ideally, we keep the menu as it is and Paste gets disabled.
Comment 7 Maxim Monastirsky 2018-09-02 18:16:21 UTC
(In reply to andreas_k from comment #4)
> drawtext contextmenu can use Paste Special cause you can past formated text
> to a drawtext box (in writer, calc, draw and impress)
Paste Special can also be added to annotation.xml in Writer, and celledit.xml in Calc.

(In reply to Heiko Tietze from comment #6)
> You get Paste when in edit mode which inserts the formatted text. And you
> also have Paste Special but that is not working.
I fixed it in Bug 118674.
Comment 8 Heiko Tietze 2018-09-03 07:33:07 UTC
(In reply to Maxim Monastirsky from comment #7)
> (In reply to Heiko Tietze from comment #6)
> > You get Paste when in edit mode which inserts the formatted text. And you
> > also have Paste Special but that is not working.
> I fixed it in Bug 118674.

Maxim, you may have fixed Paste Special > Unformatted but you likely didn't introduce a meaningful format. So where is the point in this menu item?
Comment 9 Maxim Monastirsky 2018-09-03 08:34:26 UTC
(In reply to Heiko Tietze from comment #8)
> Maxim, you may have fixed Paste Special > Unformatted but you likely didn't
> introduce a meaningful format. So where is the point in this menu item?
Sorry, but I don't understand your question. What do you mean by "you likely didn't introduce a meaningful format"?
Comment 10 Heiko Tietze 2018-09-03 10:48:29 UTC
(In reply to Maxim Monastirsky from comment #9)
> (In reply to Heiko Tietze from comment #8)
> > Maxim, you may have fixed Paste Special > Unformatted but you likely didn't
> > introduce a meaningful format. So where is the point in this menu item?
> Sorry, but I don't understand your question. What do you mean by "you likely
> didn't introduce a meaningful format"?

There is nothing else but Unformatted available under Paste Special. The same as just Paste, right?
Comment 11 andreas_k 2018-09-03 10:51:33 UTC
> There is nothing else but Unformatted available under Paste Special. The
> same as just Paste, right?

The items in paste special are always the same (unformated) I can add more if more are available.

drawtext items can since Bug 118674 was fixed use unformated and formated text.
Comment 12 Maxim Monastirsky 2018-09-03 23:53:56 UTC
(In reply to Heiko Tietze from comment #10)
> There is nothing else but Unformatted available under Paste Special. The
> same as just Paste, right?
OK, so you talk about the "More Options..." item which opens the Paste Special dialog? That's indeed not useful to have in the context menu, as currently it only presents formatted vs unformatted choice, and the context menu already has paste and paste as unformatted items. But we might still consider keeping "paste as unformatted", and move it to the top level of the menu, below the ordinary paste (instead of a paste special sub menu). I think that such a highly useful function deserves to be in the context menu. (And in the future, if we get more formats, we could change it back to a sub menu. In fact, when copying from a shape, a comment, or a cell, the clipboard gets 2 formatted options which can be pasted into shapes: ODF flat XML, and RTF. We can expose both in the dialog, but I don't know how useful it will be. In the future, it will be nice to also have HTML there, so it will be possible to e.g. copy formatted text from a browser. We have some code for that in place, but it seems to need more work.)
Comment 13 andreas_k 2018-09-04 07:09:10 UTC
this is how the cut, copy, paste section look like in ALL context menues (if PasteSpecialMenu is available)

  <menu:menuitem menu:id=".uno:Cut"/>
  <menu:menuitem menu:id=".uno:Copy"/>
  <menu:menuitem menu:id=".uno:Paste"/>
  <menu:menu menu:id=".uno:PasteSpecialMenu">
    <menu:menupopup>
      <menu:menuitem menu:id=".uno:PasteUnformatted"/>
      <menu:menuitem menu:id=".uno:PasteSpecial"/>
    </menu:menupopup>
  </menu:menu>

The submenu has always two items. Should I add the same PasteSpecialMenu than in the menubar? Or when PasteSpecial isn't available show PasteUnformatted outside the submenu?
Comment 14 Heiko Tietze 2018-09-04 09:33:55 UTC
(In reply to Maxim Monastirsky from comment #12)
> OK, so you talk about the "More Options..." ...

(In reply to andreas_k from comment #13)
>   <menu:menu menu:id=".uno:PasteSpecialMenu">
>     <menu:menupopup>
>       <menu:menuitem menu:id=".uno:PasteUnformatted"/>
>       <menu:menuitem menu:id=".uno:PasteSpecial"/>
>     </menu:menupopup>
>   </menu:menu>

Apologies. Yes, I'm talking about this sub menu but I always ended with just Unformatted and never got the special stuff in my tests. And that leads me to the same conclusion as Maxim has. OTOH, if we likely can implement more options we better keep the menu structure and do not modify it. 

+1 to the change from my side now.
Comment 15 Thomas Lendo 2018-09-13 15:04:39 UTC
(In reply to Heiko Tietze from comment #14)
> +1 to the change from my side now.
+1
Comment 16 Commit Notification 2018-10-01 11:20:19 UTC
andreas kainz committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=43cd16a158d80b9a1cb3ef2961c4bf4dcd0e6505

tdf#119411 where needed added PasteUnformated

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Thomas Lendo 2018-10-01 18:53:03 UTC
Thanks, Andreas and Heiko!