sw/source/core/unocore/unotbl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 38f34257dfd7048b30df0c46b9d4639182a4cb13 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Sep 3 15:35:06 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Sep 3 15:09:43 2024 +0200 Don't throw on a no-op Trying to set IsWidthRelative to true throws, showing warnings in the console. It happens during DOCX load in SwXText::convertToSwTable; so just do not throw when it's already enabled, as a no-op. Change-Id: I2c57a1f34a9b186cf76e2e422d446bee06134a63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172795 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index efcf33e2900d..d5502de3a7d0 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -225,7 +225,7 @@ static void lcl_SetSpecialProperty(SwFrameFormat* pFormat, { if(!aValue.get<bool>()) aSz.SetWidthPercent(0); - else + else if (aSz.GetWidthPercent() == 0) // If it's already enabled, just ignore it { throw lang::IllegalArgumentException(u"relative width cannot be switched on with this property"_ustr, nullptr, 0); }