summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon/b2dpolypolygoncutter.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-01-26 16:17:33 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-01-26 16:17:33 +0000
commit778db5e3e4cf21e5a1b65b39f0f58369c7255863 (patch)
tree54f63357eee701ced0d1e27dde9fdaf1fd685f21 /basegfx/source/polygon/b2dpolypolygoncutter.cxx
parent770c8b796267497d450ca1d8fb1725b72bccf950 (diff)
INTEGRATION: CWS aw034 (1.10.2); FILE MERGED
2006/01/19 20:35:29 aw 1.10.2.1: #129701#
Diffstat (limited to 'basegfx/source/polygon/b2dpolypolygoncutter.cxx')
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index b7c74475fb92..fbe7ee9e315e 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: b2dpolypolygoncutter.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: kz $ $Date: 2005-11-02 13:58:32 $
+ * last change: $Author: hr $ $Date: 2006-01-26 17:17:33 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -341,9 +341,10 @@ namespace basegfx
::std::sort(aSortNodes.begin(), aSortNodes.end());
// handle common nodes
- for(a = 0L; a < aSortNodes.size() - 1L; a++)
+ for(a = 0L; a < nCount; a++)
{
- for(sal_uInt32 b(a + 1L); aSortNodes[a].maPoint.equal(aSortNodes[b].maPoint) && b < aSortNodes.size(); b++)
+ // #129701# test b before using it, not after. Also use nCount instead of aSortNodes.size()
+ for(sal_uInt32 b(a + 1L); b < nCount && aSortNodes[a].maPoint.equal(aSortNodes[b].maPoint); b++)
{
impHandleCommon(maPointNodes[aSortNodes[a].mnIndex], maPointNodes[aSortNodes[b].mnIndex]);
}
@@ -649,9 +650,10 @@ namespace basegfx
::std::sort(aSortNodes.begin(), aSortNodes.end());
// handle common nodes
- for(a = 0L; a < aSortNodes.size() - 1L; a++)
+ for(a = 0L; a < mnPointCount - 1L; a++)
{
- for(b = a + 1L; aSortNodes[a].maPoint.equal(aSortNodes[b].maPoint) && b < aSortNodes.size(); b++)
+ // #129701# test b before using it, not after. Also use mnPointCount instead of aSortNodes.size()
+ for(b = a + 1L; b < mnPointCount && aSortNodes[a].maPoint.equal(aSortNodes[b].maPoint); b++)
{
impHandleCommon(maPointNodes[aSortNodes[a].mnIndex], maPointNodes[aSortNodes[b].mnIndex]);
}