Files
odfstudio/sw/source/core/edit
Justin Luth 2141f7366c tdf#166387 sw: move past straight quote in redline autocorrect
The code determined that the straight quote followed a blank space,
so it replaced it with a curly opening quote.
But because this was done bWithRedlining,
the straight quote at this nPos still exists.

Then, without incrementing the nPos, the code flowed into
the next section, which replaces a straight quote
with a curly closing quote.

Since the straight quote (now redline-deleted) still exists here,
it was doing a second subsitution on the same character.

This wasn't a problem for the closing single quote
because at that point the nPos is only handled once,
and so it moved to the next nPos
(which is the inserted closing curly quote).

But since the intention of the code was to move past
the replacement (where -1 must represent the straght-quote length)
   nPos += TextFrameIndex(sReplace.getLength() - 1);
I added the same ++nPos there too.

Change-Id: Ic1d83d7d2ed1438896b1d65b94ef0aeea5ec4f5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209350
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-08-19 21:31:10 +02:00
..
…
2026-02-25 10:33:55 +01:00