]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/prntdlgg.cpp
compilation fixes for !wxUSE_POSTSCRIPT
[wxWidgets.git] / src / generic / prntdlgg.cpp
index 9a997388d1ae5c280299c058a22a45a44860f3b5..d68b9d4d11ce3a12a1bd9598f641696161e30715 100644 (file)
@@ -90,7 +90,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
 
   yPos += 35;
 
 
   yPos += 35;
 
-  wxString choices[2];
+  wxString *choices = new wxString[2];
   choices[0] = _("All");
   choices[1] = _("Pages");
   
   choices[0] = _("All");
   choices[1] = _("Pages");
   
@@ -139,6 +139,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data):
 
   // Calls wxWindow::OnInitDialog and then wxGenericPrintDialog::TransferDataToWindow
   InitDialog();
 
   // Calls wxWindow::OnInitDialog and then wxGenericPrintDialog::TransferDataToWindow
   InitDialog();
+  delete[] choices;
 }
 
 int wxGenericPrintDialog::ShowModal(void)
 }
 
 int wxGenericPrintDialog::ShowModal(void)
@@ -235,7 +236,7 @@ bool wxGenericPrintDialog::TransferDataToWindow(void)
          
          sprintf(buf, "%d", printData.GetFromPage());
          fromText->SetValue(buf);
          
          sprintf(buf, "%d", printData.GetFromPage());
          fromText->SetValue(buf);
-         sprintf(buf, "%d", printData.GetFromPage());
+         sprintf(buf, "%d", printData.GetToPage());
          toText->SetValue(buf);
          
          if (printData.GetAllPages())
          toText->SetValue(buf);
          
          if (printData.GetAllPages())
@@ -286,7 +287,7 @@ bool wxGenericPrintDialog::TransferDataFromWindow(void)
 
 wxDC *wxGenericPrintDialog::GetPrintDC(void)
 {
 
 wxDC *wxGenericPrintDialog::GetPrintDC(void)
 {
-  return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL);
+  return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL);
 }
 
 /*
 }
 
 /*
@@ -317,7 +318,7 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
 
   paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos);
 
 
   paperTypeChoice = CreatePaperTypeChoice(&xPos, &yPos);
 
-  wxString choices[2];
+  wxString *choices =  new wxString[2];
   choices[0] = _("Portrait");
   choices[1] = _("Landscape");
 
   choices[0] = _("Portrait");
   choices[1] = _("Landscape");
 
@@ -351,6 +352,7 @@ wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSe
   Centre(wxBOTH);
 
   InitDialog();
   Centre(wxBOTH);
 
   InitDialog();
+  delete[] choices;
 }
 
 wxGenericPrintSetupDialog::~wxGenericPrintSetupDialog(void)
 }
 
 wxGenericPrintSetupDialog::~wxGenericPrintSetupDialog(void)
@@ -492,7 +494,7 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
 
   xPos = 5;
 
 
   xPos = 5;
 
-  wxString choices[2];
+  wxString *choices = new wxString[2];
   choices[0] = _("Portrait");
   choices[1] = _("Landscape");
   orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
   choices[0] = _("Portrait");
   choices[1] = _("Landscape");
   orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"),
@@ -536,6 +538,7 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog(wxWindow *parent, wxPageSetup
   Centre(wxBOTH);
 
   InitDialog();
   Centre(wxBOTH);
 
   InitDialog();
+  delete [] choices;
 }
 
 wxGenericPageSetupDialog::~wxGenericPageSetupDialog(void)
 }
 
 wxGenericPageSetupDialog::~wxGenericPageSetupDialog(void)