similar to what we do for viewID.
On attemting to load multiple documents StatusIndicator::start calls
Application::Reschedule during load of document #1.
That inner loop ends up loading document #2. The inner loop ends, and
load of document #1 completes in the outer loop.
Unfortunately the inner loop left the current DocumentId as that of the
inner document #2, so the document id set on the view of #1 is
incorrect.
Extend the similar fix for viewId switching during Reschedule to restore
the docId. If this Reschedule happens at any other time except load then
restoring the viewId is sufficient to identify the correct document, but
in the load case there is no viewId yet
Move the mnCurrentDocId out of sfx2 and ViewShell into comphelper so
it's available from vcl without needing to make any adjustments to
LibreOfficeKit.h[xx]
Change-Id: Ied70e0f9ff33f2587cfbcb02b0c9ca3cd4792cfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193814
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>