Commit d405cd4e authored by ElenaSubbotina's avatar ElenaSubbotina

XlsFormat ...

parent f6328550
......@@ -35,16 +35,6 @@
namespace XLS
{
FrtFontList::FrtFontList()
{
}
FrtFontList::~FrtFontList()
{
}
BaseObjectPtr FrtFontList::clone()
{
return BaseObjectPtr(new FrtFontList(*this));
......@@ -52,9 +42,15 @@ BaseObjectPtr FrtFontList::clone()
void FrtFontList::readFields(CFRecord& record)
{
#pragma message("####################### FrtFontList record is not implemented")
Log::error("FrtFontList record is not implemented.");
//record >> some_value;
unsigned char reserved;
record >> frtHeaderOld >> verExcel >> reserved >> cFont;
FontInfo val;
for (unsigned short i = 0; i < cFont; i++)
{
record >> val;
rgFontInfo.push_back(val);
}
}
} // namespace XLS
......
......@@ -32,28 +32,30 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
#include "../Biff_structures/FontInfo.h"
namespace XLS
{
// Logical representation of FrtFontList record in BIFF8
class FrtFontList: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(FrtFontList)
BASE_OBJECT_DEFINE_CLASS_NAME(FrtFontList)
public:
FrtFontList();
~FrtFontList();
FrtFontList(){}
~FrtFontList(){}
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeFrtFontList;
static const ElementType type = typeFrtFontList;
FrtHeaderOld frtHeaderOld;
unsigned char verExcel;
unsigned short cFont;
std::vector<FontInfo> rgFontInfo;
};
} // namespace XLS
......
......@@ -55,7 +55,8 @@ void RealTimeData::readFields(CFRecord& record)
{
#pragma message("####################### RealTimeData record is not implemented")
Log::error("RealTimeData record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -55,7 +55,8 @@ void RecipName::readFields(CFRecord& record)
{
#pragma message("####################### RecipName record is not implemented")
Log::error("RecipName record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -52,9 +52,13 @@ BaseObjectPtr RichTextStream::clone()
void RichTextStream::readFields(CFRecord& record)
{
#pragma message("####################### RichTextStream record is not implemented")
Log::error("RichTextStream record is not implemented.");
//record >> some_value;
record >> frtHeader >> dwCheckSum >> cb;
if (cb > 0 &&cb < 0xffff)
{
rgb = std::string(record.getCurData<char>(), cb);
record.skipNunBytes(cb);
}
}
} // namespace XLS
......
......@@ -32,12 +32,11 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeader.h"
namespace XLS
{
// Logical representation of RichTextStream record in BIFF8
class RichTextStream: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(RichTextStream)
......@@ -47,12 +46,15 @@ public:
~RichTextStream();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeRichTextStream;
static const ElementType type = typeRichTextStream;
FrtHeader frtHeader;
_UINT32 dwCheckSum;
_UINT32 cb;
std::string rgb;
};
} // namespace XLS
......
......@@ -54,7 +54,8 @@ void SCENARIO::readFields(CFRecord& record)
{
#pragma message("####################### SCENARIO record is not implemented")
Log::error("SCENARIO record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -55,7 +55,8 @@ void ScenMan::readFields(CFRecord& record)
{
#pragma message("####################### ScenMan record is not implemented")
Log::error("ScenMan record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -54,7 +54,8 @@ void WOpt::readFields(CFRecord& record)
{
#pragma message("####################### WOpt record is not implemented")
Log::error("WOpt record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -55,7 +55,7 @@ void WebPub::readFields(CFRecord& record)
#pragma message("####################### WebPub record is not implemented")
Log::error("WebPub record is not implemented.");
//record >> some_value;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
} // namespace XLS
......
......@@ -35,16 +35,6 @@
namespace XLS
{
YMult::YMult()
{
}
YMult::~YMult()
{
}
BaseObjectPtr YMult::clone()
{
return BaseObjectPtr(new YMult(*this));
......@@ -52,10 +42,12 @@ BaseObjectPtr YMult::clone()
void YMult::readFields(CFRecord& record)
{
#pragma message("####################### YMult record is not implemented")
Log::error("YMult record is not implemented.");
unsigned short flags;
record >> frtHeaderOld >> axmid >> numLabelMultiplier >> flags;
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
fAutoShowMultiplier = GETBIT(flags, 0);
fBeingEditted = GETBIT(flags, 1);
}
} // namespace XLS
......
......@@ -32,26 +32,30 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/FrtHeaderOld.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of YMult record in BIFF8
class YMult: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(YMult)
BASE_OBJECT_DEFINE_CLASS_NAME(YMult)
public:
YMult();
~YMult();
YMult(){}
~YMult(){}
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeYMult;
static const ElementType type = typeYMult;
FrtHeaderOld frtHeaderOld;
short axmid;
Xnum numLabelMultiplier;
bool fAutoShowMultiplier;
bool fBeingEditted;
};
} // namespace XLS
......
......@@ -32,8 +32,6 @@
#pragma once
#include "BiffAttribute.h"
//#include <Logic/Biff_structures/Phs.h>
//#include <Logic/Biff_structures/BiffString.h>
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 "TxtWf.h"
#include <Binary/CFRecord.h>
namespace XLS
{
BiffStructurePtr FontInfo::clone()
{
return BiffStructurePtr(new FontInfo(*this));
}
void FontInfo::load(CFRecord& record)
{
unsigned short flags;
record >> flags >> ifnt;
fScaled = GETBIT(flags, 0);
}
} // 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 "FontIndex.h"
namespace XLS
{
class FontInfo: public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(FontInfo)
public:
BiffStructurePtr clone();
FontInfo(){}
~FontInfo(){}
static const ElementType type = typeFontInfo;
virtual void load(CFRecord& record);
bool fScaled;
FontIndex ifnt;
};
} // namespace XLS
\ No newline at end of file
......@@ -102,8 +102,7 @@ void PtgArea3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool f
RevExternPtr tab_ids;
if(!extra_data.empty() && (tab_ids = boost::dynamic_pointer_cast<RevExtern>(extra_data.front())))
{
#pragma message("####################### PtgArea3d struct for revisions is not implemented")
Log::info("PtgArea3d struct for revisions is not implemented.");
Log::info("PtgArea3d struct for revisions is not assemble.");
ptg_stack.push(L"");
extra_data.pop();
return;
......
......@@ -57,8 +57,7 @@ void PtgAreaErr3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, boo
RevExternPtr tab_ids;
if(!extra_data.empty() && (tab_ids = boost::dynamic_pointer_cast<RevExtern>(extra_data.front())))
{
#pragma message("####################### PtgAreaErr3d struct for revisions is not implemented")
Log::info("PtgAreaErr3d struct for revisions is not implemented.");
Log::info("PtgAreaErr3d struct for revisions is not assemble.");
ptg_stack.push(L"");
extra_data.pop();
return;
......
......@@ -77,9 +77,7 @@ void PtgName::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool ful
RevNameTabidPtr tab_id;
if(!extra_data.empty() && (tab_id = boost::dynamic_pointer_cast<RevNameTabid>(extra_data.front())))
{
#pragma message("####################### PtgName struct for revisions is not checked")
Log::info("PtgName struct for revisions is not checked.");
Log::info("PtgName struct for revisions is not assemble.");
ptg_stack.push(tab_id->toString());
extra_data.pop();
return;
......
......@@ -81,8 +81,7 @@ void PtgNameX::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu
RevNamePtr tab_id;
if(!extra_data.empty() && (tab_id = boost::dynamic_pointer_cast<RevName>(extra_data.front())))
{
#pragma message("####################### PtgNameX struct for revisions is not implemented")
Log::error("PtgNameX struct for revisions is not implemented.");
Log::error("PtgNameX struct for revisions is not assemble.");
ptg_stack.push(L"#REF!");
extra_data.pop();
return;
......@@ -113,8 +112,7 @@ void PtgNameX::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu
}
else
{
#pragma message("####################### PtgNameX struct is not implemented")
Log::warning("PtgNameX structure is not implemented.");
Log::warning("PtgNameX structure is not assemble.");
//ptg_stack.push(L"#UNDEFINED_EXTERN_NAME(" + STR::int2wstr(nameindex) + L")!");
ptg_stack.push(L""); // This would let us to continue without an error
}
......
......@@ -96,8 +96,8 @@ void PtgRef3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu
RevExternPtr tab_ids;
if(!extra_data.empty() && (tab_ids = boost::dynamic_pointer_cast<RevExtern>(extra_data.front())))
{
#pragma message("####################### PtgRef3d struct for revisions is not implemented")
Log::info("PtgRef3d struct for revisions is not implemented.");
Log::info("PtgRef3d struct for revisions is not assemble.");
ptg_stack.push(L"");
extra_data.pop();
return;
......
......@@ -68,8 +68,8 @@ void PtgRefErr3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool
RevExternPtr tab_ids;
if(!extra_data.empty() && (tab_ids = boost::dynamic_pointer_cast<RevExtern>(extra_data.front())))
{
#pragma message("####################### PtgRefErr3d struct for revisions is not implemented")
Log::info("PtgRefErr3d struct for revisions is not implemented.");
Log::info("PtgRefErr3d struct for revisions is not assemble.");
ptg_stack.push(L"");
extra_data.pop();
return;
......
......@@ -47,11 +47,10 @@ void PtgSxName::loadFields(CFRecord& record)
record >> sxIndex;
}
void PtgSxName::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool full_ref)
{
#pragma message("####################### PtgSxName struct is not implemented")
Log::info("PtgSxName structure is not implemented.");
Log::info("PtgSxName structure is not assemble.");
ptg_stack.push(L"#REF!");
}
......
......@@ -32,7 +32,7 @@
#pragma once
#include "BiffStructure.h"
#include <Logic/Biff_structures/XFProp.h>
#include "../Biff_structures/XFProp.h"
namespace XLS
{
......
......@@ -172,6 +172,7 @@ enum ElementType
typeFnGroupName,
typeFnGrp12,
typeFont,
typeFontInfo,
typeFontX,
typeFooter,
typeForceFullCalculation,
......
......@@ -772,6 +772,8 @@ SOURCES += \
../XlsFormat/Logic/Biff_structures/AFDOperXNum.cpp \
../XlsFormat/Logic/Biff_unions/IMDATAOBJECT.cpp \
../XlsFormat/Logic/Biff_records/IMDATA.cpp \
../XlsFormat/Logic/Biff_structures/PBT.cpp \
../XlsFormat/Logic/Biff_structures/FontInfo.cpp \
../XlsFormat/Logic/Biff_structures/CFDatabar.cpp \
../XlsFormat/Logic/Biff_structures/CFGradient.cpp
}
......@@ -1392,6 +1394,8 @@ HEADERS += \
../XlsFormat/Logic/Biff_structures/DConnStringSequence.h \
../XlsFormat/Logic/Biff_structures/TxtWf.h \
../XlsFormat/Logic/Biff_structures/Xnum.h \
../XlsFormat/Logic/Biff_structures/PBT.h \
../XlsFormat/Logic/Biff_structures/FontInfo.h \
../XlsFormat/Logic/Biff_structures/ODRAW/IMsoArray.h \
../XlsFormat/Logic/Biff_structures/ODRAW/MSOCR.h \
../XlsFormat/Logic/Biff_structures/ODRAW/MSO_enums.h \
......
......@@ -765,3 +765,5 @@
#include "../XlsFormat/Logic/Biff_structures/DConnStringSequence.cpp"
#include "../XlsFormat/Logic/Biff_structures/TxtWf.cpp"
#include "../XlsFormat/Logic/Biff_structures/Xnum.cpp"
#include "../XlsFormat/Logic/Biff_structures/PBT.cpp"
#include "../XlsFormat/Logic/Biff_structures/FontInfo.cpp"
......@@ -3649,6 +3649,14 @@
RelativePath="..\XlsFormat\Logic\Biff_structures\FontIndex.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\FontInfo.cpp"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\FontInfo.h"
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\FormatRun.cpp"
>
......@@ -4822,7 +4830,7 @@
>
</File>
<File
RelativePath="..\XlsFormat\Logic\Biff_structures\TxtWF.h"
RelativePath="..\XlsFormat\Logic\Biff_structures\TxtWf.h"
>
</File>
<File
......
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