From d46f659c7524625474f0bb907805e285ee27d5ec Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 26 Oct 2021 00:24:49 +0300 Subject: Make sure that self-assign test checks types This may be important with static empty sequence cppu::g_emptySeq, that is common for sequences of different types. The changes in sd/qa/unit/data/xml/*.xml fix places where anys with empty Sequence used to wrongly take 'if(aAny >>= aPropSeq)' branch in dumpPropertyValueAsElement (drawinglayer/source/dumper/XShapeDumper.cxx). Change-Id: I5b0544ca94b30437c01dd46f376408f91510bcb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124167 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- cppu/source/uno/assign.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cppu') diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx index 4e3d70f311b2..c6a2cf58b457 100644 --- a/cppu/source/uno/assign.hxx +++ b/cppu/source/uno/assign.hxx @@ -388,7 +388,7 @@ inline bool _assignData( return false; // self assignment: if (*static_cast(pSource) == *static_cast(pDest)) - return true; + return _type_equals(pDestType, pSourceType); // E.g. static empty sequence may be shared if (_type_equals( pDestType, pSourceType )) { osl_atomic_increment( &(*static_cast(pSource))->nRefCount ); -- cgit