This commit is contained in:
Elena.Subbotina
2022-08-31 20:47:31 +03:00
parent 2f6aebcad5
commit 5176d58940
4 changed files with 13 additions and 6 deletions

View File

@ -85,6 +85,10 @@ std::wstring PropertyString::toString()
{
return value;
}
bool PropertyString::IsEmpty()
{
return value.empty();
}
//-------------------------------------------------------------------
bool PropertyWString::Read(XLS::CFStreamPtr stream)
{

View File

@ -63,6 +63,7 @@ public:
virtual bool Read(XLS::CFStreamPtr stream);
virtual std::wstring toString();
bool IsEmpty();
std::wstring value;
unsigned short code_page;

View File

@ -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;

View File

@ -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")
{