In other words, it is harassment to make offensive comments or to behave inappropriately towards someone because this person, for example, is female, gay, or aboriginal. It doesn't matter if your intent was to joke - if the other person interpreted your remarks as offensive, it is considered harassment. In other words, it is expected that you should realize that comments or behavior that discriminate on the basis of sex, sexual orientation, race, etc. are unacceptable - even when disguised in the form of a joke. Section 13 A person who is in a position to confer, grant or deny a benefit or advancement to another person shall not engage in sexual solicitation or make a sexual advance to that person where the person making the solicitation or advance knows or ought reasonably to know that it is unwelcome. This is what is described above as quid pro quo harassment.
Sexual harassment is frequently more about power than about sex.
It can occur in situations where there is unequal power between the people involved, and is an attempt by one person to assert power over the other. For example, your employer suggests that a promotion might be possible if you were to have sex with him. Harassment can also occur when an individual is in a vulnerable position because he or she is in the minority. Research indicates that these types of representations have traditionally been associated with jobs associated only with men - for example, in a garage or plumbing supply store. Women are not likely to feel entirely comfortable in an environment that has been defined, by these images, as exclusively male.