diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-11-02 12:59:41 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-11-02 12:59:41 +0000 |
commit | cbd32fec97a61e10d7b0f2086a15a3a9e8d60b55 (patch) | |
tree | 70504481188fe8e29fa2d682df6b4c457e3d4656 /basegfx/source/range | |
parent | 50d720696f065983a620f83fbe4d3cc656ca05f3 (diff) |
INTEGRATION: CWS canvas02 (1.5.10); FILE MERGED
2005/10/24 16:16:17 thb 1.5.10.1: #i48939# The int<->double conversions now preserve the empty state of ranges
Diffstat (limited to 'basegfx/source/range')
-rw-r--r-- | basegfx/source/range/b1drange.cxx | 18 |
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 |