diff options
author | Oliver Specht <os@openoffice.org> | 2001-09-27 12:13:38 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-09-27 12:13:38 +0000 |
commit | f87582fe10eb29f744066ea55269a0006dcbe412 (patch) | |
tree | ee6e1548b1b76e7f829184b3c70b251baa8c1139 /sfx2/source/doc/objxtor.cxx | |
parent | a435c39cffdb212c1fd5c51f15163d70458726ee (diff) |
#62832# feature: printing changes document modified state
Diffstat (limited to 'sfx2/source/doc/objxtor.cxx')
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 127ac43c9086..1b3c0463ac07 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -2,9 +2,9 @@ * * $RCSfile: objxtor.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: mba $ $Date: 2001-09-13 12:18:31 $ + * last change: $Author: os $ $Date: 2001-09-27 13:13:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,10 @@ #ifndef _SFXLSTNER_HXX //autogen #include <svtools/lstner.hxx> #endif + +#ifndef _SFX_HELP_HXX +#include <sfxhelp.hxx> +#endif #ifndef _SB_SBSTAR_HXX //autogen #include <basic/sbstar.hxx> #endif @@ -110,6 +114,9 @@ #ifndef _EHDL_HXX #include <svtools/ehdl.hxx> #endif +#ifndef INCLUDED_SVTOOLS_PRINTWARNINGOPTIONS_HXX +#include <svtools/printwarningoptions.hxx> +#endif #include <svtools/urihelper.hxx> #include <svtools/pathoptions.hxx> @@ -144,6 +151,7 @@ #include "imgmgr.hxx" #include "tbxconf.hxx" #include "accmgr.hxx" +#include "helpid.hrc" using namespace ::com::sun::star::uno; using namespace ::com::sun::star::script; @@ -507,6 +515,13 @@ sal_uInt16 SfxObjectShell::PrepareClose short nRet = RET_YES; if( SfxApplication::IsPlugin() == sal_False || bUI == 2 ) { + //initiate help agent to inform about "print modifies the document" + SfxStamp aStamp = GetDocInfo().GetPrinted(); + SvtPrintWarningOptions aPrintOptions; + if(aPrintOptions.IsModifyDocumentOnPrintingAllowed() && HasName() && aStamp.IsValid()) + { + SfxHelp::OpenHelpAgent(pFirst->GetFrame(), HID_CLOSE_WARNING); + } QueryBox aQBox( &pFrame->GetWindow(), WB_YES_NO_CANCEL | WB_DEF_YES, aText ); aQBox.SetButtonText( BUTTONID_NO, SfxResId( STR_NOSAVEANDCLOSE ) ); aQBox.SetButtonText( BUTTONID_YES, SfxResId( STR_SAVEDOC ) ); |