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

New commits:
commit 7aae0e71a408b2c9aae4fb1135ec71a4f10ed2df
Author:     Michael Stahl <[email protected]>
AuthorDate: Tue Dec 10 18:24:13 2024 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Tue Dec 10 19:58:20 2024 +0100

    tdf#159549 sw: fix FN_UNO_PARA_STYLE in unotbl.cxx
    
    SwXTextTableCursor::getPropertyValue() and
    SwXCellRange::getPropertyValue() were erroneously returning UINames.
    
    Thanks to Noel Grandin for pointing these out.
    
    Change-Id: I232b86512cac1adf9c00ac00bf8afaf3ccfeb3cd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178258
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index d2c31d2474b7..ce8d4c24f966 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1710,7 +1710,11 @@ uno::Any SwXTextTableCursor::getPropertyValue(const 
OUString& rPropertyName)
         {
             auto pFormat(SwUnoCursorHelper::GetCurTextFormatColl(rUnoCursor, 
false));
             if(pFormat)
-                aResult <<= pFormat->GetName();
+            {
+                OUString ret;
+                SwStyleNameMapper::FillProgName(pFormat->GetName(), ret, 
SwGetPoolIdFromName::TxtColl);
+                aResult <<= ret;
+            }
         }
         break;
         default:
@@ -3490,7 +3494,9 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const 
OUString& rPropertyName)
                     
SwUnoCursorHelper::GetCurTextFormatColl(*m_pImpl->m_pTableCursor, false);
                 OUString sRet;
                 if (pTmpFormat)
-                    sRet = pTmpFormat->GetName();
+                {
+                    SwStyleNameMapper::FillProgName(pTmpFormat->GetName(), 
sRet, SwGetPoolIdFromName::TxtColl);
+                }
                 aRet <<= sRet;
             }
             break;

Reply via email to