diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-07 02:27:54 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-08 05:34:37 +0100 |
commit | d833992e7e06f7d385fca6ffe35ce66b79360a63 (patch) | |
tree | 857f8e8edbbbf0754e8fdf097703b5b9a16c59c4 /sw | |
parent | 56f3dbffdf5b3264c1c71201733e3ff6bb5e48cb (diff) |
Avoid checking exact interface type of Any value
Change-Id: Ic883c3a9fd8eb87469aec6b6570a39aadf575c3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176184
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 7b5b8f392630..d5b0a60f32b2 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1185,10 +1185,8 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a } else if (pEntry->nMemberId == MID_TEXT_BOX_CONTENT) { - if (aValue.getValueType() - == cppu::UnoType<uno::Reference<text::XTextFrame>>::get()) - SwTextBoxHelper::set(pFormat, pObj, - aValue.get<uno::Reference<text::XTextFrame>>()); + if (uno::Reference<text::XTextFrame> xTextFrame; aValue >>= xTextFrame) + SwTextBoxHelper::set(pFormat, pObj, xTextFrame); else SAL_WARN( "sw.uno", "This is not a TextFrame!" ); } |