Commit 64f578e5 authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - ...

parent 16c57b50
......@@ -35,8 +35,7 @@
namespace XLS
{
Array::Array(const CellRef& cell_base_ref_init)
: formula(false, cell_base_ref_init)
Array::Array(const CellRef& cell_base_ref_init) :formula(false, cell_base_ref_init)
{
}
......
......@@ -32,8 +32,8 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/CellRangeRef.h>
#include <Logic/Biff_structures/ArrayParsedFormula.h>
#include "../Biff_structures/CellRangeRef.h"
#include "../Biff_structures/ArrayParsedFormula.h"
namespace XLS
{
......@@ -49,7 +49,6 @@ public:
~Array();
BaseObjectPtr clone();
void readFields(CFRecord& record);
......
......@@ -53,6 +53,8 @@ static inline void trim(std::wstring &s)
AutoFilter::AutoFilter()
{
wTopN = wJoin = 0;
size = -1;
bExist = false;
}
......@@ -68,6 +70,15 @@ BaseObjectPtr AutoFilter::clone()
void AutoFilter::readFields(CFRecord& record)
{
size_t pos_record = record.getRdPtr();
if (size < 0) size = record.getDataSize() - pos_record;
if (size > 0)
{
bExist = true;
}
m_bAutoFilter12 = false;
unsigned short flags;
......@@ -119,9 +130,9 @@ void AutoFilter::readFields(CFRecord& record)
trim(str2);
}
if (record.getRdPtr() < record.getDataSize())
if (record.getRdPtr() - pos_record < size)
{
int sz = record.getDataSize() - record.getRdPtr();
int sz = size - (record.getRdPtr() - pos_record);
char *dd = new char [sz];
memcpy(dd, record.getCurData<char>(), sz);
......
......@@ -32,13 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/AFDOper.h>
#include "../Biff_structures/AFDOper.h"
namespace XLS
{
// Logical representation of AutoFilter record in BIFF8
class AutoFilter: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(AutoFilter)
......@@ -74,6 +72,10 @@ public:
std::wstring str1;
std::wstring str2;
//----------------------------------------
int size;
bool bExist;
};
} // namespace XLS
......
......@@ -33,8 +33,8 @@
#include "BiffRecord.h"
#include <Logic/Biff_structures/ChartParsedFormula.h>
#include <Logic/Biff_structures/CellRangeRef.h>
#include "../Biff_structures/ChartParsedFormula.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
......
......@@ -55,7 +55,7 @@ public:
//-----------------------------
unsigned char pst;
bool fAutoSplit;
unsigned char fAutoSplit;
_UINT16 split;
_INT16 iSplitPos;
_INT16 pcSplitPercent;
......
......@@ -51,6 +51,7 @@ BaseObjectPtr Feature12::clone()
void Feature12::readFields(CFRecord& record)
{
feature11.readFields(record);
}
......
......@@ -32,6 +32,8 @@
#pragma once
#include "BiffRecordContinued.h"
#include "Feature11.h"
namespace XLS
{
......@@ -50,6 +52,7 @@ public:
static const ElementType type = typeFeature12;
Feature11 feature11;
};
} // namespace XLS
......
......@@ -40,7 +40,7 @@ class CFRecord;
class ArrayParsedFormula : public ParsedFormula
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(ArrayParsedFormula)
BASE_STRUCTURE_DEFINE_CLASS_NAME(ArrayParsedFormula)
public:
ArrayParsedFormula(const bool is_part_of_a_revision, const CellRef& cell_base_ref);
BiffStructurePtr clone();
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "CachedDiskHeader.h"
#include <Binary/CFRecord.h>
namespace XLS
{
BiffStructurePtr CachedDiskHeader::clone()
{
return BiffStructurePtr(new CachedDiskHeader(*this));
}
void CachedDiskHeader::load(CFRecord& record)
{
record >> cbdxfHdrDisk;
if (cbdxfHdrDisk > 0)
{
rgHdrDisk.size = cbdxfHdrDisk;
rgHdrDisk.load(record);
}
record >> strStyleName;
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffString.h"
#include "DXFN12List.h"
namespace XLS
{
class CFRecord;
class CachedDiskHeader : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(CachedDiskHeader)
public:
BiffStructurePtr clone();
static const ElementType type = typeCachedDiskHeader;
virtual void load(CFRecord& record);
_UINT32 cbdxfHdrDisk;
DXFN12List rgHdrDisk;
XLUnicodeString strStyleName;
};
typedef boost::shared_ptr<CachedDiskHeader> CachedDiskHeaderPtr;
} // namespace XLS
......@@ -52,11 +52,11 @@ public:
virtual void load(CFRecord& record);
int size;
DXFN dxfn;
XFExtNoFRT xfext;
//-----------------------------------------------------------------
bool bExist;
bool bExist;
int size;
};
typedef boost::shared_ptr<DXFN12List> DXFN12ListPtr;
......
......@@ -37,14 +37,12 @@
#include "ExtPtgRefErr3D.h"
#include "ExtPtgAreaErr3D.h"
#include "ExtPtgErr.h"
//#include <Exception/UnexpectedProgramPath.h>
namespace XLS
{
ExtNameParsedFormula::ExtNameParsedFormula()
: ParsedFormula(CellRef())
ExtNameParsedFormula::ExtNameParsedFormula() : ParsedFormula(CellRef())
{
}
......
......@@ -47,9 +47,11 @@ void Feat11FdaAutoFilter::load(CFRecord& record)
record >> cbAutoFilter;
record.skipNunBytes(2);
_UINT32 size = cbAutoFilter;
if (cbAutoFilter)
if (cbAutoFilter > 0 && cbAutoFilter < 2080)
{
recAutoFilter.size = cbAutoFilter;
recAutoFilter.readFields(record);
}
}
} // namespace XLS
......
......@@ -32,9 +32,9 @@
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/BiffString.h>
#include <Logic/Biff_records/AutoFilter.h>
#include "BiffString.h"
#include "../Biff_records/AutoFilter.h"
namespace XLS
{
......@@ -51,7 +51,6 @@ public:
virtual void load(CFRecord& record);
_UINT32 cbAutoFilter;
AutoFilter recAutoFilter;
};
......
......@@ -30,12 +30,15 @@
*
*/
#include "Feat11FieldDataItem.h"
#include <Binary/CFRecord.h>
#include "Feat11FieldDataItem.h"
#include "CellRangeRef.h"
namespace XLS
{
Feat11FieldDataItem::Feat11FieldDataItem(_UINT32 _lt, bool bDskHeaderCache) : lt(_lt), bDiskHdrCache(bDskHeaderCache)
{
}
BiffStructurePtr Feat11FieldDataItem::clone()
{
return BiffStructurePtr(new Feat11FieldDataItem(*this));
......@@ -83,7 +86,45 @@ void Feat11FieldDataItem::load(CFRecord& record)
}
if (fAutoFilter)
{
record >> AutoFilter;
}
if (fLoadXmapi)
{
record >> AutoFilter;
}
if (fLoadFmla)
{
fmla.load(record);
}
if (fLoadTotalFmla)
{
if (fLoadTotalArray)
{
totalArrayFmla.load(record);
}
else
{
totalFmla.load(record);
}
}
record >> strTotal;
if (lt == 0x00000001)
{
wssInfo.lfdt = lfdt;
record >> wssInfo;
}
if (lt == 0x00000003)
{
record >> qsif;
}
if (bDiskHdrCache)
{
record >> dskHdrCache;
}
}
......
......@@ -33,7 +33,13 @@
#include "BiffString.h"
#include "DXFN12List.h"
#include "ListParsedFormula.h"
#include "Feat11FdaAutoFilter.h"
#include "Feat11Fmla.h"
#include "Feat11XMap.h"
#include "Feat11WSSListInfo.h"
#include "CachedDiskHeader.h"
namespace XLS
{
......@@ -44,9 +50,10 @@ class Feat11FieldDataItem : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11FieldDataItem)
public:
Feat11FieldDataItem(_UINT32 lt, bool bDskHeaderCache);
BiffStructurePtr clone();
static const ElementType type = typeFeat11FieldDataItem;
static const ElementType type = typeFeat11FieldDataItem;
virtual void load(CFRecord& record);
......@@ -77,6 +84,19 @@ public:
DXFN12List dxfFmtInsertRow;
Feat11FdaAutoFilter AutoFilter;
Feat11XMap rgXmap;
Feat11Fmla fmla;
ListParsedFormula totalFmla;
ListParsedArrayFormula totalArrayFmla;
XLUnicodeString strTotal;
Feat11WSSListInfo wssInfo;
_UINT32 qsif;
CachedDiskHeader dskHdrCache;
//------------------------------------------------
_UINT32 lt;
bool bDiskHdrCache;
};
typedef boost::shared_ptr<Feat11FieldDataItem> Feat11FieldDataItemPtr;
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include <Binary/CFRecord.h>
#include "Feat11Fmla.h"
#include "CellRangeRef.h"
namespace XLS
{
Feat11Fmla::Feat11Fmla() : bFmlaExist(false)
{
}
BiffStructurePtr Feat11Fmla::clone()
{
return BiffStructurePtr(new Feat11Fmla(*this));
}
void Feat11Fmla::load(CFRecord& record)
{
unsigned short cbFmla;
record >> cbFmla;
if(0 != cbFmla)
{
bFmlaExist = true;
fmla.load(record);
}
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffStructure.h"
#include "ObjectParsedFormula.h"
namespace XLS
{
class CFRecord;
class Feat11Fmla : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11Fmla)
public:
Feat11Fmla();
BiffStructurePtr clone();
static const ElementType type = typeFeat11Fmla;
virtual void load(CFRecord& record);
ObjectParsedFormula fmla;
bool bFmlaExist;
};
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "Feat11WSSListInfo.h"
#include "BiffString.h"
#include "Xnum.h"
#include <Binary/CFRecord.h>
namespace XLS
{
Feat11WSSListInfo::Feat11WSSListInfo()
{
}
BiffStructurePtr Feat11WSSListInfo::clone()
{
return BiffStructurePtr(new Feat11WSSListInfo(*this));
}
void Feat11WSSListInfo::load(CFRecord& record)
{
_UINT32 flags1, reserved;
_UINT16 unused2;
unsigned char flags2;
record >> LCID >> cDec >> flags1 >> flags2 >> bDefaultType >> unused2;
switch(lfdt)
{
case 0x00000002://Number
case 0x00000006://Currency
rgbDV = BiffStructurePtr(new Xnum); break;
case 0x00000003://Boolean
rgbDV = BiffStructurePtr(new BIFF_DWORD); break;
case 0x00000004:
rgbDV = BiffStructurePtr(new DateAsNum); break;
case 0x00000005://Invalid
case 0x00000007://Invalid
case 0x00000009://Invalid
case 0x0000000a://Invalid
break;
case 0x00000001://Short Text
case 0x00000008://Choice
case 0x0000000b://Multi-choice
rgbDV = BiffStructurePtr(new XLUnicodeString); break;
}
if (rgbDV)
rgbDV->load(record);
record >> strFormula;
record >> reserved;
fPercent = GETBIT(flags1, 0);
fDecSet = GETBIT(flags1, 1);
fDateOnly = GETBIT(flags1, 2);
fReadingOrder = GETBITS(flags1, 3, 4);
fRichText = GETBIT(flags1, 5);
fUnkRTFormatting= GETBIT(flags1, 6);
fAlertUnkRTFormatting = GETBIT(flags1, 7);
fReadOnly = GETBIT(flags2, 0);
fRequired = GETBIT(flags2, 1);
fMinSet = GETBIT(flags2, 2);
fMaxSet = GETBIT(flags2, 3);
fDefaultSet = GETBIT(flags2, 4);
fDefaultDateToday = GETBIT(flags2, 5);
fLoadFormula = GETBIT(flags2, 6);
fAllowFillIn = GETBIT(flags2, 6);
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffString.h"
#include "ParsedFormula.h"
namespace XLS
{
class CFRecord;
class Feat11WSSListInfo : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11WSSListInfo)
public:
Feat11WSSListInfo();
BiffStructurePtr clone();
static const ElementType type = typeFeat11WSSListInfo;
virtual void load(CFRecord& record);
_UINT32 LCID;
_UINT32 cDec;
bool fPercent;
bool fDecSet;
bool fDateOnly;
unsigned char fReadingOrder;
bool fRichText;
bool fUnkRTFormatting;
bool fAlertUnkRTFormatting;
bool fReadOnly;
bool fRequired;
bool fMinSet;
bool fMaxSet;
bool fDefaultSet;
bool fDefaultDateToday;
bool fLoadFormula;
bool fAllowFillIn;
unsigned char bDefaultType;
BiffStructurePtr rgbDV;
XLUnicodeString strFormula;
//------------------------------------------------------
short lfdt;
};
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "Feat11XMap.h"
#include <Binary/CFRecord.h>
namespace XLS
{
Feat11XMapEntry2::Feat11XMapEntry2()
{
}
BiffStructurePtr Feat11XMapEntry2::clone()
{
return BiffStructurePtr(new Feat11XMapEntry2(*this));
}
void Feat11XMapEntry2::load(CFRecord& record)
{
record >> dwMapId >> rgbXPath;
}
//----------------------------------------------------------------------
Feat11XMapEntry::Feat11XMapEntry()
{
}
BiffStructurePtr Feat11XMapEntry::clone()
{
return BiffStructurePtr(new Feat11XMapEntry(*this));
}
void Feat11XMapEntry::load(CFRecord& record)
{
_UINT32 flags;
record >> flags >> entry;
fLoadXMap = GETBIT(flags, 1);
fCanBeSingle = GETBIT(flags, 2);
}
//----------------------------------------------------------------------
Feat11XMap::Feat11XMap()
{
}
BiffStructurePtr Feat11XMap::clone()
{
return BiffStructurePtr(new Feat11XMap(*this));
}
void Feat11XMap::load(CFRecord& record)
{
_UINT16 cbFmla;
record >> cbFmla;
for (_UINT16 i = 0; i < cbFmla; i++)
{
Feat11XMapEntry entry;
entry.load(record);
rgXmap.push_back(entry);
}
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffString.h"
namespace XLS
{
class CFRecord;
class Feat11XMapEntry2 : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11XMapEntry2)
public:
Feat11XMapEntry2();
BiffStructurePtr clone();
static const ElementType type = typeFeat11XMapEntry2;
virtual void load(CFRecord& record);
_UINT32 dwMapId;
XLUnicodeString rgbXPath;
};
class Feat11XMapEntry : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11XMapEntry)
public:
Feat11XMapEntry();
BiffStructurePtr clone();
static const ElementType type = typeFeat11XMapEntry;
virtual void load(CFRecord& record);
bool fLoadXMap;
bool fCanBeSingle;
Feat11XMapEntry2 entry;
};
class Feat11XMap : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11XMap)
public:
Feat11XMap();
BiffStructurePtr clone();
static const ElementType type = typeFeat11XMap;
virtual void load(CFRecord& record);
std::vector<Feat11XMapEntry> rgXmap;
};
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "ListParsedFormula.h"
#include <Binary/CFRecord.h>
namespace XLS
{
ListParsedFormula::ListParsedFormula() : ParsedFormula(CellRef())
{
}
BiffStructurePtr ListParsedFormula::clone()
{
return BiffStructurePtr(new ListParsedFormula(*this));
}
void ListParsedFormula::load(CFRecord& record)
{
unsigned short cce;
record >> cce;
record.skipNunBytes(2); // unused
rgce.load(record, cce);
}
//-------------------------------------------------------------------------------
ListParsedArrayFormula::ListParsedArrayFormula() : ArrayParsedFormula(false, CellRef())
{
}
BiffStructurePtr ListParsedArrayFormula::clone()
{
return BiffStructurePtr(new ListParsedArrayFormula(*this));
}
void ListParsedArrayFormula::load(CFRecord& record)
{
ArrayParsedFormula::load(record);
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "ArrayParsedFormula.h"
namespace XLS
{
class ListParsedFormula : public ParsedFormula
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(ListParsedFormula)
public:
ListParsedFormula();
BiffStructurePtr clone();
virtual void load(CFRecord& record);
};
class ListParsedArrayFormula : public ArrayParsedFormula
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(ListParsedFormula)
public:
ListParsedArrayFormula();
BiffStructurePtr clone();
virtual void load(CFRecord& record);
};
} // namespace XLS
......@@ -37,8 +37,7 @@ namespace XLS
{
ObjectParsedFormula::ObjectParsedFormula()
: ParsedFormula(CellRef())
ObjectParsedFormula::ObjectParsedFormula() : ParsedFormula(CellRef())
{
}
......
......@@ -34,7 +34,7 @@
#include <Binary/CFRecord.h>
#include "StringPtgParser.h"
#include <boost/algorithm/string.hpp>
//#include <boost/algorithm/string.hpp>
namespace XLS
{
......
......@@ -32,7 +32,7 @@
#include "TableFeatureType.h"
#include <Binary/CFRecord.h>
#include "../Biff_structures/Feat11FieldDataItem.h"
#include "Feat11FieldDataItem.h"
namespace XLS
{
......@@ -117,11 +117,9 @@ void TableFeatureType::load(CFRecord& record)
{
if (record.getRdPtr() >= record.getDataSize())
return;
BiffStructurePtr item(new Feat11FieldDataItem);
item->load(record);
arFieldData.push_back(item);
arFieldData.push_back(BiffStructurePtr(new Feat11FieldDataItem(lt, (crwHeader == 0x0000 && fSingleCell))));
arFieldData.back()->load(record);
}
if (fLoadPldwIdDeleted)
{
......
......@@ -32,7 +32,8 @@
#pragma once
#include "../Biff_records/BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "Feat11FieldDataItem.h"
namespace XLS
{
......
......@@ -34,7 +34,6 @@
#include "SORTDATA12.h"
#include "../Biff_records/FeatHdr11.h"
#include "../Biff_records/Feature11.h"
#include "../Biff_records/Feature12.h"
#include "../Biff_records/ContinueFrt11.h"
#include "../Biff_records/List12.h"
......@@ -128,7 +127,14 @@ const bool FEAT11::loadContent(BinProcessor& proc)
}break;
case typeList12:
{
m_arFEAT.back().m_arList12.push_back(elements_.front());
if (m_arFEAT.back().m_AutoFilter12)
{
m_arFEAT.back().m_arList12_2.push_back(elements_.front());
}
else
{
m_arFEAT.back().m_arList12.push_back(elements_.front());
}
}break;
case typeAutoFilter12:
{
......@@ -150,6 +156,11 @@ int FEAT11::serialize(std::wostream & strm, size_t index)
Feature11 * feature11 = dynamic_cast<Feature11*>(m_arFEAT[index].m_Feature.get());
Feature12 * feature12 = dynamic_cast<Feature12*>(m_arFEAT[index].m_Feature.get());
if (feature12 && !feature11)
{
feature11 = &feature12->feature11;
}
List12BlockLevel *block_level = NULL;
List12TableStyleClientInfo *table_style = NULL;
......@@ -221,9 +232,7 @@ int FEAT11::serialize(std::wostream & strm, size_t index)
}
}
}
else if (feature12)
{
}
if (table_style)
{
CP_XML_NODE(L"tableStyleInfo")
......
......@@ -51,17 +51,19 @@ public:
static const ElementType type = typeFEAT11;
BaseObjectPtr m_FeatHdr11;
struct _data
{
BaseObjectPtr m_Feature; //11 or 12
BaseObjectPtr m_AutoFilter12;
std::vector<BaseObjectPtr> m_arList12;
BaseObjectPtr m_AutoFilter12;
std::vector<BaseObjectPtr> m_arList12_2;
BaseObjectPtr m_SORTDATA12;
};
std::vector<_data> m_arFEAT;
BaseObjectPtr m_FeatHdr11;
std::vector<_data> m_arFEAT;
};
} // namespace XLS
......
......@@ -51,6 +51,7 @@
#include "Biff_records/BOF.h"
#include "Biff_records/DefaultRowHeight.h"
#include "Biff_records/Label.h"
#include "Biff_records/List12.h"
#include "Biff_unions/BACKGROUND.h"
#include "Biff_unions/BIGNAME.h"
......@@ -440,6 +441,10 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count--;
}
}break;
case rt_List12://LCA BI - Financial Report Usage2010.xls ??
{
count = proc.repeated<List12> (0, 0);
}break;
case rt_FeatHdr11:
{
count = proc.repeated<FEAT11> (0, 0);
......
......@@ -557,6 +557,7 @@ enum ElementType
typeBookExt_Conditional11,
typeBookExt_Conditional12,
typeBuiltInStyle,
typeCachedDiskHeader,
typeCell,
typeCellOffsetResender,
typeCellRangeRef,
......@@ -596,6 +597,11 @@ enum ElementType
typeFeat11RgSharepointIdDel,
typeFeat11RgSharepointIdChange,
typeFeat11RgInvalidCells,
typeFeat11XMapEntry2,
typeFeat11XMapEntry,
typeFeat11XMap,
typeFeat11Fmla,
typeFeat11WSSListInfo,
typeFeatFormulaErr2,
typeFeatProtection,
typeFeatSmartTag,
......
......@@ -642,6 +642,11 @@ SOURCES += \
../XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtSplitMenuColorContainer.cpp \
../XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtTertiaryFOPT.cpp \
../XlsFormat/Logic/Biff_structures/ODRAW/SimpleOfficeArtContainers.cpp \
../XlsFormat/Logic/Biff_structures/ListParsedFormula.cpp \
../XlsFormat/Logic/Biff_structures/CachedDiskHeader.cpp \
../XlsFormat/Logic/Biff_structures/Feat11Fmla.cpp \
../XlsFormat/Logic/Biff_structures/Feat11WSSListInfo.cpp \
../XlsFormat/Logic/Biff_structures/Feat11XMap.cpp \
../XlsFormat/Logic/Biff_unions/AI.cpp \
../XlsFormat/Logic/Biff_unions/ATTACHEDLABEL_bu.cpp \
../XlsFormat/Logic/Biff_unions/AUTOFILTER_bu.cpp \
......@@ -1425,6 +1430,11 @@ HEADERS += \
../XlsFormat/Logic/Biff_structures/TxtWf.h \
../XlsFormat/Logic/Biff_structures/Xnum.h \
../XlsFormat/Logic/Biff_structures/PBT.h \
../XlsFormat/Logic/Biff_structures/ListParsedFormula.h \
../XlsFormat/Logic/Biff_structures/CachedDiskHeader.h \
../XlsFormat/Logic/Biff_structures/Feat11Fmla.h \
../XlsFormat/Logic/Biff_structures/Feat11WSSListInfo.h \
../XlsFormat/Logic/Biff_structures/Feat11XMap.h \
../XlsFormat/Logic/Biff_structures/FontInfo.h \
../XlsFormat/Logic/Biff_structures/ODRAW/IMsoArray.h \
../XlsFormat/Logic/Biff_structures/ODRAW/MSOCR.h \
......
......@@ -619,6 +619,11 @@
#include "../XlsFormat/Logic/Biff_structures/AFDOperBoolErr.cpp"
#include "../XlsFormat/Logic/Biff_structures/AFDOperXNum.cpp"
#include "../XlsFormat/Logic/Biff_structures/PivotParsedFormula.cpp"
#include "../XlsFormat/Logic/Biff_structures/ListParsedFormula.cpp"
#include "../XlsFormat/Logic/Biff_structures/CachedDiskHeader.cpp"
#include "../XlsFormat/Logic/Biff_structures/Feat11Fmla.cpp"
#include "../XlsFormat/Logic/Biff_structures/Feat11WSSListInfo.cpp"
#include "../XlsFormat/Logic/Biff_structures/Feat11XMap.cpp"
#include "../XlsFormat/Logic/Biff_unions/AI.cpp"
#include "../XlsFormat/Logic/Biff_unions/ATTACHEDLABEL_bu.cpp"
......
......@@ -3253,6 +3253,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\BuiltInStyle.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\CachedDiskHeader.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\CachedDiskHeader.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Cell.cpp"
>
......@@ -3765,6 +3773,30 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11FieldDataItem.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11Fmla.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11Fmla.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11WSSListInfo.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11WSSListInfo.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11XMap.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\Feat11XMap.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\FeatFormulaErr2.cpp"
>
......@@ -4101,6 +4133,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\List12TableStyleClientInfo.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\ListParsedFormula.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\ListParsedFormula.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\LongRGB.cpp"
>
......
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