[Libreoffice-commits] core.git: 2 commits - vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 1 05:30:15 PST 2013
vcl/source/gdi/sallayout.cxx | 5 +++++
vcl/source/window/printdlg.cxx | 12 +++---------
2 files changed, 8 insertions(+), 9 deletions(-)
New commits:
commit 9c7cf46fbf01f62ea9520c4ba1ec4748fe62b20b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 1 13:28:21 2013 +0000
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
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 2222eb8..e226f78 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 )
commit 6840ba613cc46ee65d58612ecabe748d539de9f5
Author: Herbert Dürr <hdu at apache.org>
Date: Fri May 4 08:01:31 2012 +0000
#i103131# in doubt treat unicode variation selectors as invisible(cherry picked from commit 179f88dfe5a1eb2ebd051d73b50f1e0af9c12fd9)
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 7171f59..695256c 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -253,6 +253,11 @@ inline bool IsControlChar( sal_UCS4 cChar )
// byte order markers and invalid unicode
if( (cChar == 0xFEFF) || (cChar == 0xFFFE) || (cChar == 0xFFFF) )
return true;
+ // variation selectors
+ if( (0xFE00 <= cChar) && (cChar <= 0xFE0F) )
+ return true;
+ if( (0xE0100 <= cChar) && (cChar <= 0xE01EF) )
+ return true;
return false;
}
More information about the Libreoffice-commits
mailing list