diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-02-23 16:15:38 +0100 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-02-23 16:15:38 +0100 |
commit | 25c6bec2ac046330edec7de64892d9a4e6a4f9ad (patch) | |
tree | 9f4dc4326130d2f35f0ab6b6adda6b2724aaf676 /sw | |
parent | 2f5d3df4f26427a0e886bd1a4b4c209280942ad3 (diff) | |
parent | bdc6a1c7617677a48a1579dd89782661b250682c (diff) |
cws ppp02: merge
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/inc/printdata.hxx | 4 | ||||
-rwxr-xr-x | sw/source/core/doc/doc.cxx | 12 | ||||
-rwxr-xr-x | sw/source/core/view/printdata.cxx | 2 | ||||
-rwxr-xr-x | sw/source/ui/uno/unotxdoc.cxx | 9 |
4 files changed, 16 insertions, 11 deletions
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index ce3e3cc6adbc..2077aa2157b1 100755 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -293,8 +293,8 @@ public: // a map for printer paper tray numbers to use for each document page // a value of -1 for the tray means that there is no specific tray defined - std::map< sal_Int32, sal_Int32 > GetPrinterPaperTrays() { return m_aPrinterPaperTrays; } - const std::map< sal_Int32, sal_Int32 > GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; } + std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() { return m_aPrinterPaperTrays; } + const std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; } // used for 'normal' printing // A page value of 0 as entry indicates that this page is not from the document but diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 304932d3e365..fc51f6b30fd2 100755 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1565,6 +1565,18 @@ void SwDoc::CalculatePagePairsForProspectPrinting( rValidStartFrms.clear(); rtl::OUString aPageRange = rOptions.getStringValue( "PageRange", rtl::OUString() ); + // PageContent : + // 0 -> print all pages (default if aPageRange is empty) + // 1 -> print range according to PageRange + // 2 -> print selection + const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 ); + if (0 == nContent) + { + // set page range to print to 'all pages' + aPageRange = OUString::valueOf( (sal_Int32)1 ); + aPageRange += OUString::valueOf( (sal_Unicode)'-'); + aPageRange += OUString::valueOf( nDocPageCount ); + } StringRangeEnumerator aRange( aPageRange, 1, nDocPageCount, 0 ); DBG_ASSERT( pLayout, "no layout present" ); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 1fa29cfae695..7c85b9e7db5c 100755 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -44,7 +44,7 @@ #include <svl/languageoptions.hxx> #include <toolkit/awt/vclxdevice.hxx> -#include <tools/String.hxx> +#include <tools/string.hxx> #include <tools/debug.hxx> #include <tools/resary.hxx> #include <unotools/moduleoptions.hxx> diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 3058c225bf3f..0007f5a6b4e9 100755 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2851,14 +2851,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; - if (bPrintPaperFromSetup) - { - // ... from printer setup - Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions )); - if (pPrinter) - nPrinterPaperTray = pPrinter->GetPaperBin(); - } - else + if (! bPrintPaperFromSetup) { // ... from individual page style (see the page tab in Format/Page dialog) const std::map< sal_Int32, sal_Int32 > &rPaperTrays = m_pRenderData->GetPrinterPaperTrays(); |