Apache OpenOffice (AOO) Bugzilla – Issue 103332
importing a textclip (*.textClipping) doesn't work in writer
Last modified: 2013-01-29 21:43:44 UTC
A textclip is a special file format for small pieces of anything on a mac (*.textClipping). Mark any text in any app and drag into a Folder or the desktop, than finder will make a textclip file out of it. This "exporting" works well in OOo. "Importing" a textclip (drag and drop somewhere into a document) doesn't: Writer: An "insert section" Dialog pops up instead of pasting the clip. If "OK"ed, a section gets inserted but no content of the clip shows up. Calc: Dropping the clip at F6 (tip of mouse pointer) imports it to in E10 (but at least it gets imported). Existing content and Formulas in target cell are overwritten without any warning. This, but especially both behaviors combined may cause severe problems for an user. Impress & Draw: New textframe with content of the clip gets created which is acceptable. Much better would be sensing if drop is into a text frame and then insert the text there instead creating a new frame. Unfortunately, the writer import is the most likely scenario. Expected behavior: Perform action doing the same as "Paste special…" - "unformatted text" with content of the clipboard does but using the content of the textclip. On the other hand - dropping outside writers text area should behave like Draw does now: Create a new text frame with the content of the clip at the location the clip was dropped. Using an insertion/text cursor instead of an pointer would be desirable in Writer and also in suggested "insertion mode" in Draw/Impress..
When textclipping files are dropped into OOo it gets an event with systemflavor==NSFilenamesPboardType which results in the application being notified of a list of filenames, which are to be dropped into it. I guess we just need to handle the case where filenamecount==1 and filename.extension==textClipping. If this happens the list-of-filenames-drop- event should be replaced by a text-paste event. Note that the text in *.textClipping files is only available in their resource forks, the file itself seems to be empty.