Compare commits

..

7 Commits

98 changed files with 1497 additions and 360 deletions

View File

@ -3744,7 +3744,6 @@ namespace BinDocxRW
void WriteHyperlink(OOX::Logic::CHyperlink* pHyperlink)
{
int nCurPos = 0;
std::wstring sField;
std::wstring sLink;
if(pHyperlink->m_oId.IsInit())
{
@ -3757,24 +3756,20 @@ namespace BinDocxRW
}
}
if(!sLink.empty())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::Hyperlink);
WriteHyperlinkContent(sLink, pHyperlink);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
else
{
WriteParagraphContent(pHyperlink->m_arrItems, true);
}
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::Hyperlink);
WriteHyperlinkContent(sLink, pHyperlink);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
void WriteHyperlinkContent(std::wstring& sLink, OOX::Logic::CHyperlink* pHyperlink)
{
int nCurPos = 0;
//Link
nCurPos = m_oBcw.WriteItemStart(c_oSer_HyperlinkType::Link);
m_oBcw.m_oStream.WriteStringW3(sLink);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
if(!sLink.empty())
{
nCurPos = m_oBcw.WriteItemStart(c_oSer_HyperlinkType::Link);
m_oBcw.m_oStream.WriteStringW3(sLink);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
//Anchor
if(pHyperlink->m_sAnchor.IsInit())
{

View File

@ -57,6 +57,8 @@ namespace writer
static const char colon = ':';
static const char amp = '&';
static const char apos = '\'';
static const char a = '\x0a';
static const char * cdata_open() { return "<![CDATA["; }
static const char * cdata_close() { return "]]>"; }
static const char * amp_str(){ return "&amp;"; }
@ -64,6 +66,7 @@ namespace writer
static const char * right_brocket_str() { return "&gt;"; }
static const char * apos_str() { return "&apos;"; }
static const char * quote_str() { return "&quot;"; }
static const char * a_str() { return "&#10;"; }
};
template <>
@ -78,14 +81,17 @@ namespace writer
static const wchar_t colon = L':';
static const wchar_t amp = L'&';
static const wchar_t apos = L'\'';
static const wchar_t * cdata_open() { return L"<![CDATA["; }
static const wchar_t a = L'\x0a';
static const wchar_t * cdata_open() { return L"<![CDATA["; }
static const wchar_t * cdata_close() { return L"]]>"; }
static const wchar_t * amp_str(){ return L"&amp;"; }
static const wchar_t * left_brocket_str() { return L"&lt;"; }
static const wchar_t * right_brocket_str() { return L"&gt;"; }
static const wchar_t * apos_str() { return L"&apos;"; }
static const wchar_t * quote_str() { return L"&quot;"; }
};
static const wchar_t * a_str() { return L"&#10;"; }
};
template <class V>
class element;
@ -279,7 +285,9 @@ namespace writer
case chars<T>::quote:
wr_.puts(chars<T>::quote_str()); break;
default:
case chars<T>::a:
wr_.puts(chars<T>::a_str()); break;
default:
wr_.putc(*str); break;
}
}

View File

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

View File

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

View File

@ -53,6 +53,8 @@ static inline void trim(std::wstring &s)
AutoFilter::AutoFilter()
{
wTopN = wJoin = 0;
size = 0xffffffff;
bExist = false;
}
@ -68,6 +70,15 @@ BaseObjectPtr AutoFilter::clone()
void AutoFilter::readFields(CFRecord& record)
{
size_t pos_record = record.getRdPtr();
if (size == 0xffffffff) 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);

View File

@ -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,9 @@ public:
std::wstring str1;
std::wstring str2;
//----------------------------------------
bool bExist;
_UINT32 size;
};
} // namespace XLS

View File

@ -31,6 +31,13 @@
*/
#include "AutoFilter12.h"
#include "../Biff_structures/DXFN12List.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/AFDOper.h"
#include "../Biff_structures/AF12Criteria.h"
#include "../Biff_structures/AF12CellIcon.h"
namespace XLS
{
@ -58,12 +65,29 @@ void AutoFilter12::readFields(CFRecord& record)
record >> frtRefHeader >> iEntry >> fHideArrow >> ft >> cft >> cCriteria >> cDateGroupings >> flags >> unused2 >> idList;
// TODO доделать
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
_GUID_ guid_num;
record >> guid_num;
guidSview = STR::guid2bstr(guid_num);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
//-------------------------------------------------------------------------------------------------------
std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12];
size_t size = recs.size();
switch(ft)
{
case 0x00000000://not exist
break;
case 0x00000001: rgb = BiffStructurePtr(new DXFN12List); //color
break;
case 0x00000002: rgb = BiffStructurePtr(new DXFN12List); //font
break;
case 0x00000003: rgb = BiffStructurePtr(new AF12CellIcon); //icon
break;
}
if (rgb)
rgb->load(record);
while( !recs.empty() )
{
record.appendRawData(recs.front());

View File

@ -34,10 +34,7 @@
#include "BiffRecordContinued.h"
#include "../Biff_structures/FrtRefHeader.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/FrtRefHeader.h"
#include "../Biff_structures/AFDOper.h"
#include "../Biff_structures/AF12Criteria.h"
namespace XLS
{
@ -65,6 +62,9 @@ public:
_UINT32 cCriteria;
_UINT32 cDateGroupings;
_UINT32 idList;
std::wstring guidSview;
BiffStructurePtr rgb;
BiffStructurePtrVector arAF12Criteries;
};

View File

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

View File

@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
@ -54,13 +55,13 @@ public:
//-----------------------------
unsigned char pst;
bool fAutoSplit;
unsigned char fAutoSplit;
_UINT16 split;
_INT16 iSplitPos;
_INT16 pcSplitPercent;
_INT16 pcPie2Size;
_INT16 pcGap;
BIFF_DOUBLE numSplitValue;
Xnum numSplitValue;
bool fHasShadow;

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of BottomMargin record in BIFF8
class BottomMargin: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(BottomMargin)
@ -54,7 +53,7 @@ public:
static const ElementType type = typeBottomMargin;
//-----------------------------
BIFF_DOUBLE num;
Xnum num;
};

View File

@ -32,14 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/DXFN.h>
#include <Logic/Biff_structures/CFParsedFormulaNoCCE.h>
#include "../Biff_structures/DXFN.h"
#include "../Biff_structures/CFParsedFormulaNoCCE.h"
namespace XLS
{
// Logical representation of CF record in BIFF8
class CF: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(CF)
@ -50,7 +48,6 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeCF;
@ -69,6 +66,7 @@ public:
CFParsedFormulaNoCCE rgce2;
BaseObjectPtr m_CFEx;
BaseObjectPtr m_CF12;
GlobalWorkbookInfoPtr global_info_;
};

View File

@ -32,18 +32,16 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtRefHeader.h>
#include <Logic/Biff_structures/DXFN12.h>
#include <Logic/Biff_structures/CFParsedFormulaNoCCE.h>
#include <Logic/Biff_structures/CFParsedFormula.h>
#include <Logic/Biff_structures/CFExTemplateParams.h>
#include "../Biff_structures/FrtRefHeader.h"
#include "../Biff_structures/DXFN12.h"
#include "../Biff_structures/CFParsedFormulaNoCCE.h"
#include "../Biff_structures/CFParsedFormula.h"
#include "../Biff_structures/CFExTemplateParams.h"
namespace XLS
{
// Logical representation of CF12 record in BIFF8
class CF12: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(CF12)
@ -84,6 +82,7 @@ public:
int dxfId_;
BaseObjectPtr m_CFEx;
BaseObjectPtr m_CF12_2;
};
typedef boost::shared_ptr<CF12> CF12Ptr;

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of CalcDelta record in BIFF8
class CalcDelta: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(CalcDelta)
@ -54,7 +53,7 @@ public:
static const ElementType type = typeCalcDelta;
//-----------------------------
BIFF_DOUBLE numDelta;
Xnum numDelta;
};

