summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-09-20 14:25:48 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-09-20 14:25:48 +0000
commitda84748f6470f28b9639097699db5064712293d6 (patch)
tree25babdcb215eb7dc286aa96a340dc82154a13301 /sw/source/filter/ww8
parent517530679bc30ba85ab28b913b1759fea9ab2c1a (diff)
INTEGRATION: CWS redlinefilterteam24 (1.9.140); FILE MERGED
2004/08/27 16:47:07 mmaher 1.9.140.1: #i15212# Pulled out common redlining helper classes and put them where rtf can get at it them
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx72
1 files changed, 70 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index b2fa29f31360..3d5990ce58f4 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: writerwordglue.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: obo $ $Date: 2004-08-12 12:54:10 $
+ * last change: $Author: rt $ $Date: 2004-09-20 15:25:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -861,6 +861,74 @@ namespace sw
}
return nRet;
}
+
+ long DateTime2DTTM( const DateTime& rDT )
+ {
+ /*
+ mint short :6 0000003F minutes (0-59)
+ hr short :5 000007C0 hours (0-23)
+ dom short :5 0000F800 days of month (1-31)
+ mon short :4 000F0000 months (1-12)
+ yr short :9 1FF00000 years (1900-2411)-1900
+ wdy short :3 E0000000 weekday(Sunday=0
+ Monday=1
+ ( wdy can be ignored ) Tuesday=2
+ Wednesday=3
+ Thursday=4
+ Friday=5
+ Saturday=6)
+ */
+
+ long nDT = ( rDT.GetDayOfWeek() + 1 ) % 7;
+ nDT <<= 9;
+ nDT += ( rDT.GetYear() - 1900 ) & 0x1ff;
+ nDT <<= 4;
+ nDT += rDT.GetMonth() & 0xf;
+ nDT <<= 5;
+ nDT += rDT.GetDay() & 0x1f;
+ nDT <<= 5;
+ nDT += rDT.GetHour() & 0x1f;
+ nDT <<= 6;
+ nDT += rDT.GetMin() & 0x3f;
+ return nDT;
+ }
+
+ DateTime DTTM2DateTime( long lDTTM )
+ {
+ /*
+ mint short :6 0000003F minutes (0-59)
+ hr short :5 000007C0 hours (0-23)
+ dom short :5 0000F800 days of month (1-31)
+ mon short :4 000F0000 months (1-12)
+ yr short :9 1FF00000 years (1900-2411)-1900
+ wdy short :3 E0000000 weekday(Sunday=0
+ Monday=1
+ ( wdy can be ignored ) Tuesday=2
+ Wednesday=3
+ Thursday=4
+ Friday=5
+ Saturday=6)
+ */
+ DateTime aDateTime(Date( 0 ), Time( 0 ));
+ if( lDTTM )
+ {
+ USHORT lMin = (USHORT)(lDTTM & 0x0000003F);
+ lDTTM >>= 6;
+ USHORT lHour= (USHORT)(lDTTM & 0x0000001F);
+ lDTTM >>= 5;
+ USHORT lDay = (USHORT)(lDTTM & 0x0000001F);
+ lDTTM >>= 5;
+ USHORT lMon = (USHORT)(lDTTM & 0x0000000F);
+ lDTTM >>= 4;
+ USHORT lYear= (USHORT)(lDTTM & 0x000001FF) + 1900;
+ aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
+ }
+ return aDateTime;
+ }
+
+
+
+
}
}