summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-08-27 13:40:04 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-08-27 13:40:04 +0000
commit2082e2e1d9539873ca6f5638729389ff89b2adc1 (patch)
tree61795047633291340f424b86bc949cd64984487e /sfx2/source/doc
parent1307075b1a1c9ea7a353daece46a0c8bf68ef5c0 (diff)
INTEGRATION: CWS fwk96_DEV300 (1.76.36); FILE MERGED
2008/08/20 12:25:43 mav 1.76.36.1: #i92927# compare the dates correctly
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/objcont.cxx45
1 files changed, 23 insertions, 22 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 18d6ebbbc3..199a3795fc 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: objcont.cxx,v $
- * $Revision: 1.76 $
+ * $Revision: 1.77 $
*
* This file is part of OpenOffice.org.
*
@@ -94,30 +94,31 @@ using namespace ::com::sun::star::uno;
//====================================================================
-/*
-static
-bool operator< (const util::DateTime& i_rLeft, const util::DateTime& i_rRight)
-{
- return i_rLeft.Year < i_rRight.Year
- || i_rLeft.Month < i_rRight.Month
- || i_rLeft.Day < i_rRight.Day
- || i_rLeft.Hours < i_rRight.Hours
- || i_rLeft.Minutes < i_rRight.Minutes
- || i_rLeft.Seconds < i_rRight.Seconds
- || i_rLeft.HundredthSeconds < i_rRight.HundredthSeconds;
-}
-*/
-
static
bool operator> (const util::DateTime& i_rLeft, const util::DateTime& i_rRight)
{
- return i_rLeft.Year > i_rRight.Year
- || i_rLeft.Month > i_rRight.Month
- || i_rLeft.Day > i_rRight.Day
- || i_rLeft.Hours > i_rRight.Hours
- || i_rLeft.Minutes > i_rRight.Minutes
- || i_rLeft.Seconds > i_rRight.Seconds
- || i_rLeft.HundredthSeconds > i_rRight.HundredthSeconds;
+ if ( i_rLeft.Year != i_rRight.Year )
+ return i_rLeft.Year > i_rRight.Year;
+
+ if ( i_rLeft.Month != i_rRight.Month )
+ return i_rLeft.Month > i_rRight.Month;
+
+ if ( i_rLeft.Day != i_rRight.Day )
+ return i_rLeft.Day > i_rRight.Day;
+
+ if ( i_rLeft.Hours != i_rRight.Hours )
+ return i_rLeft.Hours > i_rRight.Hours;
+
+ if ( i_rLeft.Minutes != i_rRight.Minutes )
+ return i_rLeft.Minutes > i_rRight.Minutes;
+
+ if ( i_rLeft.Seconds != i_rRight.Seconds )
+ return i_rLeft.Seconds > i_rRight.Seconds;
+
+ if ( i_rLeft.HundredthSeconds != i_rRight.HundredthSeconds )
+ return i_rLeft.HundredthSeconds > i_rRight.HundredthSeconds;
+
+ return sal_False;
}