summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno/unotxdoc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uno/unotxdoc.cxx')
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 0579d180a04c..eb2f5d7d67d2 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>
@@ -107,7 +108,6 @@
#include <swcont.hxx>
#include <unodefaults.hxx>
#include <SwXDocumentSettings.hxx>
-#include <SwXPrintPreviewSettings.hxx>
#include <doc.hxx>
#include <editeng/forbiddencharacterstable.hxx>
#include <svl/zforlist.hxx>
@@ -1809,9 +1809,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") )
@@ -2732,10 +2730,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.
@@ -2844,7 +2853,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;