There is no need to allocate neither RowRanges nor HeightCache on the heap, just create them on the stack -- if nothing else, this ensures we don't leak memory, unlike before.
Fix typos in comments and indent them. Wrap over-long lines. Remove useless top-level const.
Store the line heights in a cache to make the (generic) wxDataViewCtrl usable with this style.