You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-Resolves-fdo-61656-use...

59 lines
2.6 KiB

From 569b4ed7a68751edafcca0b79e5c25d2370f96a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 1 Mar 2013 13:28:21 +0000
Subject: [PATCH] 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>
---
vcl/source/window/printdlg.cxx | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 0e63800..0e88fa2 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 )
--
1.8.1.2