[pywin32-checkins] pywin32/com/win32comext/mapi mapitags.py, 1.4, 1.5 mapiutil.py, 1.11, 1.12
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-09-27 12:04:43
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23510/com/win32comext/mapi Modified Files: mapitags.py mapiutil.py Log Message: mapiutil.py functions GetMapiTypeName and GetPropTagName have been modified to better distinguish between PT_UNICODE and PT_STRING8 type names during reverse lookups. (Nick Czeczulin) Index: mapitags.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapitags.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mapitags.py 20 Jan 2004 01:24:31 -0000 1.4 --- mapitags.py 27 Sep 2009 12:04:32 -0000 1.5 *************** *** 258,264 **** PR_BODY_W = PROP_TAG( PT_UNICODE, 4096) PR_BODY_A = PROP_TAG( PT_STRING8, 4096) ! PR_BODY_HTML_A = PROP_TAG( PT_STRING8, 4115) PR_BODY_HTML_W = PROP_TAG( PT_UNICODE, 4115) ! PR_REPORT_TEXT = PROP_TAG( PT_TSTRING, 4097) PR_REPORT_TEXT_W = PROP_TAG( PT_UNICODE, 4097) --- 258,264 ---- PR_BODY_W = PROP_TAG( PT_UNICODE, 4096) PR_BODY_A = PROP_TAG( PT_STRING8, 4096) ! PR_BODY_HTML = PROP_TAG( PT_TSTRING, 4115) PR_BODY_HTML_W = PROP_TAG( PT_UNICODE, 4115) ! PR_BODY_HTML_A = PROP_TAG( PT_STRING8, 4115) PR_REPORT_TEXT = PROP_TAG( PT_TSTRING, 4097) PR_REPORT_TEXT_W = PROP_TAG( PT_UNICODE, 4097) Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mapiutil.py 11 Dec 2008 06:55:34 -0000 1.11 --- mapiutil.py 27 Sep 2009 12:04:32 -0000 1.12 *************** *** 18,21 **** --- 18,33 ---- # to the ID. prTable[value] = name + + # String types should have 3 definitions in mapitags.py + # PR_BODY = PROP_TAG( PT_TSTRING, 4096) + # PR_BODY_W = PROP_TAG( PT_UNICODE, 4096) + # PR_BODY_A = PROP_TAG( PT_STRING8, 4096) + # The following change ensures a lookup using only the the + # property id returns the conditional default. + + if (mapitags.PROP_TYPE(value) == mapitags.PT_UNICODE or \ + mapitags.PROP_TYPE(value) == mapitags.PT_STRING8) and \ + (name[-2:] == '_A' or name[-2:] == '_W'): + continue prTable[mapitags.PROP_ID(value)] = name try: *************** *** 49,52 **** --- 61,69 ---- for name, value in mapitags.__dict__.iteritems(): if name[:3] == 'PT_': + # PT_TSTRING is a conditional assignment + # for either PT_UNICODE or PT_STRING8 and + # should not be returned during a lookup. + if name == 'PT_TSTRING': + continue ptTable[value] = name |