summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-08 11:45:18 +0000
committerMichael Stahl <mstahl@redhat.com>2013-02-08 11:58:18 +0000
commit2b2e4eea5d32baf961d0da049f72063b588e88a3 (patch)
treeddc13b9d632830d324f62d3fd1cb4b5b8d4a22ae /xmloff
parent0dea073b03de7a40414150e8b0ca0814ca106ede (diff)
Resolves: fdo#60132 Error reading file after inserting comment
Change-Id: Ib2b388c78c8f44a626267c2f8d3975b46ead3bd5 (cherry picked from commit 165a53f3a7f08e65055e08ecd4cfc068c5d353b8) Reviewed-on: https://gerrit.libreoffice.org/2041 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
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 30dadc75d12d..8f2793175095 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)