summaryrefslogtreecommitdiff
path: root/vcl/source/window/printdlg.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-01 13:28:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-01 13:29:55 +0000
commit9c7cf46fbf01f62ea9520c4ba1ec4748fe62b20b (patch)
tree180da5720a046a9a12ad10c55ff2a8d2697f6703 /vcl/source/window/printdlg.cxx
parent6840ba613cc46ee65d58612ecabe748d539de9f5 (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
Diffstat (limited to 'vcl/source/window/printdlg.cxx')
-rw-r--r--vcl/source/window/printdlg.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 2222eb8f876d..e226f78c64e6 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 );
@@ -1438,8 +1434,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 )
@@ -1449,8 +1444,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 )