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

New commits:
commit 7ef1c437f30b0869a5b9fa33809bac2c6665ace3
Author:     Jonathan Clark <jonat...@libreoffice.org>
AuthorDate: Wed Jul 9 14:49:31 2025 -0600
Commit:     Jonathan Clark <jonat...@libreoffice.org>
CommitDate: Thu Jul 10 01:10:08 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>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e645ac0d5cee..d508c89f3900 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3368,8 +3368,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