[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - xmloff/source

Caolán McNamara caolanm at redhat.com
Fri Feb 8 03:58:37 PST 2013


 xmloff/source/text/txtfldi.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 2b2e4eea5d32baf961d0da049f72063b588e88a3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 8 11:45:18 2013 +0000

    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 at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 30dadc7..8f27931 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)


More information about the Libreoffice-commits mailing list