Writer : Undo problem(Japanese IME)

Naruhiko Ogasawara naruoga at gmail.com
Fri Dec 19 07:26:43 PST 2014


Hi Hidemune, *

Some additional information:

1. To make the bug be tracked easier, I filed the bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=87500

2.  in Japaese ML:
http://listarchives.libreoffice.org/ja/discuss/msg03302.html
Hidemune said that BreakIteratorImpl::nextCharacters() handle
the last control code incorrectly in Japanese Windows environment,
and there are several code to call BreakIteratorImpl::nextCharacters()
same way.

If so, I think we should be correct BreakIteratorImpl::nextCharacters()
(or its subclasses) instead of SwBreakIt::getGraphemeCount().

How do you think?

That's because the patch is in the ML, not in Gerrit.


Regards,

2014-12-18 20:26 GMT+09:00 TANAKA H&Y <auau at kne.biglobe.ne.jp>:
> Hello,
>
> The bug is in the Writer (Windows7 64bit).
>
> 1. After the English input, I was a Japanese input.
> 2. I have run several times Undo.
> 3. Then, Writer was hung up.
>
> I was confirmed to work correctly when applying the following patch.
>
>
> diff --git a/sw/source/core/bastyp/breakit.cxx
> b/sw/source/core/bastyp/breakit.cxx
> index bf468b9..55f3dec 100644
> --- a/sw/source/core/bastyp/breakit.cxx
> +++ b/sw/source/core/bastyp/breakit.cxx
> @@ -191,8 +191,11 @@ sal_Int32 SwBreakIt::getGraphemeCount(const
> OUString& rText,
>          else
>          {
>              sal_Int32 nCount2 = 1;
> +            sal_Int32 nPosOld = nCurPos;
>              nCurPos = xBreak->nextCharacters(rText, nCurPos,
> lang::Locale(),
>                  i18n::CharacterIteratorMode::SKIPCELL, nCount2, nCount2);
> +            if (nPosOld == nCurPos)
> +                break;
>          }
>          ++nGraphemeCount;
>      }
>
>
>
> Best regards,
>
> TANAKA Hidemune
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice



-- 
Naruhiko Ogasawara (naruoga at gmail.com)


More information about the LibreOffice mailing list