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

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Applying auto corrections to imported text
Applying auto corrections to imported text
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
pqb
Red Pill


Joined: Dec 10, 2006
Posts: 5

PostPosted: Mon Jul 23, 2007 2:16 am    Post subject: Applying auto corrections to imported text

I import plain text to a doc and wish to make quotes smart. When I choose Format > autoformat > apply nothing happens. In the help it says that this should apply any auto corrections to the doc.

Autocorrect works while I'm typing, so I have the settings right for quotes.
Back to top
jakeOSX
Ninja
Ninja


Joined: Aug 12, 2003
Posts: 1373

PostPosted: Tue Jul 24, 2007 4:38 am    Post subject:

hmm, not sure if you can auto do this, the easiest way I know of is to do a find replace, ...

err, wait. that won't work so hot, will it. you could find replace for opening quotes, but then ALL the quotes would be opening.

(note, i use find/replace to get rid of smart quotes.)

hm. let me drink coffee and ponder.
Back to top
doctype
Oracle


Joined: Dec 08, 2005
Posts: 291
Location: Berlin, Germany

PostPosted: Tue Jul 24, 2007 4:57 am    Post subject: Re: Applying auto corrections to imported text

pqb wrote:
I import plain text to a doc and wish to make quotes smart. When I choose Format > autoformat > apply nothing happens. In the help it says that this should apply any auto corrections to the doc.


I found the "cause" of the problem, and it's a bit weird.

If you open a .txt file, NeoOffice sets for all text the paragraph style to "Preformatted Text" - this prevents smart quotes, even if you change the font of the text. You have first to change the paragraph style to some other (Text body, Default) for the text, and then Format > Autoformat > Apply works for me (in both cases provided the text is selected).

And not to forget when saving to use an other file format than .txt! Wink
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Tue Jul 24, 2007 5:24 am    Post subject:

Thanks for such a good tip! I've added it to the New Articles Needed page of the wiki
Back to top
pqb
Red Pill


Joined: Dec 10, 2006
Posts: 5

PostPosted: Thu Jul 26, 2007 7:31 am    Post subject: Re: Applying auto corrections to imported text

doctype wrote:
pqb wrote:
I import plain text to a doc and wish to make quotes smart. When I choose Format > autoformat > apply nothing happens. In the help it says that this should apply any auto corrections to the doc.


I found the "cause" of the problem, and it's a bit weird.

If you open a .txt file, NeoOffice sets for all text the paragraph style to "Preformatted Text" - this prevents smart quotes, even if you change the font of the text. You have first to change the paragraph style to some other (Text body, Default) for the text, and then Format > Autoformat > Apply works for me (in both cases provided the text is selected).

And not to forget when saving to use an other file format than .txt! Wink


When I checked the document in question I found that the body text had the style "Text Body".

I got the text off a web page, and cut and pasted into the doc. It is plain text of course, but I did not import a .txt file.

So I tried another approach:

I have created a template file with the font I wish to use. I import text, and it is in the font etc I need. I then apply auto formatting, and it changes the quotes to smart quotes, but also the font to Times Roman.

Is there a way of making auto format only change quotes or other features, but not the font?

Auto format talks about charts, but I need something to format document text. If there were a feature to change quotes as they are imported that would be the most convenient.
Back to top
doctype
Oracle


Joined: Dec 08, 2005
Posts: 291
Location: Berlin, Germany

PostPosted: Thu Jul 26, 2007 12:06 pm    Post subject: Re: Applying auto corrections to imported text

pqb wrote:
I got the text off a web page, and cut and pasted into the doc. It is plain text of course, but I did not import a .txt file.

Did you simply paste or did you use the Paste icon in the toolbar and choose "Unformatted text"? Because that way Apply Autoformat works for me. If you simply paste text from a webpage, there may be issues with formatting markers — I don't know exactly what can happen then.

pqb wrote:
I have created a template file with the font I wish to use. I import text, and it is in the font etc I need. I then apply auto formatting, and it changes the quotes to smart quotes, but also the font to Times Roman.

Odd. Which font did you use?
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Thu Jul 26, 2007 2:44 pm    Post subject:

I think that when pasting text in certain ways (which ones I don't recall), it doesn't get a language code set, which means some of the Auto* features won't work, because they depend on knowing the language of the text in order to work. So check the language of the paragraph/pasted text, too.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pqb
Red Pill


Joined: Dec 10, 2006
Posts: 5

PostPosted: Tue Jul 31, 2007 9:51 am    Post subject: Re: Applying auto corrections to imported text

doctype wrote:
pqb wrote:
I got the text off a web page, and cut and pasted into the doc. It is plain text of course, but I did not import a .txt file.

Did you simply paste or did you use the Paste icon in the toolbar and choose "Unformatted text"? Because that way Apply Autoformat works for me. If you simply paste text from a webpage, there may be issues with formatting markers — I don't know exactly what can happen then.

pqb wrote:
I have created a template file with the font I wish to use. I import text, and it is in the font etc I need. I then apply auto formatting, and it changes the quotes to smart quotes, but also the font to Times Roman.

Odd. Which font did you use?


I tried that, but it still alters the font.

I have set the .ott page to verdana, and the plain text is shown in that font when imported. It is when I apply auto format that it changes to times.

It must be the auto format, so how do I make autoformat choose verdana, or simply leave the font alone?
Back to top
jgd
Agent Smith


Joined: Feb 27, 2005
Posts: 1531
Location: France

PostPosted: Tue Jul 31, 2007 10:47 am    Post subject:

Maybe you can try this way:
Go to NeoOffice > Preferences > NeoOffice Writer > Basic Fonts

then change the default font with Verdana. If you want, check Current document only and click OK.

Hope that helps.

Jacqueline
Back to top
Display posts from previous:   
   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.