diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-10-11 16:19:35 +0200 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-10-11 16:19:35 +0200 |
commit | 942b5b879aca633e1a90e139b48a73df987e6133 (patch) | |
tree | 59539e5fd62e614d7454d47d7dd9fe9ffedc5b76 | |
parent | 00693d9b8e7486818437a79fb8d80261a9e4909d (diff) |
vcl116: #i114405# add more n-Up options
-rw-r--r-- | vcl/inc/vcl/print.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/vcl/svids.hrc | 6 | ||||
-rwxr-xr-x | vcl/source/gdi/print3.cxx | 8 | ||||
-rw-r--r-- | vcl/source/src/print.src | 8 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 18 |
5 files changed, 32 insertions, 10 deletions
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index be7633f13d53..8bfa9c8454e0 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -400,7 +400,7 @@ protected: PrinterController( const boost::shared_ptr<Printer>& ); public: enum NupOrderType - { LRTB, TBLR }; + { LRTB, TBLR, TBRL, RLTB }; struct MultiPageSetup { // all metrics in 100th mm diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc index 059ed1524b7c..bebd50e5dd5c 100644 --- a/vcl/inc/vcl/svids.hrc +++ b/vcl/inc/vcl/svids.hrc @@ -122,8 +122,10 @@ #define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1 #define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2 -#define SV_PRINT_PRT_NUP_ORDER_LRTD 0 -#define SV_PRINT_PRT_NUP_ORDER_TDLR 1 +#define SV_PRINT_PRT_NUP_ORDER_LRTB 0 +#define SV_PRINT_PRT_NUP_ORDER_TBLR 1 +#define SV_PRINT_PRT_NUP_ORDER_TBRL 2 +#define SV_PRINT_PRT_NUP_ORDER_RLTB 3 #define SV_PRINT_TAB_JOB 2 #define SV_PRINT_PRINTERS_FL 1 diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index d8581cc3fa7a..ab16d1b24c07 100755 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1031,6 +1031,14 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte nCellX = (nSubPage / rMPS.nRows); nCellY = (nSubPage % rMPS.nRows); break; + case PrinterController::RLTB: + nCellX = rMPS.nColumns - 1 - (nSubPage % rMPS.nColumns); + nCellY = (nSubPage / rMPS.nColumns); + break; + case PrinterController::TBRL: + nCellX = rMPS.nColumns - 1 - (nSubPage / rMPS.nRows); + nCellY = (nSubPage % rMPS.nRows); + break; } // scale the metafile down to a sub page size double fScaleX = double(aSubPageSize.Width())/double(aPageSize.aSize.Width()); diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src index 010cae338e0e..1d1dffc04652 100644 --- a/vcl/source/src/print.src +++ b/vcl/source/src/print.src @@ -281,14 +281,16 @@ ModalDialog SV_DLG_PRINT ListBox SV_PRINT_PRT_NUP_ORDER_BOX { Pos = MAP_APPFONT( 0, 0 ); - Size = MAP_APPFONT( 10, 20 ); + Size = MAP_APPFONT( 10, 50 ); DropDown = TRUE; Border = TRUE; CurPos = 0; StringList [en-US] = { - < "left to right, then down"; SV_PRINT_PRT_NUP_ORDER_LRTD; >; - < "top to bottom, then right"; SV_PRINT_PRT_NUP_ORDER_TDLR; >; + < "left to right, then down"; SV_PRINT_PRT_NUP_ORDER_LRTB; >; + < "top to bottom, then right"; SV_PRINT_PRT_NUP_ORDER_TBLR; >; + < "top to bottom, then left"; SV_PRINT_PRT_NUP_ORDER_TBRL; >; + < "right to left, then down"; SV_PRINT_PRT_NUP_ORDER_RLTB; >; }; HelpText [en-US] = "Select order in which pages are to be printed."; }; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index a0be94674328..cbecfd0e3f55 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -364,12 +364,18 @@ void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect ) int nX = 0, nY = 0; switch( mnOrderMode ) { - case SV_PRINT_PRT_NUP_ORDER_LRTD: + case SV_PRINT_PRT_NUP_ORDER_LRTB: nX = (i % mnColumns); nY = (i / mnColumns); break; - case SV_PRINT_PRT_NUP_ORDER_TDLR: + case SV_PRINT_PRT_NUP_ORDER_TBLR: nX = (i / mnRows); nY = (i % mnRows); break; + case SV_PRINT_PRT_NUP_ORDER_RLTB: + nX = mnColumns - 1 - (i % mnColumns); nY = (i / mnColumns); + break; + case SV_PRINT_PRT_NUP_ORDER_TBRL: + nX = mnColumns - 1 - (i / mnRows); nY = (i % mnRows); + break; } Size aTextSize( GetTextWidth( aPageText ), nTextHeight ); int nDeltaX = (aSubSize.Width() - aTextSize.Width()) / 2; @@ -2078,10 +2084,14 @@ void PrintDialog::updateNup() int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData( maNUpPage.maNupOrderBox.GetSelectEntryPos() ))); - if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTD ) + if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTB ) aMPS.nOrder = PrinterController::LRTB; - else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TDLR ) + else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TBLR ) aMPS.nOrder = PrinterController::TBLR; + else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_RLTB ) + aMPS.nOrder = PrinterController::RLTB; + else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TBRL ) + aMPS.nOrder = PrinterController::TBRL; int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData( maNUpPage.maNupOrientationBox.GetSelectEntryPos() ))); |