summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/range
diff options
context:
space:
mode:
authorthb <thb@openoffice.org>2010-01-18 01:10:42 +0100
committerthb <thb@openoffice.org>2010-01-18 01:10:42 +0100
commitea48c18b848fed4d6504c956adeb3f24f05938ca (patch)
tree1eccf884707ec16e4dd74f8e83c74563e1539b34 /basegfx/inc/basegfx/range
parent1737f4d2fdba50a590f76631cd7ca7e762d18c35 (diff)
parent8765a3bf9f2926a50d0f644e4263782269abe023 (diff)
thbfixes10: merge with DEV300 m69
Diffstat (limited to 'basegfx/inc/basegfx/range')
-rw-r--r--basegfx/inc/basegfx/range/b1drange.hxx6
-rw-r--r--basegfx/inc/basegfx/range/b2drange.hxx9
-rw-r--r--basegfx/inc/basegfx/range/basicrange.hxx9
3 files changed, 21 insertions, 3 deletions
diff --git a/basegfx/inc/basegfx/range/b1drange.hxx b/basegfx/inc/basegfx/range/b1drange.hxx
index efca06d92dfd..366431c3cd50 100644
--- a/basegfx/inc/basegfx/range/b1drange.hxx
+++ b/basegfx/inc/basegfx/range/b1drange.hxx
@@ -7,7 +7,6 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: b1drange.hxx,v $
- * $Revision: 1.15 $
*
* This file is part of OpenOffice.org.
*
@@ -131,6 +130,11 @@ namespace basegfx
return maRange.overlaps(rRange.maRange);
}
+ bool overlapsMore(const B1DRange& rRange) const
+ {
+ return maRange.overlapsMore(rRange.maRange);
+ }
+
void expand(double fValue)
{
maRange.expand(fValue);
diff --git a/basegfx/inc/basegfx/range/b2drange.hxx b/basegfx/inc/basegfx/range/b2drange.hxx
index 66892865399f..8a70d4782f47 100644
--- a/basegfx/inc/basegfx/range/b2drange.hxx
+++ b/basegfx/inc/basegfx/range/b2drange.hxx
@@ -7,7 +7,6 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: b2drange.hxx,v $
- * $Revision: 1.19 $
*
* This file is part of OpenOffice.org.
*
@@ -222,6 +221,14 @@ namespace basegfx
);
}
+ bool overlapsMore(const B2DRange& rRange) const
+ {
+ return (
+ maRangeX.overlapsMore(rRange.maRangeX)
+ && maRangeY.overlapsMore(rRange.maRangeY)
+ );
+ }
+
void expand(const B2DTuple& rTuple)
{
maRangeX.expand(rTuple.getX());
diff --git a/basegfx/inc/basegfx/range/basicrange.hxx b/basegfx/inc/basegfx/range/basicrange.hxx
index a7c402c905c8..59d13cf530c0 100644
--- a/basegfx/inc/basegfx/range/basicrange.hxx
+++ b/basegfx/inc/basegfx/range/basicrange.hxx
@@ -7,7 +7,6 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: basicrange.hxx,v $
- * $Revision: 1.15 $
*
* This file is part of OpenOffice.org.
*
@@ -142,6 +141,14 @@ namespace basegfx
}
}
+ bool overlapsMore(const BasicRange& rRange) const
+ {
+ if(isEmpty() || rRange.isEmpty())
+ return false;
+ // returns true if the overlap is more than just a touching at the limits
+ return ((rRange.mnMaximum > mnMinimum) && (rRange.mnMinimum < mnMaximum));
+ }
+
bool operator==( const BasicRange& rRange ) const
{
return (mnMinimum == rRange.mnMinimum && mnMaximum == rRange.mnMaximum);