If a car is a Cat C, you have to have it VIC'd (Vehicle Identity Check), and this will appear on the new log book as "car has been substantially damaged and/or repaired" (or something similar). This doesn't happen for a Cat D.
The Cat D marker will always be on this vehicle, and if (or when) a garage does a HPI check, it will show up. There is no way of getting the marker removed at this point in time.
It will obviously affect the value, but whether the garage will trade it is another thing - they probably won;t want to re-sell it, so this would obviously affect what they would offer you - expect a trade value or less.