sw/source/filter/ww8/ww8par.cxx |    2 --
 1 file changed, 2 deletions(-)

New commits:
commit 34b35c4adb0176fc3b04f938f52485e531bd5a3a
Author:     Jonathan Clark <jonat...@libreoffice.org>
AuthorDate: Wed Jul 9 14:49:31 2025 -0600
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Fri Jul 11 06:29:58 2025 +0200

    tdf#64991 Remove unnecessary special case from IdctHint hack
    
    In order to emulate sprmCIdctHint support, the DOC importer uses a hack
    which splits the input text at script type changes and overrides fonts
    to make Writer's output match Word's.
    
    One special case in this algorithm was to override treatment of
    ASCII-range weak characters as Latin script. This special case had the
    unfortunate side effect of causing serious performance problems with
    non-Latin DOC files, as what would otherwise be treated as normal text
    was split into an excessive number of spans at any ASCII-range weak
    character (including space characters). This special case was also
    unnecessary, as our default implementation already handles these
    characters the same way Microsoft Word does.
    
    This change deletes that special case. This should resolve the
    performance issue, and shouldn't otherwise affect document layout.
    
    Since this hack was added, Writer has gained support for its own version
    of script type hinting. Currently, that implementation isn't perfectly
    compatible with DOC/DOCX, but in the future we should be able to delete
    this entire workaround and support sprmCIdctHint natively.
    
    Change-Id: I25ffe38efc963b8d569e2911c64a70852e22c679
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187602
    Tested-by: Jenkins
    Reviewed-by: Jonathan Clark <jonat...@libreoffice.org>
    (cherry picked from commit 7ef1c437f30b0869a5b9fa33809bac2c6665ace3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187610
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 386a04718861..05a750c34a20 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3366,8 +3366,6 @@ void 
SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString
             const SfxInt16Item *pIdctHint = GetFormatAttr(RES_CHRATR_IDCTHINT);
             nLclIdctHint = pIdctHint->GetValue();
         }
-        else if (nScript == MSASCII) // Force weak chars in ascii range to use 
LATIN font
-            nLclIdctHint = 0;
 
         TypedWhichId<SvxFontItem> nForceFromFontId(0);
         if (nLclIdctHint != 0xFF)

Reply via email to