Commit 48641d5b authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - ..

parent d88ae6d3
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
*/ */
#include "DBQueryExt.h" #include "DBQueryExt.h"
#include "../Biff_structures/ConnGrbitDbtWeb.h"
#include "../Biff_structures/ConnGrbitDbtOledb.h"
#include "../Biff_structures/ConnGrbitDbtAdo.h"
namespace XLS namespace XLS
{ {
...@@ -52,10 +55,44 @@ BaseObjectPtr DBQueryExt::clone() ...@@ -52,10 +55,44 @@ BaseObjectPtr DBQueryExt::clone()
void DBQueryExt::readFields(CFRecord& record) void DBQueryExt::readFields(CFRecord& record)
{ {
#pragma message("####################### DBQueryExt record is not implemented") unsigned short flags1, flags2;
Log::error("DBQueryExt record is not implemented."); record >> frtHeaderOld >> dbt >> flags1;
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); fMaintain = GETBIT(flags1, 0);
fNewQuery = GETBIT(flags1, 1);
fImportXmlSource = GETBIT(flags1, 2);
fSPListSrc = GETBIT(flags1, 3);
fSPListReinitCache = GETBIT(flags1, 4);
fSrcIsXml = GETBIT(flags1, 7);
switch(dbt)
{
case 4: grbitDbt.reset(new ConnGrbitDbtWeb); break;
case 5: grbitDbt.reset(new ConnGrbitDbtOledb); break;
case 7: grbitDbt.reset(new ConnGrbitDbtAdo); break;
}
record >> flags1 >> bVerDbqueryEdit >> bVerDbqueryRefreshed >> bVerDbqueryRefreshableMin;
fTxtWiz = GETBIT(flags1, 0);
fTableNames = GETBIT(flags1, 1);
record.skipNunBytes(3); //unused
record >> coledb >> cstFuture >> wRefreshInterval >> wHtmlFmt >> cwParamFlags;
PBT val1;
for (unsigned short i = 0; i < cwParamFlags; i++)
{
record >> val1;
rgPbt.push_back(val1);
}
char val2;
for (unsigned short i = 0; i < cstFuture; i++)
{
record >> val2;
rgbFutureBytes += val2;
}
} }
} // namespace XLS } // namespace XLS
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
#include "../Biff_structures/PBT.h"
namespace XLS namespace XLS
{ {
// Logical representation of DBQueryExt record in BIFF8
class DBQueryExt: public BiffRecord class DBQueryExt: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(DBQueryExt) BIFF_RECORD_DEFINE_TYPE_INFO(DBQueryExt)
...@@ -48,12 +48,31 @@ public: ...@@ -48,12 +48,31 @@ public:
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeDBQueryExt; static const ElementType type = typeDBQueryExt;
FrtHeaderOld frtHeaderOld;
unsigned short dbt; //enum DataSourceType
bool fMaintain;
bool fNewQuery;
bool fImportXmlSource;
bool fSPListSrc;
bool fSPListReinitCache;
bool fSrcIsXml;
BiffStructurePtr grbitDbt;
bool fTxtWiz;
bool fTableNames;
unsigned char bVerDbqueryEdit; //DataFunctionalityLevel
unsigned char bVerDbqueryRefreshed;
unsigned char bVerDbqueryRefreshableMin;
unsigned short coledb;
unsigned short cstFuture;
unsigned short wRefreshInterval;
unsigned short wHtmlFmt;
unsigned short cwParamFlags;
std::vector<PBT> rgPbt;
std::string rgbFutureBytes;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -35,16 +35,6 @@ ...@@ -35,16 +35,6 @@
namespace XLS namespace XLS
{ {
Fbi2::Fbi2()
{
}
Fbi2::~Fbi2()
{
}
BaseObjectPtr Fbi2::clone() BaseObjectPtr Fbi2::clone()
{ {
return BaseObjectPtr(new Fbi2(*this)); return BaseObjectPtr(new Fbi2(*this));
...@@ -52,9 +42,9 @@ BaseObjectPtr Fbi2::clone() ...@@ -52,9 +42,9 @@ BaseObjectPtr Fbi2::clone()
void Fbi2::readFields(CFRecord& record) void Fbi2::readFields(CFRecord& record)
{ {
#pragma message("####################### Fbi2 record is not implemented") unsigned short val;
Log::error("Fbi2 record is not implemented."); record >> dmixBasis >> dmiyBasis >> twpHeightBasis >> val >> ifnt;
//record >> some_value; scab = (val != 0);
} }
} // namespace XLS } // namespace XLS
......
...@@ -32,25 +32,31 @@ ...@@ -32,25 +32,31 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/FontIndex.h"
namespace XLS namespace XLS
{ {
// Logical representation of Fbi2 record in BIFF8
class Fbi2: public BiffRecord class Fbi2: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(Fbi2) BIFF_RECORD_DEFINE_TYPE_INFO(Fbi2)
BASE_OBJECT_DEFINE_CLASS_NAME(Fbi2) BASE_OBJECT_DEFINE_CLASS_NAME(Fbi2)
public: public:
Fbi2(); Fbi2(){}
~Fbi2(); ~Fbi2(){}
BaseObjectPtr clone(); BaseObjectPtr clone();
static const ElementType type = typeFbi2;
void readFields(CFRecord& record); void readFields(CFRecord& record);
unsigned short dmixBasis;
unsigned short dmiyBasis;
unsigned short twpHeightBasis;
bool scab;
FontIndex ifnt;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -35,16 +35,6 @@ ...@@ -35,16 +35,6 @@
namespace XLS namespace XLS
{ {
SBaseRef::SBaseRef()
{
}
SBaseRef::~SBaseRef()
{
}
BaseObjectPtr SBaseRef::clone() BaseObjectPtr SBaseRef::clone()
{ {
return BaseObjectPtr(new SBaseRef(*this)); return BaseObjectPtr(new SBaseRef(*this));
...@@ -52,9 +42,7 @@ BaseObjectPtr SBaseRef::clone() ...@@ -52,9 +42,7 @@ BaseObjectPtr SBaseRef::clone()
void SBaseRef::readFields(CFRecord& record) void SBaseRef::readFields(CFRecord& record)
{ {
#pragma message("####################### SBaseRef record is not implemented") record >> ref;
Log::error("SBaseRef record is not implemented.");
//record >> some_value;
} }
} // namespace XLS } // namespace XLS
......
...@@ -32,27 +32,27 @@ ...@@ -32,27 +32,27 @@
#pragma once #pragma once
#include "BiffRecord.h" #include "BiffRecord.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS namespace XLS
{ {
// Logical representation of SBaseRef record in BIFF8
class SBaseRef: public BiffRecord class SBaseRef: public BiffRecord
{ {
BIFF_RECORD_DEFINE_TYPE_INFO(SBaseRef) BIFF_RECORD_DEFINE_TYPE_INFO(SBaseRef)
BASE_OBJECT_DEFINE_CLASS_NAME(SBaseRef) BASE_OBJECT_DEFINE_CLASS_NAME(SBaseRef)
public: public:
SBaseRef(); SBaseRef(){}
~SBaseRef(); ~SBaseRef(){}
BaseObjectPtr clone(); BaseObjectPtr clone();
void readFields(CFRecord& record); void readFields(CFRecord& record);
static const ElementType type = typeSBaseRef; static const ElementType type = typeSBaseRef;
Ref8U ref;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -68,7 +68,6 @@ void SortData::readFields(CFRecord& record) ...@@ -68,7 +68,6 @@ void SortData::readFields(CFRecord& record)
std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12]; std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12];
while(!recs.empty()) while(!recs.empty())
{ {
#pragma message("############################ frtRefHeader skipped here")
record.appendRawData(recs.front()->getData() + 12, recs.front()->getDataSize() - 12); record.appendRawData(recs.front()->getData() + 12, recs.front()->getDataSize() - 12);
recs.pop_front(); recs.pop_front();
} }
......
/*
* (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 "PBT.h"
namespace XLS
{
BiffStructurePtr PBT::clone()
{
return BiffStructurePtr(new PBT(*this));
}
void PBT::load(CFRecord& record)
{
unsigned short flags;
record >> flags;
pbt = GETBITS(flags, 0, 2);
fAutoRefresh = GETBIT(flags, 3);
fNeedRefresh = GETBIT(flags, 4);
}
} // namespace XLS
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffStructure.h"
namespace XLS
{
class PBT: public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PBT)
public:
BiffStructurePtr clone();
PBT(){}
~PBT(){}
static const ElementType type = typePBT;
virtual void load(CFRecord& record);
unsigned char pbt;
bool fAutoRefresh;
bool fNeedRefresh;
};
} // namespace XLS
\ No newline at end of file
...@@ -35,21 +35,11 @@ ...@@ -35,21 +35,11 @@
namespace XLS namespace XLS
{ {
BiffStructurePtr TxtWf::clone() BiffStructurePtr TxtWf::clone()
{ {
return BiffStructurePtr(new TxtWf(*this)); return BiffStructurePtr(new TxtWf(*this));
} }
TxtWf::TxtWf()
{
}
TxtWf::~TxtWf()
{
}
void TxtWf::load(CFRecord& record) void TxtWf::load(CFRecord& record)
{ {
record >> fieldType >> fieldStart; record >> fieldType >> fieldStart;
......
/*
* (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 TxtWf: public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(TxORuns)
public:
BiffStructurePtr clone();
TxtWf(){}
~TxtWf(){}
static const ElementType type = typeTxtWf;
virtual void load(CFRecord& record);
_UINT32 fieldType;
_UINT32 fieldStart;
};
} // namespace XLS
\ No newline at end of file
...@@ -242,6 +242,7 @@ enum ElementType ...@@ -242,6 +242,7 @@ enum ElementType
typePalette, typePalette,
typePane, typePane,
typePassword, typePassword,
typePBT,
typePhoneticInfo, typePhoneticInfo,
typePicF, typePicF,
typePie, typePie,
......
...@@ -4017,6 +4017,14 @@ ...@@ -4017,6 +4017,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\ParsedFormula.h" RelativePath="..\XlsFormat\Logic\Biff_structures\ParsedFormula.h"
> >
</File> </File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\PBT.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\PBT.h"
>
</File>
<File <File
RelativePath="..\XlsFormat\Logic\Biff_structures\PhRuns.cpp" RelativePath="..\XlsFormat\Logic\Biff_structures\PhRuns.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