mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #58815
This commit is contained in:
@ -85,6 +85,10 @@ std::wstring PropertyString::toString()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
bool PropertyString::IsEmpty()
|
||||
{
|
||||
return value.empty();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
bool PropertyWString::Read(XLS::CFStreamPtr stream)
|
||||
{
|
||||
|
||||
@ -63,6 +63,7 @@ public:
|
||||
|
||||
virtual bool Read(XLS::CFStreamPtr stream);
|
||||
virtual std::wstring toString();
|
||||
bool IsEmpty();
|
||||
|
||||
std::wstring value;
|
||||
unsigned short code_page;
|
||||
|
||||
@ -98,6 +98,8 @@ namespace OLEPS
|
||||
virtual bool Read(XLS::CFStreamPtr stream) = 0;
|
||||
virtual std::wstring toString() = 0;
|
||||
|
||||
virtual bool IsEmpty() { return false; }
|
||||
|
||||
unsigned int prop_type;
|
||||
unsigned short value_type;
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ namespace OLEPS
|
||||
CP_XML_ATTR(L"xmlns:vt", L"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes");
|
||||
|
||||
prop = GetProperty(TEMPLATE);
|
||||
if (prop)
|
||||
if ((prop) && (false == prop->IsEmpty()))
|
||||
{
|
||||
CP_XML_NODE(L"Template")
|
||||
{
|
||||
@ -128,7 +128,7 @@ namespace OLEPS
|
||||
}
|
||||
}
|
||||
prop = GetProperty(MANAGER);
|
||||
if (prop)
|
||||
if ((prop) && (false == prop->IsEmpty()))
|
||||
{
|
||||
CP_XML_NODE(L"Manager")
|
||||
{
|
||||
@ -136,7 +136,7 @@ namespace OLEPS
|
||||
}
|
||||
}
|
||||
prop = GetProperty(COMPANY);
|
||||
if (prop)
|
||||
if ((prop) && (false == prop->IsEmpty()))
|
||||
{
|
||||
CP_XML_NODE(L"Company")
|
||||
{
|
||||
@ -176,7 +176,7 @@ namespace OLEPS
|
||||
}
|
||||
}
|
||||
prop = GetProperty(PRESFORMAT);
|
||||
if (prop)
|
||||
if ((prop) && (false == prop->IsEmpty()))
|
||||
{
|
||||
CP_XML_NODE(L"PresentationFormat")
|
||||
{
|
||||
@ -304,7 +304,7 @@ namespace OLEPS
|
||||
sApplication = NSSystemUtils::gc_EnvApplicationNameDefault;
|
||||
|
||||
prop = GetProperty(APPNAME);
|
||||
if (prop)
|
||||
if ((prop) && (false == prop->IsEmpty()))
|
||||
{
|
||||
CP_XML_STREAM() << (prop->toString() + L"/" + sApplication);
|
||||
}
|
||||
@ -318,7 +318,7 @@ namespace OLEPS
|
||||
}
|
||||
}
|
||||
prop = GetProperty(DOCVERSION);
|
||||
if (prop)
|
||||
if ((prop) && (false == prop->IsEmpty()))
|
||||
{
|
||||
CP_XML_NODE(L"AppVersion")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user