Commit c08c960c authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 02ece25a
......@@ -66,7 +66,7 @@ CFRecordPtr CFStreamCacheReader::getNextRecord(const CFRecordType::TypeId desira
{
CFRecordType::TypeString rec_name = records_cache.front()->getTypeString();
//Log::warning(rec_name);
Log::warning(rec_name);
if (desirable_type == rt_MsoDrawingGroup) // объединяем rt_MsoDrawingGroup + rt_Continue в один блок
{
......
......@@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/LongRGB.h>
#include "../Biff_structures/LongRGB.h"
namespace XLS
{
......
......@@ -30,27 +30,41 @@
*
*/
#include "SXFDB.h"
#include "SXDB.h"
namespace XLS
{
SXFDB::SXFDB()
SXDB::SXDB()
{
}
SXFDB::~SXFDB()
SXDB::~SXDB()
{
}
BaseObjectPtr SXFDB::clone()
BaseObjectPtr SXDB::clone()
{
return BaseObjectPtr(new SXFDB(*this));
return BaseObjectPtr(new SXDB(*this));
}
void SXFDB::readFields(CFRecord& record)
void SXDB::readFields(CFRecord& record)
{
unsigned short flags, unused2;
record >> crdbdb >> idstm >> flags >> unused2 >> cfdbdb >> cfdbTot >> crdbUsed >> vsType >> cchWho;
if (cchWho > 0 && cchWho < 0xffff)
{
rgb.setSize(cchWho);
record >> rgb;
}
fSaveData = GETBIT(flags, 0);
fInvalid = GETBIT(flags, 1);
fRefreshOnLoad = GETBIT(flags, 2);
fOptimizeCache = GETBIT(flags, 3);
fBackgroundQuery = GETBIT(flags, 4);
fEnableRefresh = GETBIT(flags, 5);
}
} // namespace XLS
......
......@@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
......@@ -50,6 +51,21 @@ public:
static const ElementType type = typeSXDB;
_INT32 crdbdb;
unsigned short idstm;
bool fSaveData;
bool fInvalid;
bool fRefreshOnLoad;
bool fOptimizeCache;
bool fBackgroundQuery;
bool fEnableRefresh;
short cfdbdb;
short cfdbTot;
unsigned short crdbUsed;
short vsType;
unsigned short cchWho;
XLUnicodeStringNoCch rgb;
};
......
......@@ -51,6 +51,7 @@ BaseObjectPtr SXDBEx::clone()
void SXDBEx::readFields(CFRecord& record)
{
record >> numDate >> cSxFormula;
}
} // namespace XLS
......
......@@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
......@@ -51,6 +51,9 @@ public:
static const ElementType type = typeSXDBEx;
DateAsNum numDate;
_UINT32 cSxFormula; //count formulas
};
......
......@@ -30,27 +30,45 @@
*
*/
#include "SXDB.h"
#include "SXFDB.h"
namespace XLS
{
SXDB::SXDB()
SXFDB::SXFDB()
{
}
SXDB::~SXDB()
SXFDB::~SXFDB()
{
}
BaseObjectPtr SXDB::clone()
BaseObjectPtr SXFDB::clone()
{
return BaseObjectPtr(new SXDB(*this));
return BaseObjectPtr(new SXFDB(*this));
}
void SXDB::readFields(CFRecord& record)
void SXFDB::readFields(CFRecord& record)
{
unsigned short flags;
record >> flags >> ifdbParent >> ifdbBase >> citmUnq >> csxoper >> cisxoper >> catm;
record >> stFieldName;
fAllAtoms = GETBIT(flags, 0);
fSomeUnhashed = GETBIT(flags, 1);
fUsed = GETBIT(flags, 2);
fHasParent = GETBIT(flags, 3);
fRangeGroup = GETBIT(flags, 4);
fNumField = GETBIT(flags, 5);
fTextEtcField = GETBIT(flags, 7);
fnumMinMaxValid = GETBIT(flags, 8);
fShortIitms = GETBIT(flags, 9);
fNonDates = GETBIT(flags, 10);
fDateInField = GETBIT(flags, 11);
fServerBased = GETBIT(flags, 13);
fCantGetUniqueItems = GETBIT(flags, 14);
fCalculatedField = GETBIT(flags, 15);
}
} // namespace XLS
......
......@@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
......@@ -50,7 +51,27 @@ public:
static const ElementType type = typeSXFDB;
bool fAllAtoms;
bool fSomeUnhashed;
bool fUsed;
bool fHasParent;
bool fRangeGroup;
bool fNumField;
bool fTextEtcField;
bool fnumMinMaxValid;
bool fShortIitms;
bool fNonDates;
bool fDateInField;
bool fServerBased;
bool fCantGetUniqueItems;
bool fCalculatedField;
unsigned short ifdbParent;
unsigned short ifdbBase;
unsigned short citmUnq;
unsigned short csxoper;
unsigned short cisxoper;
unsigned short catm;
XLUnicodeString stFieldName;
};
} // 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 "SxIsxoper.h"
namespace XLS
{
SxIsxoper::SxIsxoper()
{
}
SxIsxoper::~SxIsxoper()
{
}
BaseObjectPtr SxIsxoper::clone()
{
return BaseObjectPtr(new SxIsxoper(*this));
}
void SxIsxoper::readFields(CFRecord& record)
{
int size = (record.getDataSize() - record.getRdPtr()) / 2;
for (int i = 0; i < size; i++)
{
unsigned short val;
record >> val;
rgSxIsxoper.push_back(val);
}
}
} // 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 "BiffRecordContinued.h"
namespace XLS
{
class SxIsxoper: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxIsxoper)
BASE_OBJECT_DEFINE_CLASS_NAME(SxIsxoper)
public:
SxIsxoper();
~SxIsxoper();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxIsxoper;
std::vector<unsigned short> rgSxIsxoper;
};
} // namespace XLS
......@@ -62,5 +62,7 @@ public:
} data;
};
typedef Xnum DateAsNum;
} // namespace XLS
......@@ -62,11 +62,15 @@ const bool DBB::loadContent(BinProcessor& proc)
m_SXDBB = elements_.back();
elements_.pop_back();
}
if(proc.optional<SXOPER>())
int count = proc.repeated<SXOPER>(0, 0);
while(count--)
{
m_SXOPER = elements_.back();
elements_.pop_back();
m_arSXOPER.push_back(elements_.front()); elements_.pop_front();
}
if (!m_SXDBB && m_arSXOPER.empty())
return false;
return true;
}
......
......@@ -49,8 +49,8 @@ public:
static const ElementType type = typeDBB;
BaseObjectPtr m_SXDBB;
BaseObjectPtr m_SXOPER;
BaseObjectPtr m_SXDBB;
std::vector<BaseObjectPtr> m_arSXOPER;
};
} // namespace XLS
......
......@@ -38,10 +38,31 @@
#include "../Biff_records/SXFDB.h"
#include "../Biff_records/SXFDBType.h"
#include "../Biff_records/SxIsxoper.h"
namespace XLS
{
// (*GRPSXOPER [SXRANGE / *(SxIsxoper *Continue)])
class Parenthesis_FDB: public ABNFParenthesis
{
BASE_OBJECT_DEFINE_CLASS_NAME(Parenthesis_FDB)
public:
BaseObjectPtr clone()
{
return BaseObjectPtr(new Parenthesis_FDB(*this));
}
const bool loadContent(BinProcessor& proc)
{
int count = proc.repeated<SXOPER>(0, 0);
if (!proc.optional<SXRANGE>())
{
count = proc.repeated<SxIsxoper>(0, 0);
}
return true;
};
};
FDB::FDB()
{
......@@ -82,12 +103,39 @@ const bool FDB::loadContent(BinProcessor& proc)
m_SXFMLA = elements_.back();
elements_.pop_back();
}
else if(proc.optional<Parenthesis_FDB>())
{
int count = elements_.size();
while(count > 0)
{
SXOPER * oper = dynamic_cast<SXOPER*> (elements_.front().get());
if (oper)
{
m_arGRPSXOPER.push_back(elements_.front());
}
else
{
SXRANGE *range = dynamic_cast<SXRANGE*> (elements_.front().get());
if (range)
m_SXRANGE = elements_.front();
else
{
SxIsxoper * isOper = dynamic_cast<SxIsxoper*> (elements_.front().get());
if (isOper)
m_arSxIsxoper.push_back(elements_.front());
}
}
elements_.pop_front();
count--;
}
}
int count = proc.repeated<SXOPER>(0, 0);
while(count--)
{
m_arSRCSXOPER.push_back(elements_.front()); elements_.pop_front();
}
}
return true;
}
......
......@@ -54,6 +54,9 @@ public:
BaseObjectPtr m_SXFMLA;
std::vector<BaseObjectPtr> m_arSRCSXOPER;
std::vector<BaseObjectPtr> m_arGRPSXOPER;
BaseObjectPtr m_SXRANGE;
std::vector<BaseObjectPtr> m_arSxIsxoper;
};
} // namespace XLS
......
......@@ -61,21 +61,23 @@ const bool SXOPER::loadContent(BinProcessor& proc)
if(proc.optional<SxNil>())
{
}
if(proc.optional<SXNum>())
else if(proc.optional<SXNum>())
{
}
if(proc.optional<SxBool>())
else if(proc.optional<SxBool>())
{
}
if(proc.optional<SxErr>())
else if(proc.optional<SxErr>())
{
}
if(proc.optional<SXString>())
else if(proc.optional<SXString>())
{
}
if(proc.optional<SXDtr>())
else if(proc.optional<SXDtr>())
{
}
else
return false;
return true;
}
......
......@@ -40,6 +40,32 @@
namespace XLS
{
// (3SXNum / (2SXDtr SXInt)
class Parenthesis_SXRANGE: public ABNFParenthesis
{
BASE_OBJECT_DEFINE_CLASS_NAME(Parenthesis_SXRANGE)
public:
BaseObjectPtr clone()
{
return BaseObjectPtr(new Parenthesis_SXRANGE(*this));
}
const bool loadContent(BinProcessor& proc)
{
int count = proc.repeated<SXNum>(0, 3);
if (count < 1)
{
count = proc.repeated<SXDtr>(0, 2);
if (count < 1)
return false;
if (proc.optional<SXInt>())
count++;
}
return (count == 3);
};
};
SXRANGE::SXRANGE()
{
......@@ -64,6 +90,10 @@ const bool SXRANGE::loadContent(BinProcessor& proc)
m_SXRng = elements_.back();
elements_.pop_back();
if(proc.optional<Parenthesis_SXRANGE>())
{
}
return true;
}
......
......@@ -2597,6 +2597,14 @@
RelativePath="..\XlsFormat\Logic\Biff_records\SXInt.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_records\SxIsxoper.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_records\SxIsxoper.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_records\SxItm.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