projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed obsolete file
[wxWidgets.git]
/
src
/
common
/
prntbase.cpp
diff --git
a/src/common/prntbase.cpp
b/src/common/prntbase.cpp
index a233f0f2067fb129ed0865a580b52c9778187af9..8e7e80b76929dc40fe1778d31c59e0a66ed059e4 100644
(file)
--- a/
src/common/prntbase.cpp
+++ b/
src/common/prntbase.cpp
@@
-115,7
+115,7
@@
wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout *WXUNUSE
return dialog;
}
return dialog;
}
-void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), c
har *
message)
+void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), c
onst wxString&
message)
{
wxMessageBox(message, _("Printing Error"), wxOK, parent);
}
{
wxMessageBox(message, _("Printing Error"), wxOK, parent);
}
@@
-612,7
+612,8
@@
bool wxPrintPreviewBase::SetCurrentPage(int pageNum)
if (m_previewCanvas)
{
if (m_previewCanvas)
{
- RenderPage(pageNum);
+ if (!RenderPage(pageNum))
+ return FALSE;
m_previewCanvas->Refresh();
}
return TRUE;
m_previewCanvas->Refresh();
}
return TRUE;
@@
-623,7
+624,8
@@
bool wxPrintPreviewBase::PaintPage(wxWindow *canvas, wxDC& dc)
DrawBlankPage(canvas, dc);
if (!m_previewBitmap)
DrawBlankPage(canvas, dc);
if (!m_previewBitmap)
- RenderPage(m_currentPage);
+ if (!RenderPage(m_currentPage))
+ return FALSE;
if (!m_previewBitmap)
return FALSE;
if (!m_previewBitmap)
return FALSE;
@@
-682,8
+684,10
@@
bool wxPrintPreviewBase::RenderPage(int pageNum)
m_previewBitmap = new wxBitmap((int)actualWidth, (int)actualHeight);
if (!m_previewBitmap || !m_previewBitmap->Ok())
{
m_previewBitmap = new wxBitmap((int)actualWidth, (int)actualHeight);
if (!m_previewBitmap || !m_previewBitmap->Ok())
{
- if (m_previewBitmap)
+ if (m_previewBitmap)
{
delete m_previewBitmap;
delete m_previewBitmap;
+ m_previewBitmap = NULL;
+ }
wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
return FALSE;
}
wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
return FALSE;
}
@@
-713,6
+717,7
@@
bool wxPrintPreviewBase::RenderPage(int pageNum)
memoryDC.SelectObject(wxNullBitmap);
delete m_previewBitmap;
memoryDC.SelectObject(wxNullBitmap);
delete m_previewBitmap;
+ m_previewBitmap = NULL;
return FALSE;
}
return FALSE;
}