Issue 15509 - Q-PCD affiliate: Clipboard format support for CSV
Summary: Q-PCD affiliate: Clipboard format support for CSV
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: All All
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
URL:
Keywords:
: 3184 4982 20913 21330 22157 34022 44517 45248 51792 70865 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-06-11 14:38 UTC by mmeeks
Modified: 2013-08-07 15:15 UTC (History)
9 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
improved plain-text paste dialog ... (2.52 KB, patch)
2003-06-11 14:39 UTC, mmeeks
no flags Details | Diff
new patch vs. 2.0 (2.36 KB, patch)
2004-10-12 14:53 UTC, mmeeks
no flags Details | Diff
fix rendering (1.43 KB, patch)
2006-06-19 12:15 UTC, mmeeks
no flags Details | Diff
Testcasespecification for Clipboardtest enhanced for CSV Import dialog on Paste Special of structured unformatted text (9.07 KB, text/html)
2006-10-10 14:15 UTC, frank
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mmeeks 2003-06-11 14:38:53 UTC
So - it transpires that people like to cut and paste structured text into the
spreadsheet, and it's really nice if the 'import text' dialog pops up so they
can determine how it's formatted [ if it's more than a simple, single line ].

This trivial patch hooks it into your nice structure easily enough; it'd be nice
to re-factor that method into a separate helper - if only that didn't involve
changing a header.
Comment 1 mmeeks 2003-06-11 14:39:29 UTC
Created attachment 6803 [details]
improved plain-text paste dialog ...
Comment 2 frank 2003-06-12 08:23:50 UTC
Hi Niklas,

this one's for you ?

Frank
Comment 3 niklas.nebel 2003-06-20 16:59:18 UTC
Falko, your idea was to have an additional, "fake", clipboard format.
Michael's solution would instead open the dialog if there's more than
one line of text in the clipboard. Do you still think we need the
additional format?
Comment 4 falko.tesch 2003-06-23 14:09:16 UTC
FT->Niklas: After spending some more in-depth thoughts on this issue
here is what came out ;o)
We willl sticjk to our "fake" clipboard format solution because
copying a single does not guarantee under all circumstances that one
does not want to copy text only.
It is very likely that one is pasting only one line from a CSV
database to a spreadsheet.
In this case the automatism will fail.

P
Comment 5 mmeeks 2003-06-23 16:16:39 UTC
So - to confirm; if I cut and paste multiple lines of CSV text from a
random terminal / web-browser etc. it will all work right in 1.1 ?
Comment 6 niklas.nebel 2003-06-23 16:44:56 UTC
For 1.1, nothing was changed (and won't be, now that the RC is already
being built). This is all about 2.0.

