sw/source/core/unocore/unostyle.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit baa997a412f1f87e4fe55af3927a685934dbcaba
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Dec 11 20:00:33 2024 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu Dec 12 10:27:05 2024 +0100

    fix ruby style name handling in SwXStyle::SetPropertyValue
    
    code dates back to
      commit 023a58b5fbbf3b30692f4b66d5f5b07c28270934
      Author: Oliver Specht <o...@openoffice.org>
      Date:   Mon Feb 19 07:04:57 2001 +0000
      ruby properties added
    Both the other places in sw/ that CharFormatName from
    SwFormatRuby expect it to be a UIName not a programmatic name.
    
    Change-Id: Ic02670f6c7ca7bacc6cd30cd48642f32eb9beb29
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178331
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit f15c86221b41739a578c8a9b15046b20b43cb8c1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178342

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 2913c0bc548e..68e632fac5c7 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1923,11 +1923,11 @@ void 
SwXStyle::SetPropertyValue<sal_uInt16(RES_TXTATR_CJK_RUBY)>(const SfxItemPr
         pRuby.reset(new SwFormatRuby(OUString()));
     OUString sStyle;
     SwStyleNameMapper::FillUIName(sValue, sStyle, SwGetPoolIdFromName::ChrFmt);
-    pRuby->SetCharFormatName(sValue);
+    pRuby->SetCharFormatName(sStyle);
     pRuby->SetCharFormatId(0);
     if(!sValue.isEmpty())
     {
-        const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(sValue, 
SwGetPoolIdFromName::ChrFmt));
+        const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(sStyle, 
SwGetPoolIdFromName::ChrFmt));
         pRuby->SetCharFormatId(nId);
     }
     rStyleSet.Put(std::move(pRuby));

Reply via email to