so that when calling getCoverPageImage in screensaver mode the document won't be opened again. This should avoid a lot of problem such as messing up style and options described in #863.
resolved conflicts with refactored structure