View File

@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
@ -44,7 +45,6 @@ public:
~CrtLayout12();
BaseObjectPtr clone();
void readFields(CFRecord& record);
@ -59,10 +59,10 @@ public:
CrtLayout12Mode wWidthMode;
CrtLayout12Mode wHeightMode;
BIFF_DOUBLE x;
BIFF_DOUBLE y;
BIFF_DOUBLE dx;
BIFF_DOUBLE dy;
Xnum x;
Xnum y;
Xnum dx;
Xnum dy;
};
} // namespace XLS

View File

@ -45,11 +45,14 @@ Feat::~Feat()
{
}
BaseObjectPtr Feat::clone()
{
return BaseObjectPtr(new Feat(*this));
}
// ISFPROTECTION = 0x0002, // Specifies the enhanced protection type.
// ISFFEC2 = 0x0003, // Specifies the ignored formula errors type.
// ISFFACTOID = 0x0004, // Specifies the smart tag type.
// ISFLIST = 0x0005, // Specifies the list type.
void Feat::readFields(CFRecord& record)
{
@ -72,17 +75,18 @@ void Feat::readFields(CFRecord& record)
switch(isf)
{
case SharedFeatureType::ISFPROTECTION:
record >> protection;
case 0x0002://ISFPROTECTION:
is_object = BiffStructurePtr(new FeatProtection);
break;
case SharedFeatureType::ISFFEC2:
record >> formula_err;
case 0x0003://ISFFEC2:
is_object = BiffStructurePtr(new FeatFormulaErr2);
break;
case SharedFeatureType::ISFFACTOID:
record >> smart_tag;
case 0x0004://ISFFACTOID:
is_object = BiffStructurePtr(new FeatSmartTag);
break;
}
if (is_object)
is_object->load(record);
}
} // namespace XLS

View File

@ -54,16 +54,13 @@ public:
static const ElementType type = typeFeat;
SharedFeatureType isf;
_UINT16 isf;
_UINT16 cref;
_UINT32 cbFeatData;
BiffStructurePtrVector refs;
std::wstring sqref;
FeatProtection protection;
FeatFormulaErr2 formula_err;
FeatSmartTag smart_tag;
BiffStructurePtr is_object;
};
} // namespace XLS

View File

@ -63,10 +63,10 @@ void FeatHdr::readFields(CFRecord& record)
{
switch(isf)
{
case SharedFeatureType::ISFPROTECTION:
case 0x0002://ISFPROTECTION:
record >> protection;
break;
case SharedFeatureType::ISFFACTOID:
case 0x0004://ISFFACTOID:
if(is_contained_in_Globals)
{
record >> prop;

View File

@ -55,12 +55,13 @@ public:
static const ElementType type = typeFeatHdr;
_UINT16 isf;
_UINT32 cbHdrData;
EnhancedProtection protection;
OSHARED::PropertyBagStore prop;
//-----------------------------
bool is_contained_in_Globals;
SharedFeatureType isf;
_UINT32 cbHdrData;
EnhancedProtection protection;
OSHARED::PropertyBagStore prop;
};
} // namespace XLS

View File

@ -54,6 +54,12 @@ void FeatHdr11::readFields(CFRecord& record)
{
record >> frt;
record >> isf;
// ISFPROTECTION = 0x0002, // Specifies the enhanced protection type.
// ISFFEC2 = 0x0003, // Specifies the ignored formula errors type.
// ISFFACTOID = 0x0004, // Specifies the smart tag type.
// ISFLIST = 0x0005, // Specifies the list type.
record.skipNunBytes(1); // reserved1
record.skipNunBytes(4); // reserved2
record.skipNunBytes(4); // reserved3

View File

@ -32,13 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtHeader.h>
#include "../Biff_structures/FrtHeader.h"
namespace XLS
{
// Logical representation of FeatHdr11 record in BIFF8
class FeatHdr11: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(FeatHdr11)
@ -48,18 +46,14 @@ public:
~FeatHdr11();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeFeatHdr11;
public:
FrtHeader frt;
SharedFeatureType isf;
_UINT32 idListNext;
FrtHeader frt;
_UINT16 isf;
_UINT32 idListNext;
};

View File

@ -39,12 +39,10 @@ Feature11::Feature11()
{
}
Feature11::~Feature11()
{
}
BaseObjectPtr Feature11::clone()
{
return BaseObjectPtr(new Feature11(*this));
@ -54,25 +52,21 @@ void Feature11::readFields(CFRecord& record)
{
record >> frtRefHeaderU;
record >> isf;
record.skipNunBytes(1); // reserved1
record.skipNunBytes(4); // reserved2
record >> cref2;
record >> cbFeatData;
record.skipNunBytes(2); // reserved3
unsigned short _isf = isf;
unsigned short _cref2 = cref2;
unsigned int _cbFeatData = cbFeatData;
std::wstring sqref_str;
for (int i = 0; i < cref2 ; ++i)
{
Ref8U reff;
record >> reff;
refs2.push_back(BiffStructurePtr(new Ref8U(reff)));
sqref_str += std::wstring (reff.toString().c_str()) + ((i == cref2 - 1) ? L"" : L" ");
sqref += reff.toString() + ((i == cref2 - 1) ? L"" : L" ");
}
sqref = sqref_str;
record >> rgbFeat;
}

View File

@ -32,15 +32,14 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/FrtRefHeaderU.h>
#include <Logic/Biff_structures/CellRangeRef.h>
#include <Logic/Biff_structures/TableFeatureType.h>
#include "../Biff_structures/FrtRefHeaderU.h"
#include "../Biff_structures/CellRangeRef.h"
#include "../Biff_structures/TableFeatureType.h"
namespace XLS
{
// Logical representation of Feature11 record in BIFF8
class Feature11: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Feature11)
@ -53,7 +52,7 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeFeature11;
static const ElementType type = typeFeature11;
FrtRefHeaderU frtRefHeaderU;
_UINT16 isf;
@ -62,7 +61,7 @@ public:
BiffStructurePtrVector refs2;
std::wstring sqref;
TableFeatureType rgbFeat;
TableFeatureType rgbFeat;
};
} // namespace XLS

View File

@ -39,12 +39,10 @@ Feature12::Feature12()
{
}
Feature12::~Feature12()
{
}
BaseObjectPtr Feature12::clone()
{
return BaseObjectPtr(new Feature12(*this));
@ -53,6 +51,7 @@ BaseObjectPtr Feature12::clone()
void Feature12::readFields(CFRecord& record)
{
feature11.readFields(record);
}

View File

@ -32,12 +32,12 @@
#pragma once
#include "BiffRecordContinued.h"
#include "Feature11.h"
namespace XLS
{
// Logical representation of Feature12 record in BIFF8
class Feature12: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(Feature12)
@ -47,12 +47,12 @@ public:
~Feature12();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeFeature12;
static const ElementType type = typeFeature12;
Feature11 feature11;
};
} // namespace XLS

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of LeftMargin record in BIFF8
class LeftMargin: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(LeftMargin)
@ -50,10 +49,9 @@ public:
static const ElementType type = typeLeftMargin;
void readFields(CFRecord& record);
//-----------------------------
BIFF_DOUBLE num;
Xnum num;
};

