void CMeta::Load(MSXML::IXMLDOMElementPtr pGO) { MSXML::IXMLDOMElementPtr pStatic; MSXML::IXMLDOMElementPtr pDynamic; MSXML::IXMLDOMElementPtr pAttr; _variant_t val; pStatic=pGO->selectSingleNode(L"./static"); //position pAttr=pStatic->selectSingleNode(L"./position"); //x1 val=pAttr->getAttribute(L"x1"); val.ChangeType(VT_I4); m_lx1=val.lVal; m_lox1=m_lx1; //y1 val=pAttr->getAttribute(L"y1"); val.ChangeType(VT_I4); m_ly1=val.lVal; m_loy1=m_ly1; //x2 val=pAttr->getAttribute(L"x2"); val.ChangeType(VT_I4); m_lx2=val.lVal; m_lox2=m_lx2; //y2 val=pAttr->getAttribute(L"y2"); val.ChangeType(VT_I4); m_ly2=val.lVal; m_loy2=m_ly2; //file pAttr=pStatic->selectSingleNode(L"./file"); //path val=pAttr->getAttribute(L"path"); m_sPicFile=val.bstrVal; //load dynamic attribution if have pDynamic=pGO->selectSingleNode(L"./dynamic"); val=pDynamic->getAttribute(L"linked"); val.ChangeType(VT_BOOL); if(val.boolVal){ m_DnyAttr.Load(pDynamic); m_DnyAttr.m_Linked=true; }else{ m_DnyAttr.m_Linked=false; } }
void CArc::Load(MSXML::IXMLDOMElementPtr pGO) { MSXML::IXMLDOMElementPtr pStatic; MSXML::IXMLDOMElementPtr pDynamic; MSXML::IXMLDOMElementPtr pAttr; _variant_t val; pStatic=pGO->selectSingleNode(L"./static"); //position pAttr=pStatic->selectSingleNode(L"./position"); //x1 val=pAttr->getAttribute(L"x1"); val.ChangeType(VT_I4); m_lx1=val.lVal; //y1 val=pAttr->getAttribute(L"y1"); val.ChangeType(VT_I4); m_ly1=val.lVal; //x2 val=pAttr->getAttribute(L"x2"); val.ChangeType(VT_I4); m_lx2=val.lVal; //y2 val=pAttr->getAttribute(L"y2"); val.ChangeType(VT_I4); m_ly2=val.lVal; //x3 val=pAttr->getAttribute(L"x3"); val.ChangeType(VT_I4); m_lx3=val.lVal; //y3 val=pAttr->getAttribute(L"y3"); val.ChangeType(VT_I4); m_ly3=val.lVal; //x4 val=pAttr->getAttribute(L"x4"); val.ChangeType(VT_I4); m_lx4=val.lVal; //y4 val=pAttr->getAttribute(L"y4"); val.ChangeType(VT_I4); m_ly4=val.lVal; //pen pAttr=pStatic->selectSingleNode(L"./pen"); //style val=pAttr->getAttribute(L"s"); val.ChangeType(VT_UI4); m_pen.lopnStyle=val.ulVal; //width val=pAttr->getAttribute(L"w"); val.ChangeType(VT_I4); m_pen.lopnWidth.x=val.lVal; //color val=pAttr->getAttribute(L"c"); val.ChangeType(VT_UI4); m_pen.lopnColor=val.ulVal; //load dynamic attribution if have pDynamic=pGO->selectSingleNode(L"./dynamic"); val=pDynamic->getAttribute(L"linked"); val.ChangeType(VT_BOOL); if(val.boolVal){ m_DnyAttr.Load(pDynamic); m_DnyAttr.m_Linked=true; }else{ m_DnyAttr.m_Linked=false; } }
void CText::Load(MSXML::IXMLDOMElementPtr pGO) { MSXML::IXMLDOMElementPtr pStatic; MSXML::IXMLDOMElementPtr pDynamic; MSXML::IXMLDOMElementPtr pAttr; _variant_t val; pStatic=pGO->selectSingleNode(L"./static"); //position pAttr=pStatic->selectSingleNode(L"./position"); //x1 val=pAttr->getAttribute(L"x1"); val.ChangeType(VT_I4); m_lx1=val.lVal; m_lox1=m_lx1; //y1 val=pAttr->getAttribute(L"y1"); val.ChangeType(VT_I4); m_ly1=val.lVal; m_loy1=m_ly1; //x2 val=pAttr->getAttribute(L"x2"); val.ChangeType(VT_I4); m_lx2=val.lVal; m_lox2=m_lx2; //y2 val=pAttr->getAttribute(L"y2"); val.ChangeType(VT_I4); m_ly2=val.lVal; m_loy2=m_ly2; //face color pAttr=pStatic->selectSingleNode(L"./color"); //color val=pAttr->getAttribute(L"c"); val.ChangeType(VT_UI4); m_FaceColor=val.ulVal; m_oFaceColor=m_FaceColor; //font pAttr=pStatic->selectSingleNode(L"./font"); //lfHeight val=pAttr->getAttribute(L"h"); val.ChangeType(VT_I4); m_font.lfHeight=val.ulVal; //lfWidth val=pAttr->getAttribute(L"wd"); val.ChangeType(VT_I4); m_font.lfWidth=val.ulVal; //lfEscapement val=pAttr->getAttribute(L"e"); val.ChangeType(VT_I4); m_font.lfEscapement=val.ulVal; //lfOrientation val=pAttr->getAttribute(L"o"); val.ChangeType(VT_I4); m_font.lfOrientation=val.ulVal; //lfWeight val=pAttr->getAttribute(L"wg"); val.ChangeType(VT_I4); m_font.lfWeight=val.ulVal; //lfItalic val=pAttr->getAttribute(L"i"); val.ChangeType(VT_UI1); m_font.lfItalic=val.ulVal; //lfUnderline val=pAttr->getAttribute(L"u"); val.ChangeType(VT_UI1); m_font.lfUnderline=val.ulVal; //lfStrikeOut val=pAttr->getAttribute(L"so"); val.ChangeType(VT_UI1); m_font.lfStrikeOut=val.ulVal; //lfCharSet val=pAttr->getAttribute(L"cs"); val.ChangeType(VT_UI1); m_font.lfCharSet=val.ulVal; //lfOutPrecision val=pAttr->getAttribute(L"op"); val.ChangeType(VT_UI1); m_font.lfOutPrecision=val.ulVal; //lfClipPrecision val=pAttr->getAttribute(L"cp"); val.ChangeType(VT_UI1); m_font.lfClipPrecision=val.ulVal; //lfQuality val=pAttr->getAttribute(L"q"); val.ChangeType(VT_UI1); m_font.lfQuality=val.ulVal; //lfPitchAndFamily val=pAttr->getAttribute(L"paf"); val.ChangeType(VT_UI1); m_font.lfPitchAndFamily=val.ulVal; //lfFaceName val=pAttr->getAttribute(L"fn"); CString strFaceName=val.bstrVal; sprintf(m_font.lfFaceName,"%s",(LPCTSTR)strFaceName); //text pAttr=pStatic->selectSingleNode(L"./text"); val=pAttr->getAttribute(L"t"); m_text=val.bstrVal; //load dynamic attribution if have pDynamic=pGO->selectSingleNode(L"./dynamic"); val=pDynamic->getAttribute(L"linked"); val.ChangeType(VT_BOOL); if(val.boolVal) { m_DnyAttr.Load(pDynamic); m_DnyAttr.m_Linked=true; } else { m_DnyAttr.m_Linked=false; } }