Skip to content

Commit 7a82552

Browse files
committed
oxcical: always set PidLidAppointmentStateFlags on ingest
If the PidLidAppointmentStateFlags property is *absent*, some 1-day duration allday appointments are displayed by Outlook not from midnight to midnight, but from hour N to hour N. This seems like an OL bug. As OL always creates the property; let's do so too. References: GXL-617, DESK-3728
1 parent 468c9b5 commit 7a82552

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/mapi/oxcical.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,19 @@ static bool oxcical_parse_subtype(namemap &phash, uint16_t *plast_propid,
10551055
return true;
10561056
}
10571057

1058+
static bool oxcical_set_stateflags(namemap &hash, uint16_t &last_propid,
1059+
MESSAGE_CONTENT &msg)
1060+
{
1061+
uint32_t val = 0;
1062+
PROPERTY_NAME pn = {MNID_ID, PSETID_Appointment, PidLidAppointmentStateFlags};
1063+
if (namemap_add(hash, last_propid, std::move(pn)) != 0)
1064+
return false;
1065+
if (msg.proplist.set(PROP_TAG(PT_LONG, last_propid), &val) != ecSuccess)
1066+
return false;
1067+
++last_propid;
1068+
return true;
1069+
}
1070+
10581071
static bool oxcical_parse_dates(const ical_component *ptz_component,
10591072
const ical_line &iline, uint32_t *pcount, uint32_t *pdates)
10601073
{
@@ -2167,6 +2180,8 @@ static const char *oxcical_import_internal(const char *str_zone, const char *met
21672180
b_allday = true;
21682181
if (b_allday && !oxcical_parse_subtype(phash, &last_propid, pmsg, pexception))
21692182
return "E-2704: oxcical_parse_subtype returned an unspecified error";
2183+
if (!oxcical_set_stateflags(phash, last_propid, *pmsg))
2184+
return "E-2739";
21702185

21712186
ical_time itime{};
21722187
piline = pmain_event->get_line("RECURRENCE-ID");

0 commit comments

Comments
 (0)