From e8bb827571f540ac4af2247cb11239bb96876669 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 30 Jan 2012 12:19:11 +0100 Subject: Fixed cppheader.xsl nillable treatment. * cppheader.xsl had initially been written under the false assumption that a missing oor:nillable attribute defaults to "false" instead of "true". That has been fixed. * As a result, many places that use the new simplified officecfg/*.hxx headers broke as they did not expect value types to be wrapped boost::optional. To keep the code simple, I decided to change all occurrences in officecfg/registry/schema/ of properties that specify a default and do not explicitly specify oor:nillable="true" to oor:nillable="false". Strictly speaking, this is an incompatible change, but in many cases it should be what was intended, anyway. * Some places that use the new simplified officecfg/*.hxx headers still had to be adapted to boost::optional wrapping. * This showed that unotools/configuration.hxx did not yet work for those wrapped properties and needed fixing, too. --- configmgr/source/propertynode.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configmgr') diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx index ea95274310b8..ab0125fc3499 100644 --- a/configmgr/source/propertynode.cxx +++ b/configmgr/source/propertynode.cxx @@ -35,6 +35,7 @@ #include "rtl/ref.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" +#include "sal/log.hxx" #include "components.hxx" #include "node.hxx" @@ -77,6 +78,9 @@ css::uno::Any PropertyNode::getValue(Components & components) { } externalDescriptor_ = rtl::OUString(); // must not throw } + SAL_WARN_IF( + !(value_.hasValue() || nillable_), "configmgr", + "non-nillable property without value"); return value_; } -- cgit