Kaydet (Commit) 76301169 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

i#79611: SvxFieldData::Create() is not supposed to throw.

Change-Id: Ied4e5cc9211b2a541006432d0b4d257f014249f4
üst c226e931
...@@ -43,7 +43,18 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe ...@@ -43,7 +43,18 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
if (!xPropSet.is()) if (!xPropSet.is())
return NULL; return NULL;
uno::Any aAny = xPropSet->getPropertyValue(UNO_TC_PROP_TEXTFIELD_TYPE); // we do not support these fields from Writer, so make sure we do not throw
// here - see fdo#63436 how to possibly extend Writer to make use of this
uno::Any aAny;
try {
aAny = xPropSet->getPropertyValue(UNO_TC_PROP_TEXTFIELD_TYPE);
if ( !aAny.has<sal_Int32>() )
return NULL;
} catch ( const beans::UnknownPropertyException& e )
{
return NULL;
}
sal_Int32 nFieldType = aAny.get<sal_Int32>(); sal_Int32 nFieldType = aAny.get<sal_Int32>();
switch (nFieldType) switch (nFieldType)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment