... with the ID or the class
While at it, simplify the code a bit
Change-Id: I9e36f334b884d31229568835a346d4427a47c760
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155945
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>