sw/source/core/unocore/unocrsrhelper.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 93c83aa91cc7608bfdb6972ad024697f1bc85f98
Author:     Tünde Tóth <toth.tu...@nisz.hu>
AuthorDate: Wed Jun 29 13:22:59 2022 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Fri Jul 8 10:15:08 2022 +0200

    tdf#149747 DOCX import: use UI style name for tracked changes
    
    instead of the programmatic style name, because rejection
    of tracked paragraph style changes was incorrect
    with an other UI than English UI.
    
    Follow-up to commit 0ad5d133bd75ccd3a04505aaac7ad3f2f9105f76
    "tdf#132781 DOCX: export interoperable hyperlink style names"
    and commit 4248d759744f83a68d334a8b347124719a2886a8
    "tdf#126243 DOCX: export/reject tracked paragraph style change".
    
    Change-Id: I3b3b163b2538732b2470162888083de0609895fc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136624
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 04b93de0d003..b176138a0d2a 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1342,7 +1342,7 @@ void makeRedline( SwPaM const & rPaM,
             if (!aWhichPairs.empty())
             {
                 sal_uInt16 nStylePoolId = USHRT_MAX;
-                OUString sParaStyleName;
+                OUString sParaStyleName, sUIStyle;
                 SfxItemSet aItemSet(rDoc.GetAttrPool(), aWhichPairs);
 
                 for (size_t i = 0; i < aEntries.size(); ++i)
@@ -1374,7 +1374,11 @@ void makeRedline( SwPaM const & rPaM,
                 if (eType == RedlineType::ParagraphFormat && 
sParaStyleName.isEmpty())
                     nStylePoolId = RES_POOLCOLL_STANDARD;
 
-                xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl( 
sParaStyleName, nStylePoolId, &aItemSet ));
+                // tdf#149747 Get UI style name from programmatic style name
+                SwStyleNameMapper::FillUIName(sParaStyleName, sUIStyle,
+                                              SwGetPoolIdFromName::TxtColl);
+                xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl(
+                    sUIStyle.isEmpty() ? sParaStyleName : sUIStyle, 
nStylePoolId, &aItemSet));
             }
             else if (eType == RedlineType::ParagraphFormat)
                 xRedlineExtraData.reset(new SwRedlineExtraData_FormatColl( "", 
RES_POOLCOLL_STANDARD, nullptr ));

Reply via email to