Of course this means the issue shouldn't be marked "fixed", yet.
Comment 7 falko.tesch 2003-08-15 10:51:57 UTC
Changed OS and issue type as well a prority. Since this feature is not
covered by PCD priority has to be set to 4.
Comment 8 falko.tesch 2003-09-11 14:07:43 UTC
*** Issue 4040 has been marked as a duplicate of this issue. ***
Comment 9 falko.tesch 2003-10-08 11:52:58 UTC
*** Issue 4982 has been marked as a duplicate of this issue. ***
Comment 10 frank 2003-10-09 09:07:15 UTC
*** Issue 20913 has been marked as a duplicate of this issue. ***
Comment 11 falko.tesch 2003-10-17 08:08:27 UTC
Changed title for better finding
Comment 12 falko.tesch 2003-10-17 08:09:42 UTC
*** Issue 3184 has been marked as a duplicate of this issue. ***
Comment 13 frank 2003-10-22 10:21:27 UTC
*** Issue 21330 has been marked as a duplicate of this issue. ***
Comment 14 falko.tesch 2003-11-04 16:31:35 UTC
Modified title
Comment 15 frank 2003-11-06 09:59:29 UTC
*** Issue 22157 has been marked as a duplicate of this issue. ***
Comment 16 Martin Hollmichel 2004-05-28 15:01:01 UTC
according to the announcement on releases
(http://www.openoffice.org/servlets/ReadMsg?list=releases&msgNo=7503) this issue
will be re-targeted to OOo Later.
Comment 17 frank 2004-09-20 11:28:04 UTC
*** Issue 34022 has been marked as a duplicate of this issue. ***
Comment 18 mmeeks 2004-10-11 20:46:43 UTC
Given that we have a rather fine, working patch that's been shipping for many
moons, is tested, works etc. - can we not go with that instead of a "wont-fix".

You see how many duplicates there are here - right ?
Comment 19 mmeeks 2004-10-12 14:53:02 UTC
Created attachment 18314 [details]
new patch vs. 2.0
Comment 20 gorn 2004-11-29 15:41:14 UTC
Yes this is the feature which is really missing. I work with 
statistival data very much and i shoul either everytime 
1. copy data
2. go to notepad 
3. save it 
4. go to data import
5. find the saved file
6. import it

which is too long. The "text to columns" feature from Excel would 
serve this much more better.

Thanks Jakub
Comment 21 frank 2004-12-10 08:34:40 UTC
*** Issue 38754 has been marked as a duplicate of this issue. ***
Comment 22 vandermeyj 2004-12-10 20:33:16 UTC
Shouldn the votes of a closed duplicate issue be added
> to the Open issue?   I am ready to require our company
> to use open office but I can not do that until closed
> issue 4040 is in fact resolved.
Comment 23 oc 2005-01-18 10:02:26 UTC
issue 4040 (text to columns) is reopened because it could not be ensured that
this Q-pcd could handles this too.
Comment 24 mmeeks 2005-01-18 11:59:19 UTC
Does this mean that there is a chance you might commit something like my patch
from 18 months ago now ;-) It isn't a darstadly plot to destroy the suite in
patch form: honest :-) [ I happen to have needed it myself on several occasions ]
Comment 25 ttissino 2005-03-04 15:06:40 UTC
I wonder why this issue is not already resolved: on my UbuntuLinux (debian
based) box, OOo comes with a patch that does the job. Why the same patch is not
inserted in the main stream?
Comment 26 mmeeks 2005-03-04 16:05:14 UTC
The patch is too simple ! - we need a more complicated approach ;->

Since I don't understand the 'fake clipboard format' approach, I'm sceptical
that it will work pasting from common Unix applications over which we have no
control - and where we simply get a big chunk of text - all too frequently.

Similarly - yes, it doesn't handle a single row very nicely - but then, manually
converting a single row of data to a number of columns is usually fairly trivial.

Not committing the patch because it has 1 corner case you think could be easier
- is condeming innumerable users to serious pain on the off-chance of avoiding
hurting this tiny corner case. Sigh.
Comment 27 mmeeks 2005-03-04 16:07:11 UTC
The patch is too simple ! - we need a more complicated approach ;->

Since I don't understand the 'fake clipboard format' approach, I'm sceptical
that it will work pasting from common Unix applications over which we have no
control - and where we simply get a big chunk of text - all too frequently.

Similarly - yes, it doesn't handle a single row very nicely - but then, manually
converting a single row of data to a number of columns is usually fairly trivial.

Not committing the patch because it has 1 corner case you think could be easier
- is condeming innumerable users to serious pain on the off-chance of avoiding
hurting this tiny corner case. Sigh.

** This bug has ~25 duplicates if you count #4040# **
Comment 28 frank 2005-03-11 10:47:00 UTC
*** Issue 44517 has been marked as a duplicate of this issue. ***
Comment 29 stx123 2005-03-11 11:33:30 UTC
I think the number of votes and duplicates is not reflected in the priority...
Comment 30 falko.tesch 2005-03-11 12:04:26 UTC
FT: Hi Niklas, can you please have a look on this patch. If it is really that
simple change/addition then we should seriously consider to integrate this patch
into OO.o 2.0.
Or maybe this is something for 2.0.1?
Comment 31 falko.tesch 2005-03-11 13:36:58 UTC
FT: After talking with Niklas, who suggested to combine this feature with issue
 39898 we decided to shift this patch/enhancement to release 2.0.1.
In rough words:
We will add a checkbox to the "Paste special" dialogue (on by default) that will
show the CSV filter or a new HTML filter options dialogue.
This will enable the user to define the formatting of his source text.
Comment 32 Regina Henschel 2005-07-11 08:35:41 UTC
*** Issue 51792 has been marked as a duplicate of this issue. ***
Comment 33 falko.tesch 2005-08-26 09:35:56 UTC
FT: This issue will be handled (and solved) within issue i50670.
Please close. Thx.

