diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-05-03 08:25:16 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-05-03 10:12:16 +0200 |
commit | 8c78361b05ba3cefe5b0f31f35113f7890fd2296 (patch) | |
tree | a0f0f3fb3d84bd5719c8281d438a03ab1253870f /sw | |
parent | 8426c38a23e5bcc4a8fc061113755de0f8dbc250 (diff) |
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 <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 31 |
1 files changed, 30 insertions, 1 deletions
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&) { |