EnableHeadlessMode bool arg doesn't toggle headless

but refers if a dialog is fatal or autocancelled

Change-Id: I7f15ecb26a3e29065caaacb932c7416f4cd96ff6
Reviewed-on: https://gerrit.libreoffice.org/36487
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/test/source/setupvcl.cxx b/test/source/setupvcl.cxx
index 49bdf73..ed090ea 100644
--- a/test/source/setupvcl.cxx
+++ b/test/source/setupvcl.cxx
@@ -74,7 +74,7 @@ void test::setUpVcl() {
    LanguageTag::setConfiguredSystemLanguage(tag.getLanguageType(false));
    InitVCL();
    if (isHeadless()) {
        Application::EnableHeadlessMode(true);
        Application::EnableHeadlessMode(false);
    }
    Application::setDeInitHook(LINK(nullptr, Hook, deinitHook));
}