Commit 6cd5fbca authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 7c964b3f
......@@ -197,7 +197,7 @@ namespace PPTX
virtual std::wstring toXML() const
{
if (Fill.IsInit())
Fill->toXML();
return Fill->toXML();
return _T("");
}
......
......@@ -251,31 +251,32 @@ namespace XmlUtils
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CAttribute& oAttr)
{
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T(" />");
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L"/>";
}
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CNodeValue& oNode)
{
if (_T("") == oNode.m_strValue)
return _T("<") + strName + _T("/>");
if (oNode.m_strValue.empty())
return L"<" + strName + L"/>";
return _T("<") + strName + _T(">") + oNode.m_strValue + _T("</") + strName + _T(">");
return L"<" + strName + L">" + oNode.m_strValue + L"</" + strName + L">";
}
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CAttribute& oAttr, const CNodeValue& oNode)
{
if (_T("") == oNode.m_strValue)
if ( oNode.m_strValue.empty())
return CreateNode(strName, oAttr);
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T(">") + oNode.m_strValue + _T("</") + strName + _T(">");
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L">" + oNode.m_strValue + L"</" + strName + L">";
}
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const CAttribute& oAttr, const std::wstring& strXml)
{
if (_T("") != strXml)
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T(">") + strXml + _T("</") + strName + _T(">");
return _T("<") + strName + _T(" ") + oAttr.m_strValue + _T("/>");
if (!strXml.empty())
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L">" + strXml + L"</" + strName + L">";
return L"<" + strName + (oAttr.m_strValue.empty() ? L"" : L" " + oAttr.m_strValue) + L"/>";
}
AVSINLINE std::wstring CreateNode(const std::wstring& strName, const std::wstring& strXml)
{
return _T("<") + strName + _T(">") + strXml + _T("</") + strName + _T(">");
return L"<" + strName + L">" + strXml + L"</" + strName + L">";
}
AVSINLINE void SaveToFile(const std::wstring& strFile, const std::wstring& strXml)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment