https://bugs.documentfoundation.org/show_bug.cgi?id=140077

--- Comment #10 from Dave Gilbert <[email protected]> ---
Ah, so if I add:

+++ b/sw/source/core/text/porlay.cxx
@@ -2648,17 +2648,24 @@ TextFrameIndex SwScriptInfo::CountCJKCharacters(const
OUString &rText,
     TextFrameIndex nPos, TextFrameIndex const nEnd, LanguageType aLang)
 {
     TextFrameIndex nCount(0);
     if (nEnd > nPos)
     {
         sal_Int32 nDone = 0;
         const lang::Locale &rLocale = g_pBreakIt->GetLocale( aLang );
         while ( nPos < nEnd )
         {
+            TextFrameIndex nOldPos = nPos;
             nPos = TextFrameIndex(g_pBreakIt->GetBreakIter()->nextCharacters(
                     rText, sal_Int32(nPos),
                     rLocale,
                     i18n::CharacterIteratorMode::SKIPCELL, 1, nDone));
+            if (nPos == nOldPos) {
+                SAL_WARN("sw.core", "CountCJKCharacters not moving" );
+                break;
+            }
             nCount++;
         }

then I get the bad_array_new_length back.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to