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

Caolán McNamara caolanm at redhat.com
Wed Apr 15 07:42:20 PDT 2015


 oox/source/export/vmlexport.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bdec405ed5017c432ef4f1efeb2e78ccd37fdc7b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 15 15:39:40 2015 +0100

    don't crash on export of ooo52825-1.doc to .docx
    
    Change-Id: I944f65c9bf1cf7cc39e674bab602dbf2d499317c

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index d3e8291..570416d 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -523,7 +523,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                                     // See EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply the number of points.
                                     // FIXME: we miss out a significant amount of complexity from
                                     // the above method here, and do some rather odd things to match.
-                                    int nElems = aVertices.nPropSize / ( nPointSize * 2);
+                                    int nElems = !nPointSize ? 0 : aVertices.nPropSize / (nPointSize * 2);
                                     if (nSeg > nElems)
                                     {
                                         SAL_WARN("oox", "Busted escher export " << nSeg << "vs . " << nElems << " truncating point stream");


More information about the Libreoffice-commits mailing list