Bug 50746 - Make "paste unformatted text" command work in Calc
Summary: Make "paste unformatted text" command work in Calc
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Serge Krot (CIB)
URL:
Whiteboard: target:6.0.0
Keywords: needsDevEval, topicUI
: 102260 (view as bug list)
Depends on:
Blocks: UNO-Command-New Unify-Across-Apps Paste-Special-Unformatted
  Show dependency treegraph
 
Reported: 2012-06-05 12:36 UTC by efelthauser
Modified: 2017-11-23 11:20 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
photo of where the missing option should go (134.36 KB, image/png)
2012-06-05 12:36 UTC, efelthauser
Details
Screenshot: "Customize"/"Add Commands" dialogs in LibO 3.5.4 Calc (160.82 KB, image/png)
2012-06-17 02:24 UTC, Roman Eisele
Details
Screenshot: "Customize"/"Add Commands" dialogs in LibO 3.5.4 Writer (150.87 KB, image/png)
2012-06-17 02:25 UTC, Roman Eisele
Details
Screenshot: "Customize"/"Add Commands" dialogs in LibO 3.5.4 Impress (185.22 KB, image/png)
2012-06-17 02:25 UTC, Roman Eisele
Details
Screenshot: Bug still present in LOdev 2012-12-06 (Mac OS X): Paste commands (368.13 KB, image/png)
2012-12-13 07:45 UTC, Roman Eisele
Details
Screenshot: Bug still present in LOdev 2012-12-06 (Mac OS X): UNO paste commands (372.19 KB, image/png)
2012-12-13 07:51 UTC, Roman Eisele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description efelthauser 2012-06-05 12:36:30 UTC
Created attachment 62597 [details]
photo of where the missing option should go

Under Tools>Customize>Menu>Edit, there should be the option to add a menu item called "Paste unformatted text". There is not. Instead, there are two "Paste special" items listed...
Comment 1 Roman Eisele 2012-06-17 02:23:12 UTC
Thank you for your report!

REPRODUCIBLE with LibreOffice 3.5.4.2 (Build ID: 165a79a-7059095-e13bb37-fef39a4-9503d18), German langpack installed, on MacOS X 10.6.8 German UI.

To reproduce, start LibreOffice Calc and select (from the menu) "Tools > Customize ...", then select the "Edit" menu, then click "Add ..." and then select the "Category" called "Edit".

I get the same results as the original reporter; I will attach a screenshot confirming this. However, I have to point out:

1) The original reports's screenshot (attachment 62597 [details]) shows also two entries called "Paste Special" in the list of the "Customize" window, the 1st one right after "Undo" (a very strange place!), the 2nd one at the right position after "Paste". I don't see the 1st "Paste special" menu item (see my screenshot), and I think this is not a part of the problem -- it may be just a coincidence from some playing around with the "Add command" utility.

2) There is an interesting little difference between the two "Paste Special" entries in the list of the "Add commands" dialog window: the 2nd one has a description which is shown below ("Inserts the contents of the clipboard into the current file in a format that you can specify."; see my screenshot), but if I select the 1st "Paste Special" entry, no such description appears.

3) One could question if this is a but at all. Of course, it is strange that there are two "Paste Special" entries in the list of the "Add commands" dialog window, but who has said that there should be a "Paste unformatted text" entry? One could think "Maybe this is a missing feature, but not a bug."

But we can easily show that there is really a bug or at least an inconsistency here, because this "Paste Unformatted Text" entry is missing only in Calc (and in Impress), but it is present in Writer. See my 2nd screenshot: Writer allows to add a special "Paste unformatted text" menu item; and my 3rd screenshot for Impress.

Summary:
* Writer  offers "Paste", "Paste Special", "Paste Unformatted Text".
* Calc    offers "Paste", "Paste Special", "Paste Special" (2 times!)
* Impress offers "Paste", "Paste Special".

Given the fact that Writer offers both "Paste Special" and "Paste unformatted text" items in the list of the "Add commands" dialog window, and no 2nd "Paste Special" item, it seems reasonable to speek of both an inconsistency (there is a "Paste unformatted text" in Writer, but neither in Calc nor in Impress) and of a bug (the 2nd and useless "Paste Special" item in Calc should probably be a "Paste unformatted text" item like in Writer).

I have changed the "Component" field of this bug report to "Spreadsheet" to make clear that we are talking about a Calc issue.

