m_custColours[i] = colour;
}
-wxColour wxColourData::GetCustomColour(int i)
+wxColour wxColourData::GetCustomColour(int i) const
{
wxCHECK_MSG( i >= 0 && i < NUM_CUSTOM, wxColour(0,0,0),
_T("custom colour index out of range") );
m_nativeData->TransferTo( *this ) ;
}
-void wxPrintData::operator=(const wxPrintData& data)
+wxPrintData& wxPrintData::operator=(const wxPrintData& data)
{
+ if ( &data == this )
+ return *this;
+
m_printNoCopies = data.m_printNoCopies;
m_printCollate = data.m_printCollate;
m_printOrientation = data.m_printOrientation;
m_privData = new char[m_privDataLen];
memcpy( m_privData, data.GetPrivData(), m_privDataLen );
}
+
+ return *this;
}
// Is this data OK for showing the print dialog?
// paper id
void wxPageSetupDialogData::CalculateIdFromPaperSize()
{
- wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
+ wxASSERT_MSG( (wxThePrintPaperDatabase != NULL),
wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") );
wxSize sz = GetPaperSize();
// Use paper id in wxPrintData to set this object's paper size
void wxPageSetupDialogData::CalculatePaperSizeFromId()
{
- wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
+ wxASSERT_MSG( (wxThePrintPaperDatabase != NULL),
wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") );
wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId());