summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-08 11:45:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-08 11:45:18 +0000
commit165a53f3a7f08e65055e08ecd4cfc068c5d353b8 (patch)
tree6aa5b3599c2d0a0631b160d245f4c8efea81c760 /xmloff
parentaf92c600ef755d3766393b2ef7956f5ac163410c (diff)
Resolves: fdo#60132 Error reading file after inserting comment
Change-Id: Ib2b388c78c8f44a626267c2f8d3975b46ead3bd5
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtfldi.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 4b7dc53ab317..d97281a352db 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3782,6 +3782,11 @@ void XMLAnnotationImportContext::PrepareField(
while (xFields->hasMoreElements())
{
uno::Reference<beans::XPropertySet> xCurrField(xFields->nextElement(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySetInfo> xPropsInfo(xCurrField->getPropertySetInfo());
+
+ if (!xPropsInfo->hasPropertyByName(sPropertyName))
+ continue;
+
OUString aFieldName;
xCurrField->getPropertyValue(sPropertyName) >>= aFieldName;
if (aFieldName == aName)