slam back at her for wearing inappropriately to work. say you meant to compliment her nice legs but yet you also to make a point hope she get your message that she should wear appropriately for the occasion, in this case dress codes apply in office too. Say hope she won't send wrong message to your customers that the boss hire whores in the office too.
Be sarcastic, but yet diplomatic, and yet dare to comment or compliment if need arises. Say you can even see her undies which you felt offended and commenting on her legs is just stop short of commenting on seeing her undies.