Princess Diana 'gave royal contacts to newspaper,' court hears