*** This issue has been marked as a duplicate of 50670 ***
Comment 34 frank 2005-08-30 10:34:22 UTC
... and closed
Comment 35 mmeeks 2006-06-19 11:23:07 UTC
Can you confirm that this issue was in fact fixed as part of i#50670# - to me it
seems (as it always has done) that this is a totally different issue, and the
spec. shows no sign of having this change.

Only (nearly) a year since this was marked a 'duplicate' (IMHO) completely bogusly.
Comment 36 mmeeks 2006-06-19 11:23:26 UTC
re-target to 2.0.4
Comment 37 frank 2006-06-19 12:10:33 UTC
Hi Eike,

please have a look at this one.

Frank
Comment 38 mmeeks 2006-06-19 12:15:12 UTC
Created attachment 37229 [details]
fix rendering
Comment 39 mmeeks 2006-06-19 12:17:59 UTC
The 2nd patch fixes the rendering problems caused when doing the csv paste: this
seems to be down to a bug in the method used to import that code.

The patch fixes the code path such that we throw up a warning dialog (as
expected) if the sheet is not editable, adjusts the range correctly, and calls
Start/End paste (as the other importers do).

HTH.
Comment 40 niklas.nebel 2006-06-19 19:40:52 UTC
There was the idea to solve both issues together with a "filter options" button
in the "paste special" dialog, which is why this was marked as duplicate. But
the actual solution for issue 50670 is different, so, yes, this one is still open.
Comment 41 ooo 2006-07-12 16:41:57 UTC
I'm back from vacation.

There is not enough time to get this into 2.0.4, retargeting to 2.x

Mathias (mmp on CC), is it acceptable from a User Experience team's view to have
this "small solution" (instead of the "big import options button", which we
won't get that soon) and invoke the CSV import dialog during paste if a newline
is present in clipboard data? Maybe even if common field separators like
comma/tab/semicolon are present?

  Eike
Comment 42 ooo 2006-08-18 21:09:05 UTC
Mathias,

As you're back from vacation now, this is a kind reminder to have a look at my
previous comment in this issue and state whether UE would be satisfied with the
small solution.

Thanks
  Eike
Comment 43 matthias.mueller-prove 2006-09-27 14:13:10 UTC
Thanks for the call, Eike. AFAI-understand this issue we should implement it for
OOo 2.1. 
No dialog change, no documentation change, no spec necessary.

New behavior: If the clipboard contains structured text in the form of i)
several lines, or b) text with typical separators like ';' then the Text Import
Dialog is opened to allow to fine tune the interpretation of the text.
Comment 44 ooo 2006-10-05 20:37:28 UTC
Started.
Comment 45 ooo 2006-10-05 23:36:45 UTC
In CWS calc39:

sc/source/ui/dbgui/scuiasciiopt.cxx  1.9.62.1
sc/source/ui/docshell/impex.cxx  1.36.62.1
sc/source/ui/inc/impex.hxx  1.11.282.1
sc/source/ui/view/viewfun5.cxx  1.41.62.2

Including (corrected) Undo from issue 45248 and modifications to handle overflows.
Comment 46 ooo 2006-10-05 23:43:40 UTC
*** Issue 45248 has been marked as a duplicate of this issue. ***
Comment 47 mmeeks 2006-10-06 09:24:39 UTC
Thank you Eike - you rock. Your customers are going to love you: really :-)
Comment 48 niklas.nebel 2006-10-10 09:49:21 UTC
back to QA for verification
Comment 49 ooo 2006-10-10 10:45:17 UTC
Actually this is a new feature, changing issue type.
Comment 50 frank 2006-10-10 14:15:41 UTC
Created attachment 39665 [details]
Testcasespecification for Clipboardtest enhanced for CSV Import dialog on Paste Special of structured unformatted text
Comment 51 ooo 2006-10-12 10:58:10 UTC
sc/source/ui/view/viewfun5.cxx  1.41.62.3

