Author: alg
Date: Tue Feb 18 16:37:20 2014
New Revision: 1569417

URL: http://svn.apache.org/r1569417
Log:
i124073 choose a more compiler-independent way of construction

Modified:
    
openoffice/trunk/main/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx

Modified: 
openoffice/trunk/main/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx?rev=1569417&r1=1569416&r2=1569417&view=diff
==============================================================================
--- 
openoffice/trunk/main/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
 (original)
+++ 
openoffice/trunk/main/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
 Tue Feb 18 16:37:20 2014
@@ -759,9 +759,23 @@ namespace drawinglayer
                             basegfx::B2DPolygon 
aMaskPolygon(basegfx::tools::createUnitPolygon());
                             aMaskPolygon.transform(rTransform);
 
-                            aRetval[0] = new MaskPrimitive2D(
+                            // #124073# the clde below was compiler-dependent. 
Normally,
+                            // a compiler will
+                            // - alloc mem
+                            // - ececute the constructor
+                            // - do the assignment
+                            // but the mac compiler does 
alloc-assign-constructor, thus
+                            // modifying aRetval[0] befure aRetval gets used 
in the
+                            // constructor. This creates an endless loop in 
the primitive
+                            // stack. Thus do it the safe way.
+                            // 
+                            // aRetval[0] = new MaskPrimitive2D(
+                            //     basegfx::B2DPolyPolygon(aMaskPolygon),
+                            //     aRetval);
+                            MaskPrimitive2D* pMaskPrimitive2D = new 
MaskPrimitive2D(
                                 basegfx::B2DPolyPolygon(aMaskPolygon),
                                 aRetval);
+                            aRetval[0] = pMaskPrimitive2D;
                         }
 #ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE
                     }


Reply via email to