From 01234e4d83a2ea871afbbfd54d9ea4eed9dc8cf5 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 24 Feb 2009 19:39:41 +0000 Subject: [PATCH] Syncing uppdev git-svn-id: svn://ultimatepp.org/upp/trunk@902 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppdev/CacheGlyphTest/main.cpp | 2 +- uppdev/XmlBug/XmlBug.cpp | 57 +++++----------------------------- uppdev/XmlBug/XmlBug.xml | 5 +-- 3 files changed, 12 insertions(+), 52 deletions(-) diff --git a/uppdev/CacheGlyphTest/main.cpp b/uppdev/CacheGlyphTest/main.cpp index db345bfb8..d491e6531 100644 --- a/uppdev/CacheGlyphTest/main.cpp +++ b/uppdev/CacheGlyphTest/main.cpp @@ -96,7 +96,7 @@ void Test::QuadraticOp(const Pointf& p1, const Pointf& p, bool rel) GUI_APP_MAIN { Test test; - test.Character(0, 0, 'G', Roman(100)); + test.Character(0, 0, 'Q', Roman(20).Italic()); DDUMP(quad); DDUMP(move); DDUMP(line); diff --git a/uppdev/XmlBug/XmlBug.cpp b/uppdev/XmlBug/XmlBug.cpp index 645f4eb02..26ffdb488 100644 --- a/uppdev/XmlBug/XmlBug.cpp +++ b/uppdev/XmlBug/XmlBug.cpp @@ -5,57 +5,16 @@ using namespace Upp; CONSOLE_APP_MAIN { try { - String d = LoadFile(GetDataFile("XmlBug.xml")); - - XmlParser p(d); - - while(!p.IsTag()) p.Skip(); - - p.PassTag("Settings"); - - String Host, CustomersUrl, CustomersSince, ProductsUrl, ProductsSince, OrdersUrl, OrdersSince; - int Port, CycleTime; - - while(!p.IsEof()) - { - if(p.Tag("WebServer")) - { - Host = p["Host"]; - Port = atoi(p["Port"]); - } - else if(p.Tag("CustomerList")) - { - CustomersUrl = p["Url"]; - DUMP(CustomersUrl); - CustomersSince = p["Since"]; - } - else if(p.Tag("ProductList")) - { - ProductsUrl = p["Url"]; - ProductsSince = p["Since"]; - } - else if(p.Tag("OrderList")) - { - OrdersUrl = p["Url"]; - OrdersSince = p["Since"]; - } - else if(p.Tag("Cycle")) - { - CycleTime = atoi(p["Time"]); - if (CycleTime <= 0) - { - CycleTime = 10; - } - } - else - { - p.Skip(); - } - } + XmlNode xn = ParseXML(LoadFile(GetDataFile("XmlBug.xml"))); + LOG(xn["Settings"]["Cycle"].Attr("Time")); + LOG(xn["Settings"]["Cycle"].Attr("test1")); + LOG(xn["Settings"]["Cycle"].Attr("test2")); + LOG(xn["Settings"]["Cycle"].Attr("test3")); + LOG(xn["Settings"]["OrderList"].Attr("Url")); } - catch(XmlError) + catch(XmlError e) { - LOG("Error"); + LOG("Error " << e); } } diff --git a/uppdev/XmlBug/XmlBug.xml b/uppdev/XmlBug/XmlBug.xml index 916e2c285..7e3feb327 100644 --- a/uppdev/XmlBug/XmlBug.xml +++ b/uppdev/XmlBug/XmlBug.xml @@ -1,7 +1,8 @@ + - - + +