Sigh.. QA rejected this feature because of time constraints and automated
testcases that use the clipboard and would had to be adapted. Temporarily
disabled the condition, will enable for OOo2.2 again.
Comment 52 ooo 2006-10-12 11:07:44 UTC
Grabbing issue again.
Comment 53 ooo 2006-10-12 11:08:13 UTC
Accepting.
Comment 54 niall_martin 2006-10-17 15:46:54 UTC
This is important.  Not having it is one of reasons why I continue  to use 
Lotus 123 for important work.
Comment 55 ooo 2006-10-25 14:23:07 UTC
In CWS dr51
sc/source/ui/view/viewfun5.cxx  1.43.6.1
Comment 56 Regina Henschel 2006-10-26 09:24:54 UTC
*** Issue 70865 has been marked as a duplicate of this issue. ***
Comment 57 norbert2 2006-10-27 17:05:37 UTC
In my opinion the "fake clipboard format" is the best solution for accessing the
CSV import wizard.

(Also when pasting single rows I want to be able to use the CSV import wizard.
Note that also single rows can have many, many columns!)
Comment 59 norbert2 2006-11-01 21:11:13 UTC
"When pasting unformatted text from the clipboard, either when it's the
only clipboard format or selected under Paste Special, and the text
consists of more than one line or contains at least one of the field
delimiter characters comma, semicolon, tab or blank, then the CSV text
import dialog is opened to allow detailed processing of the clipboard
content."



So I would also have a CSV dialog when pasting a single row with many columns
(if delimiter characters are present, right? This is important for me.

As I understand this will also lead to unwanted opening of the CSV dialog that
the user has to confirm. Is it possible to design this function so that just
conforming of that dialog leads to the same result as current OOo versions
without that dialog?

It would be a solution but I'm not a fan of such automatisms.

If you implement this don't forget that it should also work when pasting
unformated text using the drop down menu of the paste button! The text above
only mentions "paste special".
Comment 60 ooo 2006-11-02 12:10:02 UTC
Norbert2,

> So I would also have a CSV dialog when pasting a single row with many columns
> (if delimiter characters are present, right? This is important for me.

Yes, that's correct.

> As I understand this will also lead to unwanted opening of the CSV dialog that
> the user has to confirm. Is it possible to design this function so that just
> conforming of that dialog leads to the same result as current OOo versions
> without that dialog?

Done. No separator checkbox is preselected, just hitting enter will
paste the entire content to the current cell.

> If you implement this don't forget that it should also work when pasting
> unformated text using the drop down menu of the paste button! The text above
> only mentions "paste special".

The button's result pasted is unformatted text if selected. So yes, it
also works when pasting via the button.

Btw, this issue is marked RESOLVED/FIXED and implementation is already
done, just waiting to be built, QA'd and integrated.

  Eike
Comment 61 ooo 2006-11-02 13:10:40 UTC
> No separator checkbox is preselected

Actually the Tab separator is preselected now because that mimics the previous
behavior without this feature, where an embedded tab splitted the text to
different columns.
Comment 62 norbert2 2006-11-02 17:21:37 UTC
OK. This is what I mean.
Comment 63 ooo 2006-12-04 11:15:27 UTC
Reassigning to QA.
Comment 64 frank 2006-12-08 14:09:53 UTC
found fixed on cws dr51 using Linux, Solaris and Windows build
Comment 65 Frank Schönheit 2007-01-11 08:39:03 UTC
Coming here from issue 73320 ...

As much as this feature here might be important for people doing statistical
work with Calc, it is disturbing and annoying for a lot of other use cases. 

Nowadays, whenever I want to copy some text into a cell, where this text comes
from an editor, and contains spaces (that means: *always*), then the import
dialog pops up. Argh.

That's the typical case of "magic always hurts 50 percent of your users". I
don't want OOo to know better than me what I want to do. If I paste plain text,
I want OOo to simply paste it, instead of a dialog jumping out of the box and
crying "Hey, see what other cool functionality I can offer here! Care to try
it?" No, I don't care.

Is there any chance we introduce an option (even without UI) which controls this
behaviour?
Comment 66 mmeeks 2007-01-11 12:51:05 UTC
Frank - sorry, norbert2 screwed you ... our original patch behaved in a more
friendly fashion.
Comment 67 norbert2 2007-01-11 18:32:41 UTC
fs: This is why I would prefer the "fake clipboard format"-solution, too.
Comment 68 frank 2007-02-06 13:28:51 UTC
found fixed on master OOFm6 using Linux, Solaris and Windows build