Commit 48641d5b authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat - ..

parent d88ae6d3
......@@ -31,6 +31,9 @@
*/
#include "DBQueryExt.h"
#include "../Biff_structures/ConnGrbitDbtWeb.h"
#include "../Biff_structures/ConnGrbitDbtOledb.h"
#include "../Biff_structures/ConnGrbitDbtAdo.h"
namespace XLS
{
......@@ -52,10 +55,44 @@ BaseObjectPtr DBQueryExt::clone()
void DBQueryExt::readFields(CFRecord& record)
{
#pragma message("####################### DBQueryExt record is not implemented")
Log::error("DBQueryExt record is not implemented.");
unsigned short flags1, flags2;
record >> frtHeaderOld >> dbt >> flags1;
fMaintain = GETBIT(flags1, 0);
fNewQuery = GETBIT(flags1, 1);
fImportXmlSource = GETBIT(flags1, 2);
fSPListSrc = GETBIT(flags1, 3);
fSPListReinitCache = GETBIT(flags1, 4);
fSrcIsXml = GETBIT(flags1, 7);
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
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
......
......@@ -32,12 +32,12 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
#include "../Biff_structures/PBT.h"
namespace XLS
{
// Logical representation of DBQueryExt record in BIFF8
class DBQueryExt: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(DBQueryExt)
......@@ -47,13 +47,32 @@ public:
~DBQueryExt();
BaseObjectPtr clone();
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
......
......@@ -35,16 +35,6 @@
namespace XLS
{
Fbi2::Fbi2()
{
}
Fbi2::~Fbi2()
{
}
BaseObjectPtr Fbi2::clone()
{
return BaseObjectPtr(new Fbi2(*this));
......@@ -52,9 +42,9 @@ BaseObjectPtr Fbi2::clone()
void Fbi2::readFields(CFRecord& record)
{
#pragma message("####################### Fbi2 record is not implemented")
Log::error("Fbi2 record is not implemented.");
//record >> some_value;
unsigned short val;
record >> dmixBasis >> dmiyBasis >> twpHeightBasis >> val >> ifnt;
scab = (val != 0);
}
} // namespace XLS
......
......@@ -32,25 +32,31 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FontIndex.h"
namespace XLS
{
// Logical representation of Fbi2 record in BIFF8
class Fbi2: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Fbi2)
BASE_OBJECT_DEFINE_CLASS_NAME(Fbi2)
public:
Fbi2();
~Fbi2();
Fbi2(){}
~Fbi2(){}
BaseObjectPtr clone();
static const ElementType type = typeFbi2;
void readFields(CFRecord& record);
unsigned short dmixBasis;
unsigned short dmiyBasis;
unsigned short twpHeightBasis;
bool scab;
FontIndex ifnt;
};
} // namespace XLS
......
......@@ -35,16 +35,6 @@
namespace XLS
{
SBaseRef::SBaseRef()
{
}
SBaseRef::~SBaseRef()
{
}
BaseObjectPtr SBaseRef::clone()
{
return BaseObjectPtr(new SBaseRef(*this));
......@@ -52,9 +42,7 @@ BaseObjectPtr SBaseRef::clone()
void SBaseRef::readFields(CFRecord& record)
{
#pragma message("####################### SBaseRef record is not implemented")
Log::error("SBaseRef record is not implemented.");
//record >> some_value;
record >> ref;
}
} // namespace XLS
......
......@@ -32,26 +32,26 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
// Logical representation of SBaseRef record in BIFF8
class SBaseRef: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SBaseRef)
BASE_OBJECT_DEFINE_CLASS_NAME(SBaseRef)
public:
SBaseRef();
~SBaseRef();
SBaseRef(){}
~SBaseRef(){}
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSBaseRef;
static const ElementType type = typeSBaseRef;
Ref8U ref;
};
......
......@@ -68,7 +68,6 @@ void SortData::readFields(CFRecord& record)
std::list<CFRecordPtr>& recs = continue_records[rt_ContinueFrt12];
while(!recs.empty())
{
#pragma message("############################ frtRefHeader skipped here")
record.appendRawData(recs.front()->getData() + 12, recs.front()->getDataSize() - 12);
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 @@
namespace XLS
{
BiffStructurePtr TxtWf::clone()
{
return BiffStructurePtr(new TxtWf(*this));
}
TxtWf::TxtWf()
{
}
TxtWf::~TxtWf()
{
}
void TxtWf::load(CFRecord& record)
{
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
typePalette,
typePane,
typePassword,
typePBT,
typePhoneticInfo,
typePicF,
typePie,
......
......@@ -4017,6 +4017,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\ParsedFormula.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\PBT.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\PBT.h"
>
</File>
<File
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