diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/QuerySaveDocument.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index ff670d66d43d..7ac2b6771809 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -33,9 +33,14 @@ #include <sfx2/sfxuno.hxx> #include "doc.hrc" #include <vcl/msgbox.hxx> +#include <vcl/svapp.hxx> // ----------------------------------------------------------------------------- short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle) { + if (Application::IsHeadlessModeEnabled()) + { // don't block Desktop::terminate() if there's no user to ask + return RET_NO; + } String aText( SfxResId( STR_QUERY_SAVE_DOCUMENT ) ); aText.SearchAndReplace( DEFINE_CONST_UNICODE( "$(DOC)" ), _rTitle ); |