diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-03-01 13:28:21 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-02 01:54:52 +0000 |
commit | 569b4ed7a68751edafcca0b79e5c25d2370f96a4 (patch) | |
tree | dc54f6126ad1ddf09c7c6923e6ebac57e6fe6bc9 | |
parent | 38fed1b25a1679ed4384ef0ed9ff4669f67a6723 (diff) |
Resolves: fdo#61656 use order and orientation combobox select pos as index
not the associated entry data, which isn't set for these simple
1 to 1 position -> data comboboxes
Change-Id: I0c73786bca00684cedc4672d0ad5e61d0c1f9bd7
(cherry picked from commit 9c7cf46fbf01f62ea9520c4ba1ec4748fe62b20b)
Reviewed-on: https://gerrit.libreoffice.org/2490
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | vcl/source/window/printdlg.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 0e63800f9d58..0e88fa2ed8b1 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -449,11 +449,7 @@ void PrintDialog::NUpTabPage::initFromMultiPageSetup( const vcl::PrinterControll mpBorderCB->Check( i_rMPS.bDrawBorder ); mpNupRowsEdt->SetValue( i_rMPS.nRows ); mpNupColEdt->SetValue( i_rMPS.nColumns ); - for( sal_uInt16 i = 0; i < mpNupOrderBox->GetEntryCount(); i++ ) - { - if( int(sal_IntPtr(mpNupOrderBox->GetEntryData( i ))) == i_rMPS.nOrder ) - mpNupOrderBox->SelectEntryPos( i ); - } + mpNupOrderBox->SelectEntryPos( i_rMPS.nOrder ); if( i_rMPS.nRows != 1 || i_rMPS.nColumns != 1 ) { mpNupPagesBox->SelectEntryPos( mpNupPagesBox->GetEntryCount()-1 ); @@ -1444,8 +1440,7 @@ void PrintDialog::updateNup() aMPS.bDrawBorder = maNUpPage.mpBorderCB->IsChecked(); - int nOrderMode = int(sal_IntPtr(maNUpPage.mpNupOrderBox->GetEntryData( - maNUpPage.mpNupOrderBox->GetSelectEntryPos() ))); + int nOrderMode = maNUpPage.mpNupOrderBox->GetSelectEntryPos(); if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTB ) aMPS.nOrder = PrinterController::LRTB; else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TBLR ) @@ -1455,8 +1450,7 @@ void PrintDialog::updateNup() else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TBRL ) aMPS.nOrder = PrinterController::TBRL; - int nOrientationMode = int(sal_IntPtr(maNUpPage.mpNupOrientationBox->GetEntryData( - maNUpPage.mpNupOrientationBox->GetSelectEntryPos() ))); + int nOrientationMode = maNUpPage.mpNupOrientationBox->GetSelectEntryPos(); if( nOrientationMode == SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE ) aMPS.aPaperSize = maNupLandscapeSize; else if( nOrientationMode == SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT ) |