A much needed improvement would be the following, please consider working on it:
https://bugs.documentfoundation.org/show_bug.cgi?id=131436