diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-03-02 14:53:33 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-04-17 16:06:12 +0100 |
commit | 67b4c0b556c2bc586d0a2d63d0fd6efa32a6c25c (patch) | |
tree | 6b9ddae76faf51b79967217e5a70824cd5d4c2dc /sfx2 | |
parent | 9e215ad344f0f1df681617072ad5af093eb6944a (diff) |
ExecuteQuerySaveDocument: return NO when headless instead of CANCEL
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
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 ); |