X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/925e9792d32e353233985f53a4845f154e455a58..37f6a080f43058b4575bece0eb11ad99fa63287d:/samples/richedit/wxllist.cpp?ds=sidebyside diff --git a/samples/richedit/wxllist.cpp b/samples/richedit/wxllist.cpp index 0025d971b3..31e5ba8f5d 100644 --- a/samples/richedit/wxllist.cpp +++ b/samples/richedit/wxllist.cpp @@ -325,7 +325,7 @@ wxLayoutObjectText::GetOffsetScreen(wxDC &dc, CoordType xpos) const &width, &height, &descent); offs++; } - /* We have to substract 1 to compensate for the offs++, and another + /* We have to subtract 1 to compensate for the offs++, and another one because we don't want to position the cursor behind the object what we clicked on, but before - otherwise it looks funny. */ @@ -2141,7 +2141,7 @@ wxLayoutList::MoveCursorWord(int n, bool untilNext) CoordType moveDelta = p - start - offset; if ( (n < 0) && (offset == tobj->GetLength() - 1) ) { - // because we substracted 1 from offset in this case above, now + // because we subtracted 1 from offset in this case above, now // compensate for it moveDelta--; } @@ -3303,10 +3303,12 @@ void wxLayoutPrintout::GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, /* We allocate a temporary wxDC for printing, so that we can determine the correct paper size and scaling. We don't actually print anything on it. */ -#if defined(__WXMSW__) +#if defined(__WXMSW__) || defined(__WXMAC__) wxPrinterDC *psdc = new wxPrinterDC(wxEmptyString,wxEmptyString,_T(WXLLIST_TEMPFILE),false); #else - wxPostScriptDC *psdc = new wxPostScriptDC(WXLLIST_TEMPFILE,false); + wxPrintData data; + data.SetFilename(WXLLIST_TEMPFILE); + wxPostScriptDC *psdc = new wxPostScriptDC(data); #endif psdc->StartDoc(m_title);