mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix build on macOS
This commit is contained in:
@ -92,15 +92,15 @@ namespace XmlUtils
|
||||
bool ReadTillEnd(int nDepth = -2);
|
||||
|
||||
std::wstring GetName();
|
||||
std::string GetNameA();
|
||||
int GetDepth();
|
||||
bool IsEmptyNode();
|
||||
std::string GetNameA();
|
||||
int GetDepth();
|
||||
bool IsEmptyNode();
|
||||
|
||||
std::wstring GetText();
|
||||
std::string GetTextA();
|
||||
std::string GetTextA();
|
||||
|
||||
std::wstring GetText2();
|
||||
std::string GetText2A();
|
||||
std::string GetText2A();
|
||||
|
||||
std::wstring GetText3();
|
||||
|
||||
@ -112,7 +112,11 @@ namespace XmlUtils
|
||||
bool MoveToNextAttribute();
|
||||
bool MoveToElement();
|
||||
|
||||
bool IsEmptyElement();
|
||||
bool IsEmptyElement();
|
||||
|
||||
std::wstring GetNamespacePrefix();
|
||||
XmlNodeType GetNodeType();
|
||||
bool IsDefaultAttribute();
|
||||
};
|
||||
|
||||
class KERNEL_DECL IXmlDOMDocument
|
||||
|
||||
@ -187,4 +187,17 @@ namespace XmlUtils
|
||||
{
|
||||
return m_pInternal->IsEmptyElement();
|
||||
}
|
||||
|
||||
std::wstring CXmlLiteReader::GetNamespacePrefix()
|
||||
{
|
||||
return m_pInternal->GetNamespacePrefix();
|
||||
}
|
||||
XmlNodeType CXmlLiteReader::GetNodeType()
|
||||
{
|
||||
return m_pInternal->GetNodeType();
|
||||
}
|
||||
bool CXmlLiteReader::IsDefaultAttribute()
|
||||
{
|
||||
return m_pInternal->IsDefaultAttribute();
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
#include "../libxml2/libxml.h"
|
||||
#include "../libxml2/include/libxml/xmlreader.h"
|
||||
#include "../include/xmlutils.h"
|
||||
|
||||
namespace XmlUtils
|
||||
{
|
||||
@ -429,6 +430,25 @@ namespace XmlUtils
|
||||
return 1 == xmlTextReaderIsEmptyElement(reader) ? true : false;
|
||||
}
|
||||
|
||||
std::wstring GetNamespacePrefix()
|
||||
{
|
||||
xmlChar* pName = xmlTextReaderPrefix(reader);
|
||||
if (NULL == pName)
|
||||
return L"";
|
||||
|
||||
std::wstring sTemp = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pName, (LONG)strlen((const char*)pName));
|
||||
free(pName);
|
||||
return sTemp;
|
||||
}
|
||||
XmlNodeType GetNodeType()
|
||||
{
|
||||
return (XmlUtils::XmlNodeType)xmlTextReaderNodeType(reader);
|
||||
}
|
||||
bool IsDefaultAttribute()
|
||||
{
|
||||
return (0 != xmlTextReaderIsDefault(reader)) ? true : false;
|
||||
}
|
||||
|
||||
private:
|
||||
inline std::wstring GetXml(bool bInner)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user