View File

@ -43,12 +43,10 @@ List12::List12()
{
}
List12::~List12()
{
}
BaseObjectPtr List12::clone()
{
return BaseObjectPtr(new List12(*this));

View File

@ -83,12 +83,9 @@ int Number::serialize(std::wostream & stream)
{
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
}
if (num.value())
CP_XML_NODE(L"v")
{
CP_XML_NODE(L"v")
{
CP_XML_STREAM() << STR::double2str(num);
}
CP_XML_STREAM() << std::to_wstring(num.data.value);
}
}
}

View File

@ -32,14 +32,13 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/CellOffsetResender.h>
#include <Logic/Biff_structures/Cell.h>
#include "../Biff_structures/CellOffsetResender.h"
#include "../Biff_structures/Cell.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of Number record in BIFF8
class Number: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Number)
@ -59,13 +58,11 @@ public:
const CellRef getLocation() const;
//-----------------------------
GlobalWorkbookInfoPtr global_info_;
CellOffsetResender resender;
Cell cell;
BIFF_DOUBLE num;
Xnum num;
//-----------------------------
GlobalWorkbookInfoPtr global_info_;
};
} // namespace XLS

View File

@ -32,12 +32,10 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of RightMargin record in BIFF8
class RightMargin: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(RightMargin)
@ -48,14 +46,12 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeRightMargin;
static const ElementType type = typeRightMargin;
//-----------------------------
BIFF_DOUBLE num;
Xnum num;
};
} // namespace XLS

View File

@ -81,7 +81,7 @@ int SIIndex::serialize(std::wostream & _stream, int idx, const CellRef & in_ref)
CP_XML_NODE(L"c:pt")
{
CP_XML_ATTR(L"idx", idx++);
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << number->num; }
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << number->num.data.value; }
}
res = 1;
}
@ -122,7 +122,7 @@ int SIIndex::serialize(std::wostream & _stream, ChartParsedFormula & in_ref)
CP_XML_NODE(L"c:pt")
{
CP_XML_ATTR(L"idx", idx++);
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << number->num; }
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << std::to_wstring(number->num.data.value); }
}
}
}

View File

@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
@ -55,7 +56,7 @@ public:
unsigned char sertm;
unsigned char ebsrc;
unsigned char fTeeTop;
BIFF_DOUBLE numValue;
Xnum numValue;
_UINT16 cnum;
};

View File

@ -32,13 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/ChartNumNillable.h>
#include "../Biff_structures/ChartNumNillable.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of SerAuxTrend record in BIFF8
class SerAuxTrend: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SerAuxTrend)
@ -48,20 +47,19 @@ public:
~SerAuxTrend();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSerAuxTrend;
//-----------------------------
unsigned char regt;
unsigned char ordUser;
ChartNumNillable numIntercept;
unsigned char fEquation;
unsigned char fRSquared;
BIFF_DOUBLE numForecast;
BIFF_DOUBLE numBackcast;
unsigned char regt;
unsigned char ordUser;
ChartNumNillable numIntercept;
unsigned char fEquation;
unsigned char fRSquared;
Xnum numForecast;
Xnum numBackcast;
};

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of Setup record in BIFF8
class Setup: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Setup)
@ -73,8 +72,8 @@ public:
_UINT16 iRes;
_UINT16 iVRes;
BIFF_DOUBLE numHdr;
BIFF_DOUBLE numFtr;
Xnum numHdr;
Xnum numFtr;
_UINT16 iCopies;
};

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of TopMargin record in BIFF8
class TopMargin: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(TopMargin)
@ -50,10 +49,10 @@ public:
void readFields(CFRecord& record);
static const ElementType type = typeTopMargin;
static const ElementType type = typeTopMargin;
//-----------------------------
BIFF_DOUBLE num;
Xnum num;
};

View File

@ -32,13 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/PaneType.h>
#include "../Biff_structures/PaneType.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of UserSViewBegin record in BIFF8
class UserSViewBegin: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(UserSViewBegin)
@ -88,8 +87,8 @@ public:
bool fRuler;
std::wstring ref8TopLeft;
BIFF_DOUBLE operNumX;
BIFF_DOUBLE operNumY;
Xnum operNumX;
Xnum operNumY;
ForwardOnlyParam<unsigned short> colRPane;
ForwardOnlyParam<unsigned short> rwBPane;

View File

@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of ValueRange record in BIFF8
class ValueRange: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(ValueRange)
@ -53,11 +52,11 @@ public:
static const ElementType type = typeValueRange;
//-----------------------------
BIFF_DOUBLE numMin;
BIFF_DOUBLE numMax;
BIFF_DOUBLE numMajor;
BIFF_DOUBLE numMinor;
BIFF_DOUBLE numCross;
Xnum numMin;
Xnum numMax;
Xnum numMajor;
Xnum numMinor;
Xnum numCross;
bool fAutoMin;
bool fAutoMax;

View File

@ -0,0 +1,56 @@
/*
* (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 "AF12CellIcon.h"
#include <Binary/CFRecord.h>
namespace XLS
{
BiffStructurePtr AF12CellIcon::clone()
{
return BiffStructurePtr(new AF12CellIcon(*this));
}
AF12CellIcon::AF12CellIcon()
{
}
AF12CellIcon::~AF12CellIcon()
{
}
void AF12CellIcon::load(CFRecord& record)
{
record >> iIconSet >> iIcon;
}
} // namespace XLS

View File

@ -0,0 +1,58 @@
/*
* (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"
namespace XLS
{
class AF12CellIcon: public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(AF12CellIcon)
public:
BiffStructurePtr clone();
AF12CellIcon();
~AF12CellIcon();
virtual void load(CFRecord& record);
static const ElementType type = typeAF12CellIcon;
_UINT32 iIconSet;
_UINT32 iIcon;
};
typedef boost::shared_ptr<AF12CellIcon> AF12CellIconPtr;
} // namespace XLS

View File

@ -31,8 +31,7 @@
*/
#pragma once
#include <Logic/Biff_records/BiffRecord.h>
#include <Logic/Biff_structures/BiffString.h>
#include "BiffString.h"
#include "AFDOper.h"
namespace XLS
@ -49,8 +48,7 @@ public:
virtual void load(CFRecord& record);
static const ElementType type = typeAF12Criteria;
static const ElementType type = typeAF12Criteria;
AFDOper doper;
XLUnicodeStringNoCch str;

View File

@ -32,7 +32,7 @@
#pragma once
#include <Logic/Biff_records/BiffRecord.h>
#include <Logic/Biff_structures/BiffString.h>
#include "BiffString.h"
#include "AFDOperStr.h"
#include "AFDOperRk.h"

View File

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

View File

