From 0b1e4a306705d8c25db6e233244101ba6c4c16b6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 3 May 2016 15:26:01 +0200 Subject: Prevent Any::setValue from reinterpreting bool* as sal_Bool* ...which only happens ot work in environments where sizeof (bool) == 1. The simpler alternative is to use the operator <<= template without passing explicit UNO type information, anyway. The std::nullptr_t overloads are needed to disambiguate calls with a nullptr argument. (Which can at least be meaningful for VOID, but for other types what it happens to do is store a default value of the given type.) As std::nullptr_t is only C++11, this all needs to be LIBO_INTERNAL_ONLY. Change-Id: Iff06a6ba94250bd4ae4afc937c2a2bfa75f0888f --- include/comphelper/property.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/comphelper') diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx index 1b79ccb8aec6..bc13cd0bc42d 100644 --- a/include/comphelper/property.hxx +++ b/include/comphelper/property.hxx @@ -132,7 +132,7 @@ inline bool tryPropertyValue(css::uno::Any& /*out*/_rConvertedValue, css::uno::A if (bool(bNewValue) != _bCurrentValue) { _rConvertedValue.setValue(&bNewValue, cppu::UnoType::get()); - _rOldValue.setValue(&_bCurrentValue, cppu::UnoType::get()); + _rOldValue <<= _bCurrentValue; bModified = true; } return bModified; -- cgit