[ooo-build-commit] .: Branch 'ooo-build-3-2' - patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Thu Mar 25 01:54:35 PDT 2010


 patches/dev300/apply            |    1 
 patches/dev300/vcl-stl-fix.diff |   73 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

New commits:
commit f7b99eb375dea6024a48ca1b41f8bc76c220a38e
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Mar 24 13:30:01 2010 +0100

    Fix invalid iterator usage in X11SalGraphics::drawPolyPolygon
    
    * patches/dev300/apply: added patch
    * patches/dev300/vcl-stl-fix.diff: donˈt use iterator youˈve just
      erased

diff --git a/patches/dev300/apply b/patches/dev300/apply
index dc2c6c5..3723c9b 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3574,6 +3574,7 @@ connectivity-build-fix.diff, i#107957, fridrich
 oowintool-java6.diff, fridrich
 connectivity-build-fix-mac.diff, thorsten
 vcl-xinerama-clone-fix.diff, n#578730, thorsten
+vcl-stl-fix.diff, n#588957, thorsten
 
 [ HyphenFix ]
 # László Németh's patch for hyphen module
diff --git a/patches/dev300/vcl-stl-fix.diff b/patches/dev300/vcl-stl-fix.diff
new file mode 100644
index 0000000..549ed3c
--- /dev/null
+++ b/patches/dev300/vcl-stl-fix.diff
@@ -0,0 +1,73 @@
+Fix iterator handliŋ for drawPolygon
+
+From: Thorsten Behrens <tbehrens at novell.com>
+
+
+---
+
+ vcl/unx/source/gdi/salgdi.cxx |   21 +++++++++++++++++++--
+ 1 files changed, 19 insertions(+), 2 deletions(-)
+
+
+diff --git vcl/unx/source/gdi/salgdi.cxx vcl/unx/source/gdi/salgdi.cxx
+index ae281ab..0b02ad0 100644
+--- vcl/unx/source/gdi/salgdi.cxx
++++ vcl/unx/source/gdi/salgdi.cxx
+@@ -1427,14 +1427,17 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
+         // unless it splits another trapezoid that is still active
+         bool bSplit = false;
+         ActiveTrapSet::iterator aActiveTrapsIt = aActiveTraps.begin();
+-        for(; aActiveTrapsIt != aActiveTraps.end(); ++aActiveTrapsIt )
++        while(aActiveTrapsIt != aActiveTraps.end())
+         {
+             XTrapezoid& rLeftTrap = aTrapVector[ *aActiveTrapsIt ];
+ 
+             // skip until first overlap candidate
+             // TODO: use stl::*er_bound() instead
+             if( IsLeftOf( aTrapezoid.left, rLeftTrap.left) )
++            {
++                ++aActiveTrapsIt;
+                 continue;
++            }
+ 
+             // in the ActiveTrapSet there are still trapezoids where
+             // a vertical overlap with new trapezoids is no longer possible
+@@ -1445,15 +1448,26 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
+             {
+                 ActiveTrapSet::iterator it = aActiveTrapsIt;
+                 if( aActiveTrapsIt != aActiveTraps.begin() )
++                {
+                     --aActiveTrapsIt;
+-                aActiveTraps.erase( it );
++                    aActiveTraps.erase( it );
++                    ++aActiveTrapsIt;
++                }
++                else
++                {
++                    aActiveTraps.erase( it );
++                    aActiveTrapsIt = aActiveTraps.begin();
++                }
+                 continue;
+             }
+ 
+             // check if there is horizontal overlap
+             // aTrapezoid.left==rLeftTrap.right is allowed though
+             if( !IsLeftOf( aTrapezoid.left, rLeftTrap.right ) )
++            {
++                ++aActiveTrapsIt;
+                 continue;
++            }
+ 
+             // prepare to split the old trapezoid and keep its upper part
+             // find the old trapezoids entry in the VerticalTrapSet and remove it
+@@ -1463,7 +1477,10 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
+             for(; aVTSit != aVTSPair.second; ++aVTSit )
+             {
+                 if( *aVTSit != *aActiveTrapsIt )
++                {
++                    ++aActiveTrapsIt;
+                     continue;
++                }
+                 aVerticalTraps.erase( aVTSit );
+                 break;
+             }


More information about the ooo-build-commit mailing list