@ -78,8 +78,6 @@ typedef unsigned char FillPattern;
typedef BiffAttributeSimple<unsigned char> BIFF_BYTE;
typedef BiffAttributeSimple<_UINT16> BIFF_WORD;
typedef BiffAttributeSimple<_UINT32> BIFF_DWORD;
typedef BiffAttributeSimple<double> BIFF_DOUBLE;
struct PtgAttrSpaceType : public BiffStructure_NoVtbl
{
@ -257,22 +255,6 @@ public:
unsigned char ifmt;
};
class SharedFeatureType : public BiffAttributeSimple<_UINT16>
{
public:
enum
{
ISFPROTECTION = 0x0002, // Specifies the enhanced protection type.
ISFFEC2 = 0x0003, // Specifies the ignored formula errors type.
ISFFACTOID = 0x0004, // Specifies the smart tag type.
ISFLIST = 0x0005, // Specifies the list type.
};
};
struct FFErrorCheck : public BiffStructure_NoVtbl
{
unsigned int ffecCalcError : 1;

View File

@ -0,0 +1,57 @@
/*
* (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

View File

@ -0,0 +1,60 @@
/*
* (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

View File

@ -44,7 +44,8 @@ BiffStructurePtr DXFN12List::clone()
DXFN12List::DXFN12List()
{
size = -1;
bExist = false;
size = 0xffffffff;
}
@ -56,10 +57,11 @@ void DXFN12List::load(CFRecord& record)
{
size_t pos_record = record.getRdPtr();
if (size < 0) size = record.getDataSize() - pos_record;
if (size == 0xffffffff) size = record.getDataSize() - pos_record;
if (size > 0)
{
bExist = true;
record >> dxfn;
size -= (record.getRdPtr() - pos_record);
}

View File

@ -31,10 +31,11 @@
*/
#pragma once
#include "BiffString.h"
#include "DXFN.h"
#include "XFExtNoFRT.h"
#include "../Biff_records/BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "../Biff_structures/DXFN.h"
#include "../Biff_structures/XFExtNoFRT.h"
namespace XLS
{
@ -48,13 +49,15 @@ public:
DXFN12List();
~DXFN12List();
static const ElementType type = typeDXFN12List;
static const ElementType type = typeDXFN12List;
virtual void load(CFRecord& record);
int size;
DXFN dxfn;
XFExtNoFRT xfext;
//-----------------------------------------------------------------
bool bExist;
_UINT32 size;
};
typedef boost::shared_ptr<DXFN12List> DXFN12ListPtr;

View File

@ -47,12 +47,13 @@ BiffStructurePtr DXFNum::clone()
void DXFNum::load(CFRecord& record)
{
if (!parent) return;
if (parent->ifmtNinch)return;
if (parent->fIfmtUser)
{
record >> user_defined;
}
if (!parent->ifmtNinch)//else
else
{
record >> fmt_id;
}

View File

@ -50,7 +50,10 @@ BiffStructurePtr DXFNumUsr::clone()
void DXFNumUsr::load(CFRecord& record)
{
record >> cb >> fmt;
record >> cb;
fmt.setSize(cb);
record >> fmt;
}

View File

@ -50,7 +50,6 @@ public:
virtual void load(CFRecord& record);
unsigned short cb;
XLUnicodeString fmt;
};

View File

@ -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())
{
}

View File

@ -45,11 +45,19 @@ BiffStructurePtr Feat11FdaAutoFilter::clone()
void Feat11FdaAutoFilter::load(CFRecord& record)
{
record >> cbAutoFilter;
if (cbAutoFilter >= 0xffff0000)
{
//LCA BI - Financial Report Usage2010.xls
return;
}
record.skipNunBytes(2);
_UINT32 size = cbAutoFilter;
if (cbAutoFilter)
if (cbAutoFilter > 0 && cbAutoFilter < 2080)
{
recAutoFilter.size = cbAutoFilter;
recAutoFilter.readFields(record);
}
}
} // namespace XLS

View File

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

View File

@ -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));
@ -74,16 +77,53 @@ void Feat11FieldDataItem::load(CFRecord& record)
{
dxfFmtAgg.size = cbFmtAgg;
record >> dxfFmtAgg;
}
}
if (cbFmtInsertRow > 0)
{
dxfFmtInsertRow.size = cbFmtInsertRow;
record >> dxfFmtInsertRow;
}
}
if (fAutoFilter)
{
record >> AutoFilter;
}
if (fLoadXmapi)
{
record >> rgXmap;
}
if (fLoadFmla)
{
fmla.load(record);
}
if (fLoadTotalFmla)
{
if (fLoadTotalArray)
{
totalArrayFmla.load(record);
}
else
{
totalFmla.load(record);
}
}
if (fLoadTotalStr)
{
record >> strTotal;
}
if (lt == 0x00000001)
{
wssInfo.lfdt = lfdt;
record >> wssInfo;
}
if (lt == 0x00000003)
{
record >> qsif;
}
if (bDiskHdrCache)
{
record >> dskHdrCache;
}
}

View File

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

View File

