|
|
|
|
@ -121,6 +121,8 @@
|
|
|
|
|
#include "../../XlsbFormat/Biff12_unions/PCDSCSET.h"
|
|
|
|
|
#include "../../XlsbFormat/Biff12_records/BeginPCDSCSet.h"
|
|
|
|
|
#include "../../XlsbFormat/Biff12_records/PCRRecord.h"
|
|
|
|
|
#include "../../XlsbFormat/Biff12_unions/PNAMES.h"
|
|
|
|
|
#include "../../XlsbFormat/Biff12_unions/PNAME.h"
|
|
|
|
|
|
|
|
|
|
#include <boost/range/adaptor/reversed.hpp>
|
|
|
|
|
|
|
|
|
|
@ -2345,8 +2347,10 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
{
|
|
|
|
|
m_oColPageCount = ptr->ccolPage;
|
|
|
|
|
m_oFirstDataCol = ptr->colFirstData;
|
|
|
|
|
m_oFirstDataRow = ptr->rwFirstData;
|
|
|
|
|
m_oFirstHeaderRow = ptr->rwFirstHead;
|
|
|
|
|
if(ptr->rwFirstHead < ptr->rwFirstData)
|
|
|
|
|
m_oFirstDataRow = ptr->rwFirstData;
|
|
|
|
|
|
|
|
|
|
m_oRowPageCount = ptr->crwPage;
|
|
|
|
|
|
|
|
|
|
if(!ptr->rfxGeom.toString().empty())
|
|
|
|
|
@ -2669,10 +2673,22 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
{
|
|
|
|
|
m_oCount = (_UINT32)ptr->m_arPCDFIELD.size();
|
|
|
|
|
|
|
|
|
|
for(auto &item : ptr->m_arPCDFIELD)
|
|
|
|
|
{
|
|
|
|
|
auto field = static_cast<XLSB::PCDFIELD*>(item.get());
|
|
|
|
|
if(field == nullptr)
|
|
|
|
|
break;
|
|
|
|
|
auto BeginField = static_cast<XLSB::BeginPCDField*>(field->m_BrtBeginPCDField.get());
|
|
|
|
|
if(BeginField == nullptr)
|
|
|
|
|
break;
|
|
|
|
|
ptr->global_info->arPivotCacheSxNames.push_back(BeginField->stFldName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(auto &item : ptr->m_arPCDFIELD)
|
|
|
|
|
{
|
|
|
|
|
m_arrItems.push_back(new CPivotCacheField(item));
|
|
|
|
|
}
|
|
|
|
|
ptr->global_info->arPivotCacheSxNames.clear();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CPivotCacheFields::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
|
|
|
|
@ -2740,7 +2756,20 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
auto ptr = static_cast<XLSB::PCDFIELD*>(obj.get());
|
|
|
|
|
|
|
|
|
|
if(ptr != nullptr)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
if(ptr->m_PNAMES != nullptr)
|
|
|
|
|
{
|
|
|
|
|
XLSB::PNAMES* names = static_cast<XLSB::PNAMES*>(ptr->m_PNAMES.get());
|
|
|
|
|
for(auto i:names->m_arPNAME)
|
|
|
|
|
{
|
|
|
|
|
auto name = static_cast<XLSB::PNAME*>(i.get());
|
|
|
|
|
XLS::_sx_name nameStruct;
|
|
|
|
|
nameStruct.name = name->m_BrtBeginPName;
|
|
|
|
|
ptr->global_info->arPivotSxNames.push_back(nameStruct);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReadAttributes(ptr->m_BrtBeginPCDField);
|
|
|
|
|
|
|
|
|
|
if(ptr->m_PCDFATBL != nullptr)
|
|
|
|
|
@ -2748,6 +2777,9 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
|
|
|
|
|
if(ptr->m_PCDFGROUP != nullptr)
|
|
|
|
|
m_oFieldGroup = ptr->m_PCDFGROUP;
|
|
|
|
|
|
|
|
|
|
if(!ptr->global_info->arPivotSxNames.empty())
|
|
|
|
|
ptr->global_info->arPivotSxNames.clear();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CPivotCacheField::ReadAttributes(XLS::BaseObjectPtr& obj)
|
|
|
|
|
@ -3019,6 +3051,8 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(m_oCount->GetValue() != m_arrItems.size())
|
|
|
|
|
*m_oCount = m_arrItems.size();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CSharedItems::ReadAttributes(XLS::BaseObjectPtr& obj)
|
|
|
|
|
@ -3405,16 +3439,21 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
WritingStringNullableAttrInt(L"bc", m_oBackColor, m_oBackColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"fc", m_oForeColor, m_oForeColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"in", m_oFormatIndex, m_oFormatIndex->GetValue());
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
if(!m_arrItems.empty())
|
|
|
|
|
{
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</s>");
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</s>");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
writer.WriteString(L"/>");
|
|
|
|
|
}
|
|
|
|
|
void CPivotCharacterValue::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
|
|
|
|
{
|
|
|
|
|
@ -3491,8 +3530,8 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
|
|
|
|
|
if(!ptr->info.stCaption.value().empty())
|
|
|
|
|
m_oCaption = ptr->info.stCaption.value();
|
|
|
|
|
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
if(ptr->info.fFmla)
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
m_oUnused = ptr->info.fGhost;
|
|
|
|
|
m_oCount = ptr->info.cIMemProps;
|
|
|
|
|
|
|
|
|
|
@ -3525,16 +3564,23 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
WritingStringNullableAttrInt(L"bc", m_oBackColor, m_oBackColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"fc", m_oForeColor, m_oForeColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"in", m_oFormatIndex, m_oFormatIndex->GetValue());
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
if(!m_arrItems.empty())
|
|
|
|
|
{
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</s>");
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</e>");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
writer.WriteString(L"/>");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CPivotErrorValue::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
|
|
|
|
{
|
|
|
|
|
@ -3631,7 +3677,7 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
|
|
|
|
|
if(!ptr->info.stCaption.value().empty())
|
|
|
|
|
m_oCaption = ptr->info.stCaption.value();
|
|
|
|
|
|
|
|
|
|
if(ptr->info.fFmla)
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
m_oUnused = ptr->info.fGhost;
|
|
|
|
|
m_oCount = ptr->info.cIMemProps;
|
|
|
|
|
@ -3665,16 +3711,21 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
WritingStringNullableAttrInt(L"bc", m_oBackColor, m_oBackColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"fc", m_oForeColor, m_oForeColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"in", m_oFormatIndex, m_oFormatIndex->GetValue());
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
if(!m_arrItems.empty())
|
|
|
|
|
{
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</n>");
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</n>");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
writer.WriteString(L"/>");
|
|
|
|
|
}
|
|
|
|
|
void CPivotNumericValue::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
|
|
|
|
{
|
|
|
|
|
@ -3752,8 +3803,8 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
|
|
|
|
|
if(!ptr->info.stCaption.value().empty())
|
|
|
|
|
m_oCaption = ptr->info.stCaption.value();
|
|
|
|
|
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
if(ptr->info.fFmla)
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
m_oUnused = ptr->info.fGhost;
|
|
|
|
|
m_oCount = ptr->info.cIMemProps;
|
|
|
|
|
|
|
|
|
|
@ -3840,7 +3891,7 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
|
|
|
|
|
if(!ptr->info.stCaption.value().empty())
|
|
|
|
|
m_oCaption = ptr->info.stCaption.value();
|
|
|
|
|
|
|
|
|
|
if(ptr->info.fFmla)
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
m_oUnused = ptr->info.fGhost;
|
|
|
|
|
m_oCount = ptr->info.cIMemProps;
|
|
|
|
|
@ -3928,8 +3979,8 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
|
|
|
|
|
if(!ptr->info.stCaption.value().empty())
|
|
|
|
|
m_oCaption = ptr->info.stCaption.value();
|
|
|
|
|
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
if(ptr->info.fFmla)
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
m_oUnused = ptr->info.fGhost;
|
|
|
|
|
m_oCount = ptr->info.cIMemProps;
|
|
|
|
|
|
|
|
|
|
@ -3961,16 +4012,21 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
WritingStringNullableAttrInt(L"bc", m_oBackColor, m_oBackColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"fc", m_oForeColor, m_oForeColor->GetValue());
|
|
|
|
|
WritingStringNullableAttrInt(L"in", m_oFormatIndex, m_oFormatIndex->GetValue());
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
if(!m_arrItems.empty())
|
|
|
|
|
{
|
|
|
|
|
writer.WriteString(L">");
|
|
|
|
|
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</m>");
|
|
|
|
|
for ( size_t i = 0; i < m_arrItems.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
if ( m_arrItems[i] )
|
|
|
|
|
{
|
|
|
|
|
m_arrItems[i]->toXML(writer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
writer.WriteString(L"</m>");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
writer.WriteString(L"/>");
|
|
|
|
|
}
|
|
|
|
|
void CPivotNoValue::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
|
|
|
|
{
|
|
|
|
|
@ -4044,8 +4100,8 @@ xmlns:xr16=\"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16\"
|
|
|
|
|
{
|
|
|
|
|
if(!ptr->info.stCaption.value().empty())
|
|
|
|
|
m_oCaption = ptr->info.stCaption.value();
|
|
|
|
|
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
if(ptr->info.fFmla)
|
|
|
|
|
m_oCalculated = ptr->info.fFmla;
|
|
|
|
|
m_oUnused = ptr->info.fGhost;
|
|
|
|
|
m_oCount = ptr->info.cIMemProps;
|
|
|
|
|
|
|
|
|
|
|