我开门的时候弄坏了锁。

In opening the door, I broke the lock.

Source: Tatoeba

Sentence Composition