Kaydet (Commit) 3d038663 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

124607: ODF import: check on certain property existence in annotation import to avoid exceptions

üst bd1eb988
......@@ -3760,13 +3760,17 @@ void XMLAnnotationImportContext::EndElement()
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
while (xFields->hasMoreElements())
{
uno::Reference<beans::XPropertySet> xCurrField(xFields->nextElement(), uno::UNO_QUERY);
OUString aFieldName;
xCurrField->getPropertyValue(sPropertyName) >>= aFieldName;
if ( aFieldName == aName )
uno::Reference< beans::XPropertySet > xCurrField(xFields->nextElement(), uno::UNO_QUERY);
uno::Reference< beans::XPropertySetInfo > xCurrFieldPropInfo = xCurrField->getPropertySetInfo();
if ( xCurrFieldPropInfo->hasPropertyByName( sPropertyName ) )
{
xPrevField.set( xCurrField, uno::UNO_QUERY );
break;
OUString aFieldName;
xCurrField->getPropertyValue( sPropertyName ) >>= aFieldName;
if ( aFieldName == aName )
{
xPrevField.set( xCurrField, uno::UNO_QUERY );
break;
}
}
}
}
......
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