I am trying to convert an old story to HTML. I'd previously used asterisks to indicate italics. In AutoCorrect options, it plainly says "Automatic *bold*, /italic/, -strikeout- and _underline_". So I find+replaced all the asterisks with slashes. I clicked apply, and none of the words became italicized. It turned the remaining asterisks to bold, and the underscores to underlined text, but it absolutely will not make italics.
When typing new text inside this document, it will AutoCorrect slashes to italics. But it ignores all the old text. All it does is change the font.
I just upgraded from 188.8.131.52 to 184.108.40.206, and the problem still exists.
Steps to Reproduce:
1. Put slashes around a word.
2. Check that / -> italics is checked in AutoCorrect options
3. Click Apply
The text does not change. (However, the font changes from Times New Roman to Alias)
The text becomes italicized.
User Profile Reset: Yes
[Information automatically included from LibreOffice]
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Version: 220.127.116.11 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 6.1; UI render: default;
Locale: en-US (en_US); Calc: group
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
As described. Same with -strikeout-. The options strikeout and italic are implemented in 5.4 with commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=6bfe94a631b5c5029a1f96a52b000d25e33bad4a.
Not sure this is incorrect behavior.
The two "modes" of autocorrect are while modifying [M] and while typing initial text [T]
The correction for typing new text occurs when the closing *, _, -, or / is entered. Likewise with existing text, modifying makes the autocorrection for each enclosing *, _, -, or /
Performing a Find & Replace will make the substitution, but I don't believe it is expected to pass the text back through the edit shell to then perform an autocorrect. Should it? Not as implemented.
And, revisiting the strings just replaced, backspacing over the closing mark and replacing it triggers the [M] autocorrect for each of the formats--Bold, Underline, Strikethrough, and Italic.
Checked behavior in
Version: 18.104.22.168 (x64)
Build ID: 6b8ed514a9f8b44d37a1b96673cbbdd077e24059
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new;
Locale: en-US (en_US); Calc: group
prior to adding the / italic and - strikethrough--Find & Replace did not trigger the * bold or _ underline autoreplace in that build.
Is there, or should there be, optional linkage for Find & Replace to trigger Auto-correct?
WHAT!? Of course this is incorrect behavior!
Tools/AutoCorrect/Apply. Right there. Clicking that works with bold and underline, but NOT italics. If it DIDN'T replace asterisks with bolding and underscores with underlining, I would say that maybe it just couldn't do that at all. But it is doing HALF ITS JOB. Why!?
And yes, I could go through the entire text and manually delete+replace every / to trigger AutoCorrect normally. That would take an entire days' worth of monotonous work. This is a NOVEL.
> Not sure this is incorrect behavior.
> Performing a Find & Replace will make the substitution, but I don't believe
> it is expected to pass the text back through the edit shell to then perform
> an autocorrect. Should it? Not as implemented.
(In reply to SNORT from comment #4)
> Tools/AutoCorrect/Apply. Right there. Clicking that works with bold and
> underline, but NOT italics. If it DIDN'T replace asterisks with bolding and
> underscores with underlining, I would say that maybe it just couldn't do
> that at all. But it is doing HALF ITS JOB. Why!?
Hmm, my bad. I'd mistakenly made a target text selection and then applied the autocorrect.
Seems when applying the autocorrect to existing text, a selection is not needed nor helpful--as the autocorrect simply runs through the whole document.
So confirming that the Tools -> Autocorrect -> Apply autocorrect does render the * Bold or _ Underline markup, but not the / Italic nor the - Strikethrough.
So there is an implementation error--something more needed to be connected to get the same behavior.
> And yes, I could go through the entire text and manually delete+replace
> every / to trigger AutoCorrect normally. That would take an entire days'
> worth of monotonous work. This is a NOVEL.
No need, just do the * bold or _ underline Find & Replace with "Whole words only" checked, apply the Autocorrect for those to have distinct formatting to work against.
Then change the direct formatting with Find & Replace with Find using Other Options -> Attributes--probably with the Including Styles checkbox.
Pick an Attribute and use the Format button's dialog to configure first the Find field, and then the Replace field. It is a little bit fussy to get the right mix for desired result, but seems to work.
It is a shame that doing it directly for / italic or - strike through with an autocorrect is not 100% yet.
Commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=6bfe94a631b5c5029a1f96a52b000d25e33bad4a had omitted SwAutoFormat::AutoCorrect in sw/source/core/edit/autofmt.cxx, which still only handles '*' and '_' to call SvxAutoCorrect::FnChgWeightUnderl.