本文整理汇总了C++中xmlutils::CXmlNode::GetAttribute方法的典型用法代码示例。如果您正苦于以下问题:C++ CXmlNode::GetAttribute方法的具体用法?C++ CXmlNode::GetAttribute怎么用?C++ CXmlNode::GetAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xmlutils::CXmlNode
的用法示例。
在下文中一共展示了CXmlNode::GetAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromXMLShapeType
bool CPPTShape::LoadFromXMLShapeType(XmlUtils::CXmlNode& oNodeShapeType) // vml object
{ // из за особенносей форматирования vmlDrawing могут вылезти пустые текстовые значения - value ..
std::wstring sId = oNodeShapeType.GetAttribute(_T("o:spt"));
bool bIsNeedRecalc = true;
if (sId != _T(""))
{
int id = XmlUtils::GetInteger(sId);
if (id > 0)
{
SetShapeType((PPTShapes::ShapeType)id);
//ReCalculate();
m_eType = (PPTShapes::ShapeType)id;
}
}
std::wstring strAdj = oNodeShapeType.GetAttribute(_T("adj"));
if (strAdj != _T(""))
LoadAdjustValuesList(strAdj);
XmlUtils::CXmlNode oNodeGuides;
if (oNodeShapeType.GetNode(_T("v:formulas"), oNodeGuides))
{
LoadGuidesList(oNodeGuides.GetXml());
}
XmlUtils::CXmlNode oNodePath;
if (oNodeShapeType.GetNode(_T("v:path"), oNodePath))
{
std::wstring strTextR = oNodePath.GetAttribute(_T("textboxrect"));
if (strTextR != _T(""))
LoadTextRect(strTextR);
}
XmlUtils::CXmlNode oNodeAHs;
if (oNodeShapeType.GetNode(_T("v:handles"), oNodeAHs))
{
LoadAHList(oNodeAHs);
}
std::wstring strPath = oNodeShapeType.GetAttribute(_T("path"));
if (strPath != _T(""))
{
LoadPathList(strPath);
}
XmlUtils::CXmlNode oNodeTextPath;
if (oNodeShapeType.GetNode(_T("v:textpath"), oNodeTextPath))
{
if (m_eType < PPTShapes::ShapeType::sptCTextPlain || m_eType > PPTShapes::ShapeType::sptCTextCanDown)
m_eType = PPTShapes::ShapeType::sptCTextPlain;
}
std::wstring strFilled = oNodeShapeType.GetAttribute(_T("filled"));
std::wstring strStroked = oNodeShapeType.GetAttribute(_T("stroked"));
if (strFilled != _T(""))
{
if (strFilled == _T("false") || strFilled == _T("f"))
m_bIsFilled = false;
else
m_bIsFilled = true;
}
if (strStroked != _T(""))
{
if (strStroked == _T("false") || strStroked == _T("f"))
m_bIsStroked = false;
else
m_bIsStroked = true;
}
XmlUtils::CXmlNode oNodeSignature;
if (oNodeShapeType.GetNode(_T("o:signatureline"), oNodeSignature))
{
m_oSignatureLine = oNodeSignature;
}
ReCalculate();
return true;
}