From 508cd16f8737bce8026c40d478bce4d5b233f2b9 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 6 Sep 2010 16:54:27 +0200 Subject: #i112518# prevent document modification while printing --- sw/source/ui/uno/unotxdoc.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sw/source/ui/uno/unotxdoc.cxx') 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 #include #include +#include #include #include @@ -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. -- cgit From 2093818a3e6ea8a4d2632d924a07720f122932b2 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 7 Sep 2010 15:23:10 +0200 Subject: sw33bf09: #i114210# method - correct determination of page number from renderer index --- sw/source/ui/uno/unotxdoc.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/source/ui/uno/unotxdoc.cxx') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 0579d180a04c..eaa96a5d6ffc 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2844,7 +2844,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { - const USHORT nPage = nRenderer + 1; + // --> TL, OD 2010-09-07 #i114210# + // determine the correct page number from the renderer index + const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // <-- // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; -- cgit From a6d3374099e0d49043e61d10aef07b9d88784e9f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 13 Sep 2010 15:04:50 +0200 Subject: cws tl82: #i114267# code clean-up --- sw/source/ui/uno/unotxdoc.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) mode change 100644 => 100755 sw/source/ui/uno/unotxdoc.cxx (limited to 'sw/source/ui/uno/unotxdoc.cxx') diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx old mode 100644 new mode 100755 index 0579d180a04c..0bc43bf989ba --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -107,7 +107,6 @@ #include #include #include -#include #include #include #include @@ -1809,9 +1808,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } else if (sCategory == C2U ("text") ) { - if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) ) - xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) ); - else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) + if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } else if (sCategory == C2U ("chart2") ) -- cgit