Instead of using getFilter and getHavingClause that report an empty filter/ having whenever "Apply Filter" is unchecked, use the raw Filter/HavingClause properties. Add UITest. Change-Id: Id0995217c48aba77c4e89327ede990bc31d19c1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211413 Tested-by: Jenkins Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>