For the missing item in Impress, we should file a separate report, probably an enhancement request.
Comment 2 Roman Eisele 2012-06-17 02:24:35 UTC
Created attachment 63128 [details]
Screenshot: "Customize"/"Add Commands" dialogs in LibO 3.5.4 Calc
Comment 3 Roman Eisele 2012-06-17 02:25:03 UTC
Created attachment 63129 [details]
Screenshot: "Customize"/"Add Commands" dialogs in LibO 3.5.4 Writer
Comment 4 Roman Eisele 2012-06-17 02:25:27 UTC
Created attachment 63130 [details]
Screenshot: "Customize"/"Add Commands" dialogs in LibO 3.5.4 Impress
Comment 5 Roman Eisele 2012-06-17 02:29:19 UTC
The same inconsistency/bug is already present in LibreOffice 3.4.4 (for MacOS X), therefore adjusted the Version field.
Comment 6 Roman Eisele 2012-06-20 03:13:31 UTC
The same inconsistency/bug (see my summary in comment #1) is also present in LibreOffice 3.5.4.2 on *Windows*. Therefore not a special MacOS issue; changed the Platform to "All".
Comment 7 Roman Eisele 2012-06-20 03:18:29 UTC
@Markus Mohrhard,
@Eike Rathke:

This Calc/UI issue is neither terrible nor urgent, but it is still of some importance, especially for power users, and probably rather easy to fix. It would be very nice if you could take a look at it.

Thank you very much in advance!
Comment 8 Roman Eisele 2012-06-28 09:05:46 UTC
(In reply to comment #1)
> For the missing item in Impress, we should file a separate report, probably an
> enhancement request.

I have done so; please see bug 51525, which is a enhancement request for adding the "Paste Unformatted Text" to the commands list in the "Customize > Add Commands" dialog for Impress.
Comment 9 Rob Snelders 2012-12-02 15:42:36 UTC
1 paste special is the uno:PasteSpecial-command.
The other is uno:InsertContents-command.

They are 2 different commands with the same name. I'm not sure however what to rename 1 of those to to make them differ.
Comment 10 Roman Eisele 2012-12-02 16:33:26 UTC
Rob, thank you for investigating this issue!

Well, it would be very helpful if was possible to rename one of the two entries, because the two entries with the same name confuse the user, and prevent that he/she recognizes the difference of them ...
Comment 11 Rob Snelders 2012-12-02 19:03:42 UTC
As far as I can see the function do mainly the same thing. Somebody should look into it and find out what the difference is.
Comment 12 Markus Mohrhard 2012-12-05 18:26:36 UTC
At least in master I have Paste, Paste Special, Paste Only with Text, Number and Formula.

@Roman: If you could confirm this we could close this bug report. We can't backport any changes for it as it would break the string freeze.
Comment 13 Roman Eisele 2012-12-06 07:36:18 UTC
(In reply to comment #12)
> At least in master I have Paste, Paste Special, Paste Only with Text, Number
> and Formula.

Nice to hear that!

> @Roman: If you could confirm this we could close this bug report. We can't
> backport any changes for it as it would break the string freeze.

I would like to do so, but since 2012-11-28, there are no new master/daily builds for Mac OS X. I have a bunch of fixes etc. which I need to verify, check, etc. ... When there will be a new (and working) master build, I will check this.
Comment 14 Roman Eisele 2012-12-13 07:45:15 UTC
Created attachment 71430 [details]
Screenshot: Bug still present in LOdev 2012-12-06 (Mac OS X): Paste commands


@ Markus:
(In reply to comment #12)
> At least in master I have Paste, Paste Special, Paste Only with Text, Number
> and Formula.
> 
> @Roman: If you could confirm this we could close this bug report. We can't
> backport any changes for it as it would break the string freeze.

IMHO the problem is still present. With the latest master build for Mac OS X (Version 4.1.0.0.alpha0+, Build ID: e43d62fb39e0b6b3e59b22110460d23b6d507b5, pull time: 2012-12-06_09:19:57) -- sorry, there is no newer one! --, I still see two "Paste Special" options, but no "Paste Only with Text" option. Please see the attached screenshot ...
Comment 15 Roman Eisele 2012-12-13 07:51:05 UTC
Created attachment 71431 [details]
Screenshot: Bug still present in LOdev 2012-12-06 (Mac OS X): UNO paste commands

Of course, besides the normal “Paste” and the duplicated “Paste Special” options, there are also four options with “.uno:” prefix:

  .uno:PasteOnly
  .uno:PasteOnlyFormula
  .uno:PasteOnlyText
  .uno:PasteOnlyValue

Did you refer to these options?

IMHO the names of these options are a bit unlucky: a “normal” user might not understand what the rather technical “.uno:” prefix means, and may not realize that he/she should use *these* options in order to add a custom menu option. Instead, he/she might just search for a simple “Paste Unformatted Text” option.

So, if it was possible to rename these four UNO options just to “Paste Only Formula”, “Paste Only Text”, etc., we would have a perfect solution ;-)
Comment 16 Cor Nouws 2013-03-30 22:30:43 UTC
The second 'paste special' is not present in my 4.0.2rc1

I think the idea is that Paste unformatted text is added as choice?
Comment 17 Cor Nouws 2014-10-18 20:00:55 UTC
pls note that in 4.0 the context menu contains
 Paste special
 Paste only > Text
            > Number
            > Formula
Comment 18 Cor Nouws 2014-10-18 20:01:18 UTC
(In reply to Cor Nouws from comment #17)
> pls note that in 4.0 the context menu contains

 Stupid me: must be 4.4 of course!

>  Paste special
>  Paste only > Text
>             > Number
>             > Formula
Comment 19 Robinson Tryon (qubit) 2015-12-10 07:20:11 UTC Comment hidden (obsolete)
Comment 20 Muhammet Kara 2016-12-07 07:22:05 UTC
@Pravin: A polite ping: Are you still working on this?

As of latest master, there is already "Paste Unformatted Text" in the customize dialog for Writer; and its equivalent ("Paste Only" -> "Paste Only Text") for Calc.

Only problem that still exists is that there are still two "Paste Special" entries in the customize dialog of Calc. (One of them having additional "..." at the end)

I think we need to rename the one without "..." to something else. It is actually uno:InsertContents, and it opens a dialog to paste contents of what is in the memory (was copied/cut already) when the copied/cut thing is a "cell". (It does nothing if the copied/cut thing is not cell but just text inside the cell)

I guess we can rename it to "Paste Contents", "Paste Cell Contents", "Paste Special Dialog" or "Paste Through Dialog". I would prefer one of the first two choices.
Comment 21 Muhammet Kara 2017-02-22 08:41:21 UTC
Seems like we can reset the assignee to default.
Comment 22 Yousuf Philips (jay) (retired) 2017-04-24 16:12:32 UTC
So basically what is needed is to make .uno:PasteUnformatted work in Calc, like it does in Writer and Impress.
Comment 23 Cor Nouws 2017-04-25 07:19:19 UTC
(In reply to Yousuf Philips (jay) from comment #22)
> So basically what is needed is to make .uno:PasteUnformatted work in Calc,
> like it does in Writer and Impress.

Tools > Customize .. Add, category Edit already has
 Paste Only Formula
 Paste Only Numbers
 Paste Only Text
 Paste Special
 Paste Special

So 'Paste unformatted' is Paste Only Text?
Comment 24 Yousuf Philips (jay) (retired) 2017-04-25 15:54:52 UTC
(In reply to Cor Nouws from comment #23)
> So 'Paste unformatted' is Paste Only Text?

Its opening the paste special dialog and selecting 'unformatted text'. It pastes everything (text, numbers, formula, etc) without formatting.
Comment 25 Yousuf Philips (jay) (retired) 2017-08-31 15:27:41 UTC
*** Bug 102260 has been marked as a duplicate of this bug. ***
Comment 26 Thomas Lendo 2017-09-14 21:40:00 UTC
"Paste Only Text" does nothing in Calc.
"Paste Only Formula" and "Paste Only Numbers" are working well.

Version: 6.0.0.0.alpha0+
Build-ID: 33ead25229d308f98fa171412f2937ca0ba976e9
CPU-Threads: 4; Betriebssystem:Linux 4.10; UI-Render: Standard; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-13_00:43:03
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 27 Eike Rathke 2017-11-15 14:21:23 UTC
(In reply to Thomas Lendo from comment #26)
> "Paste Only Text" does nothing in Calc.
Paste Only Text works *IF* the copied source has cells with text content or formula cells with text results (numeric/date are not text).
Comment 28 Commit Notification 2017-11-18 23:50:57 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2865210607364feaff2c0275b7cd6c5439f5f070

tdf#50746 Make "paste unformatted text" work for Calc

It will be available in 6.0.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 29 Commit Notification 2017-11-21 15:15:29 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

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

tdf#113571, tdf#32213, tdf#50746: Make "paste unformatted text"

It will be available in 6.0.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 30 Commit Notification 2017-11-21 16:51:28 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Introduce and use ScCellShell::HasClipboardFormat(), tdf#50746 follow-up

It will be available in 6.0.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 31 Yousuf Philips (jay) (retired) 2017-11-22 13:58:55 UTC
Patch to put it in the menu and context menu

https://gerrit.libreoffice.org/45095
Comment 32 Commit Notification 2017-11-23 11:20:12 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

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

tdf#50746 add paste unformatted to menu and context menu

It will be available in 6.0.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.