Xerox ordered to pay $4.9 million in legal fees