Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2022? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - Copy & Paste applies wrong text formatting.
Copy & Paste applies wrong text formatting.
 
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
sta_admin
Agent


Joined: Nov 18, 2009
Posts: 15

PostPosted: Mon May 16, 2011 9:00 am    Post subject: Copy & Paste applies wrong text formatting. Reply with quote

I'm working with some documents, in which coping and pasting parts of text with several different formats (bold, underlined, different font), causes the pasted text to have an unique format (but I did't use special paste). It seems a random future, because it's not so for every copy/paste... I really can't figure why sometimes the text will be pasted with the original format, and sometime with an unique format.
Can you explain what happens, or investigate about it (btw, it was so with NeoOffice 3.1.x and it's so with NeoOffice 3.2)?


Last edited by sta_admin on Mon May 16, 2011 9:37 am; edited 2 times in total
Back to top
View user's profile Send private message AIM Address
sta_admin
Agent


Joined: Nov 18, 2009
Posts: 15

PostPosted: Mon May 16, 2011 9:32 am    Post subject: Re: Copy & Paste applies wrong text formatting. Reply with quote

Other sequence, with coping and pasting from two different document:
Back to top
View user's profile Send private message AIM Address
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11932

PostPosted: Mon May 16, 2011 9:39 am    Post subject: Reply with quote

Can you attach one or both of the document files and list the steps for both cases so that I can try and reproduce the problem on my machine?

Patrick
Back to top
View user's profile Send private message Visit poster's website
sta_admin
Agent


Joined: Nov 18, 2009
Posts: 15

PostPosted: Mon May 16, 2011 9:44 am    Post subject: Reply with quote

OK, this is the one I used in the first sequence (you can try with more parts of the text, sometimes it pastes in a way and sometimes in another).
Back to top
View user's profile Send private message AIM Address
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11932

PostPosted: Mon May 16, 2011 9:59 am    Post subject: Reply with quote

Thank you for the document. The first thing that I see is that in all of the lines with underlines, only the words are set to use the Times New Roman font and all of the spaces and underlines next in those lines use the MS Comic Sans font. I suspect that that is what is sometimes triggering NeoOffice's underlying OpenOffice.org code to set all of the paste content to MS Comic Sans.

If you select all of the lines in an entire section like the "denominazione" section, and set the font to Times New Roman for the entire section, does that stop the problem from occurring when pasting any content copies from that section?

Patrick
Back to top
View user's profile Send private message Visit poster's website
sta_admin
Agent


Joined: Nov 18, 2009
Posts: 15

PostPosted: Mon May 16, 2011 10:08 am    Post subject: Reply with quote

pluby wrote:
If you select all of the lines in an entire section like the "denominazione" section, and set the font to Times New Roman for the entire section, does that stop the problem from occurring when pasting any content copies from that section?


Maybe, I'll try later. But I need to have the document as it is, with the empty places underlined and with a different fonts
Back to top
View user's profile Send private message AIM Address
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11932

PostPosted: Mon May 16, 2011 11:10 am    Post subject: Reply with quote

sta_admin wrote:
Maybe, I'll try later. But I need to have the document as it is, with the empty places underlined and with a different fonts


I understand. What I can give you then is a way to avoid this problem. In the first case, you highlight the last "denominazione" line and insert a newline at the at of the copied line and then past the copied line.

In this case, then end of the copied line is MS Comic Sans so when you insert a newline, then end of the copied line through the beginning of the new line are set to MS Comic Sans. This is what triggers the behavior that you see. Specifically, the behavior is that when you insert newlines, spaces, or text, the font at the cursor is given priority over the font in the copied content.

Unfortunately, this unintuitive behavior is normal behavior in both OpenOffice.org 3.3 (the latest version) and OpenOffice.org 3.1.2 (the version that NeoOffice 3.1.2 and 3.2 are based on) so I started looking for a workaround.

Fortunatly, the workaround for the first case is to modify your steps slightly. Like before, select the entire line but then move the cursor to the beginning of the next line and insert an empty new line. Then move the cursor backwards to the empty new line and paste.

Does that workaround work for you in the first case? If so, I will check and see if the same workaround works for the seconds case and, if not, investigate the second case further.

Patrick
Back to top
View user's profile Send private message Visit poster's website
sta_admin
Agent


Joined: Nov 18, 2009
Posts: 15

PostPosted: Mon May 16, 2011 1:08 pm    Post subject: Reply with quote

pluby wrote:
Fortunatly, the workaround for the first case is to modify your steps slightly. Like before, select the entire line but then move the cursor to the beginning of the next line and insert an empty new line. Then move the cursor backwards to the empty new line and paste.
Patrick


This seems to work. But I've same doubts it will work flawless for any case, because in some case I got strange combination of pasted formats, something like underlined Times New Roman (that I didn't have in copied text), or like in the first example, parts of converted MS Comic Sans font without underlining (see letter "P" before ".IVA" in pasted text). But until now it's OK.

pluby wrote:
If you select all of the lines in an entire section like the "denominazione" section, and set the font to Times New Roman for the entire section, does that stop the problem from occurring when pasting any content copies from that section?


This a bit less, because even I change font to Times New Roman, the pastes text will be entirely underlined.
Back to top
View user's profile Send private message AIM Address
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11932

PostPosted: Mon May 16, 2011 1:24 pm    Post subject: Reply with quote

sta_admin wrote:
pluby wrote:
If you select all of the lines in an entire section like the "denominazione" section, and set the font to Times New Roman for the entire section, does that stop the problem from occurring when pasting any content copies from that section?


This a bit less, because even I change font to Times New Roman, the pastes text will be entirely underlined.


I will look at your document again tomorrow and see if I can find any way to change the paragraph styles or character formatting so that this behavior does not get triggered. It appears to me that the many overlapping styles, font size, and underlining attributes in that section causes NeoOffice's underlying OpenOffice.org code to "give up" and use the "start of the line" format for the new pasted line.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11932

PostPosted: Mon May 16, 2011 10:39 pm    Post subject: Reply with quote

I think that I have found a way to stop NeoOffice's underlying OpenOffice.org code from overriding the formatting in the pasted content: after you insert an empty new line but before you paste, right-click or Control-click on the empty new line and in the popup menu that appears, select the "Default Formatting" menu. After selecting that menu, you should be able to paste without losing any formatting in the copied content.

Does this workaround work for you?

Unfortunately, the OpenOffice.org code appears to always give priority to the formatting already assigned to the cursor and there is no way to turn this behavior off so if my latest workaround does not work, let us know and I will continue searching for alternative workarounds.

Patrick
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds