Kaydet (Commit) cf26d761 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#74524: ODF import: fix unhandled exception in annotation import

Crash with unhandled UnknownPropertyException when trying to get "Name"
property from a PageNumber field.

Change-Id: I501cc138caba034c85630519014b94d783ab8f39
üst 772c3a20
......@@ -3716,12 +3716,17 @@ void XMLAnnotationImportContext::EndElement()
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::XPropertySetInfo> const xInfo(
xCurrField->getPropertySetInfo());
if (xInfo->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