Alerting all users is done from different contexts.
One such is when loading a new document.
Since both alerting all users and loading documents
need to hold the same lock, this would deadlock.
The solution here is to differentiate between
external alerts and internal ones (to WSD).
The internal one expects to be invoked while holding
the lock, while the external one always takes the lock.
Care should be taking when alerting from within WSD to
avoid this deadlock.
Change-Id: Idf0e952db1216a3d161f22c7da51af16701f685b
Reviewed-on: https://gerrit.libreoffice.org/31102
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>