diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-03-02 14:53:33 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-03-03 00:05:29 +0100 |
commit | eb237af5aa0a5d8616e4a8ddd1e528433bdd0f82 (patch) | |
tree | fd15d10541d5f2a31327fd8320065b606f077a88 /sfx2 | |
parent | 90f7a3ada68f309a9d3201183ef552e59f9558fb (diff) |
ExecuteQuerySaveDocument: return NO when headless instead of CANCEL
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 ); |