[Libreoffice-commits] core.git: sw/qa xmloff/source

Caolán McNamara caolanm at redhat.com
Wed May 25 20:07:39 UTC 2016


 sw/qa/core/data/odt/pass/tdf97879.odt |binary
 xmloff/source/text/txtimp.cxx         |    8 +++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e954697a9d39e40473fb9f59a791ccb7129e763c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 25 20:47:10 2016 +0100

    Resolves: tdf#97879 loop in style hierarchy on odt loop
    
    Change-Id: I0098c434b89b6a57e8b888a4d4f643e4d0865d29

diff --git a/sw/qa/core/data/odt/pass/tdf97879.odt b/sw/qa/core/data/odt/pass/tdf97879.odt
new file mode 100644
index 0000000..b345267
Binary files /dev/null and b/sw/qa/core/data/odt/pass/tdf97879.odt differ
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 3da0e8b..08dafaf 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1380,7 +1380,13 @@ static bool lcl_HasListStyle( const OUString& sStyleName,
                 else
                 {
                     // search list style at parent
-                    xStyle.set( xPropState, UNO_QUERY );
+                    Reference<XStyle> xParentStyle(xPropState, UNO_QUERY);
+                    if (xStyle == xParentStyle)
+                    {
+                        // error case
+                        return true;
+                    }
+                    xStyle = xParentStyle;
                 }
             }
         }


More information about the Libreoffice-commits mailing list