summaryrefslogtreecommitdiff
path: root/basegfx/source/range/b1drange.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/range/b1drange.cxx')
-rw-r--r--basegfx/source/range/b1drange.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/basegfx/source/range/b1drange.cxx b/basegfx/source/range/b1drange.cxx
index 6bc7dadda30f..0143ce7bb4d4 100644
--- a/basegfx/source/range/b1drange.cxx
+++ b/basegfx/source/range/b1drange.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: b1drange.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 20:49:49 $
+ * last change: $Author: kz $ $Date: 2005-11-02 13:59:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -46,15 +46,21 @@
namespace basegfx
{
B1DRange::B1DRange( const B1IRange& rRange ) :
- maRange(rRange.getMinimum())
+ maRange()
{
- expand(rRange.getMaximum());
+ if( !rRange.isEmpty() )
+ {
+ maRange = rRange.getMinimum();
+ expand(rRange.getMaximum());
+ }
}
B1IRange fround(const B1DRange& rRange)
{
- return B1IRange( fround( rRange.getMinimum()),
- fround( rRange.getMaximum()) );
+ return rRange.isEmpty() ?
+ B1IRange() :
+ B1IRange( fround( rRange.getMinimum()),
+ fround( rRange.getMaximum()) );
}
} // end of namespace basegfx