Changing Pronoun
The Pronoun/subject/object of the reported verb determines the change in Pronoun of the reported speech.
The subject or object of the first sentence also determines the change in the possessive Pronouns.
For example,
She said to me, “I love your new dress”. (Direct speech)
She told me that she loved my new dress. (Indirect speech)
She said, “I have done my assignments”. (Direct speech)
She said that she had done her assignments. (Indirect speech)