@ -0,0 +1,66 @@
/*
* (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

View File

@ -0,0 +1,59 @@
/*
* (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

View File

@ -0,0 +1,104 @@
/*
* (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

View File

@ -0,0 +1,80 @@
/*
* (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

View File

@ -0,0 +1,97 @@
/*
* (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

View File

@ -0,0 +1,90 @@
/*
* (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

View File

@ -0,0 +1,72 @@
/*
* (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

View File

@ -0,0 +1,56 @@
/*
* (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

View File

@ -122,8 +122,6 @@ void OfficeArtFOPTE::load(XLS::CFRecord& record)
opid = GETBITS(flags, 0, 13);
fBid = GETBIT(flags, 14);
fComplex = GETBIT(flags, 15);
// TODO: complex data shall be parsed here
}
OfficeArtFOPTEPtr OfficeArtFOPTE::load_and_create(XLS::CFRecord& record)

View File

@ -37,8 +37,7 @@ namespace XLS
{
ObjectParsedFormula::ObjectParsedFormula()
: ParsedFormula(CellRef())
ObjectParsedFormula::ObjectParsedFormula() : ParsedFormula(CellRef())
{
}

View File

@ -34,7 +34,7 @@
#include <Binary/CFRecord.h>
#include "StringPtgParser.h"
#include <boost/algorithm/string.hpp>
//#include <boost/algorithm/string.hpp>
namespace XLS
{

View File

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

View File

@ -32,7 +32,8 @@
#pragma once
#include "../Biff_records/BiffRecord.h"
#include "../Biff_structures/BiffString.h"
#include "Feat11FieldDataItem.h"
namespace XLS
{

View File

@ -43,7 +43,7 @@ class Xnum : public BiffStructure
public:
BiffStructurePtr clone();
static const ElementType type = typeXnum;
static const ElementType type = typeXnum;
virtual void load(CFRecord& record);

View File

@ -31,11 +31,13 @@
*/
#include "AUTOFILTER.h"
#include <Logic/Biff_records/AutoFilterInfo.h>
#include <Logic/Biff_records/AutoFilter12.h>
#include <Logic/Biff_records/AutoFilter.h>
#include <Logic/Biff_records/ContinueFrt12.h>
#include <Logic/Biff_unions/SORTDATA12.h>
#include "SORTDATA12.h"
#include "../Biff_records/AutoFilterInfo.h"
#include "../Biff_records/AutoFilter12.h"
#include "../Biff_records/AutoFilter.h"
#include "../Biff_records/ContinueFrt12.h"
#include "../Biff_structures/AF12Criteria.h"
namespace XLS
{
@ -45,12 +47,10 @@ AUTOFILTER::AUTOFILTER()
{
}
AUTOFILTER::~AUTOFILTER()
{
}
class Parenthesis_AUTOFILTER_1: public ABNFParenthesis
{
BASE_OBJECT_DEFINE_CLASS_NAME(Parenthesis_AUTOFILTER_1)
@ -79,7 +79,6 @@ BaseObjectPtr AUTOFILTER::clone()
return BaseObjectPtr(new AUTOFILTER(*this));
}
// AUTOFILTER = AutoFilterInfo *(AutoFilter / (AutoFilter12 *ContinueFrt12)) *SORTDATA12
const bool AUTOFILTER::loadContent(BinProcessor& proc)
{

View File

@ -31,13 +31,14 @@
*/
#include "CONDFMTS.h"
#include <Logic/Biff_unions/CONDFMT.h>
#include <Logic/Biff_unions/CONDFMT12.h>
#include <Logic/Biff_records/CFEx.h>
#include <Logic/Biff_records/CF12.h>
#include <Logic/Biff_records/CF.h>
#include <Logic/Biff_records/CondFmt.h>
#include <Logic/Biff_records/CondFmt12.h>
#include "CONDFMT.h"
#include "CONDFMT12.h"
#include "../Biff_records/CFEx.h"
#include "../Biff_records/CF12.h"
#include "../Biff_records/CF.h"
#include "../Biff_records/CondFmt.h"
#include "../Biff_records/CondFmt12.h"
namespace XLS
{
@ -84,7 +85,9 @@ public:
{
return false;
}
//proc.optional<CF12>(); // TODO: uncomment this and pass a base cell reference to the constructor
CellRef ref;
CF12 cf (ref);
proc.optional(cf);
return true;
};
};
@ -113,18 +116,27 @@ const bool CONDFMTS::loadContent(BinProcessor& proc)
count = proc.repeated<Parenthesis_CONDFMTS_2>(0, 0);
if (count > 0) res = true;
while(count > 0)
while(!elements_.empty())
{
m_arCFEx.insert(m_arCFEx.begin(), elements_.back());
elements_.pop_back();
count--;
}
if (elements_.front()->get_type() == typeCFEx)
{
_data_ex data_ex;
data_ex.ex = elements_.front();
m_arCFEx.push_back(data_ex);
}
else
{
if (!m_arCFEx.empty())
m_arCFEx.back().cf12 = elements_.front();
}
elements_.pop_front();
}
//----------------------------------------------------------------------------
for (size_t i = 0 ; i < m_arCFEx.size(); i++)
{
if (!m_arCFEx[i]) continue;
CFEx * cfEx = dynamic_cast<CFEx *>(m_arCFEx[i].get());
CFEx * cfEx = dynamic_cast<CFEx *>(m_arCFEx[i].ex.get());
if (cfEx)
{
size_t ind_cf = cfEx->content.icf;
@ -139,7 +151,10 @@ const bool CONDFMTS::loadContent(BinProcessor& proc)
{
CF* cf = dynamic_cast<CF *>(CONDFMT_->m_arCF[ind_cf].get());
if (cf)
cf->m_CFEx = m_arCFEx[i];
{
cf->m_CFEx = m_arCFEx[i].ex;
cf->m_CF12 = m_arCFEx[i].cf12;
}
}
}
@ -151,7 +166,10 @@ const bool CONDFMTS::loadContent(BinProcessor& proc)
{
CF12* cf = dynamic_cast<CF12 *>(CONDFMT12_->m_arCF12[ind_cf].get());
if (cf)
cf->m_CFEx = m_arCFEx[i];
{
cf->m_CFEx = m_arCFEx[i].ex;
cf->m_CF12_2 = m_arCFEx[i].cf12;
}
}
}
}

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of CONDFMTS union of records
class CONDFMTS: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(CONDFMTS)
@ -54,7 +52,13 @@ public:
int serialize(std::wostream & stream);
std::vector<BaseObjectPtr> m_arCONDFMT; //CONDFMT or CONDFMT12
std::vector<BaseObjectPtr> m_arCFEx;
struct _data_ex
{
BaseObjectPtr ex;
BaseObjectPtr cf12;
};
std::vector<_data_ex> m_arCFEx;
};
} // namespace XLS

View File

@ -162,8 +162,10 @@ int CUSTOMVIEW::serialize(std::wostream & stream)
CP_XML_NODE(L"pane")
{
if (userSView->operNumX != 0) CP_XML_ATTR(L"xSplit", userSView->operNumX);
if (userSView->operNumY != 0) CP_XML_ATTR(L"ySplit", userSView->operNumY);
if (userSView->operNumX.data.value != 0)
CP_XML_ATTR(L"xSplit", std::to_wstring(userSView->operNumX.data.value));
if (userSView->operNumY.data.value != 0)
CP_XML_ATTR(L"ySplit", std::to_wstring(userSView->operNumY.data.value));
if (userSView->pane_top_left_cell != L"A1")CP_XML_ATTR(L"topLeftCell", userSView->pane_top_left_cell);

View File

@ -152,16 +152,16 @@ int DVAXIS::serialize(std::wostream & _stream)
{
CP_XML_NODE(L"c:max")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMax));
else CP_XML_ATTR(L"val", value_range->numMax);
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMax.data.value));
else CP_XML_ATTR(L"val", value_range->numMax.data.value);
}
}
if (value_range->fAutoMin == false)
{
CP_XML_NODE(L"c:min")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMin));
else CP_XML_ATTR(L"val", value_range->numMin);
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMin.data.value));
else CP_XML_ATTR(L"val", value_range->numMin.data.value);
}
}
}
@ -202,16 +202,16 @@ int DVAXIS::serialize(std::wostream & _stream)
{
CP_XML_NODE(L"c:majorUnit")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMajor));
else CP_XML_ATTR(L"val", value_range->numMajor);
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMajor.data.value));
else CP_XML_ATTR(L"val", value_range->numMajor.data.value);
}
}
if (value_range->fAutoMinor == false)
{
CP_XML_NODE(L"c:minorUnit")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMinor));
else CP_XML_ATTR(L"val", value_range->numMinor);
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMinor.data.value));
else CP_XML_ATTR(L"val", value_range->numMinor.data.value);
}
}
}

View File

