summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/doc.cxx
diff options
context:
space:
mode:
authorSrijan Bhatia <srijanbhatiasun@gmail.com>2020-06-18 18:41:14 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2020-07-02 12:12:02 +0200
commit14b8c176133979cd1c3163ef5fe3eed0e6479fea (patch)
treef4f269904c4187336ceb13113a71154d49988bb8 /sw/source/core/doc/doc.cxx
parent445537bbc2971b970bed244db40f35c9caf43ef4 (diff)
tdf#127680 Add the option to print even or odd values from a particular range
Added a box besides the pages option that lets the user choose between left and right pages/left pages/right pages. Change-Id: Iee0386f4f3cfd2dac3fcf898a3fefb5434cb27a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96612 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/core/doc/doc.cxx')
-rw-r--r--sw/source/core/doc/doc.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 4d0791481478..b51e957810b3 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -669,7 +669,7 @@ void SwDoc::CalculatePagesForPrinting(
sal_Int32 nDocPageCount )
{
const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
- const bool bPrintSelection = nContent == 4;
+ const bool bPrintSelection = nContent == 2;
// properties to take into account when calculating the set of pages
// (PDF export UI does not allow for selecting left or right pages only)
@@ -726,11 +726,12 @@ void SwDoc::CalculatePagesForPrinting(
// 4 -> print selection
if (1 == nContent)
aPageRange = rOptions.getStringValue( "PageRange" );
- if (4 == nContent)
+
+ if (2 == nContent)
{
// note that printing selections is actually implemented by copying
// the selection to a new temporary document and printing all of that one.
- // Thus for Writer "PrintContent" must never be 4.
+ // Thus for Writer "PrintContent" must never be 2.
// See SwXTextDocument::GetRenderDoc for evaluating if a selection is to be
// printed and for creating the temporary document.
}
@@ -913,9 +914,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// PageContent :
// 0 -> print all pages (default if aPageRange is empty)
// 1 -> print range according to PageRange
- // 2 -> print even pages
- // 3 -> print odd pages
- // 4 -> print selection
+ // 2 -> print selection
const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
if (nContent == 1)
aPageRange = rOptions.getStringValue( "PageRange" );