void FontTable::Font::fromXML(XmlUtils::CXmlNode& oNode) { if ( _T("w:font") == oNode.GetName() ) { m_name = std::wstring(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:name")))); XmlUtils::CXmlNode oChild; if ( oNode.GetNode( _T("w:panose1"), oChild ) ) m_panose1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:charset"), oChild ) ) m_charset = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:family"), oChild ) ) m_family = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:pitch"), oChild ) ) m_pitch = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:sig"), oChild ) ) { m_usb0 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb0")))); m_usb1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb1")))); m_usb2 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb2")))); m_usb3 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb3")))); m_csb0 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:csb0")))); m_csb1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:csb1")))); } } }
void Numbering::Level::fromXML(XmlUtils::CXmlNode& oNode) { if ( _T("w:lvl") == oNode.GetName() ) { Ilvl = _wtoi(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:ilvl")))); Tentative = _wtoi(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:tentative")))); Tplc = std::wstring(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:tentative")))); XmlUtils::CXmlNode oChild; if ( oNode.GetNode( _T("w:suff"), oChild ) ) Suffix = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:lvlText"), oChild ) ) Text = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:lvlJc"), oChild ) ) Align = Logic::Align(std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))))); if ( oNode.GetNode( _T("w:start"), oChild ) ) Start = _wtoi(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))); if ( oNode.GetNode( _T("w:numFmt"), oChild ) ) { OOX::Logic::NumFormat fmt; fmt.fromXML(oChild); NumFmt = fmt; } } }