sw/source/core/unocore/unotext.cxx |   31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

New commits:
commit 8c78361b05ba3cefe5b0f31f35113f7890fd2296
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed May 3 08:25:16 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed May 3 10:12:16 2023 +0200

    sw floattable: don't try to set various character properties as table 
property
    
    Cell UNO objects don't have such a property, and this generates a
    warning on importing sw/qa/core/layout/data/floattable.docx, silence it.
    
    Change-Id: Ie8e104ba9b028d0e1d9cf4893b4002b1b2a89f38
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151311
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index ec1c89824ae7..6d6ce3cb866d 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2254,7 +2254,36 @@ SwXText::convertToTable(
         {
             try
             {
-                xPrSet->setPropertyValue(rTableProperty.Name, 
rTableProperty.Value);
+                static const std::initializer_list<std::u16string_view> 
vDenylist = {
+                    u"BottomBorder",
+                    u"CharAutoKerning",
+                    u"CharFontName",
+                    u"CharFontNameAsian",
+                    u"CharFontNameComplex",
+                    u"CharHeight",
+                    u"CharHeightAsian",
+                    u"CharHeightComplex",
+                    u"CharInteropGrabBag",
+                    u"CharLocale",
+                    u"CharLocaleAsian",
+                    u"CharLocaleComplex",
+                    u"HorizontalBorder",
+                    u"LeftBorder",
+                    u"ParaAdjust",
+                    u"ParaBottomMargin",
+                    u"ParaIsHyphenation",
+                    u"ParaLineSpacing",
+                    u"ParaOrphans",
+                    u"ParaTopMargin",
+                    u"ParaWidows",
+                    u"RightBorder",
+                    u"TopBorder",
+                    u"VerticalBorder",
+                };
+                if (std::find(vDenylist.begin(), vDenylist.end(), 
rTableProperty.Name) == vDenylist.end())
+                {
+                    xPrSet->setPropertyValue(rTableProperty.Name, 
rTableProperty.Value);
+                }
             }
             catch (const uno::Exception&)
             {

Reply via email to