summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/flditem.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 2b3d090b796e..70fe69274e5c 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -43,7 +43,18 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
if (!xPropSet.is())
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>();
switch (nFieldType)