JURORS at O'Leary's trial heard how the victim felt she was in a horror movie after waking up to find herself in his dingy flat.
The woman begged for her life during the ordeal.
The victim had been on a night out with her boyfriend but separated from him after they had an argument.
Leeds Crown Court heard the woman went alone to the Stone Roses Bar, on Lower Briggate, and drank heavily until the early hours of the morning.
The last thing she remembered was a barman asking if she wanted a taxi.
She awoke the next morning, September 17 last year, to find herself in bed with O'Leary at the flat on Winrose Drive, Belle Isle.
O'Leary, a convicted rapist, had already had sexual contact with the woman as she slept.
She was unable to escape as grilles covered all the windows and O'Leary kept her locked in.
At one stage O'Leary turned out all of the lights and struck the woman over the head.
He then forced her onto his bed as she begged him to stop.
Rupert Doswell, prosecuting, said: "She screamed and told him not to do it. She said 'you are a good person really, don't do it'"
The prosecutor said: "Maybe it was something that she said that resonated with him, because as quickly as it started, it stopped and she ran off to the bathroom."
O'Leary managed to get into the bathroom holding a hunting knife.
The victim feared she was about to be killed when O'Leary began placing plastic bags on the floor of the property.
Mr Dodswell said: "She was convinced that the defendant was putting the bags on the floor so if he stabbed her he could clear up the blood."
The prosecutor added: "She believed she was going to die and pleaded with him not to kill her. She said she had a son and was the only person he had."
The victim rushed to a kitchen and tried to find a knife but was unable to open drawers.
O'Leary eventually allowed the woman out of the property in the early hours of the following morning when her screams alerted neighbours.
She managed to stop a taxi in the street and was driven to Elland Road police station.
The woman took officers to O'Leary's flat where he was arrested.
DNA evidence was later recovered which showed he had sexual contact with the woman.