diff options
Diffstat (limited to 'basegfx/inc/basegfx/range')
-rw-r--r-- | basegfx/inc/basegfx/range/b1drange.hxx | 122 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b1ibox.hxx | 112 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b1irange.hxx | 114 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2dconnectedranges.hxx | 46 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2dpolyrange.hxx | 2 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2drange.hxx | 108 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2drangeclipper.hxx | 6 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2drectangle.hxx | 2 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2ibox.hxx | 88 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2irange.hxx | 98 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b2irectangle.hxx | 2 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b3drange.hxx | 114 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b3dvolume.hxx | 2 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b3ibox.hxx | 86 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b3irange.hxx | 98 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/b3ivolume.hxx | 2 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/basicbox.hxx | 2 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/basicrange.hxx | 28 | ||||
-rw-r--r-- | basegfx/inc/basegfx/range/rangeexpander.hxx | 8 |
19 files changed, 520 insertions, 520 deletions
diff --git a/basegfx/inc/basegfx/range/b1drange.hxx b/basegfx/inc/basegfx/range/b1drange.hxx index feb48d336e9a..a6cacec6d718 100644 --- a/basegfx/inc/basegfx/range/b1drange.hxx +++ b/basegfx/inc/basegfx/range/b1drange.hxx @@ -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 @@ -38,55 +38,55 @@ namespace basegfx class B1DRange { - ::basegfx::BasicRange< double, DoubleTraits > maRange; + ::basegfx::BasicRange< double, DoubleTraits > maRange; - public: - B1DRange() + public: + B1DRange() { } - - explicit B1DRange(double fStartValue) - : maRange(fStartValue) + + explicit B1DRange(double fStartValue) + : maRange(fStartValue) { } - - B1DRange(double fStartValue1, double fStartValue2) - : maRange(fStartValue1) + + B1DRange(double fStartValue1, double fStartValue2) + : maRange(fStartValue1) { expand(fStartValue2); } - + B1DRange(const B1DRange& rRange) - : maRange(rRange.maRange) + : maRange(rRange.maRange) { } explicit B1DRange( const B1IRange& rRange ); - bool isEmpty() const + bool isEmpty() const { return maRange.isEmpty(); } - void reset() - { - maRange.reset(); + void reset() + { + maRange.reset(); } - - bool operator==( const B1DRange& rRange ) const - { - return (maRange == rRange.maRange); + + bool operator==( const B1DRange& rRange ) const + { + return (maRange == rRange.maRange); } - bool operator!=( const B1DRange& rRange ) const - { - return (maRange != rRange.maRange); + bool operator!=( const B1DRange& rRange ) const + { + return (maRange != rRange.maRange); } - B1DRange& operator=(const B1DRange& rRange) - { - maRange = rRange.maRange; - return *this; + B1DRange& operator=(const B1DRange& rRange) + { + maRange = rRange.maRange; + return *this; } bool equal(const B1DRange& rRange) const @@ -94,64 +94,64 @@ namespace basegfx return (maRange.equal(rRange.maRange)); } - double getMinimum() const - { - return maRange.getMinimum(); + double getMinimum() const + { + return maRange.getMinimum(); } - double getMaximum() const - { - return maRange.getMaximum(); + double getMaximum() const + { + return maRange.getMaximum(); } - double getRange() const - { - return maRange.getRange(); + double getRange() const + { + return maRange.getRange(); } - + double getCenter() const { - return maRange.getCenter(); + return maRange.getCenter(); } - bool isInside(double fValue) const - { - return maRange.isInside(fValue); + bool isInside(double fValue) const + { + return maRange.isInside(fValue); } - - bool isInside(const B1DRange& rRange) const - { - return maRange.isInside(rRange.maRange); + + bool isInside(const B1DRange& rRange) const + { + return maRange.isInside(rRange.maRange); } - bool overlaps(const B1DRange& rRange) const - { - return maRange.overlaps(rRange.maRange); + bool overlaps(const B1DRange& rRange) const + { + return maRange.overlaps(rRange.maRange); } - bool overlapsMore(const B1DRange& rRange) const - { - return maRange.overlapsMore(rRange.maRange); + bool overlapsMore(const B1DRange& rRange) const + { + return maRange.overlapsMore(rRange.maRange); } - void expand(double fValue) - { - maRange.expand(fValue); + void expand(double fValue) + { + maRange.expand(fValue); } - void expand(const B1DRange& rRange) - { - maRange.expand(rRange.maRange); + void expand(const B1DRange& rRange) + { + maRange.expand(rRange.maRange); } - void intersect(const B1DRange& rRange) - { - maRange.intersect(rRange.maRange); + void intersect(const B1DRange& rRange) + { + maRange.intersect(rRange.maRange); } void grow(double fValue) { - maRange.grow(fValue); + maRange.grow(fValue); } }; diff --git a/basegfx/inc/basegfx/range/b1ibox.hxx b/basegfx/inc/basegfx/range/b1ibox.hxx index d2ef68b86e7a..2001ec964a32 100644 --- a/basegfx/inc/basegfx/range/b1ibox.hxx +++ b/basegfx/inc/basegfx/range/b1ibox.hxx @@ -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 @@ -36,107 +36,107 @@ namespace basegfx { class B1IBox { - ::basegfx::BasicBox maRange; + ::basegfx::BasicBox maRange; - public: - B1IBox() + public: + B1IBox() { } - - explicit B1IBox(sal_Int32 nStartValue) - : maRange(nStartValue) + + explicit B1IBox(sal_Int32 nStartValue) + : maRange(nStartValue) { } - - B1IBox(sal_Int32 nStartValue1, sal_Int32 nStartValue2) - : maRange(nStartValue1) + + B1IBox(sal_Int32 nStartValue1, sal_Int32 nStartValue2) + : maRange(nStartValue1) { expand(nStartValue2); } B1IBox(const B1IBox& rBox) - : maRange(rBox.maRange) + : maRange(rBox.maRange) { } - bool isEmpty() const + bool isEmpty() const { return maRange.isEmpty(); } - void reset() - { - maRange.reset(); + void reset() + { + maRange.reset(); } - - bool operator==( const B1IBox& rBox ) const - { - return (maRange == rBox.maRange); + + bool operator==( const B1IBox& rBox ) const + { + return (maRange == rBox.maRange); } - bool operator!=( const B1IBox& rBox ) const - { - return (maRange != rBox.maRange); + bool operator!=( const B1IBox& rBox ) const + { + return (maRange != rBox.maRange); } - void operator=(const B1IBox& rBox) - { - maRange = rBox.maRange; + void operator=(const B1IBox& rBox) + { + maRange = rBox.maRange; } - sal_Int32 getMinimum() const - { - return maRange.getMinimum(); + sal_Int32 getMinimum() const + { + return maRange.getMinimum(); } - sal_Int32 getMaximum() const - { - return maRange.getMaximum(); + sal_Int32 getMaximum() const + { + return maRange.getMaximum(); } - Int32Traits::DifferenceType getRange() const - { - return maRange.getRange(); + Int32Traits::DifferenceType getRange() const + { + return maRange.getRange(); } - + double getCenter() const { - return maRange.getCenter(); + return maRange.getCenter(); } - bool isInside(sal_Int32 nValue) const - { - return maRange.isInside(nValue); + bool isInside(sal_Int32 nValue) const + { + return maRange.isInside(nValue); } - - bool isInside(const B1IBox& rBox) const - { - return maRange.isInside(rBox.maRange); + + bool isInside(const B1IBox& rBox) const + { + return maRange.isInside(rBox.maRange); } - bool overlaps(const B1IBox& rBox) const - { - return maRange.overlaps(rBox.maRange); + bool overlaps(const B1IBox& rBox) const + { + return maRange.overlaps(rBox.maRange); } - void expand(sal_Int32 nValue) - { - maRange.expand(nValue); + void expand(sal_Int32 nValue) + { + maRange.expand(nValue); } - void expand(const B1IBox& rBox) - { - maRange.expand(rBox.maRange); + void expand(const B1IBox& rBox) + { + maRange.expand(rBox.maRange); } - void intersect(const B1IBox& rBox) - { - maRange.intersect(rBox.maRange); + void intersect(const B1IBox& rBox) + { + maRange.intersect(rBox.maRange); } void grow(sal_Int32 nValue) { - maRange.grow(nValue); + maRange.grow(nValue); } }; } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b1irange.hxx b/basegfx/inc/basegfx/range/b1irange.hxx index a503133f4b0f..9c77d23b8204 100644 --- a/basegfx/inc/basegfx/range/b1irange.hxx +++ b/basegfx/inc/basegfx/range/b1irange.hxx @@ -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 @@ -36,108 +36,108 @@ namespace basegfx { class B1IRange { - ::basegfx::BasicRange< sal_Int32, Int32Traits > maRange; + ::basegfx::BasicRange< sal_Int32, Int32Traits > maRange; - public: - B1IRange() + public: + B1IRange() { } - - explicit B1IRange(sal_Int32 nStartValue) - : maRange(nStartValue) + + explicit B1IRange(sal_Int32 nStartValue) + : maRange(nStartValue) { } - - B1IRange(sal_Int32 nStartValue1, sal_Int32 nStartValue2) - : maRange(nStartValue1) + + B1IRange(sal_Int32 nStartValue1, sal_Int32 nStartValue2) + : maRange(nStartValue1) { expand(nStartValue2); } B1IRange(const B1IRange& rRange) - : maRange(rRange.maRange) + : maRange(rRange.maRange) { } - bool isEmpty() const + bool isEmpty() const { return maRange.isEmpty(); } - void reset() - { - maRange.reset(); + void reset() + { + maRange.reset(); } - - bool operator==( const B1IRange& rRange ) const - { - return (maRange == rRange.maRange); + + bool operator==( const B1IRange& rRange ) const + { + return (maRange == rRange.maRange); } - bool operator!=( const B1IRange& rRange ) const - { - return (maRange != rRange.maRange); + bool operator!=( const B1IRange& rRange ) const + { + return (maRange != rRange.maRange); } - B1IRange& operator=(const B1IRange& rRange) - { - maRange = rRange.maRange; - return *this; + B1IRange& operator=(const B1IRange& rRange) + { + maRange = rRange.maRange; + return *this; } - sal_Int32 getMinimum() const - { - return maRange.getMinimum(); + sal_Int32 getMinimum() const + { + return maRange.getMinimum(); } - sal_Int32 getMaximum() const - { - return maRange.getMaximum(); + sal_Int32 getMaximum() const + { + return maRange.getMaximum(); } - Int32Traits::DifferenceType getRange() const - { - return maRange.getRange(); + Int32Traits::DifferenceType getRange() const + { + return maRange.getRange(); } - + double getCenter() const { - return maRange.getCenter(); + return maRange.getCenter(); } - bool isInside(sal_Int32 nValue) const - { - return maRange.isInside(nValue); + bool isInside(sal_Int32 nValue) const + { + return maRange.isInside(nValue); } - - bool isInside(const B1IRange& rRange) const - { - return maRange.isInside(rRange.maRange); + + bool isInside(const B1IRange& rRange) const + { + return maRange.isInside(rRange.maRange); } - bool overlaps(const B1IRange& rRange) const - { - return maRange.overlaps(rRange.maRange); + bool overlaps(const B1IRange& rRange) const + { + return maRange.overlaps(rRange.maRange); } - void expand(sal_Int32 nValue) - { - maRange.expand(nValue); + void expand(sal_Int32 nValue) + { + maRange.expand(nValue); } - void expand(const B1IRange& rRange) - { - maRange.expand(rRange.maRange); + void expand(const B1IRange& rRange) + { + maRange.expand(rRange.maRange); } - void intersect(const B1IRange& rRange) - { - maRange.intersect(rRange.maRange); + void intersect(const B1IRange& rRange) + { + maRange.intersect(rRange.maRange); } void grow(sal_Int32 nValue) { - maRange.grow(nValue); + maRange.grow(nValue); } }; } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b2dconnectedranges.hxx b/basegfx/inc/basegfx/range/b2dconnectedranges.hxx index 6949918fa2ef..27fbcb06b527 100644 --- a/basegfx/inc/basegfx/range/b2dconnectedranges.hxx +++ b/basegfx/inc/basegfx/range/b2dconnectedranges.hxx @@ -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 @@ -73,16 +73,16 @@ namespace basegfx public: /// Type of the basic entity (rect + user data) typedef ::std::pair< B2DRange, UserData > ComponentType; - typedef ::std::list< ComponentType > ComponentListType; + typedef ::std::list< ComponentType > ComponentListType; /// List of (intersecting) components, plus overall bounds struct ConnectedComponents { - ComponentListType maComponentList; - B2DRange maTotalBounds; + ComponentListType maComponentList; + B2DRange maTotalBounds; }; - typedef ::std::list< ConnectedComponents > ConnectedComponentsType; + typedef ::std::list< ConnectedComponents > ConnectedComponentsType; /// Create the range calculator @@ -109,15 +109,15 @@ namespace basegfx ranges (typically, for well-behaved input, it is O(n) though). */ - void addRange( const B2DRange& rRange, - const UserData& rUserData ) + void addRange( const B2DRange& rRange, + const UserData& rUserData ) { // check whether fast path is possible: if new range is // outside accumulated total range, can add it as a // separate component right away. - const bool bNotOutsideEverything( + const bool bNotOutsideEverything( maTotalBounds.overlaps( rRange ) ); - + // update own global bounds range maTotalBounds.expand( rRange ); @@ -172,7 +172,7 @@ namespace basegfx // no position and size. if( !aCurrAggregate->maTotalBounds.isEmpty() && - aCurrAggregate->maTotalBounds.overlaps( + aCurrAggregate->maTotalBounds.overlaps( aNewConnectedComponent.maTotalBounds ) ) { // union the intersecting @@ -181,13 +181,13 @@ namespace basegfx // calc union bounding box aNewConnectedComponent.maTotalBounds.expand( aCurrAggregate->maTotalBounds ); - + // extract all aCurrAggregate components // to aNewConnectedComponent - aNewConnectedComponent.maComponentList.splice( - aNewConnectedComponent.maComponentList.end(), + aNewConnectedComponent.maComponentList.splice( + aNewConnectedComponent.maComponentList.end(), aCurrAggregate->maComponentList ); - + // remove and delete aCurrAggregate entry // from list (we've gutted it's content // above). list::erase() will update our @@ -212,17 +212,17 @@ namespace basegfx // // add new component to the end of the component list - aNewConnectedComponent.maComponentList.push_back( + aNewConnectedComponent.maComponentList.push_back( ComponentType( rRange, rUserData ) ); - + // do some consistency checks (aka post conditions) OSL_ENSURE( !aNewConnectedComponent.maComponentList.empty(), "B2DConnectedRanges::addRange(): empty aggregate list" ); - OSL_ENSURE( !aNewConnectedComponent.maTotalBounds.isEmpty() || - (aNewConnectedComponent.maTotalBounds.isEmpty() && + OSL_ENSURE( !aNewConnectedComponent.maTotalBounds.isEmpty() || + (aNewConnectedComponent.maTotalBounds.isEmpty() && aNewConnectedComponent.maComponentList.size() == 1), "B2DConnectedRanges::addRange(): empty ranges must be solitary"); - + // add aNewConnectedComponent as a new entry to // maDisjunctAggregatesList maDisjunctAggregatesList.push_back( aNewConnectedComponent ); @@ -242,7 +242,7 @@ namespace basegfx maDisjunctAggregatesList.end(), aFunctor ); } - + private: // default: disabled copy/assignment B2DConnectedRanges(const B2DConnectedRanges&); @@ -253,11 +253,11 @@ namespace basegfx Each entry corresponds to one of the top-level rectangles in the drawing above. */ - ConnectedComponentsType maDisjunctAggregatesList; - + ConnectedComponentsType maDisjunctAggregatesList; + /** Global bound rect over all added ranges. */ - B2DRange maTotalBounds; + B2DRange maTotalBounds; }; } diff --git a/basegfx/inc/basegfx/range/b2dpolyrange.hxx b/basegfx/inc/basegfx/range/b2dpolyrange.hxx index 5ce105da980b..1abdbda7cad5 100644 --- a/basegfx/inc/basegfx/range/b2dpolyrange.hxx +++ b/basegfx/inc/basegfx/range/b2dpolyrange.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/basegfx/inc/basegfx/range/b2drange.hxx b/basegfx/inc/basegfx/range/b2drange.hxx index 8d78f1141298..f1271fe4ae0c 100644 --- a/basegfx/inc/basegfx/range/b2drange.hxx +++ b/basegfx/inc/basegfx/range/b2drange.hxx @@ -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,25 +44,25 @@ namespace basegfx class B2DRange { - public: - typedef double ValueType; - typedef DoubleTraits TraitsType; + public: + typedef double ValueType; + typedef DoubleTraits TraitsType; - B2DRange() + B2DRange() { } - + explicit B2DRange(const B2DTuple& rTuple) - : maRangeX(rTuple.getX()), + : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()) { } - + B2DRange(double x1, double y1, double x2, double y2) - : maRangeX(x1), + : maRangeX(x1), maRangeY(y1) { maRangeX.expand(x2); @@ -71,57 +71,57 @@ namespace basegfx B2DRange(const B2DTuple& rTuple1, const B2DTuple& rTuple2) - : maRangeX(rTuple1.getX()), + : maRangeX(rTuple1.getX()), maRangeY(rTuple1.getY()) { expand( rTuple2 ); } - + B2DRange(const B2DRange& rRange) - : maRangeX(rRange.maRangeX), + : maRangeX(rRange.maRangeX), maRangeY(rRange.maRangeY) { } explicit B2DRange(const B2IRange& rRange); - bool isEmpty() const + bool isEmpty() const { return ( - maRangeX.isEmpty() + maRangeX.isEmpty() || maRangeY.isEmpty() ); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); } - bool operator==( const B2DRange& rRange ) const - { - return (maRangeX == rRange.maRangeX - && maRangeY == rRange.maRangeY); + bool operator==( const B2DRange& rRange ) const + { + return (maRangeX == rRange.maRangeX + && maRangeY == rRange.maRangeY); } - bool operator!=( const B2DRange& rRange ) const - { - return (maRangeX != rRange.maRangeX - || maRangeY != rRange.maRangeY); + bool operator!=( const B2DRange& rRange ) const + { + return (maRangeX != rRange.maRangeX + || maRangeY != rRange.maRangeY); } - B2DRange& operator=(const B2DRange& rRange) - { - maRangeX = rRange.maRangeX; - maRangeY = rRange.maRangeY; - return *this; + B2DRange& operator=(const B2DRange& rRange) + { + maRangeX = rRange.maRangeX; + maRangeY = rRange.maRangeY; + return *this; } bool equal(const B2DRange& rRange) const { - return (maRangeX.equal(rRange.maRangeX) - && maRangeY.equal(rRange.maRangeY)); + return (maRangeX.equal(rRange.maRangeX) + && maRangeY.equal(rRange.maRangeY)); } double getMinX() const @@ -161,7 +161,7 @@ namespace basegfx maRangeY.getMinimum() ); } - + B2DPoint getMaximum() const { return B2DPoint( @@ -177,7 +177,7 @@ namespace basegfx maRangeY.getRange() ); } - + B2DPoint getCenter() const { return B2DPoint( @@ -185,21 +185,21 @@ namespace basegfx maRangeY.getCenter() ); } - + double getCenterX() const { return maRangeX.getCenter(); } - + double getCenterY() const { return maRangeY.getCenter(); } - + bool isInside(const B2DTuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) ); } @@ -207,7 +207,7 @@ namespace basegfx bool isInside(const B2DRange& rRange) const { return ( - maRangeX.isInside(rRange.maRangeX) + maRangeX.isInside(rRange.maRangeX) && maRangeY.isInside(rRange.maRangeY) ); } @@ -215,7 +215,7 @@ namespace basegfx bool overlaps(const B2DRange& rRange) const { return ( - maRangeX.overlaps(rRange.maRangeX) + maRangeX.overlaps(rRange.maRangeX) && maRangeY.overlaps(rRange.maRangeY) ); } @@ -223,7 +223,7 @@ namespace basegfx bool overlapsMore(const B2DRange& rRange) const { return ( - maRangeX.overlapsMore(rRange.maRangeX) + maRangeX.overlapsMore(rRange.maRangeX) && maRangeY.overlapsMore(rRange.maRangeY) ); } @@ -236,29 +236,29 @@ namespace basegfx void expand(const B2DRange& rRange) { - maRangeX.expand(rRange.maRangeX); - maRangeY.expand(rRange.maRangeY); + maRangeX.expand(rRange.maRangeX); + maRangeY.expand(rRange.maRangeY); } void intersect(const B2DRange& rRange) { - maRangeX.intersect(rRange.maRangeX); - maRangeY.intersect(rRange.maRangeY); + maRangeX.intersect(rRange.maRangeX); + maRangeY.intersect(rRange.maRangeY); } void grow(double fValue) { - maRangeX.grow(fValue); - maRangeY.grow(fValue); + maRangeX.grow(fValue); + maRangeY.grow(fValue); } void transform(const B2DHomMatrix& rMatrix); private: - typedef ::basegfx::BasicRange< ValueType, TraitsType > MyBasicRange; + typedef ::basegfx::BasicRange< ValueType, TraitsType > MyBasicRange; - MyBasicRange maRangeX; - MyBasicRange maRangeY; + MyBasicRange maRangeX; + MyBasicRange maRangeY; }; /** Round double to nearest integer for 2D range @@ -286,9 +286,9 @@ namespace basegfx @return the input vector */ - ::std::vector< B2DRange >& computeSetDifference( ::std::vector< B2DRange >& o_rResult, - const B2DRange& rFirst, - const B2DRange& rSecond ); + ::std::vector< B2DRange >& computeSetDifference( ::std::vector< B2DRange >& o_rResult, + const B2DRange& rFirst, + const B2DRange& rSecond ); } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b2drangeclipper.hxx b/basegfx/inc/basegfx/range/b2drangeclipper.hxx index 146273d5d21d..c59329c226ea 100644 --- a/basegfx/inc/basegfx/range/b2drangeclipper.hxx +++ b/basegfx/inc/basegfx/range/b2drangeclipper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,13 +40,13 @@ namespace basegfx namespace tools { /** Extract poly-polygon w/o self-intersections from poly-range - + Similar to the solveCrossovers(const B2DPolyPolygon&) method, this one calculates a self-intersection-free poly-polygon with the same topology, and encoding inside/outsidedness via polygon orientation and layering. */ - B2DPolyPolygon solveCrossovers(const std::vector<B2DRange>& rRanges, + B2DPolyPolygon solveCrossovers(const std::vector<B2DRange>& rRanges, const std::vector<B2VectorOrientation>& rOrientations); } } diff --git a/basegfx/inc/basegfx/range/b2drectangle.hxx b/basegfx/inc/basegfx/range/b2drectangle.hxx index c00d13256cea..9a9e1b7cbf80 100644 --- a/basegfx/inc/basegfx/range/b2drectangle.hxx +++ b/basegfx/inc/basegfx/range/b2drectangle.hxx @@ -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 diff --git a/basegfx/inc/basegfx/range/b2ibox.hxx b/basegfx/inc/basegfx/range/b2ibox.hxx index 1e2c790dc51d..38e664d4faeb 100644 --- a/basegfx/inc/basegfx/range/b2ibox.hxx +++ b/basegfx/inc/basegfx/range/b2ibox.hxx @@ -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 @@ -41,20 +41,20 @@ namespace basegfx { class B2IBox { - public: - typedef sal_Int32 ValueType; - typedef Int32Traits TraitsType; + public: + typedef sal_Int32 ValueType; + typedef Int32Traits TraitsType; - B2IBox() + B2IBox() { } - + explicit B2IBox(const B2ITuple& rTuple) - : maRangeX(rTuple.getX()), + : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()) { } - + B2IBox(sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, @@ -65,7 +65,7 @@ namespace basegfx maRangeX.expand(x2); maRangeY.expand(y2); } - + B2IBox(const B2ITuple& rTuple1, const B2ITuple& rTuple2) : maRangeX(rTuple1.getX()), @@ -73,40 +73,40 @@ namespace basegfx { expand( rTuple2 ); } - + B2IBox(const B2IBox& rBox) : maRangeX(rBox.maRangeX), maRangeY(rBox.maRangeY) { } - bool isEmpty() const + bool isEmpty() const { return maRangeX.isEmpty() || maRangeY.isEmpty(); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); } - bool operator==( const B2IBox& rBox ) const - { - return (maRangeX == rBox.maRangeX - && maRangeY == rBox.maRangeY); + bool operator==( const B2IBox& rBox ) const + { + return (maRangeX == rBox.maRangeX + && maRangeY == rBox.maRangeY); } - bool operator!=( const B2IBox& rBox ) const - { - return (maRangeX != rBox.maRangeX - || maRangeY != rBox.maRangeY); + bool operator!=( const B2IBox& rBox ) const + { + return (maRangeX != rBox.maRangeX + || maRangeY != rBox.maRangeY); } - void operator=(const B2IBox& rBox) - { - maRangeX = rBox.maRangeX; - maRangeY = rBox.maRangeY; + void operator=(const B2IBox& rBox) + { + maRangeX = rBox.maRangeX; + maRangeY = rBox.maRangeY; } sal_Int32 getMinX() const @@ -146,7 +146,7 @@ namespace basegfx maRangeY.getMinimum() ); } - + B2IPoint getMaximum() const { return B2IPoint( @@ -162,7 +162,7 @@ namespace basegfx maRangeY.getRange() ); } - + B2DPoint getCenter() const { return B2DPoint( @@ -170,11 +170,11 @@ namespace basegfx maRangeY.getCenter() ); } - + bool isInside(const B2ITuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) ); } @@ -182,7 +182,7 @@ namespace basegfx bool isInside(const B2IBox& rBox) const { return ( - maRangeX.isInside(rBox.maRangeX) + maRangeX.isInside(rBox.maRangeX) && maRangeY.isInside(rBox.maRangeY) ); } @@ -190,7 +190,7 @@ namespace basegfx bool overlaps(const B2IBox& rBox) const { return ( - maRangeX.overlaps(rBox.maRangeX) + maRangeX.overlaps(rBox.maRangeX) && maRangeY.overlaps(rBox.maRangeY) ); } @@ -203,25 +203,25 @@ namespace basegfx void expand(const B2IBox& rBox) { - maRangeX.expand(rBox.maRangeX); - maRangeY.expand(rBox.maRangeY); + maRangeX.expand(rBox.maRangeX); + maRangeY.expand(rBox.maRangeY); } void intersect(const B2IBox& rBox) { - maRangeX.intersect(rBox.maRangeX); - maRangeY.intersect(rBox.maRangeY); + maRangeX.intersect(rBox.maRangeX); + maRangeY.intersect(rBox.maRangeY); } void grow(sal_Int32 nValue) { - maRangeX.grow(nValue); - maRangeY.grow(nValue); + maRangeX.grow(nValue); + maRangeY.grow(nValue); } private: - BasicBox maRangeX; - BasicBox maRangeY; + BasicBox maRangeX; + BasicBox maRangeY; }; /** Compute the set difference of the two given boxes @@ -243,9 +243,9 @@ namespace basegfx @return the input vector */ - ::std::vector< B2IBox >& computeSetDifference( ::std::vector< B2IBox >& o_rResult, - const B2IBox& rFirst, - const B2IBox& rSecond ); + ::std::vector< B2IBox >& computeSetDifference( ::std::vector< B2IBox >& o_rResult, + const B2IBox& rFirst, + const B2IBox& rSecond ); } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b2irange.hxx b/basegfx/inc/basegfx/range/b2irange.hxx index 5378e487ba95..85ac60df724e 100644 --- a/basegfx/inc/basegfx/range/b2irange.hxx +++ b/basegfx/inc/basegfx/range/b2irange.hxx @@ -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 @@ -41,73 +41,73 @@ namespace basegfx { class B2IRange { - public: - typedef sal_Int32 ValueType; - typedef Int32Traits TraitsType; + public: + typedef sal_Int32 ValueType; + typedef Int32Traits TraitsType; - B2IRange() + B2IRange() { } - + explicit B2IRange(const B2ITuple& rTuple) - : maRangeX(rTuple.getX()), + : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()) { } - + B2IRange(sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2) - : maRangeX(x1), + : maRangeX(x1), maRangeY(y1) { maRangeX.expand(x2); maRangeY.expand(y2); } - + B2IRange(const B2ITuple& rTuple1, const B2ITuple& rTuple2) - : maRangeX(rTuple1.getX()), + : maRangeX(rTuple1.getX()), maRangeY(rTuple1.getY()) { expand( rTuple2 ); } - + B2IRange(const B2IRange& rRange) - : maRangeX(rRange.maRangeX), + : maRangeX(rRange.maRangeX), maRangeY(rRange.maRangeY) { } - bool isEmpty() const + bool isEmpty() const { return maRangeX.isEmpty() || maRangeY.isEmpty(); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); } - bool operator==( const B2IRange& rRange ) const - { - return (maRangeX == rRange.maRangeX - && maRangeY == rRange.maRangeY); + bool operator==( const B2IRange& rRange ) const + { + return (maRangeX == rRange.maRangeX + && maRangeY == rRange.maRangeY); } - bool operator!=( const B2IRange& rRange ) const - { - return (maRangeX != rRange.maRangeX - || maRangeY != rRange.maRangeY); + bool operator!=( const B2IRange& rRange ) const + { + return (maRangeX != rRange.maRangeX + || maRangeY != rRange.maRangeY); } - B2IRange& operator=(const B2IRange& rRange) - { - maRangeX = rRange.maRangeX; - maRangeY = rRange.maRangeY; - return *this; + B2IRange& operator=(const B2IRange& rRange) + { + maRangeX = rRange.maRangeX; + maRangeY = rRange.maRangeY; + return *this; } sal_Int32 getMinX() const @@ -147,7 +147,7 @@ namespace basegfx maRangeY.getMinimum() ); } - + B2IPoint getMaximum() const { return B2IPoint( @@ -163,7 +163,7 @@ namespace basegfx maRangeY.getRange() ); } - + B2DPoint getCenter() const { return B2DPoint( @@ -171,11 +171,11 @@ namespace basegfx maRangeY.getCenter() ); } - + bool isInside(const B2ITuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) ); } @@ -183,7 +183,7 @@ namespace basegfx bool isInside(const B2IRange& rRange) const { return ( - maRangeX.isInside(rRange.maRangeX) + maRangeX.isInside(rRange.maRangeX) && maRangeY.isInside(rRange.maRangeY) ); } @@ -191,7 +191,7 @@ namespace basegfx bool overlaps(const B2IRange& rRange) const { return ( - maRangeX.overlaps(rRange.maRangeX) + maRangeX.overlaps(rRange.maRangeX) && maRangeY.overlaps(rRange.maRangeY) ); } @@ -204,27 +204,27 @@ namespace basegfx void expand(const B2IRange& rRange) { - maRangeX.expand(rRange.maRangeX); - maRangeY.expand(rRange.maRangeY); + maRangeX.expand(rRange.maRangeX); + maRangeY.expand(rRange.maRangeY); } void intersect(const B2IRange& rRange) { - maRangeX.intersect(rRange.maRangeX); - maRangeY.intersect(rRange.maRangeY); + maRangeX.intersect(rRange.maRangeX); + maRangeY.intersect(rRange.maRangeY); } void grow(sal_Int32 nValue) { - maRangeX.grow(nValue); - maRangeY.grow(nValue); + maRangeX.grow(nValue); + maRangeY.grow(nValue); } private: - typedef ::basegfx::BasicRange< ValueType, TraitsType > MyBasicRange; + typedef ::basegfx::BasicRange< ValueType, TraitsType > MyBasicRange; - MyBasicRange maRangeX; - MyBasicRange maRangeY; + MyBasicRange maRangeX; + MyBasicRange maRangeY; }; /** Compute the set difference of the two given ranges @@ -246,9 +246,9 @@ namespace basegfx @return the input vector */ - ::std::vector< B2IRange >& computeSetDifference( ::std::vector< B2IRange >& o_rResult, - const B2IRange& rFirst, - const B2IRange& rSecond ); + ::std::vector< B2IRange >& computeSetDifference( ::std::vector< B2IRange >& o_rResult, + const B2IRange& rFirst, + const B2IRange& rSecond ); } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b2irectangle.hxx b/basegfx/inc/basegfx/range/b2irectangle.hxx index 2abc954e0196..965fe7b10bbe 100644 --- a/basegfx/inc/basegfx/range/b2irectangle.hxx +++ b/basegfx/inc/basegfx/range/b2irectangle.hxx @@ -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 diff --git a/basegfx/inc/basegfx/range/b3drange.hxx b/basegfx/inc/basegfx/range/b3drange.hxx index 8e1cf8aa9f02..eeec1fa29e16 100644 --- a/basegfx/inc/basegfx/range/b3drange.hxx +++ b/basegfx/inc/basegfx/range/b3drange.hxx @@ -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 @@ -42,31 +42,31 @@ namespace basegfx class B3DRange { - typedef ::basegfx::BasicRange< double, DoubleTraits > MyBasicRange; + typedef ::basegfx::BasicRange< double, DoubleTraits > MyBasicRange; - MyBasicRange maRangeX; - MyBasicRange maRangeY; - MyBasicRange maRangeZ; + MyBasicRange maRangeX; + MyBasicRange maRangeY; + MyBasicRange maRangeZ; - public: - B3DRange() + public: + B3DRange() { } - + explicit B3DRange(const B3DTuple& rTuple) - : maRangeX(rTuple.getX()), + : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()), maRangeZ(rTuple.getZ()) { } - + B3DRange(double x1, double y1, double z1, double x2, double y2, double z2) - : maRangeX(x1), + : maRangeX(x1), maRangeY(y1), maRangeZ(z1) { @@ -77,15 +77,15 @@ namespace basegfx B3DRange(const B3DTuple& rTuple1, const B3DTuple& rTuple2) - : maRangeX(rTuple1.getX()), + : maRangeX(rTuple1.getX()), maRangeY(rTuple1.getY()), maRangeZ(rTuple1.getZ()) { expand(rTuple2); } - + B3DRange(const B3DRange& rRange) - : maRangeX(rRange.maRangeX), + : maRangeX(rRange.maRangeX), maRangeY(rRange.maRangeY), maRangeZ(rRange.maRangeZ) { @@ -93,49 +93,49 @@ namespace basegfx explicit B3DRange(const B3IRange& rRange); - bool isEmpty() const + bool isEmpty() const { return ( - maRangeX.isEmpty() - || maRangeY.isEmpty() + maRangeX.isEmpty() + || maRangeY.isEmpty() || maRangeZ.isEmpty() ); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); - maRangeZ.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); + maRangeZ.reset(); } - - bool operator==( const B3DRange& rRange ) const - { - return (maRangeX == rRange.maRangeX + + bool operator==( const B3DRange& rRange ) const + { + return (maRangeX == rRange.maRangeX && maRangeY == rRange.maRangeY - && maRangeZ == rRange.maRangeZ); + && maRangeZ == rRange.maRangeZ); } - bool operator!=( const B3DRange& rRange ) const - { - return (maRangeX != rRange.maRangeX + bool operator!=( const B3DRange& rRange ) const + { + return (maRangeX != rRange.maRangeX || maRangeY != rRange.maRangeY - || maRangeZ != rRange.maRangeZ); + || maRangeZ != rRange.maRangeZ); } - B3DRange& operator=(const B3DRange& rRange) - { - maRangeX = rRange.maRangeX; - maRangeY = rRange.maRangeY; - maRangeZ = rRange.maRangeZ; - return *this; + B3DRange& operator=(const B3DRange& rRange) + { + maRangeX = rRange.maRangeX; + maRangeY = rRange.maRangeY; + maRangeZ = rRange.maRangeZ; + return *this; } bool equal(const B3DRange& rRange) const { - return (maRangeX.equal(rRange.maRangeX) + return (maRangeX.equal(rRange.maRangeX) && maRangeY.equal(rRange.maRangeY) - && maRangeZ.equal(rRange.maRangeZ)); + && maRangeZ.equal(rRange.maRangeZ)); } double getMinX() const @@ -191,7 +191,7 @@ namespace basegfx maRangeZ.getMinimum() ); } - + B3DPoint getMaximum() const { return B3DPoint( @@ -209,7 +209,7 @@ namespace basegfx maRangeZ.getRange() ); } - + B3DPoint getCenter() const { return B3DPoint( @@ -218,26 +218,26 @@ namespace basegfx maRangeZ.getCenter() ); } - + double getCenterX() const { return maRangeX.getCenter(); } - + double getCenterY() const { return maRangeY.getCenter(); } - + double getCenterZ() const { return maRangeZ.getCenter(); } - + bool isInside(const B3DTuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) && maRangeZ.isInside(rTuple.getZ()) ); @@ -246,7 +246,7 @@ namespace basegfx bool isInside(const B3DRange& rRange) const { return ( - maRangeX.isInside(rRange.maRangeX) + maRangeX.isInside(rRange.maRangeX) && maRangeY.isInside(rRange.maRangeY) && maRangeZ.isInside(rRange.maRangeZ) ); @@ -255,7 +255,7 @@ namespace basegfx bool overlaps(const B3DRange& rRange) const { return ( - maRangeX.overlaps(rRange.maRangeX) + maRangeX.overlaps(rRange.maRangeX) && maRangeY.overlaps(rRange.maRangeY) && maRangeZ.overlaps(rRange.maRangeZ) ); @@ -270,23 +270,23 @@ namespace basegfx void expand(const B3DRange& rRange) { - maRangeX.expand(rRange.maRangeX); - maRangeY.expand(rRange.maRangeY); - maRangeZ.expand(rRange.maRangeZ); + maRangeX.expand(rRange.maRangeX); + maRangeY.expand(rRange.maRangeY); + maRangeZ.expand(rRange.maRangeZ); } void intersect(const B3DRange& rRange) { - maRangeX.intersect(rRange.maRangeX); - maRangeY.intersect(rRange.maRangeY); - maRangeZ.intersect(rRange.maRangeZ); + maRangeX.intersect(rRange.maRangeX); + maRangeY.intersect(rRange.maRangeY); + maRangeZ.intersect(rRange.maRangeZ); } void grow(double fValue) { - maRangeX.grow(fValue); - maRangeY.grow(fValue); - maRangeZ.grow(fValue); + maRangeX.grow(fValue); + maRangeY.grow(fValue); + maRangeZ.grow(fValue); } void transform(const B3DHomMatrix& rMatrix); diff --git a/basegfx/inc/basegfx/range/b3dvolume.hxx b/basegfx/inc/basegfx/range/b3dvolume.hxx index 50cac5188271..4891444dc87e 100644 --- a/basegfx/inc/basegfx/range/b3dvolume.hxx +++ b/basegfx/inc/basegfx/range/b3dvolume.hxx @@ -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 diff --git a/basegfx/inc/basegfx/range/b3ibox.hxx b/basegfx/inc/basegfx/range/b3ibox.hxx index 7c349becd43c..a219ef41181b 100644 --- a/basegfx/inc/basegfx/range/b3ibox.hxx +++ b/basegfx/inc/basegfx/range/b3ibox.hxx @@ -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 @@ -39,22 +39,22 @@ namespace basegfx { class B3IBox { - BasicBox maRangeX; - BasicBox maRangeY; - BasicBox maRangeZ; + BasicBox maRangeX; + BasicBox maRangeY; + BasicBox maRangeZ; - public: - B3IBox() + public: + B3IBox() { } - + explicit B3IBox(const B3ITuple& rTuple) : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()), maRangeZ(rTuple.getZ()) { } - + B3IBox(sal_Int32 x1, sal_Int32 y1, sal_Int32 z1, @@ -86,37 +86,37 @@ namespace basegfx { } - bool isEmpty() const + bool isEmpty() const { return maRangeX.isEmpty() || maRangeY.isEmpty() || maRangeZ.isEmpty(); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); - maRangeZ.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); + maRangeZ.reset(); } - - bool operator==( const B3IBox& rBox ) const - { - return (maRangeX == rBox.maRangeX + + bool operator==( const B3IBox& rBox ) const + { + return (maRangeX == rBox.maRangeX && maRangeY == rBox.maRangeY - && maRangeZ == rBox.maRangeZ); + && maRangeZ == rBox.maRangeZ); } - bool operator!=( const B3IBox& rBox ) const - { - return (maRangeX != rBox.maRangeX + bool operator!=( const B3IBox& rBox ) const + { + return (maRangeX != rBox.maRangeX || maRangeY != rBox.maRangeY - || maRangeZ != rBox.maRangeZ); + || maRangeZ != rBox.maRangeZ); } - void operator=(const B3IBox& rBox) - { - maRangeX = rBox.maRangeX; - maRangeY = rBox.maRangeY; - maRangeZ = rBox.maRangeZ; + void operator=(const B3IBox& rBox) + { + maRangeX = rBox.maRangeX; + maRangeY = rBox.maRangeY; + maRangeZ = rBox.maRangeZ; } sal_Int32 getMinX() const @@ -172,7 +172,7 @@ namespace basegfx maRangeZ.getMinimum() ); } - + B3IPoint getMaximum() const { return B3IPoint( @@ -190,7 +190,7 @@ namespace basegfx maRangeZ.getRange() ); } - + B3DPoint getCenter() const { return B3DPoint( @@ -199,11 +199,11 @@ namespace basegfx maRangeZ.getCenter() ); } - + bool isInside(const B3ITuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) && maRangeZ.isInside(rTuple.getZ()) ); @@ -212,7 +212,7 @@ namespace basegfx bool isInside(const B3IBox& rBox) const { return ( - maRangeX.isInside(rBox.maRangeX) + maRangeX.isInside(rBox.maRangeX) && maRangeY.isInside(rBox.maRangeY) && maRangeZ.isInside(rBox.maRangeZ) ); @@ -221,7 +221,7 @@ namespace basegfx bool overlaps(const B3IBox& rBox) const { return ( - maRangeX.overlaps(rBox.maRangeX) + maRangeX.overlaps(rBox.maRangeX) && maRangeY.overlaps(rBox.maRangeY) && maRangeZ.overlaps(rBox.maRangeZ) ); @@ -236,23 +236,23 @@ namespace basegfx void expand(const B3IBox& rBox) { - maRangeX.expand(rBox.maRangeX); - maRangeY.expand(rBox.maRangeY); - maRangeZ.expand(rBox.maRangeZ); + maRangeX.expand(rBox.maRangeX); + maRangeY.expand(rBox.maRangeY); + maRangeZ.expand(rBox.maRangeZ); } void intersect(const B3IBox& rBox) { - maRangeX.intersect(rBox.maRangeX); - maRangeY.intersect(rBox.maRangeY); - maRangeZ.intersect(rBox.maRangeZ); + maRangeX.intersect(rBox.maRangeX); + maRangeY.intersect(rBox.maRangeY); + maRangeZ.intersect(rBox.maRangeZ); } void grow(sal_Int32 nValue) { - maRangeX.grow(nValue); - maRangeY.grow(nValue); - maRangeZ.grow(nValue); + maRangeX.grow(nValue); + maRangeY.grow(nValue); + maRangeZ.grow(nValue); } }; } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b3irange.hxx b/basegfx/inc/basegfx/range/b3irange.hxx index 32d48812d2cd..b2c8e7f30360 100644 --- a/basegfx/inc/basegfx/range/b3irange.hxx +++ b/basegfx/inc/basegfx/range/b3irange.hxx @@ -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 @@ -39,31 +39,31 @@ namespace basegfx { class B3IRange { - typedef ::basegfx::BasicRange< sal_Int32, Int32Traits > MyBasicRange; + typedef ::basegfx::BasicRange< sal_Int32, Int32Traits > MyBasicRange; - MyBasicRange maRangeX; - MyBasicRange maRangeY; - MyBasicRange maRangeZ; + MyBasicRange maRangeX; + MyBasicRange maRangeY; + MyBasicRange maRangeZ; - public: - B3IRange() + public: + B3IRange() { } - + explicit B3IRange(const B3ITuple& rTuple) - : maRangeX(rTuple.getX()), + : maRangeX(rTuple.getX()), maRangeY(rTuple.getY()), maRangeZ(rTuple.getZ()) { } - + B3IRange(sal_Int32 x1, sal_Int32 y1, sal_Int32 z1, sal_Int32 x2, sal_Int32 y2, sal_Int32 z2) - : maRangeX(x1), + : maRangeX(x1), maRangeY(y1), maRangeZ(z1) { @@ -74,7 +74,7 @@ namespace basegfx B3IRange(const B3ITuple& rTuple1, const B3ITuple& rTuple2) - : maRangeX(rTuple1.getX()), + : maRangeX(rTuple1.getX()), maRangeY(rTuple1.getY()), maRangeZ(rTuple1.getZ()) { @@ -82,44 +82,44 @@ namespace basegfx } B3IRange(const B3IRange& rRange) - : maRangeX(rRange.maRangeX), + : maRangeX(rRange.maRangeX), maRangeY(rRange.maRangeY), maRangeZ(rRange.maRangeZ) { } - bool isEmpty() const + bool isEmpty() const { return maRangeX.isEmpty() || maRangeY.isEmpty() || maRangeZ.isEmpty(); } - void reset() - { - maRangeX.reset(); - maRangeY.reset(); - maRangeZ.reset(); + void reset() + { + maRangeX.reset(); + maRangeY.reset(); + maRangeZ.reset(); } - - bool operator==( const B3IRange& rRange ) const - { - return (maRangeX == rRange.maRangeX + + bool operator==( const B3IRange& rRange ) const + { + return (maRangeX == rRange.maRangeX && maRangeY == rRange.maRangeY - && maRangeZ == rRange.maRangeZ); + && maRangeZ == rRange.maRangeZ); } - bool operator!=( const B3IRange& rRange ) const - { - return (maRangeX != rRange.maRangeX + bool operator!=( const B3IRange& rRange ) const + { + return (maRangeX != rRange.maRangeX || maRangeY != rRange.maRangeY - || maRangeZ != rRange.maRangeZ); + || maRangeZ != rRange.maRangeZ); } - B3IRange& operator=(const B3IRange& rRange) - { - maRangeX = rRange.maRangeX; - maRangeY = rRange.maRangeY; - maRangeZ = rRange.maRangeZ; - return *this; + B3IRange& operator=(const B3IRange& rRange) + { + maRangeX = rRange.maRangeX; + maRangeY = rRange.maRangeY; + maRangeZ = rRange.maRangeZ; + return *this; } sal_Int32 getMinX() const @@ -175,7 +175,7 @@ namespace basegfx maRangeZ.getMinimum() ); } - + B3IPoint getMaximum() const { return B3IPoint( @@ -193,7 +193,7 @@ namespace basegfx maRangeZ.getRange() ); } - + B3DPoint getCenter() const { return B3DPoint( @@ -202,11 +202,11 @@ namespace basegfx maRangeZ.getCenter() ); } - + bool isInside(const B3ITuple& rTuple) const { return ( - maRangeX.isInside(rTuple.getX()) + maRangeX.isInside(rTuple.getX()) && maRangeY.isInside(rTuple.getY()) && maRangeZ.isInside(rTuple.getZ()) ); @@ -215,7 +215,7 @@ namespace basegfx bool isInside(const B3IRange& rRange) const { return ( - maRangeX.isInside(rRange.maRangeX) + maRangeX.isInside(rRange.maRangeX) && maRangeY.isInside(rRange.maRangeY) && maRangeZ.isInside(rRange.maRangeZ) ); @@ -224,7 +224,7 @@ namespace basegfx bool overlaps(const B3IRange& rRange) const { return ( - maRangeX.overlaps(rRange.maRangeX) + maRangeX.overlaps(rRange.maRangeX) && maRangeY.overlaps(rRange.maRangeY) && maRangeZ.overlaps(rRange.maRangeZ) ); @@ -239,23 +239,23 @@ namespace basegfx void expand(const B3IRange& rRange) { - maRangeX.expand(rRange.maRangeX); - maRangeY.expand(rRange.maRangeY); - maRangeZ.expand(rRange.maRangeZ); + maRangeX.expand(rRange.maRangeX); + maRangeY.expand(rRange.maRangeY); + maRangeZ.expand(rRange.maRangeZ); } void intersect(const B3IRange& rRange) { - maRangeX.intersect(rRange.maRangeX); - maRangeY.intersect(rRange.maRangeY); - maRangeZ.intersect(rRange.maRangeZ); + maRangeX.intersect(rRange.maRangeX); + maRangeY.intersect(rRange.maRangeY); + maRangeZ.intersect(rRange.maRangeZ); } void grow(sal_Int32 nValue) { - maRangeX.grow(nValue); - maRangeY.grow(nValue); - maRangeZ.grow(nValue); + maRangeX.grow(nValue); + maRangeY.grow(nValue); + maRangeZ.grow(nValue); } }; } // end of namespace basegfx diff --git a/basegfx/inc/basegfx/range/b3ivolume.hxx b/basegfx/inc/basegfx/range/b3ivolume.hxx index 67fe3d2959f6..18f003e11c3e 100644 --- a/basegfx/inc/basegfx/range/b3ivolume.hxx +++ b/basegfx/inc/basegfx/range/b3ivolume.hxx @@ -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 diff --git a/basegfx/inc/basegfx/range/basicbox.hxx b/basegfx/inc/basegfx/range/basicbox.hxx index 0159acc9e8e0..3625dd9b48b5 100644 --- a/basegfx/inc/basegfx/range/basicbox.hxx +++ b/basegfx/inc/basegfx/range/basicbox.hxx @@ -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 diff --git a/basegfx/inc/basegfx/range/basicrange.hxx b/basegfx/inc/basegfx/range/basicrange.hxx index 8711f95b754c..d8f149f205c8 100644 --- a/basegfx/inc/basegfx/range/basicrange.hxx +++ b/basegfx/inc/basegfx/range/basicrange.hxx @@ -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 @@ -39,12 +39,12 @@ namespace basegfx template< typename T, typename Traits > class BasicRange { protected: - T mnMinimum; - T mnMaximum; - + T mnMinimum; + T mnMaximum; + public: - typedef T ValueType; - typedef Traits TraitsType; + typedef T ValueType; + typedef Traits TraitsType; BasicRange() : mnMinimum(Traits::maxVal()), @@ -148,13 +148,13 @@ namespace basegfx return ((rRange.mnMaximum > mnMinimum) && (rRange.mnMinimum < mnMaximum)); } - bool operator==( const BasicRange& rRange ) const - { + bool operator==( const BasicRange& rRange ) const + { return (mnMinimum == rRange.mnMinimum && mnMaximum == rRange.mnMaximum); } - bool operator!=( const BasicRange& rRange ) const - { + bool operator!=( const BasicRange& rRange ) const + { return (mnMinimum != rRange.mnMinimum || mnMaximum != rRange.mnMaximum); } @@ -162,13 +162,13 @@ namespace basegfx { mnMinimum = rRange.mnMinimum; mnMaximum = rRange.mnMaximum; - return *this; + return *this; } bool equal(const BasicRange& rRange) const { return ( - fTools::equal(mnMinimum, rRange.mnMinimum) && + fTools::equal(mnMinimum, rRange.mnMinimum) && fTools::equal(mnMaximum, rRange.mnMaximum)); } @@ -207,7 +207,7 @@ namespace basegfx { mnMinimum = rRange.mnMinimum; } - + if(rRange.mnMaximum > mnMaximum) { mnMaximum = rRange.mnMaximum; @@ -229,7 +229,7 @@ namespace basegfx { mnMinimum = rRange.mnMinimum; } - + if(rRange.mnMaximum < mnMaximum) { mnMaximum = rRange.mnMaximum; diff --git a/basegfx/inc/basegfx/range/rangeexpander.hxx b/basegfx/inc/basegfx/range/rangeexpander.hxx index 509757d79750..6d8e2562e2ad 100644 --- a/basegfx/inc/basegfx/range/rangeexpander.hxx +++ b/basegfx/inc/basegfx/range/rangeexpander.hxx @@ -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 @@ -53,9 +53,9 @@ namespace basegfx */ template< typename RangeType > class RangeExpander { - public: - typedef RangeType ValueType; - typedef void result_type; + public: + typedef RangeType ValueType; + typedef void result_type; explicit RangeExpander( ValueType& rBounds ) : mrBounds( rBounds ) |