@ -31,15 +31,23 @@
*/
#include "FEAT11.h"
#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"
#include "../Biff_records/AutoFilter12.h"
#include "../Biff_records/ContinueFrt12.h"
#include "../Biff_records/List12.h"
#include "../Biff_unions/SORTDATA12.h"
#include "../Biff_records/SortData.h"
#include "../Biff_structures/List12BlockLevel.h"
#include "../Biff_structures/List12TableStyleClientInfo.h"
#include "../Biff_structures/List12DisplayName.h"
#include "../Biff_structures/Feat11FieldDataItem.h"
#include "../Biff_structures/AF12Criteria.h"
#include "../Biff_structures/SortCond12.h"
namespace XLS
{
@ -54,8 +62,6 @@ FEAT11::~FEAT11()
{
}
class Parenthesis_FEAT11_1: public ABNFParenthesis
{
BASE_OBJECT_DEFINE_CLASS_NAME(Parenthesis_FEAT11_1)
@ -125,9 +131,13 @@ const bool FEAT11::loadContent(BinProcessor& proc)
case typeList12:
{
if (m_arFEAT.back().m_AutoFilter12)
m_arFEAT.back().m_arList12_second.push_back(elements_.front());
{
m_arFEAT.back().m_arList12_2.push_back(elements_.front());
}
else
{
m_arFEAT.back().m_arList12.push_back(elements_.front());
}
}break;
case typeAutoFilter12:
{
@ -143,13 +153,147 @@ const bool FEAT11::loadContent(BinProcessor& proc)
return true;
}
int FEAT11::serialize(std::wostream & strm)
int FEAT11::serialize(std::wostream & strm, size_t index)
{
FeatHdr11 * feature = dynamic_cast<FeatHdr11*>(m_FeatHdr11.get());
Feature11 *feature11 = dynamic_cast<Feature11*>(m_arFEAT[index].m_Feature.get());
Feature12 *feature12 = dynamic_cast<Feature12*>(m_arFEAT[index].m_Feature.get());
AutoFilter12 *filter = dynamic_cast<AutoFilter12*>(m_arFEAT[index].m_AutoFilter12.get());
SORTDATA12 *sort = dynamic_cast<SORTDATA12*>(m_arFEAT[index].m_SORTDATA12.get());
if (feature12 && !feature11)
{
feature11 = &feature12->feature11;
}
List12BlockLevel *block_level = NULL;
List12TableStyleClientInfo *table_style = NULL;
List12DisplayName *display_name = NULL;
for (size_t i = 0; i < m_arFEAT[index].m_arList12.size(); i++)
{
List12* list_prop = dynamic_cast<List12*>(m_arFEAT[index].m_arList12[i].get());
if (!list_prop) continue;
if (!block_level) block_level = dynamic_cast<List12BlockLevel*> (list_prop->rgbList12.get());
if (!table_style) table_style = dynamic_cast<List12TableStyleClientInfo*> (list_prop->rgbList12.get());
if (!display_name) display_name = dynamic_cast<List12DisplayName*> (list_prop->rgbList12.get());
}
//----------------------------------------------------------------------------------------------------------------------------------
std::wstring display, comment;
if (display_name)
{
display = display_name->stListName.value();
comment = display_name->stListComment.value();
}
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"table")
{
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
if (feature11)
{
if (display.empty()) display = feature11->rgbFeat.rgbName.value();
CP_XML_ATTR(L"id", feature11->rgbFeat.idList);
CP_XML_ATTR(L"name", feature11->rgbFeat.rgbName.value());
CP_XML_ATTR(L"displayName", display);
CP_XML_ATTR(L"ref", feature11->sqref);
if (!comment.empty())
CP_XML_ATTR(L"comment", comment);
if (block_level)
{
if (!block_level->stData.value().empty())
CP_XML_ATTR(L"dataCellStyle", block_level->stData.value());
}
if (feature11->rgbFeat.fAutoFilter && (filter || sort))
{
if(sort)
{
SortData *sort_data = dynamic_cast<SortData*>(sort->m_SortData.get());
CP_XML_NODE(L"autoFilter")
{
//if (filter)
//else
CP_XML_ATTR(L"ref", sort_data->rfx);
}
CP_XML_NODE(L"sortState")
{
CP_XML_ATTR(L"ref", sort_data->rfx);
for (size_t s = 0; s < sort_data->sortCond12Array.size(); s++)
{
SortCond12 *sort_cond = dynamic_cast<SortCond12*>(sort_data->sortCond12Array[s].get());
CP_XML_NODE(L"sortCondition")
{
CP_XML_ATTR(L"descending", sort_cond->fSortDes);
CP_XML_ATTR(L"ref", sort_cond->rfx.toString());
}
}
}
}
else
{
CP_XML_NODE(L"autoFilter")
{
//CP_XML_ATTR(L"ref", filter->rfx);
for (size_t k = 0 ; k < (std::min)((size_t)1, filter->arAF12Criteries.size()); k++)
{
AF12Criteria * af12Criteria = dynamic_cast<AF12Criteria *>(filter->arAF12Criteries[k].get());
if (af12Criteria == NULL) continue;
//CP_XML_NODE(L"filter")
{
//CP_XML_ATTR(L"val", af12Criteria->_str);
CP_XML_ATTR(L"ref", af12Criteria->_str);
}
}
}
}
}
CP_XML_NODE(L"tableColumns")
{
CP_XML_ATTR(L"count", feature11->rgbFeat.arFieldData.size());
for (size_t i = 0; i < feature11->rgbFeat.arFieldData.size(); i++)
{
Feat11FieldDataItem* field = dynamic_cast<Feat11FieldDataItem*>(feature11->rgbFeat.arFieldData[i].get());
if(!field) continue;
CP_XML_NODE(L"tableColumn")
{
CP_XML_ATTR(L"id", field->idField);
CP_XML_ATTR(L"name", field->strCaption.value());
if (field->dxfFmtAgg.bExist ||
field->dxfFmtInsertRow.bExist)
{
//if (!field->stData.value().empty())
// CP_XML_ATTR(L"dataCellStyle", field->stData.value());
//if (!field->stData.value().empty())
// CP_XML_ATTR(L"dataDxfId", field->stData.value());
}
//totalsRowFunction
}
}
}
}
if (table_style)
{
CP_XML_NODE(L"tableStyleInfo")
{
CP_XML_ATTR(L"name", table_style->stListStyleName.value());
CP_XML_ATTR(L"showFirstColumn", table_style->nFirstColumn);
CP_XML_ATTR(L"showLastColumn", table_style->nLastColumn);
CP_XML_ATTR(L"showRowStripes", table_style->nRowStripes);
CP_XML_ATTR(L"showColumnStripes", table_style->nColumnStripes);
}
}
}
}
return 0;

View File

@ -47,23 +47,23 @@ public:
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
int serialize(std::wostream & stream);
int serialize(std::wostream & stream, size_t index);
static const ElementType type = typeFEAT11;
BaseObjectPtr m_FeatHdr11;
struct _data
{
BaseObjectPtr m_Feature; //11 or 12
BaseObjectPtr m_AutoFilter12;
std::vector<BaseObjectPtr> m_arList12;
std::vector<BaseObjectPtr> m_arList12_second;
std::vector<BaseObjectPtr> m_arAutoFilter12;
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

View File

@ -167,15 +167,13 @@ int PAGESETUP::serialize(std::wostream & stream)
{
if (setup)
{
if (setup->numHdr.value())
{
CP_XML_ATTR(L"header", setup->numHdr);
CP_XML_ATTR(L"header", std::to_wstring(setup->numHdr.data.value));
header = true;
}
if (setup->numFtr.value())
{
CP_XML_ATTR(L"footer", setup->numFtr);
CP_XML_ATTR(L"footer", std::to_wstring(setup->numFtr.data.value));
footer = true;
}
}
@ -187,26 +185,26 @@ int PAGESETUP::serialize(std::wostream & stream)
if (!t)
{
TopMargin* top = dynamic_cast<TopMargin*>(it->get());
CP_XML_ATTR(L"top", top->num);
CP_XML_ATTR(L"top", std::to_wstring(top->num.data.value));
t = true;
}break;
case typeBottomMargin:
if (!b)
{
BottomMargin* bottom = dynamic_cast<BottomMargin*>(it->get());
CP_XML_ATTR(L"bottom", bottom->num);
CP_XML_ATTR(L"bottom", std::to_wstring(bottom->num.data.value));
b= true;
}break;
case typeLeftMargin:
{
LeftMargin* left = dynamic_cast<LeftMargin*>(it->get());
CP_XML_ATTR(L"left", left->num);
CP_XML_ATTR(L"left", std::to_wstring(left->num.data.value));
l= true;
}break;
case typeRightMargin:
{
RightMargin* right = dynamic_cast<RightMargin*>(it->get());
CP_XML_ATTR(L"right", right->num);
CP_XML_ATTR(L"right", std::to_wstring(right->num.data.value));
r= true;
}break;
}
@ -219,9 +217,9 @@ int PAGESETUP::serialize(std::wostream & stream)
if (!r) CP_XML_ATTR(L"right" , 0.75);
}
CP_XML_NODE(L"pageSetup")
{
}
//CP_XML_NODE(L"pageSetup") - для chartsheet аккуратнее
//{
//}
if (m_Header || m_Footer)
{

View File

@ -163,19 +163,19 @@ int TABLESTYLES::serialize(std::wostream & stream)
case 0x0000000a: CP_XML_ATTR(L"type", L"lastHeaderCell"); break;
case 0x0000000b: CP_XML_ATTR(L"type", L"firstTotalCell"); break;
case 0x0000000c: CP_XML_ATTR(L"type", L"lastTotalCell"); break;
case 0x0000000d: CP_XML_ATTR(L"type", L"firstSubtotalColumn"); break;//??
case 0x0000000e: CP_XML_ATTR(L"type", L"firstSubtotalColumn"); break;//even
case 0x0000000f: CP_XML_ATTR(L"type", L"lastSubtotalColumn"); break;//odd
case 0x00000010: CP_XML_ATTR(L"type", L"firstSubtotalRow"); break;//??
case 0x00000011: CP_XML_ATTR(L"type", L"firstSubtotalRow"); break;//even
case 0x00000012: CP_XML_ATTR(L"type", L"lastSubtotalRow"); break;//odd
case 0x0000000d: CP_XML_ATTR(L"type", L"firstSubtotalColumn"); break;
case 0x0000000e: CP_XML_ATTR(L"type", L"secondSubtotalColumn"); break;
case 0x0000000f: CP_XML_ATTR(L"type", L"thirdSubtotalColumn"); break;
case 0x00000010: CP_XML_ATTR(L"type", L"firstSubtotalRow"); break;
case 0x00000011: CP_XML_ATTR(L"type", L"secondSubtotalRow"); break;
case 0x00000012: CP_XML_ATTR(L"type", L"thirdSubtotalRow"); break;
case 0x00000013: CP_XML_ATTR(L"type", L"blankRow"); break;
case 0x00000014: CP_XML_ATTR(L"type", L"firstColumnSubheading");break;
case 0x00000015: CP_XML_ATTR(L"type", L"firstColumnSubheading");break;
case 0x00000016: CP_XML_ATTR(L"type", L"lastColumnSubheading"); break;
case 0x00000015: CP_XML_ATTR(L"type", L"secondColumnSubheading");break;
case 0x00000016: CP_XML_ATTR(L"type", L"thirdColumnSubheading");break;
case 0x00000017: CP_XML_ATTR(L"type", L"firstRowSubheading"); break;
case 0x00000018: CP_XML_ATTR(L"type", L"firstRowSubheading"); break;
case 0x00000019: CP_XML_ATTR(L"type", L"lastRowSubheading"); break;
case 0x00000018: CP_XML_ATTR(L"type", L"secondRowSubheading"); break;
case 0x00000019: CP_XML_ATTR(L"type", L"thirdRowSubheading"); break;
case 0x0000001a: CP_XML_ATTR(L"type", L"pageFieldLabels"); break;
case 0x0000001b: CP_XML_ATTR(L"type", L"pageFieldValues"); break;
}

View File

@ -215,7 +215,6 @@ void GlobalWorkbookInfo::GetDigitFontSizePixels()
}
catch(...)
{
// TODO: default value!
}
}

