Spanish court investigates ex-spy chief over alleged snooping on Catalans