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

Caolán McNamara caolanm at redhat.com
Tue Sep 30 12:43:02 PDT 2014


 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   10 +++++++++-
 sw/qa/core/data/ooxml/pass/fdo79129.docx            |binary
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit c84ce79132c674b4c2d31da8997ed77671323dfe
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 30 10:43:37 2014 +0100

    Resolves: fdo#79129 Crash in oox::drawingml::LayoutNode::setupShape
    
    Change-Id: I0bafd2c43d29806eea0ff0cb165e67aece53488f

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 049f409..dc5f2db 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -394,7 +394,15 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI
             const DiagramData::StringMap::value_type::second_type::const_iterator aVecEnd=aNodeName->second.end();
             while( aVecIter != aVecEnd )
             {
-                DiagramData::PointNameMap::const_iterator aDataNode2=rDgm.getData()->getPointNameMap().find(aVecIter->first);
+                DiagramData::PointNameMap& rMap = rDgm.getData()->getPointNameMap();
+                DiagramData::PointNameMap::const_iterator aDataNode2 = rMap.find(aVecIter->first);
+                if (aDataNode2 == rMap.end())
+                {
+                    //busted, skip it
+                    ++aVecIter;
+                    continue;
+                }
+
                 if( aVecIter->second == 0 )
                 {
                     // grab shape attr from topmost element(s)
diff --git a/sw/qa/core/data/ooxml/pass/fdo79129.docx b/sw/qa/core/data/ooxml/pass/fdo79129.docx
new file mode 100644
index 0000000..46ff0f5
Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/fdo79129.docx differ


More information about the Libreoffice-commits mailing list