View File

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

View File

@ -546,6 +546,7 @@ enum ElementType
typeBopPopCustomPiesIndices,
typeIXFCellMulBlankSpecial,
typeAddinUdf,
typeAF12CellIcon,
typeAF12Criteria,
typeAFDOper,
typeAFDOperRk,
@ -557,6 +558,7 @@ enum ElementType
typeBookExt_Conditional11,
typeBookExt_Conditional12,
typeBuiltInStyle,
typeCachedDiskHeader,
typeCell,
typeCellOffsetResender,
typeCellRangeRef,
@ -596,6 +598,11 @@ enum ElementType
typeFeat11RgSharepointIdDel,
typeFeat11RgSharepointIdChange,
typeFeat11RgInvalidCells,
typeFeat11XMapEntry2,
typeFeat11XMapEntry,
typeFeat11XMap,
typeFeat11Fmla,
typeFeat11WSSListInfo,
typeFeatFormulaErr2,
typeFeatProtection,
typeFeatSmartTag,

View File

@ -75,9 +75,6 @@
#include "../XlsFormat/Logic/Biff_records/IMDATA.h"
#include "../XlsFormat/Logic/Biff_records/Note.h"
#include "../XlsFormat/Logic/Biff_records/WsBool.h"
#include "../XlsFormat/Logic/Biff_records/FeatHdr11.h"
#include "../XlsFormat/Logic/Biff_records/Feature11.h"
#include "../XlsFormat/Logic/Biff_records/Feature12.h"
#include "../XlsFormat/Logic/Biff_structures/URLMoniker.h"
#include "../XlsFormat/Logic/Biff_structures/FileMoniker.h"
@ -994,30 +991,18 @@ void XlsConverter::convert(ODRAW::OfficeArtBStoreContainer* art_bstore, int star
void XlsConverter::convert(XLS::FEAT11 * shared_feature)
{
if (!shared_feature) return;
xlsx_context->start_table();
std::wstringstream strm;
shared_feature->serialize(strm);
for (size_t i = 0; i < shared_feature->m_arFEAT.size(); i++)
{
xlsx_context->start_table();
xlsx_context->get_tables_context().add_table(strm.str());
std::wstringstream strm;
shared_feature->serialize(strm, i);
xlsx_context->end_table();
//XLS::FeatHdr11 * feature = dynamic_cast<XLS::FeatHdr11*>(shared_feature->m_FeatHdr11.get());
xlsx_context->get_tables_context().add_table(strm.str());
//for (size_t i = 0; i < shared_feature->m_arFEAT.size(); i++)
//{
// XLS::Feature11 * feature11 = dynamic_cast<XLS::Feature11*>(shared_feature->m_arFEAT[i].m_Feature.get());
// XLS::Feature12 * feature12 = dynamic_cast<XLS::Feature12*>(shared_feature->m_arFEAT[i].m_Feature.get());
//
// if (feature11)
// {
// }
// else if (feature12)
// {
// }
//}
xlsx_context->end_table();
}
}
void XlsConverter::convert(XLS::HLINK * HLINK_)

View File

@ -128,10 +128,6 @@ void xlsx_conversion_context::set_sheet_type(int type)
if (sheets_.empty()) return;
sheets_.back()->type = type;
if (type == 3)
{
get_sheet_context().set_chart_view();
}
}
void xlsx_conversion_context::start_table()
{
@ -170,6 +166,8 @@ void xlsx_conversion_context::set_sheet_id(int id)
{
if (id < 0) return;
sheets_.back()->id = id;
sheets_map_.insert(std::make_pair(id, sheets_.size() - 1));
}
void xlsx_conversion_context::start_chart()
{
@ -246,8 +244,11 @@ void xlsx_conversion_context::end_document()
{
std::wstringstream workbook_content;
for (size_t i = 0; i < sheets_.size(); i++)
//for (size_t i = 0; i < sheets_.size(); i++) нужно по id
for (std::map<int, int>::iterator it = sheets_map_.begin(); it != sheets_map_.end(); it++)
{
int i = it->second;
package::sheet_content_ptr content = package::sheet_content::create();
const std::wstring slideRId = std::wstring(L"sId") + std::to_wstring(i + 1);

View File

@ -130,7 +130,9 @@ private:
size_t next_vml_file_id_; //используется для footer/header & comments
std::map<int, int> sheets_map_;
std::vector<xlsx_xml_worksheet_ptr> sheets_;
std::wstring connections_;
std::map<std::wstring, std::wstring>query_tables_;
std::map<std::wstring, std::wstring>control_props_;

View File

@ -59,21 +59,6 @@ void xlsx_sheet_context::start_table()
tables_state_.push_back( table_state_ptr(new table_state(context_)));
}
void xlsx_sheet_context::set_chart_view()
{
CP_XML_WRITER(context_.current_sheet().sheetViews())
{
CP_XML_NODE(L"sheetViews")
{
CP_XML_NODE(L"sheetView")
{
CP_XML_ATTR(L"showGridLines", 0);
CP_XML_ATTR(L"workbookViewId", 0);
}
}
}
}
void xlsx_sheet_context::end_table()
{
if (!get_drawing_context().empty())

View File

@ -59,7 +59,6 @@ public:
xlsx_sheet_context(xlsx_conversion_context & Context);
void start_table();
void set_chart_view();
void end_table();
xlsx_drawing_context & get_drawing_context();

View File

@ -375,6 +375,7 @@ SOURCES += \
../XlsFormat/Logic/Biff_structures/AFDOper.cpp \
../XlsFormat/Logic/Biff_structures/AFDOperRk.cpp \
../XlsFormat/Logic/Biff_structures/AFDOperStr.cpp \
../XlsFormat/Logic/Biff_structures/AF12CellIcon.cpp \
../XlsFormat/Logic/Biff_structures/AntiMoniker.cpp \
../XlsFormat/Logic/Biff_structures/ArrayParsedFormula.cpp \
../XlsFormat/Logic/Biff_structures/Bes.cpp \
@ -642,6 +643,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 \
@ -1178,6 +1184,7 @@ HEADERS += \
../XlsFormat/Logging/Logger.h \
../XlsFormat/Logic/Biff_structures/AddinUdf.h \
../XlsFormat/Logic/Biff_structures/AF12Criteria.h \
../XlsFormat/Logic/Biff_structures/AF12CellIcon.h \
../XlsFormat/Logic/Biff_structures/AFDOper.h \
../XlsFormat/Logic/Biff_structures/AFDOperRk.h \
../XlsFormat/Logic/Biff_structures/AFDOperStr.h \
@ -1425,6 +1432,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 \

View File

@ -619,6 +619,12 @@
#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_structures/AF12CellIcon.cpp"
#include "../XlsFormat/Logic/Biff_unions/AI.cpp"
#include "../XlsFormat/Logic/Biff_unions/ATTACHEDLABEL_bu.cpp"

View File

@ -3121,6 +3121,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\AddinUdf.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\AF12CellIcon.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\AF12CellIcon.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\AF12Criteria.cpp"
>
@ -3253,6 +3261,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 +3781,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 +4141,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"
>

View File

@ -15,7 +15,7 @@ cd "%SCRIPTPATH%%PLATFORM%"
if exist "cef_binary.7z" (
echo "cef_binary.7z already downloaded"
) else (
Powershell.exe Invoke-WebRequest -OutFile cef_binary.7z http://d2ettrnqo7v976.cloudfront.net/cef/2454/%PLATFORM%/cef_binary.7z
Powershell.exe Invoke-WebRequest -OutFile cef_binary.7z http://d2ettrnqo7v976.cloudfront.net/cef/3163/%PLATFORM%/cef_binary.7z
)
SET UNSIP_PROGRAMM="%ProgramFiles%\7-Zip\7z.exe"

View File

@ -42,7 +42,7 @@ if [[ -f "cef_binary.7z" ]]
then
echo "cef_binary already downloaded"
else
wget http://d2ettrnqo7v976.cloudfront.net/cef/2454/$platform$arch/cef_binary.7z
wget http://d2ettrnqo7v976.cloudfront.net/cef/3163/$platform$arch/cef_binary.7z
fi
if [ -d cef_binary ]
then

View File

@ -97,7 +97,12 @@ public :
m_bComplete = (CURLE_OK == res);
if (m_bComplete)
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length());
{
if (m_sFilePath.empty())
m_sFilePath = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)sOut.c_str(), sOut.length());
else
NSFile::CFileBinary::Move(UTF8_TO_U(sOut), m_sFilePath);
}
//int nRes = execl("/usr/bin/wget", stringWstingToUtf8String (m_sFileUrl).c_str(), "-P", stringWstingToUtf8String (m_sFilePath).c_str(), (char *)NULL);
//m_bComplete = nRes >= 0;

View File

@ -70,7 +70,7 @@ public :
virtual int DownloadFile()
{
CoInitialize ( NULL );
if ( S_OK != _DownloadFile ( m_sFileUrl ) )
if ( /*S_OK != _DownloadFile ( m_sFileUrl )*/TRUE )
{
HRESULT hrResultAll = DownloadFileAll(m_sFileUrl, m_sFilePath);

View File

@ -939,7 +939,7 @@ namespace NSDoctRenderer
MoveFileOpen(path, sFileCopy);
COfficeFileFormatChecker oChecker;
if (!oChecker.isOfficeFile(path))
if (!oChecker.isOfficeFile(sFileCopy))
return false;
if (oChecker.nFileType & AVS_OFFICESTUDIO_FILE_DOCUMENT)

View File

@ -1194,5 +1194,5 @@ bool Doct_renderer_SaveFile_ForBuilder(int nFormat, const std::wstring& strDstFi
oParams.m_strDstFilePath = strDstFile;
return NSDoctRenderer::CDoctRenderer_Private::Doct_renderer_SaveFile(&oParams,
pNative, isolate, global_js, args, try_catch, strError, true);
pNative, isolate, global_js, args, try_catch, strError, false);
}

View File

@ -298,7 +298,8 @@ namespace BinXlsxRW
Type = 2,
Value = 3,
Formula = 4,
RefRowCol = 5
RefRowCol = 5,
ValueText = 6
};}
namespace c_oSerFormulaTypes{enum c_oSerFormulaTypes
{

View File

@ -79,7 +79,7 @@ namespace BinXlsxRW {
return c_oSerConstants::ReadOk;
}
res = (((CallbackType*)poFuncObj)->*fReadFunction)(type, length, arg);
if(res == c_oSerConstants::ReadUnknown && length > 0)
if(res == c_oSerConstants::ReadUnknown)
{
m_oBufferedStream.GetPointer(length);
res = c_oSerConstants::ReadOk;

View File

@ -3555,6 +3555,11 @@ namespace BinXlsxRW {
pCell->m_oValue.Init();
pCell->m_oValue->m_sText.append(OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(dValue));
}
else if(c_oSerCellTypes::ValueText == type)
{
pCell->m_oValue.Init();
pCell->m_oValue->m_sText.append(m_oBufferedStream.GetString4(length));
}
else
res = c_oSerConstants::ReadUnknown;
return res;