- wxLayoutObjectCmd *obj = new wxLayoutObjectCmd;
-
- wxString tmp;
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->family);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->size);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->style);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->weight);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->underline);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->m_fg_valid);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->m_bg_valid);
- if(obj->m_StyleInfo->m_fg_valid)
- {
- int red, green, blue;
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &red);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &green);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &blue);
- obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
- }
- if(obj->m_StyleInfo->m_bg_valid)
- {
- int red, green, blue;
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &red);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &green);
- ReadString(tmp, istr);
- sscanf(tmp.c_str(),"%d", &blue);
- obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
- }
- return obj;
+ wxLayoutObjectCmd *obj = new wxLayoutObjectCmd;
+
+ long l = 0;
+ wxString tmp;
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->family = (int) l;
+
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->size = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->style = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->weight = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->underline = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->m_fg_valid = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ obj->m_StyleInfo->m_bg_valid = (int) l;
+
+ if(obj->m_StyleInfo->m_fg_valid)
+ {
+ int red, green, blue;
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ red = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ green = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ blue = (int) l;
+
+ obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
+ }
+
+ if(obj->m_StyleInfo->m_bg_valid)
+ {
+ int red, green, blue;
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ red = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ green = (int) l;
+
+ ReadString(tmp, istr);
+ tmp.ToLong(&l);
+ blue = (int) l;
+
+ obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
+ }
+
+ return obj;