summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:17:16 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:17:16 +0200
commite71dd58cbb6cbcf4d032db73982239badeeabf22 (patch)
treeb21dfedc3f13ef0ba966efd13da05ff38523e698 /basegfx/source/polygon/b2dpolygoncutandtouch.cxx
parent510e316a6f128161e6454fe35053231bd24b5a03 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 0fce58acaa20c2e3cd99690e41da991380a0a1a9 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:20 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 6fc21aa74b4d2aba07d854d5d3c2f404905b40ef Author: Tor Lillqvist <tlillqvist@novell.com> Date: Tue Jan 18 16:25:52 2011 +0200 Avoid GetHelpText() call which can be quite heavy GetHelpText() can cause a quite heavy sequence of file and directory lookups. See fdo#33088. As its return value here was just passed on to ShowHelpStatusText() which doesn't do anything at all, it was completely unnecessary. The GetHelpText() calls here caused the noticeable slowdown in highlighting menu items on Windows with lots of localised help files for some bundled extensions. Signed-off-by: Caolan McNamara <caolanm@redhat.com> Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Thorsten Behrens <thb@documentfoundation.org> Signed-off-by: fstrba@novell.com vcl/source/window/menu.cxx | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 3c2e3b6efc81c5e34c56f0f11723ed848801be35 Author: Luboš Luňák <l.lunak@suse.cz> Date: Tue Jan 18 13:11:00 2011 +0100 do not mix unrelated X11 Visuals (fdo#33108) Do not assume that there is just one generic Visual, as today's XServers are ARGB-capable and cases of both the default depth and 32bit visuals can happen. Signed-off-by: Thorsten Behrens <tbehrens@novell.com> Signed-off-by: Radek Doulik <rodo@novell.com> Signed-off-by: Michael Meeks <michael.meeks@novell.com> vcl/unx/inc/salgdi.h | 2 +- vcl/unx/source/gdi/salgdi.cxx | 17 ++++++++--------- vcl/unx/source/gdi/salgdi3.cxx | 8 -------- 3 files changed, 9 insertions(+), 18 deletions(-) commit 1c9c9180b4105626e9242e5499b67180abf4a53c Author: Andre Fischer <andre.f.fischer@oracle.com> Date: Tue Jan 18 10:41:22 2011 +0100 calc65: #i116318# Fixed the painting of axial gradients. Signed-off-by: Thorsten Behrens <tbehrens@novell.com> (cherry picked from commit ea29f32bd5bc1a937a747bd5a1f5b37f570ed25f) Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Radek Doulik <rodo@novell.com> cppcanvas/source/mtfrenderer/implrenderer.cxx | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) commit 94ba0c5b10f8089dc549e9fc4f3085622cff65c4 Author: Luboš Luňák <l.lunak@suse.cz> Date: Wed Nov 3 15:17:33 2010 +0100 use sane scrollbar sizes when drawing bnc#619772 leads to a crash because maximum = minimum = 0, and this strange (but for whatever reason needed) '- mnVisibleSize' hack makes maximum be -1, eventually leading to a crash vcl/unx/kde4/KDESalGraphics.cxx | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4831d49751fd5aa81901cfc0402311ff2d700056 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:37 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: libs-gui_libreoffice-3.3.0.4
Diffstat (limited to 'basegfx/source/polygon/b2dpolygoncutandtouch.cxx')
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx74
1 files changed, 37 insertions, 37 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index ac118e73356f..31c4a518a0b1 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@
//////////////////////////////////////////////////////////////////////////////
// defines
-#define SUBDIVIDE_FOR_CUT_TEST_COUNT (50)
+#define SUBDIVIDE_FOR_CUT_TEST_COUNT (50)
//////////////////////////////////////////////////////////////////////////////
@@ -56,13 +56,13 @@ namespace basegfx
class temporaryPoint
{
- B2DPoint maPoint; // the new point
- sal_uInt32 mnIndex; // index after which to insert
- double mfCut; // parametric cut description [0.0 .. 1.0]
+ B2DPoint maPoint; // the new point
+ sal_uInt32 mnIndex; // index after which to insert
+ double mfCut; // parametric cut description [0.0 .. 1.0]
public:
temporaryPoint(const B2DPoint& rNewPoint, sal_uInt32 nIndex, double fCut)
- : maPoint(rNewPoint),
+ : maPoint(rNewPoint),
mnIndex(nIndex),
mfCut(fCut)
{
@@ -91,9 +91,9 @@ namespace basegfx
class temporaryPolygonData
{
- B2DPolygon maPolygon;
- B2DRange maRange;
- temporaryPointVector maPoints;
+ B2DPolygon maPolygon;
+ B2DRange maRange;
+ temporaryPointVector maPoints;
public:
const B2DPolygon& getPolygon() const { return maPolygon; }
@@ -127,12 +127,12 @@ namespace basegfx
// add start point
aRetval.append(rCandidate.getB2DPoint(0));
-
+
for(sal_uInt32 a(0L); a < nCount; a++)
{
// get edge
rCandidate.getBezierSegment(a, aEdge);
-
+
if(aEdge.isBezier())
{
// control vectors involved for this edge
@@ -172,7 +172,7 @@ namespace basegfx
aRetval.append(aNewPoint);
}
}
-
+
// add edge end point
aRetval.append(aEdge.getEndPoint());
}
@@ -184,7 +184,7 @@ namespace basegfx
// set closed flag and correct last point (which is added double now).
tools::closeWithGeometryChange(aRetval);
}
-
+
return aRetval;
}
else
@@ -239,8 +239,8 @@ namespace basegfx
////////////////////////////////////////////////////////////////////////////////
void findEdgeCutsTwoEdges(
- const B2DPoint& rCurrA, const B2DPoint& rNextA,
- const B2DPoint& rCurrB, const B2DPoint& rNextB,
+ const B2DPoint& rCurrA, const B2DPoint& rNextA,
+ const B2DPoint& rCurrB, const B2DPoint& rNextB,
sal_uInt32 nIndA, sal_uInt32 nIndB,
temporaryPointVector& rTempPointsA, temporaryPointVector& rTempPointsB)
{
@@ -416,7 +416,7 @@ namespace basegfx
void findEdgeCutsBezierAndEdge(
const B2DCubicBezier& rCubicA,
- const B2DPoint& rCurrB, const B2DPoint& rNextB,
+ const B2DPoint& rCurrB, const B2DPoint& rNextB,
sal_uInt32 nIndA, sal_uInt32 nIndB,
temporaryPointVector& rTempPointsA, temporaryPointVector& rTempPointsB)
{
@@ -430,7 +430,7 @@ namespace basegfx
// create subdivided polygons and find cuts between them
// Keep adaptiveSubdivideByCount due to needed quality
- aTempPolygonA.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
+ aTempPolygonA.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
aTempPolygonA.append(rCubicA.getStartPoint());
rCubicA.adaptiveSubdivideByCount(aTempPolygonA, SUBDIVIDE_FOR_CUT_TEST_COUNT);
aTempPolygonEdge.append(rCurrB);
@@ -471,10 +471,10 @@ namespace basegfx
// create subdivided polygons and find cuts between them
// Keep adaptiveSubdivideByCount due to needed quality
- aTempPolygonA.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
+ aTempPolygonA.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
aTempPolygonA.append(rCubicA.getStartPoint());
rCubicA.adaptiveSubdivideByCount(aTempPolygonA, SUBDIVIDE_FOR_CUT_TEST_COUNT);
- aTempPolygonB.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
+ aTempPolygonB.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
aTempPolygonB.append(rCubicB.getStartPoint());
rCubicB.adaptiveSubdivideByCount(aTempPolygonB, SUBDIVIDE_FOR_CUT_TEST_COUNT);
@@ -515,7 +515,7 @@ namespace basegfx
// create subdivided polygon and find cuts on it
// Keep adaptiveSubdivideByCount due to needed quality
- aTempPolygon.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
+ aTempPolygon.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
aTempPolygon.append(rCubicA.getStartPoint());
rCubicA.adaptiveSubdivideByCount(aTempPolygon, SUBDIVIDE_FOR_CUT_TEST_COUNT);
findCuts(aTempPolygon, aTempPointVector);
@@ -595,7 +595,7 @@ namespace basegfx
else
{
// test for simple edge-edge cuts
- findEdgeCutsTwoEdges(aCubicA.getStartPoint(), aCubicA.getEndPoint(), aCubicB.getStartPoint(), aCubicB.getEndPoint(),
+ findEdgeCutsTwoEdges(aCubicA.getStartPoint(), aCubicA.getEndPoint(), aCubicB.getStartPoint(), aCubicB.getEndPoint(),
a, b, rTempPoints, rTempPoints);
}
}
@@ -616,7 +616,7 @@ namespace basegfx
{
const B2DPoint aNextB(rCandidate.getB2DPoint(b + 1L == nPointCount ? 0L : b + 1L));
const B2DRange aRangeB(aCurrB, aNextB);
-
+
// consecutive segments touch of course
bool bOverlap = false;
if( b > a+1)
@@ -627,7 +627,7 @@ namespace basegfx
{
findEdgeCutsTwoEdges(aCurrA, aNextA, aCurrB, aNextB, a, b, rTempPoints, rTempPoints);
}
-
+
// prepare next step
aCurrB = aNextB;
}
@@ -654,13 +654,13 @@ namespace basegfx
////////////////////////////////////////////////////////////////////////////////
void findTouchesOnEdge(
- const B2DPoint& rCurr, const B2DPoint& rNext, const B2DPolygon& rPointPolygon,
+ const B2DPoint& rCurr, const B2DPoint& rNext, const B2DPolygon& rPointPolygon,
sal_uInt32 nInd, temporaryPointVector& rTempPoints)
{
// find out if points from rPointPolygon are positioned on given edge. If Yes, add
// points there to represent touches (which may be enter or leave nodes later).
const sal_uInt32 nPointCount(rPointPolygon.count());
-
+
if(nPointCount)
{
const B2DRange aRange(rCurr, rNext);
@@ -668,7 +668,7 @@ namespace basegfx
B2DVector aNormalizedEdgeVector(aEdgeVector);
aNormalizedEdgeVector.normalize();
bool bTestUsingX(fabs(aEdgeVector.getX()) > fabs(aEdgeVector.getY()));
-
+
for(sal_uInt32 a(0L); a < nPointCount; a++)
{
const B2DPoint aTestPoint(rPointPolygon.getB2DPoint(a));
@@ -681,7 +681,7 @@ namespace basegfx
if(areParallel(aNormalizedEdgeVector, aTestVector))
{
- const double fCut((bTestUsingX)
+ const double fCut((bTestUsingX)
? aTestVector.getX() / aEdgeVector.getX()
: aTestVector.getY() / aEdgeVector.getY());
const double fZero(0.0);
@@ -701,7 +701,7 @@ namespace basegfx
////////////////////////////////////////////////////////////////////////////////
void findTouchesOnCurve(
- const B2DCubicBezier& rCubicA, const B2DPolygon& rPointPolygon,
+ const B2DCubicBezier& rCubicA, const B2DPolygon& rPointPolygon,
sal_uInt32 nInd, temporaryPointVector& rTempPoints)
{
// find all points from rPointPolygon which touch the given bezier segment. Add an entry
@@ -712,7 +712,7 @@ namespace basegfx
// create subdivided polygon and find cuts on it
// Keep adaptiveSubdivideByCount due to needed quality
- aTempPolygon.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
+ aTempPolygon.reserve(SUBDIVIDE_FOR_CUT_TEST_COUNT + 8);
aTempPolygon.append(rCubicA.getStartPoint());
rCubicA.adaptiveSubdivideByCount(aTempPolygon, SUBDIVIDE_FOR_CUT_TEST_COUNT);
findTouches(aTempPolygon, rPointPolygon, aTempPointVector);
@@ -788,7 +788,7 @@ namespace basegfx
void findCuts(const B2DPolygon& rCandidateA, const B2DPolygon& rCandidateB, temporaryPointVector& rTempPointsA, temporaryPointVector& rTempPointsB)
{
- // find out if edges from both polygons cut. If so, add entries to rTempPoints which
+ // find out if edges from both polygons cut. If so, add entries to rTempPoints which
// should be added to the polygons accordingly
const sal_uInt32 nPointCountA(rCandidateA.count());
const sal_uInt32 nPointCountB(rCandidateB.count());
@@ -847,7 +847,7 @@ namespace basegfx
else
{
// test for simple edge-edge cuts
- findEdgeCutsTwoEdges(aCubicA.getStartPoint(), aCubicA.getEndPoint(), aCubicB.getStartPoint(), aCubicB.getEndPoint(),
+ findEdgeCutsTwoEdges(aCubicA.getStartPoint(), aCubicA.getEndPoint(), aCubicB.getStartPoint(), aCubicB.getEndPoint(),
a, b, rTempPointsA, rTempPointsB);
}
}
@@ -911,7 +911,7 @@ namespace basegfx
if(rCandidate.count())
{
temporaryPointVector aTempPoints;
-
+
findTouches(rCandidate, rCandidate, aTempPoints);
findCuts(rCandidate, aTempPoints);
@@ -1016,11 +1016,11 @@ namespace basegfx
{
temporaryPointVector aTempPoints;
temporaryPointVector aTempPointsUnused;
-
+
for(sal_uInt32 a(0L); a < rMask.count(); a++)
{
const B2DPolygon aPartMask(rMask.getB2DPolygon(a));
-
+
findTouches(rCandidate, aPartMask, aTempPoints);
findCuts(rCandidate, aPartMask, aTempPoints, aTempPointsUnused);
}
@@ -1052,7 +1052,7 @@ namespace basegfx
B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate, const B2DPoint& rStart, const B2DPoint& rEnd)
{
const sal_uInt32 nCount(rCandidate.count());
-
+
if(nCount && !rStart.equal(rEnd))
{
const B2DRange aPolygonRange(rCandidate.getB2DRange());
@@ -1114,7 +1114,7 @@ namespace basegfx
{
const sal_uInt32 nCountA(rCandidate.count());
const sal_uInt32 nCountM(rPolyMask.count());
-
+
if(nCountA && nCountM)
{
const B2DRange aRangeA(rCandidate.getB2DRange());
@@ -1208,7 +1208,7 @@ namespace basegfx
if(rCandidate.count())
{
temporaryPointVector aTempPoints;
-
+
findCuts(rCandidate, aTempPoints);
return mergeTemporaryPointsAndPolygon(rCandidate, aTempPoints);