summaryrefslogtreecommitdiff
path: root/xmloff/source/forms/elementimport.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-11-01 11:34:47 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-11-01 11:34:47 +0100
commit0066883822a8d184264a7660e859cd9e116992cf (patch)
treec5a0ffa18bf708daabcf994f54b321e123fa6d9c /xmloff/source/forms/elementimport.cxx
parent132f86ce950f431b671e0c640cea0883026e9215 (diff)
dba34a: s_propertyMetaData should not be a global static, as it uses other global statics for initialization, which makes proper initialization dependent on module-load-order
Diffstat (limited to 'xmloff/source/forms/elementimport.cxx')
-rw-r--r--xmloff/source/forms/elementimport.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index a25e7533a1..a944e62ef1 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -880,6 +880,7 @@ namespace xmloff
++aValueProps
)
{
+ bool bSuccess = false;
switch (aValueProps->Handle)
{
case PROPID_VALUE:
@@ -889,6 +890,7 @@ namespace xmloff
if (!bRetrievedValues)
{
getValuePropertyNames(m_eElementType, nClassId, pCurrentValueProperty, pValueProperty);
+ ENSURE_OR_BREAK( pCurrentValueProperty && pValueProperty, "OControlImport::StartElement: illegal value property names!" );
bRetrievedValues = sal_True;
}
OSL_ENSURE((PROPID_VALUE != aValueProps->Handle) || pValueProperty,
@@ -901,6 +903,7 @@ namespace xmloff
aValueProps->Name = ::rtl::OUString::createFromAscii(pValueProperty);
else
aValueProps->Name = ::rtl::OUString::createFromAscii(pCurrentValueProperty);
+ bSuccess = true;
}
break;
case PROPID_MIN_VALUE:
@@ -910,6 +913,7 @@ namespace xmloff
if (!bRetrievedValueLimits)
{
getValueLimitPropertyNames(nClassId, pMinValueProperty, pMaxValueProperty);
+ ENSURE_OR_BREAK( pMinValueProperty && pMaxValueProperty, "OControlImport::StartElement: illegal value limit property names!" );
bRetrievedValueLimits = sal_True;
}
OSL_ENSURE((PROPID_MIN_VALUE != aValueProps->Handle) || pMinValueProperty,
@@ -922,10 +926,14 @@ namespace xmloff
aValueProps->Name = ::rtl::OUString::createFromAscii(pMinValueProperty);
else
aValueProps->Name = ::rtl::OUString::createFromAscii(pMaxValueProperty);
+ bSuccess = true;
}
break;
}
+ if ( !bSuccess )
+ continue;
+
// translate the value
implTranslateValueProperty(m_xInfo, *aValueProps);
// add the property to the base class' array