]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/richedit/wxllist.cpp
Missed labels to replace number of 'topicNNN' in anchors.
[wxWidgets.git] / samples / richedit / wxllist.cpp
index b5625309d22373e29b1e247d4b365a37e194fe2f..51ba0553e8e0b23d75c754b60d2e4f52e3552e95 100644 (file)
@@ -631,36 +631,36 @@ wxLayoutObjectCmd::Read(wxString &istr)
 
     if(obj->m_StyleInfo->m_fg_valid)
     {
-        int red, green, blue;
+        unsigned char red, green, blue;
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        red = (int) l;
+        red = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        green = (int) l;
+        green = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        blue = (int) l;
+        blue = (unsigned char) l;
 
         obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
     }
 
     if(obj->m_StyleInfo->m_bg_valid)
     {
-        int red, green, blue;
+        unsigned char red, green, blue;
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        red = (int) l;
+        red = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        green = (int) l;
+        green = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        blue = (int) l;
+        blue = (unsigned char) l;
 
         obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
     }
@@ -1100,7 +1100,7 @@ wxLayoutLine::Draw(wxDC &dc,
 
    pos.y += m_BaseLine;
 
-   CoordType xpos = 0; // cursorpos, lenght of line
+   CoordType xpos = 0; // cursorpos, length of line
 
    CoordType from, to;
 
@@ -1821,16 +1821,10 @@ wxLayoutList::SetFont(int family, int size, int style, int weight,
                       int underline, wxChar const *fg, wxChar const *bg)
 
 {
-   wxColour
-      *cfg = NULL,
-      *cbg = NULL;
+   wxColour cfg = wxTheColourDatabase->Find((fg)?fg:wxT("BLACK"));
+   wxColour cbg = wxTheColourDatabase->Find((bg)?bg:wxT("WHITE"));
 
-   if( fg )
-      cfg = wxTheColourDatabase->FindColour(fg);
-   if( bg )
-      cbg = wxTheColourDatabase->FindColour(bg);
-
-   SetFont(family,size,style,weight,underline,cfg,cbg);
+   SetFont(family,size,style,weight,underline,&cfg,&cbg);
 }
 
 void
@@ -3347,7 +3341,7 @@ bool wxLayoutPrintout::HasPage(int pageNum)
 }
 
 /*
-  Stupid wxWindows doesn't draw proper ellipses, so we comment this
+  Stupid wxWidgets doesn't draw proper ellipses, so we comment this
   out. It's a waste of paper anyway.
 */
 #if 0