summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-26 00:24:49 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-26 07:19:40 +0200
commitd46f659c7524625474f0bb907805e285ee27d5ec (patch)
tree5b72549798b676d5c5c6f332e511d8f300e69615 /cppu
parentd80547c7f4ddf599cce52e5c52269cb07a677466 (diff)
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<OUString> 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 <mike.kaganski@collabora.com>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/uno/assign.hxx2
1 files changed, 1 insertions, 1 deletions
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<uno_Sequence **>(pSource) == *static_cast<uno_Sequence **>(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<uno_Sequence **>(pSource))->nRefCount );