[ooo-build-commit] .: patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Thu Mar 25 01:51:34 PDT 2010
patches/dev300/apply | 1
patches/dev300/vcl-stl-fix.diff | 73 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+)
New commits:
commit 5a273453dd083631cf5afbb4e171eb841d643ee9
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 66f4790..0fc9e1c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3745,6 +3745,7 @@ captionnumbering-hu.diff, i#110273, timar
sw-caption-separator.diff, i#110287, timar
# Fix name order for Hungarian on the UI
svx-hu-name-order.diff, i#105342, timar
+vcl-stl-fix.diff, n#588957, thorsten
[ Features ]
# embed generic media files inside odf docs, 2nd part
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