Download it now!
Bug 61325 - FORMATTING: AutoCorrect > Apply works on the Default Style and user custom styles ONLY
Summary: FORMATTING: AutoCorrect > Apply works on the Default Style and user custom st...
Status: RESOLVED DUPLICATE of bug 59034
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2013-02-23 03:40 UTC by Kumāra
Modified: 2018-03-31 07:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice quotes AutoCorrect test files (14.39 KB, application/zip)
2014-01-14 17:24 UTC, 95269e41
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kumāra 2013-02-23 03:40:11 UTC
When I paste texts with simple quote marks, I normally want to change them to  better-looking inverted commas (or so-called "smart quotes"). When I use Format > AutoCorrect > Apply, I expect the quote marks--single and double--to change accordingly. (I remember using this in Lotus WordPro.) But nothing changes, and there's nothing I can change in the settings to make it possible.

Presently, the AutoCorrect for this only happens while typing.

I think this is relatively simple hack, and it would automate the conversion of ordinary quote marks in a text pasted from elsewhere. Even with the Find and Replace tool, doing this manually, esp. on a long text, is tedious as the opening and closing quote in the original text is the same. We have to go through the instances one by one to avoid changing the quote marks wrongly.

I suggest this as an option to be included in AutoCorrect Options > Localised Options.

If you support this change, please add your email address to the cc list as a form of voting for this. Thank you.

I'm not sure if this should be labelled with FORMATTING or EDITING. Please correct if necessary.
Comment 1 Kumāra 2013-08-24 04:11:44 UTC
I just realised that this is not an enhancement request, but a bug.

Strangely. the feature works normally on a new document, but not on an old document which has spanned many LibO versions. Not sure what's preventing it from working.

Since no one else seems to have this problem, I'll have to be satisfied with a workaround: Paste the text on a new document, Apply AutoCorrect, copy and pasted on working document.

The bug remains on 4.1.0.2.
Comment 2 tommy27 2013-09-22 20:37:11 UTC
can you upload here that problematic file?
do you still see bug in 4.1.1.2?
Comment 3 tommy27 2013-10-19 07:30:35 UTC
I set status to NEEDINFO waiting for test file.
Comment 4 95269e41 2014-01-14 17:24:33 UTC
Created attachment 92054 [details]
LibreOffice quotes AutoCorrect test files

I am having this very same problem in LO 4.1.4.2.
Hungarian language - quotes should be replaced. This does not work in old files.

- If I copy new text into the old document, it (AutoCorrect - Apply replacing quote marks) won't work.
- If I copy new text (e.g. from Notepad) to a new document, it works.
- If I copy text from the old document to a new one, it won't work, also CONTAMINATING the document, so it won't work on any new text added from Notepad.

Very strange.

Attaching 2 sample documents with a Hungarian sentence. A good one and a bad, contaminated one. It is binary so diff does not help me, but I'm sure you could use it.
Comment 5 95269e41 2014-01-14 17:26:36 UTC
I am having this very same problem in LO 4.1.4.2.
Hungarian language - quotes should be replaced. This does not work in old files.

- If I copy new text into the old document, it (AutoCorrect - Apply replacing quote marks) won't work.
- If I copy new text (e.g. from Notepad) to a new document, it works.
- If I copy text from the old document to a new one, it won't work, also CONTAMINATING the document, so it won't work on any new text added from Notepad.

Very strange.

Attaching 2 sample documents with a Hungarian sentence. A good one and a bad, contaminated one. It is binary so diff does not help me, but I'm sure you could use it.
Comment 6 Kumāra 2014-01-14 22:54:58 UTC
(In reply to comment #2)
> can you upload here that problematic file?
> do you still see bug in 4.1.1.2?

Sorry, I forgot about this. Thanks to 95269e41@opayq.com for the files.

Setting status back to NEW.
Comment 7 Kumāra 2014-01-14 23:27:01 UTC
95269e41@opayq.com, I appreciate your observations. I still have having this issue on 4.1.4.2 too.

I've done some more testing. Try this, tommy27:

Copy and paste this into a new doc:
"When, householder, a noble disciple has understood thus: 'Longing and unrighteous greed...

Execute AutoCorrect > Apply, and you'll see the 2 quote marks changing.

Paste the same text again, and execute AutoCorrect > Apply. Nothing happens.

You can do another test:
Copy and paste this into a new doc:
"When, householder, a noble disciple has understood thus: 'Longing and unrighteous greed...

Execute AutoCorrect > Apply and Edit Changes (instead of Apply). Then close the dialog box (i.e., click x). Now you cannot apply AutoCorrect anymore.
Comment 8 Joel Madero 2015-05-02 15:41:27 UTC Comment hidden (obsolete)
Comment 9 Gordo 2015-06-18 17:48:23 UTC
Format -> AutoCorrect -> Apply only works on the Default Sytle and user custom styles.  What is happening is that, in the case of a paragraph that has already been autocorrected, the paragraph style has been changed to Text Body.  Pasting text to the end of the paragraph converts whatever style it was to the existing style so autocorrect will not work on it.  Also, entering a new paragraph keeps the style and running autocorrect will not work on any new text pasted in from another LO document, notepad, or a website; an empty paragraph inherits the new style.

A workaround is to change the style to Default Style and then run autocorrect.

sw/source/core/edit/autofmt.cxx
~line 2072 SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags, SwNodeIndex* pSttNd, SwNodeIndex* pEndNd )

Some stuff in there about flags and replace styles.

Windows Vista 64
Version: 4.4.4.2
Build ID: f784c932ccfd756d01b70b6bb5e09ff62e1b3285
Comment 10 Kumāra 2015-06-19 02:37:58 UTC
Thanks, Gordo. I confirm your observation. 

It's not just ignoring quote marks, not working at all, unless the paragraph is in Default Style and user custom. I'm changing the Summary accordingly.

Your workaround works.
Comment 11 QA Administrators 2016-09-20 10:10:34 UTC Comment hidden (obsolete)
Comment 12 V Stuart Foote 2018-03-31 07:59:54 UTC

*** This bug has been marked as a duplicate of bug 59034 ***