summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-06-29 13:22:59 +0200
committerLászló Németh <nemeth@numbertext.org>2022-07-08 10:15:08 +0200
commit93c83aa91cc7608bfdb6972ad024697f1bc85f98 (patch)
treecfc866dfcaa6605456e93b82de6ad59fad31b2dd
parent[API CHANGE] Drop css::accessibility::XAccessibleStateSet (diff)
downloadcore-93c83aa91cc7608bfdb6972ad024697f1bc85f98.tar.gz
core-93c83aa91cc7608bfdb6972ad024697f1bc85f98.zip
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx8
1 files changed, 6 insertions, 2 deletions
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 ));