Fix using custom paper format in wxOSX.

Do actually use the custom paper object the code creates.

Closes #16959.
This commit is contained in:
Vadim Zeitlin
2015-04-21 15:48:17 +02:00
parent b6d3a64fae
commit c2543cd474
2 changed files with 13 additions and 2 deletions

View File

@@ -623,6 +623,7 @@ wxOSX:
- Compilation fix for wxWebView under 10.10.
- Fix conversion of wxBitmap to wxImage in 64 bit builds.
- Fix wxFileDialog::GetFilterIndex() for file open dialogs (phsilva).
- Fix custom paper support (tijsv).
3.0.2: (released 2014-10-06)

View File

@@ -198,8 +198,18 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data )
wxString id, name(wxT("Custom paper"));
id.Printf(wxT("wxPaperCustom%dx%d"), papersize.x, papersize.y);
PMPaperCreateCustom(printer, wxCFStringRef( id, wxFont::GetDefaultEncoding() ), wxCFStringRef( name, wxFont::GetDefaultEncoding() ),
papersize.x, papersize.y, &margins, &paper);
if ( PMPaperCreateCustom
(
printer,
wxCFStringRef(id, wxFont::GetDefaultEncoding()),
wxCFStringRef(name, wxFont::GetDefaultEncoding()),
papersize.x, papersize.y,
&margins,
&paper
) )
{
bestPaper = paper;
}
}
if ( bestPaper != kPMNoData )
{