diff options
author | os <os@openoffice.org> | 2010-09-06 16:54:27 +0200 |
---|---|---|
committer | os <os@openoffice.org> | 2010-09-06 16:54:27 +0200 |
commit | 508cd16f8737bce8026c40d478bce4d5b233f2b9 (patch) | |
tree | 9d180e4113721b9599b98a70c0306d664abff2b1 /sw/source/ui | |
parent | 104e5322c5b511105b26b8c811078da66e6d95b9 (diff) |
#i112518# prevent document modification while printing
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 0579d180a04c..27ba8add92d4 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -82,6 +82,7 @@ #include <svx/xmleohlp.hxx> #include <globals.hrc> #include <unomid.h> +#include <unotools/printwarningoptions.hxx> #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> @@ -2732,10 +2733,21 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // since printing now also use the API for PDF export this option // should be set for printing as well ... pWrtShell->SetPDFExportOption( sal_True ); + bool bOrigStatus = pRenderDocShell->IsEnableSetModified(); + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + bool bStateChanged = false; + if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + pRenderDocShell->EnableSetModified( sal_False ); + bStateChanged = true; + } + // --> FME 2005-05-23 #122919# Force field update before PDF export: pWrtShell->ViewShell::UpdateFlds(TRUE); // <-- + if( bStateChanged ) + pRenderDocShell->EnableSetModified( sal_True ); // there is some redundancy between those two function calls, but right now // there is no time to sort this out. |