Rename variables that refer to document from editor to document

Change-Id: I82114ffb66e29e8ac2e1b41138f6ddadfc266d07
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Squish: Fix expected object

Change-Id: I49eef9de0c635cd6618d05e0618ce6b0fe8d352e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>