I've done some investigating into whether or not someone's ever scored a hundred and got a hat trick in the same match.
The answer is no-one has, but of those 27 occasions of an allrounder scoring a hundred and taking three or more wickets in a match, this is the fourth occasion where a hat trick ball has come up.
Chris Gayle has done it twice, both against England, first
here and then
here. One notable point is that on both occasions the unfortunate man in the middle of the potential hat trick was Paul Collingwood, who had a pair of miserable matches at Chris Gayle's hands. Having been the man to set up Gayle's hat trick balls, he also failed with the ball himself, returning 0-19 off 3 and 0-58 off 9 as Gayle racked up centuries.
It is as fitting, then, as it is remarkable that the only other man to have achieved this feat is in fact
Paul Collingwood. Colly scored 112 off 86 balls against Bangladesh in 2005, before taking 6-31 off 10 with the ball, including two wickets in two balls for his second and third wickets of the day. This is also only the second ever example of a hundred and a 5-for in the same ODI, after Viv Richards managed the feat in Dunedin in 1987.