Compare commits

..

21 Commits

Author SHA1 Message Date
4954ef2934 refactoring 2017-07-03 10:27:49 +03:00
721e8800f1 refactoring 2017-07-03 10:27:23 +03:00
ef8e5cab6d XlsFormat ... 2017-07-02 17:49:41 +03:00
028e58ad51 XlsFormat ... 2017-07-02 13:18:56 +03:00
424e0e34cc . 2017-07-01 17:56:12 +03:00
d8988cd101 . 2017-07-01 16:33:36 +03:00
440a884c0a . 2017-07-01 14:38:46 +03:00
449bab1a70 . 2017-06-30 19:42:25 +03:00
c1e5e33691 min command length 2017-06-30 17:30:03 +03:00
8c7515443a Merge remote-tracking branch 'origin/release/v4.4.1' into develop 2017-06-30 16:56:51 +03:00
1d16f4ab8f XlsFormat - convert piot cache 2017-06-30 16:55:37 +03:00
122a5cd056 x2t - return error code by PptConvert 2017-06-30 16:21:07 +03:00
b0994759e7 memset before readlink. 2017-06-30 15:02:21 +03:00
118f1c5736 . 2017-06-30 12:51:08 +03:00
b65703ceb1 . 2017-06-30 12:22:45 +03:00
c08c960c96 . 2017-06-30 12:22:37 +03:00
02ece25af8 . 2017-06-30 10:15:08 +03:00
435a27f6d9 Merge remote-tracking branch 'origin/release/v4.4.1' into develop 2017-06-29 19:26:31 +03:00
85ea22048a fix bug #35120 2017-06-29 19:25:23 +03:00
87ae0b38fa XlsFormat - read pivot cache stream 2017-06-29 19:05:45 +03:00
b93d463469 OdfFormat - fix roundRect 2017-06-29 12:43:05 +03:00
119 changed files with 4834 additions and 351 deletions

View File

@ -687,6 +687,7 @@ void common_shape_draw_attlist::add_attributes( const xml::attributes_wc_ptr & A
CP_APPLY_ATTR(L"draw:transform", draw_transform_);
CP_APPLY_ATTR(L"draw:name", draw_name_);
CP_APPLY_ATTR(L"draw:text-style-name", draw_text_style_name_);
CP_APPLY_ATTR(L"drawooo:display", drawooo_display_);
}
void common_shape_draw_attlist::apply_from(const common_shape_draw_attlist & Other)
{
@ -698,6 +699,7 @@ void common_shape_draw_attlist::apply_from(const common_shape_draw_attlist & Oth
_CP_APPLY_PROP2(draw_transform_);
_CP_APPLY_PROP2(draw_name_);
_CP_APPLY_PROP2(draw_text_style_name_);
_CP_APPLY_PROP2(drawooo_display_);
}
void common_shape_draw_attlist::serialize(CP_ATTR_NODE)
@ -710,6 +712,7 @@ void common_shape_draw_attlist::serialize(CP_ATTR_NODE)
CP_XML_ATTR_OPT(L"draw:transform", draw_transform_);
CP_XML_ATTR_OPT(L"draw:name", draw_name_);
CP_XML_ATTR_OPT(L"draw:text-style-name", draw_text_style_name_);
CP_XML_ATTR_OPT(L"drawooo:display", drawooo_display_);
}
void common_draw_shape_with_text_and_styles_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{

View File

@ -501,6 +501,7 @@ public:
_CP_OPT(std::wstring) draw_layer_;
_CP_OPT(std::wstring) draw_transform_;
_CP_OPT(int) draw_z_index_;
_CP_OPT(std::wstring) drawooo_display_;
};
class common_draw_position_attlist

View File

@ -95,13 +95,13 @@ void draw_shape::common_docx_convert(oox::docx_conversion_context & Context)
Context.set_paragraph_state (false);
Context.set_run_state (false);
BOOST_FOREACH(const office_element_ptr & elm, content_)
for (size_t i = 0; i < content_.size(); i++)
{
ElementType type = elm->get_type();
ElementType type = content_[i]->get_type();
if (type != typeDrawCustomShape)
{
elm->docx_convert(Context);
content_[i]->docx_convert(Context);
}
}
@ -120,9 +120,16 @@ void draw_rect::docx_convert(oox::docx_conversion_context & Context)
return;
}
common_docx_convert(Context);
//...
draw_shape::docx_convert(Context);
if (draw_rect_attlist_.draw_corner_radius_)
{
draw_shape * shape = Context.get_drawing_context().get_current_shape();//owner
double val = draw_rect_attlist_.draw_corner_radius_->get_value() * 6500;
shape->additional_.push_back(_property(L"oox-draw-modifiers", std::to_wstring((int)val)));
}
draw_shape::docx_convert(Context);
}
void draw_ellipse::docx_convert(oox::docx_conversion_context & Context)
{
@ -157,6 +164,7 @@ void draw_line::docx_convert(oox::docx_conversion_context & Context)
reset_svg_attributes();
common_docx_convert(Context);
//...
draw_shape::docx_convert(Context);
}

View File

@ -384,9 +384,11 @@ void odf_drawing_context::start_group()
group->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_name_ = impl_->current_drawing_state_.name_;
if (impl_->current_drawing_state_.z_order_ >= 0)
group->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_z_index_ = impl_->current_drawing_state_.z_order_;
if (!impl_->current_drawing_state_.name_.empty())
group->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_name_ = impl_->current_drawing_state_.name_;
//if (!impl_->current_drawing_state_.description_.empty())
// group->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_name_ = impl_->current_drawing_state_.description_;
if (impl_->current_drawing_state_.hidden_)
group->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.drawooo_display_ = L"printer";
impl_->current_drawing_state_.name_ = L"";
impl_->current_drawing_state_.z_order_ = -1;
@ -519,10 +521,12 @@ void odf_drawing_context::end_drawing()
draw->common_draw_attlists_.shape_with_text_and_styles_.common_presentation_attlist_.presentation_class_ = impl_->current_drawing_state_.presentation_class_;
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_layer_ = draw_layer;
}
if (impl_->current_drawing_state_.name_.length() > 0)
if (!impl_->current_drawing_state_.name_.empty())
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_name_ = impl_->current_drawing_state_.name_;
if (impl_->current_drawing_state_.z_order_ >= 0)
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_z_index_ = impl_->current_drawing_state_.z_order_;
if (impl_->current_drawing_state_.hidden_)
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.drawooo_display_ = L"printer";
std::wstring strTransform;
@ -2125,6 +2129,13 @@ void odf_drawing_context::set_textarea_wrap(bool Val)
impl_->current_graphic_properties->fo_wrap_option_ = wrap_option(wrap_option::NoWrap);
}
void odf_drawing_context::set_textarea_fit_to_size(bool val)
{
if (!impl_->current_graphic_properties)return;
impl_->current_graphic_properties->draw_fit_to_size_ = val;
}
void odf_drawing_context::set_textarea_font(std::wstring & latin, std::wstring & cs, std::wstring & ea)
{

View File

@ -228,6 +228,7 @@ public:
void set_textarea_wrap (bool val);
void set_textarea_fontcolor (std::wstring hexColor);
void set_textarea_font (std::wstring & latin, std::wstring & cs, std::wstring & ea);
void set_textarea_fit_to_size (bool val);
void set_placeholder_id (std::wstring val);
void set_placeholder_type (int val);

View File

@ -283,6 +283,8 @@ void odt_conversion_context::end_drawings()
}
void odt_conversion_context::start_paragraph(bool styled)
{
if (current_field_.enabled && !current_field_.result) return; //Стандартное_составное_письмо.docx
if (is_paragraph_in_current_section_ && !styled)
{
styles_context()->create_style(L"", odf_types::style_family::Paragraph, true, false, -1);
@ -374,8 +376,9 @@ void odt_conversion_context::set_field_instr(std::wstring instr)
{
if (current_field_.enabled == false) return;
current_field_.type = 0; //users field
int res1 = instr.find(L"HYPERLINK");
if (res1 >=0) //это не поле - это hyperlink
if (res1 >= 0) //это не поле - это hyperlink
{
current_field_.type = 1;
@ -390,24 +393,24 @@ void odt_conversion_context::set_field_instr(std::wstring instr)
}
}
res1 = instr.find(L"NUMPAGES");
if (res1 >=0 && current_field_.type == 0)
if (res1 >= 0 && current_field_.type == 0)
{
current_field_.type = 3;
}
res1 = instr.find(L"PAGEREF");
if (res1 >=0 && current_field_.type == 0 ) //это не поле - это bookmark
if (res1 >= 0 && current_field_.type == 0 ) //это не поле - это bookmark
{
current_field_.type = 5;
if (instr.length() > 9)
current_field_.value = instr.substr(9, instr.length()-5);
}
res1 = instr.find(L"PAGE");
if (res1 >=0 && current_field_.type == 0)
if (res1 >= 0 && current_field_.type == 0)
{
current_field_.type = 2;
}
res1 = instr.find(L"TIME");
if (res1 >=0 && current_field_.type == 0)
if (res1 >= 0 && current_field_.type == 0)
{
current_field_.type = 4;
}
@ -418,20 +421,34 @@ void odt_conversion_context::set_field_instr(std::wstring instr)
}
//////////////////////////////////////////
res1 = instr.find(L"@");
if (res1 >=0)
if (res1 >= 0)
{
current_field_.format = instr.substr(res1+1, instr.length());
current_field_.format = instr.substr(res1 + 1, instr.length());
}
if (current_field_.type == 0)
{
res1 = instr.find(L" ");
if (res1 >= 0)
{
current_field_.name = instr.substr(0, res1);
}
}
}
void odt_conversion_context::start_field(bool in_span)
{
current_field_.enabled = true;
current_field_.result = false;
current_field_.in_span = in_span;
current_field_.value = L"";
current_field_.type = 0;
current_field_.value.clear();
current_field_.name.clear();
current_field_.type = 0; // users field
}
void odt_conversion_context::separate_field()
{
current_field_.result = true;
}
void odt_conversion_context::set_master_page_name(std::wstring master_name)
{
if (current_root_elements_.size() < 1)// return; - эффект_штурмовика.docx - 1 страница !! (и ваще -
@ -566,13 +583,17 @@ void odt_conversion_context::end_field()
}
current_field_.value = L"";
current_field_.format = L"";
current_field_.name = L"";
current_field_.enabled = false;
current_field_.started = false;
current_field_.in_span = false;
current_field_.result = false;
current_field_.enabled = false;
current_field_.started = false;
current_field_.in_span = false;
}
void odt_conversion_context::end_paragraph()
{
if (current_field_.enabled && !current_field_.result) return; //Стандартное_составное_письмо.docx
text_context()->end_paragraph();
flush_section();

View File

@ -95,6 +95,7 @@ public:
void start_field (bool in_span);
void end_field ();
void separate_field ();
void set_field_instr (std::wstring instr);
void start_run (bool styled = false);
@ -182,12 +183,14 @@ private:
struct _field_state
{
std::wstring name;
bool enabled;
int type;
std::wstring value;
std::wstring format;
bool started;
bool in_span;
bool result;
}current_field_;
struct _text_changes_state

View File

@ -1137,12 +1137,24 @@ void OoxConverter::convert(PPTX::Logic::BodyPr *oox_bodyPr)
//+ style section
//+element text:section в котором параграфы
}
if (oox_bodyPr->Fit.type == PPTX::Logic::TextFit::FitSpAuto)
{
//изменяемы размеры
odf_context()->drawing_context()->set_text_box_min_size(true);//уже выставленые в min
switch(oox_bodyPr->Fit.type)
{
case PPTX::Logic::TextFit::FitSpAuto:
{//изменяемы размеры
odf_context()->drawing_context()->set_text_box_min_size(true);//уже выставленые в min
}break;
case PPTX::Logic::TextFit::FitNo:
{
}break;
case PPTX::Logic::TextFit::FitNormAuto:
{
}break;
default:
{
}
}
if (oox_bodyPr->fromWordArt.IsInit() && oox_bodyPr->prstTxWarp.IsInit())
{
for (size_t i = 0; i < oox_bodyPr->prstTxWarp->avLst.size(); i++)

View File

@ -593,6 +593,14 @@ void OoxConverter::convert(OOX::Vml::CRoundRect *vml_roundrect)
OOX::Vml::CVmlCommonElements *vml_common = dynamic_cast<OOX::Vml::CVmlCommonElements *>(vml_roundrect);
convert(vml_common);
double arc_size = vml_roundrect->m_oArcSize.GetValue();
if (arc_size > 0)
{
odf_types::length corner = odf_types::length(arc_size * 20, odf_types::length::cm);
odf_context()->drawing_context()->set_corner_radius(corner);
}
}
void OoxConverter::convert(OOX::Vml::CCurve *vml_curve)

View File

@ -751,7 +751,7 @@ void DocxConverter::convert(OOX::Logic::CSym *oox_sym)
odt_context->text_context()->set_symbol_text(oox_sym->m_oChar->GetValue());
//odt_context->text_context()->add_text_content(std::wstring(L"/") + oox_sym->m_oChar->ToString());
}
void DocxConverter::convert(OOX::Logic::CFldChar *oox_fld)
void DocxConverter::convert(OOX::Logic::CFldChar *oox_fld)
{
if (oox_fld == NULL) return;
@ -762,7 +762,7 @@ void DocxConverter::convert(OOX::Logic::CFldChar *oox_fld)
{
if (oox_fld->m_oFldCharType->GetValue() == SimpleTypes::fldchartypeBegin) odt_context->start_field(false);
if (oox_fld->m_oFldCharType->GetValue() == SimpleTypes::fldchartypeEnd) odt_context->end_field();
if (oox_fld->m_oFldCharType->GetValue() == SimpleTypes::fldchartypeSeparate){}
if (oox_fld->m_oFldCharType->GetValue() == SimpleTypes::fldchartypeSeparate)odt_context->separate_field();
}
}

View File

@ -1436,6 +1436,8 @@ void PptxConverter::convert_layout(PPTX::Logic::CSld *oox_slide)
if (pShape.IsInit() && pShape->nvSpPr.nvPr.ph.is_init())
{
pShape->FillLevelUp();
int type = 0;
if (pShape->nvSpPr.nvPr.ph->type.IsInit())
type = pShape->nvSpPr.nvPr.ph->type->GetBYTECode();

View File

@ -92,13 +92,16 @@ public:
bool bResult = pInfo->ReadFromStream(&oUserAtom, pStream);
offsetToEdit = pInfo->m_oUser.m_nOffsetLastEdit;
m_oCurrentUser.m_bIsEncrypt = pInfo->m_bEncrypt;
if (bResult == false)
{
delete pInfo;
if (pInfo->m_bEncrypt) return false;
else continue;
if (pInfo->m_bEncrypt)
return false;
else
continue;
}
m_arUsers.push_back(pInfo);

View File

@ -116,7 +116,7 @@ bool CPPTFileReader::ReadPersists()
CFStreamPtr pStream = GetDocumentStream();
if (!pStream) return false;
if (m_oDocumentInfo.ReadFromStream(&m_oCurrentUser, pStream->stream_) == false) return false;
return m_oDocumentInfo.ReadFromStream(&m_oCurrentUser, pStream->stream_);
}
void CPPTFileReader::ReadDocument()
{

View File

@ -60,7 +60,7 @@ int _tmain(int argc, _TCHAR* argv[])
pptFile.put_TempDirectory(tempPath);
HRESULT hRes = pptFile.LoadFromFile(sSrcPpt, dstTempPath, L"password");
HRESULT hRes = pptFile.LoadFromFile(sSrcPpt, dstTempPath, L"");
if (hRes == S_OK)
{

View File

@ -83,8 +83,6 @@ namespace PPTX
m_eType = OOX::et_a_latin;
else if ( _T("a:sym") == m_name )
m_eType = OOX::et_a_sym;
else
return;
ReadAttributes( oReader );

View File

@ -128,27 +128,32 @@ namespace PPTX
{
if (!pShape) return;
if(pShape->nvSpPr.nvPr.ph.is_init())
if (pShape->nvSpPr.nvPr.ph.is_init())
{
std::wstring idx = pShape->nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
std::wstring idx = pShape->nvSpPr.nvPr.ph->idx.get_value_or(L"");
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(L"body");
if(type == L"ctrTitle") type = L"title";
if (type == L"ctrTitle") type = L"title";
for(size_t i = 0; i < cSld.spTree.SpTreeElems.size(); ++i)
for (size_t i = 0; i < cSld.spTree.SpTreeElems.size(); ++i)
{
smart_ptr<Logic::Shape> pLayoutShape = cSld.spTree.SpTreeElems[i].GetElem().smart_dynamic_cast<Logic::Shape>();
if(pLayoutShape.IsInit())
if (pLayoutShape.IsInit())
{
if(pLayoutShape->nvSpPr.nvPr.ph.is_init())
if (pLayoutShape->nvSpPr.nvPr.ph.is_init())
{
std::wstring lIdx = pLayoutShape->nvSpPr.nvPr.ph->idx.get_value_or(_T("0"));
std::wstring lIdx = pLayoutShape->nvSpPr.nvPr.ph->idx.get_value_or(_T(""));
std::wstring lType = pLayoutShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
if(lType == _T("ctrTitle")) lType = _T("title");
if (lType == L"ctrTitle") lType = L"title";
if((type == lType) && (idx == lIdx))
if ((type == lType) && (idx == lIdx) && !idx.empty())
{
pShape->SetLevelUpElement(pLayoutShape.operator->());
return;
}
else if ((type == lType) && idx.empty() && lIdx.empty())
{
pShape->SetLevelUpElement(pLayoutShape.operator->());
return;

View File

@ -96,8 +96,6 @@ CompoundFile::CompoundFile(const std::wstring & file_path, const ReadWriteMode m
storage_ = NULL;
Open(file_path, mode);
}
// Opens "Workbook" stream and returns the only reference
CFStreamPtr CompoundFile::getWorkbookStream()
{
@ -114,61 +112,6 @@ CFStreamPtr CompoundFile::getWorkbookStream()
return stream;
}
// Creates "Workbook" stream and returns the only reference
CFStreamPtr CompoundFile::createWorkbookStream()
{
return createNamedStream("Workbook");
}
void CompoundFile::closeWorkbookStream()
{
return closeNamedStream("Workbook");
}
// Opens "SummaryInformation" stream and returns the only reference
CFStreamPtr CompoundFile::getSummaryInformationStream()
{
return getNamedStream("SummaryInformation");
}
// Creates "SummaryInformation" stream and returns the only reference
CFStreamPtr CompoundFile::createSummaryInformationStream()
{
return createNamedStream("SummaryInformation");
}
// Closes "SummaryInformation" stream
void CompoundFile::closeSummaryInformationStream()
{
return closeNamedStream("SummaryInformation");
}
// Opens "SummaryInformation" stream and returns the only reference
CFStreamPtr CompoundFile::getDocumentSummaryInformationStream()
{
return getNamedStream("DocumentSummaryInformation");
}
// Creates "SummaryInformation" stream and returns the only reference
CFStreamPtr CompoundFile::createDocumentSummaryInformationStream()
{
return createNamedStream("DocumentSummaryInformation");
}
// Closes "SummaryInformation" stream
void CompoundFile::closeDocumentSummaryInformationStream()
{
return closeNamedStream("DocumentSummaryInformation");
}
CFStreamPtr CompoundFile::getNamedStream(const std::string& name)
{
if(!streams[name])

View File

@ -58,29 +58,19 @@ public:
bool isError();
CFStreamPtr getWorkbookStream();
CFStreamPtr createWorkbookStream();
void closeWorkbookStream();
CFStreamPtr getSummaryInformationStream();
CFStreamPtr createSummaryInformationStream();
void closeSummaryInformationStream();
CFStreamPtr getDocumentSummaryInformationStream();
CFStreamPtr createDocumentSummaryInformationStream();
void closeDocumentSummaryInformationStream();
CFStreamPtr getWorkbookStream ();
CFStreamPtr getNamedStream (const std::string& name);
POLE::Storage *storage_;
private:
POLE::Stream* openStream (const std::string & stream_name); // Opens a stream in the storage (shall be called not more than once per stream)
POLE::Stream* createStream (const std::string & stream_name); // Creates a new stream in the storage
CFStreamPtr getNamedStream (const std::string& name);
CFStreamPtr createNamedStream (const std::string& name);
void closeNamedStream (const std::string& name);
private:
std::map<std::string, CFStreamPtr> streams;
POLE::Storage *storage_;
ReadWriteMode rwMode;
};

View File

@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include <Logic/Biff_structures/LongRGB.h>
#include "../Biff_structures/LongRGB.h"
namespace XLS
{

View File

@ -59,12 +59,12 @@ public:
typedef enum
{
st_Workbook = 0x0005,
st_Globals = st_Workbook,
st_Dialog = 0x0010,
st_Worksheet = st_Dialog,
st_Chart = 0x0020,
st_Macro = 0x040
st_Workbook = 0x0005,
st_Globals = st_Workbook,
st_Dialog = 0x0010,
st_Worksheet = st_Dialog,
st_Chart = 0x0020,
st_Macro = 0x040
} SubstreamType;

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of BkHim record in BIFF8
class BkHim: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(BkHim)
@ -48,10 +46,9 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeBkHim;
static const ElementType type = typeBkHim;
_UINT16 cf;
_UINT32 lcb;

View File

@ -0,0 +1,71 @@
/*
* (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 "SXDB.h"
namespace XLS
{
SXDB::SXDB()
{
}
SXDB::~SXDB()
{
}
BaseObjectPtr SXDB::clone()
{
return BaseObjectPtr(new SXDB(*this));
}
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

View File

@ -0,0 +1,73 @@
/*
* (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 "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
class SXDB: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXDB)
BASE_OBJECT_DEFINE_CLASS_NAME(SXDB)
public:
SXDB();
~SXDB();
BaseObjectPtr clone();
void readFields(CFRecord& record);
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;
};
} // namespace XLS

View File

@ -0,0 +1,76 @@
/*
* (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 "SXDBB.h"
namespace XLS
{
SXDBB::SXDBB()
{
}
SXDBB::~SXDBB()
{
}
BaseObjectPtr SXDBB::clone()
{
return BaseObjectPtr(new SXDBB(*this));
}
void SXDBB::readFields(CFRecord& record)
{
unsigned int sz = record.getDataSize() - record.getRdPtr();
//std::list<CFRecordPtr>& recs = continue_records[rt_Continue];
//while (record.getRdPtr() + lcb > record.getDataSize() && !recs.empty())
//{
// record.appendRawData(recs.front());
// recs.pop_front();
//}
if (record.checkFitReadSafe(sz))
{
blob = boost::shared_array<char>(new char[sz]);
memcpy(blob.get(), record.getCurData<char>(), sz);
record.skipNunBytes(sz);
}
}
} // namespace XLS

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
*
*/
#pragma once
#include "BiffRecordContinued.h"
namespace XLS
{
class SXDBB: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXDBB)
BASE_OBJECT_DEFINE_CLASS_NAME(SXDBB)
public:
SXDBB();
~SXDBB();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXDBB;
boost::shared_array<char> blob;
};
} // 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
*
*/
#include "SXDBEx.h"
namespace XLS
{
SXDBEx::SXDBEx()
{
}
SXDBEx::~SXDBEx()
{
}
BaseObjectPtr SXDBEx::clone()
{
return BaseObjectPtr(new SXDBEx(*this));
}
void SXDBEx::readFields(CFRecord& record)
{
record >> numDate >> cSxFormula;
}
} // namespace XLS

View File

@ -0,0 +1,61 @@
/*
* (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 "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
class SXDBEx: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXDBEx)
BASE_OBJECT_DEFINE_CLASS_NAME(SXDBEx)
public:
SXDBEx();
~SXDBEx();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXDBEx;
DateAsNum numDate;
_UINT32 cSxFormula; //count formulas
};
} // namespace XLS

View File

@ -0,0 +1,74 @@
/*
* (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 "SXDtr.h"
namespace XLS
{
SXDtr::SXDtr()
{
}
SXDtr::~SXDtr()
{
}
BaseObjectPtr SXDtr::clone()
{
return BaseObjectPtr(new SXDtr(*this));
}
void SXDtr::readFields(CFRecord& record)
{
record >> yr >> mon >> dom >> hr >> min >> sec;
}
int SXDtr::serialize(std::wostream & strm)
{
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"d")
{
std::wstringstream s;
s << yr << L"-" << mon << L"-" << dom << L"T" << hr << L":" << min << L":" << sec;
CP_XML_ATTR(L"v", s.str());
}
}
return 0;
}
} // namespace XLS

View File

@ -0,0 +1,65 @@
/*
* (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 "BiffRecord.h"
namespace XLS
{
class SXDtr: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXDtr)
BASE_OBJECT_DEFINE_CLASS_NAME(SXDtr)
public:
SXDtr();
~SXDtr();
BaseObjectPtr clone();
void readFields(CFRecord& record);
int serialize(std::wostream & strm);
static const ElementType type = typeSXDtr;
unsigned short yr;
unsigned short mon;
unsigned char dom;
unsigned char hr;
unsigned char min;
unsigned char sec;
};
} // namespace XLS

View File

@ -0,0 +1,75 @@
/*
* (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 "SXFDB.h"
namespace XLS
{
SXFDB::SXFDB()
{
}
SXFDB::~SXFDB()
{
}
BaseObjectPtr SXFDB::clone()
{
return BaseObjectPtr(new SXFDB(*this));
}
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

View File

@ -0,0 +1,78 @@
/*
* (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 "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace XLS
{
class SXFDB: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXFDB)
BASE_OBJECT_DEFINE_CLASS_NAME(SXFDB)
public:
SXFDB();
~SXFDB();
BaseObjectPtr clone();
void readFields(CFRecord& record);
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

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
*
*/
#include "SXFDBType.h"
namespace XLS
{
SXFDBType::SXFDBType()
{
}
SXFDBType::~SXFDBType()
{
}
BaseObjectPtr SXFDBType::clone()
{
return BaseObjectPtr(new SXFDBType(*this));
}
void SXFDBType::readFields(CFRecord& record)
{
record >> wTypeSql;
}
} // namespace XLS

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
*
*/
#pragma once
#include "BiffRecord.h"
namespace XLS
{
class SXFDBType: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXFDBType)
BASE_OBJECT_DEFINE_CLASS_NAME(SXFDBType)
public:
SXFDBType();
~SXFDBType();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXFDBType;
short wTypeSql; //ODBCType enum
};
} // namespace XLS

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 "SXFormula.h"
namespace XLS
{
SXFormula::SXFormula()
{
}
SXFormula::~SXFormula()
{
}
BaseObjectPtr SXFormula::clone()
{
return BaseObjectPtr(new SXFormula(*this));
}
void SXFormula::readFields(CFRecord& record)
{
}
} // namespace XLS

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
*
*/
#pragma once
#include "BiffRecord.h"
namespace XLS
{
class SXFormula: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXFormula)
BASE_OBJECT_DEFINE_CLASS_NAME(SXFormula)
public:
SXFormula();
~SXFormula();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXFormula;
};
} // 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
*
*/
#include "SXInt.h"
namespace XLS
{
SXInt::SXInt()
{
}
SXInt::~SXInt()
{
}
BaseObjectPtr SXInt::clone()
{
return BaseObjectPtr(new SXInt(*this));
}
void SXInt::readFields(CFRecord& record)
{
record >> num;
}
} // namespace XLS

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
*
*/
#pragma once
#include "BiffRecord.h"
namespace XLS
{
class SXInt: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXInt)
BASE_OBJECT_DEFINE_CLASS_NAME(SXInt)
public:
SXInt();
~SXInt();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXInt;
short num;
};
} // namespace XLS

View File

@ -0,0 +1,69 @@
/*
* (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 "SXNum.h"
namespace XLS
{
SXNum::SXNum()
{
}
SXNum::~SXNum()
{
}
BaseObjectPtr SXNum::clone()
{
return BaseObjectPtr(new SXNum(*this));
}
void SXNum::readFields(CFRecord& record)
{
record >> num;
}
int SXNum::serialize(std::wostream & strm)
{
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"n")
{
CP_XML_ATTR(L"v", num.data.value);
}
}
return 0;
}
} // 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 "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
class SXNum: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXNum)
BASE_OBJECT_DEFINE_CLASS_NAME(SXNum)
public:
SXNum();
~SXNum();
BaseObjectPtr clone();
void readFields(CFRecord& record);
int serialize(std::wostream & strm);
static const ElementType type = typeSXNum;
Xnum num;
};
} // namespace XLS

View File

@ -0,0 +1,64 @@
/*
* (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 "SXPair.h"
namespace XLS
{
SXPair::SXPair()
{
}
SXPair::~SXPair()
{
}
BaseObjectPtr SXPair::clone()
{
return BaseObjectPtr(new SXPair(*this));
}
void SXPair::readFields(CFRecord& record)
{
unsigned short reserved1, flags;
record >> isxvd >> iCache >> reserved1 >> flags;
fFormula = GETBIT(flags, 0);
fPhysical = GETBIT(flags, 3);
fRelative = GETBIT(flags, 4);
}
} // namespace XLS

View File

@ -0,0 +1,63 @@
/*
* (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 "BiffRecord.h"
//#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
class SXPair: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXPair)
BASE_OBJECT_DEFINE_CLASS_NAME(SXPair)
public:
SXPair();
~SXPair();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXPair;
unsigned short isxvd;
short iCache;
bool fFormula;
bool fPhysical;
bool fRelative;
};
} // namespace XLS

View File

@ -0,0 +1,64 @@
/*
* (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 "SXRng.h"
namespace XLS
{
SXRng::SXRng()
{
}
SXRng::~SXRng()
{
}
BaseObjectPtr SXRng::clone()
{
return BaseObjectPtr(new SXRng(*this));
}
void SXRng::readFields(CFRecord& record)
{
unsigned short flags;
record >> flags;
fAutoStart = GETBIT(flags, 0);
fAutoEnd = GETBIT(flags, 1);
iByType = GETBITS(flags, 2, 4);
}
} // 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 "BiffRecord.h"
//#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
class SXRng: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SXRng)
BASE_OBJECT_DEFINE_CLASS_NAME(SXRng)
public:
SXRng();
~SXRng();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSXRng;
bool fAutoStart;
bool fAutoEnd;
unsigned char iByType;
};
} // namespace XLS

View File

@ -61,6 +61,17 @@ void SXString::readFields(CFRecord& record)
record >> segment;
}
}
int SXString::serialize(std::wostream & strm)
{
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"s")
{
CP_XML_ATTR(L"v", segment.value());
}
}
return 0;
}
} // namespace XLS

View File

@ -49,6 +49,8 @@ public:
void readFields(CFRecord& record);
int serialize(std::wostream & strm);
static const ElementType type = typeSXString;
unsigned short cch;

View File

@ -0,0 +1,61 @@
/*
* (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 "SxBool.h"
namespace XLS
{
SxBool::SxBool()
{
}
SxBool::~SxBool()
{
}
BaseObjectPtr SxBool::clone()
{
return BaseObjectPtr(new SxBool(*this));
}
void SxBool::readFields(CFRecord& record)
{
unsigned short flags;
record >> flags;
val = (flags != 0);
}
} // namespace XLS

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
*
*/
#pragma once
#include "BiffRecord.h"
namespace XLS
{
class SxBool: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxBool)
BASE_OBJECT_DEFINE_CLASS_NAME(SxBool)
public:
SxBool();
~SxBool();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxBool;
bool val;
};
} // 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
*
*/
#include "SxErr.h"
namespace XLS
{
SxErr::SxErr()
{
}
SxErr::~SxErr()
{
}
BaseObjectPtr SxErr::clone()
{
return BaseObjectPtr(new SxErr(*this));
}
void SxErr::readFields(CFRecord& record)
{
record >> wbe;
}
} // 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 "BiffRecord.h"
//#include "../Biff_structures/CellRangeRef.h"
namespace XLS
{
class SxErr: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxErr)
BASE_OBJECT_DEFINE_CLASS_NAME(SxErr)
public:
SxErr();
~SxErr();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxErr;
unsigned short wbe;
};
} // 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
*
*/
#include "SxFmla.h"
namespace XLS
{
SxFmla::SxFmla()
{
}
SxFmla::~SxFmla()
{
}
BaseObjectPtr SxFmla::clone()
{
return BaseObjectPtr(new SxFmla(*this));
}
void SxFmla::readFields(CFRecord& record)
{
fmla.load(record);
}
} // 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 "BiffRecord.h"
#include "../Biff_structures/PivotParsedFormula.h"
namespace XLS
{
class SxFmla: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxFmla)
BASE_OBJECT_DEFINE_CLASS_NAME(SxFmla)
public:
SxFmla();
~SxFmla();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxFmla;
PivotParsedFormula fmla;
};
} // namespace XLS

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 "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

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
*
*/
#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

View File

@ -0,0 +1,61 @@
/*
* (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 "SxName.h"
namespace XLS
{
SxName::SxName()
{
}
SxName::~SxName()
{
}
BaseObjectPtr SxName::clone()
{
return BaseObjectPtr(new SxName(*this));
}
void SxName::readFields(CFRecord& record)
{
unsigned short flags;
record >> flags >> ifdb >> ifn >> csxpair;
fErrName = GETBIT(flags, 0);
}
} // 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 "BiffRecord.h"
namespace XLS
{
class SxName: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxName)
BASE_OBJECT_DEFINE_CLASS_NAME(SxName)
public:
SxName();
~SxName();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeSxName;
bool fErrName;
short ifdb;
short ifn;
unsigned short csxpair;
};
} // namespace XLS

View File

@ -0,0 +1,65 @@
/*
* (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 "SxNil.h"
namespace XLS
{
SxNil::SxNil()
{
}
SxNil::~SxNil()
{
}
BaseObjectPtr SxNil::clone()
{
return BaseObjectPtr(new SxNil(*this));
}
void SxNil::readFields(CFRecord& record)
{
}
int SxNil::serialize(std::wostream & strm)
{
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"m");
}
return 0;
}
} // namespace XLS

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
*
*/
#pragma once
#include "BiffRecord.h"
namespace XLS
{
class SxNil: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(SxNil)
BASE_OBJECT_DEFINE_CLASS_NAME(SxNil)
public:
SxNil();
~SxNil();
BaseObjectPtr clone();
void readFields(CFRecord& record);
int serialize(std::wostream & strm);
static const ElementType type = typeSxNil;
};
} // namespace XLS

View File

@ -170,7 +170,7 @@ int TxO::serialize (std::wostream & _stream)
CP_XML_WRITER(_stream)
{
for (int i = 0 ; i < TxOruns.rgTxoRuns.size(); i++)
for (size_t i = 0 ; i < TxOruns.rgTxoRuns.size(); i++)
{
Run *run = dynamic_cast<Run*>(TxOruns.rgTxoRuns[i].get());
if (run == NULL) continue;

View File

@ -45,8 +45,6 @@ public:
BiffStructurePtr clone();
void load(CFRecord& record);
std::vector<CellRangeRef> cell_ranges;

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
*
*/
#include "PivotParsedFormula.h"
#include <Binary/CFRecord.h>
namespace XLS
{
PivotParsedFormula::PivotParsedFormula()
: ParsedFormula(CellRef())
{
}
BiffStructurePtr PivotParsedFormula::clone()
{
return BiffStructurePtr(new PivotParsedFormula(*this));
}
void PivotParsedFormula::load(CFRecord& record)
{
unsigned short cce;
record >> cce >> cSxName;
rgce.load(record, cce);
}
} // namespace XLS

View File

@ -0,0 +1,52 @@
/*
* (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 "ParsedFormula.h"
namespace XLS
{
class PivotParsedFormula: public ParsedFormula
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(PivotParsedFormula)
public:
PivotParsedFormula();
BiffStructurePtr clone();
void load(CFRecord& record);
unsigned short cSxName;
};
} // namespace XLS

View File

@ -62,5 +62,7 @@ public:
} data;
};
typedef Xnum DateAsNum;
} // namespace XLS

View File

@ -0,0 +1,78 @@
/*
* (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 "DBB.h"
#include "../Biff_records/SXDBB.h"
#include "SXOPER.h"
namespace XLS
{
DBB::DBB()
{
}
DBB::~DBB()
{
}
BaseObjectPtr DBB::clone()
{
return BaseObjectPtr(new DBB(*this));
}
// DBB = [SXDBB] *SXOPER
const bool DBB::loadContent(BinProcessor& proc)
{
if(proc.optional<SXDBB>())
{
m_SXDBB = elements_.back();
elements_.pop_back();
}
int count = proc.repeated<SXOPER>(0, 0);
while(count--)
{
m_arSXOPER.push_back(elements_.front()); elements_.pop_front();
}
if (!m_SXDBB && m_arSXOPER.empty())
return false;
return true;
}
} // namespace XLS

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
*
*/
#pragma once
#include <Logic/CompositeObject.h>
namespace XLS
{
class DBB: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(DBB)
public:
DBB();
~DBB();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeDBB;
BaseObjectPtr m_SXDBB;
std::vector<BaseObjectPtr> m_arSXOPER;
};
} // namespace XLS

View File

@ -43,18 +43,15 @@ DREF::DREF()
{
}
DREF::~DREF()
{
}
BaseObjectPtr DREF::clone()
{
return BaseObjectPtr(new DREF(*this));
}
// DREF = DConName / DConBin / DConRef
const bool DREF::loadContent(BinProcessor& proc)
{
@ -68,8 +65,42 @@ const bool DREF::loadContent(BinProcessor& proc)
}
}
}
m_DCon = elements_.back();
elements_.pop_back();
return true;
}
int DREF::serialize(std::wostream & strm)
{
if (!m_DCon)return 0;
DConName* name = dynamic_cast<DConName*>(m_DCon.get());
DConBin* bin = dynamic_cast<DConBin*>(m_DCon.get());
DConRef* ref = dynamic_cast<DConRef*>(m_DCon.get());
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"cacheSource")
{
if (name)
{
CP_XML_ATTR(L"type", L"worksheet");
CP_XML_NODE(L"worksheetSource")
{
CP_XML_ATTR(L"name", name->stName.value());
}
}
else if(bin)
{
}
else if(ref)
{
}
}
}
return 0;
}
} // namespace XLS

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of DREF union of records
class DREF: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(DREF)
@ -49,7 +47,11 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeDREF;
int serialize(std::wostream & stream);
static const ElementType type = typeDREF;
BaseObjectPtr m_DCon;
};
} // namespace XLS

View File

@ -0,0 +1,252 @@
/*
* (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 "FDB.h"
#include "SXFMLA_bu.h"
#include "SXOPER.h"
#include "SXRANGE.h"
#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:
Parenthesis_FDB(int count = 0)
{
m_count = count;
}
BaseObjectPtr clone()
{
return BaseObjectPtr(new Parenthesis_FDB(*this));
}
const bool loadContent(BinProcessor& proc)
{
if (m_count < 1) return false;
int count = proc.repeated<SXOPER>(0, m_count);
if (!proc.optional<SXRANGE>())
{
count = proc.repeated<SxIsxoper>(0, 0);
}
return true;
};
private:
int m_count;
};
FDB::FDB()
{
}
FDB::~FDB()
{
}
BaseObjectPtr FDB::clone()
{
return BaseObjectPtr(new FDB(*this));
}
// FDB = SXFDB SXFDBType [SXFMLA / (*GRPSXOPER [SXRANGE / *(SxIsxoper *Continue)])] *SRCSXOPER
// SXRANGE = SXOPER
// SRCSXOPER = SXOPER
const bool FDB::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXFDB>())
{
return false;
}
m_SXFDB = elements_.back();
elements_.pop_back();
SXFDB* fdb = dynamic_cast<SXFDB*>(m_SXFDB.get());
if(proc.mandatory<SXFDBType>())
{
m_SXFDBType = elements_.back();
elements_.pop_back();
}
if(proc.optional<SXFMLA>())
{
m_SXFMLA = elements_.back();
elements_.pop_back();
}
else
{
Parenthesis_FDB parenthesis_FDB(fdb->csxoper);
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;
}
int FDB::serialize(std::wostream & strm)
{
SXFDB* fdb = dynamic_cast<SXFDB*>(m_SXFDB.get());
SXFDBType* fdb_type = dynamic_cast<SXFDBType*>(m_SXFDBType.get());
if (!fdb || !fdb_type) return 0;
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"cacheField")
{
CP_XML_ATTR(L"name", fdb->stFieldName.value());
CP_XML_ATTR(L"numFmtId", fdb_type->wTypeSql);
switch(fdb_type->wTypeSql)//format code
{
case 0x0000:
case 0x0001:
case 0x0003:
case 0x0004:
case 0x0005:
case 0x0006:
case 0x0007:
case 0x0008:
case 0x000B:
case 0x000C:
case 0xFFF9:
case 0xFFFE:
break;
}
if(m_SXFMLA)
{
//{formula
}
//caption, databaseFields, ..
if (m_arSRCSXOPER.empty() == false)
{
CP_XML_NODE(L"sharedItems")
{
//CP_XML_ATTR(L"containsSemiMixedTypes", 0);
CP_XML_ATTR(L"containsNonDate", fdb->fNonDates);
CP_XML_ATTR(L"containsDate", fdb->fDateInField);
CP_XML_ATTR(L"containsNumber", fdb->fNumField);
CP_XML_ATTR(L"containsBlank", fdb->fTextEtcField);
//CP_XML_ATTR(L"containsString", 0);
if (fdb->fnumMinMaxValid)
{
if (fdb->fDateInField)
{
CP_XML_ATTR(L"minDate", 0); // "2007-11-18T00:00:00"
CP_XML_ATTR(L"maxDate", 0); // "2007-12-25T00:00:00"
}
else if (fdb->fNumField)
{
CP_XML_ATTR(L"minValue", 0);
CP_XML_ATTR(L"maxValue", 0);
}
}
CP_XML_ATTR(L"count", fdb->catm);
for (size_t i = 0; i < m_arSRCSXOPER.size(); i++)
{
m_arSRCSXOPER[i]->serialize(CP_XML_STREAM());
}
}
}
if (m_arGRPSXOPER.empty() == false)
{
CP_XML_NODE(L"fieldGroup")
{
if (fdb->ifdbParent > 0)
CP_XML_ATTR(L"par", fdb->ifdbParent);
if (m_SXRANGE)
m_SXRANGE->serialize(CP_XML_STREAM());
CP_XML_NODE(L"groupItems")
{
CP_XML_ATTR(L"count", m_arGRPSXOPER.size());
for (size_t i = 0; i < m_arGRPSXOPER.size(); i++)
{
m_arGRPSXOPER[i]->serialize(CP_XML_STREAM());
}
}
}
}
}
}
return 0;
}
} // namespace XLS

View File

@ -0,0 +1,65 @@
/*
* (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 <Logic/CompositeObject.h>
namespace XLS
{
class FDB: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(FDB)
public:
FDB();
~FDB();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
int serialize(std::wostream & strm);
static const ElementType type = typeFDB;
BaseObjectPtr m_SXFDB;
BaseObjectPtr m_SXFDBType;
BaseObjectPtr m_SXFMLA;
std::vector<BaseObjectPtr> m_arSRCSXOPER;
std::vector<BaseObjectPtr> m_arGRPSXOPER;
BaseObjectPtr m_SXRANGE;
std::vector<BaseObjectPtr> m_arSxIsxoper;
};
} // namespace XLS

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of GLOBALS union of records
class GLOBALS: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(GLOBALS)
@ -49,7 +47,7 @@ public:
virtual const bool loadContent (BinProcessor& proc);
static const ElementType type = typeGLOBALS;
static const ElementType type = typeGLOBALS;
int serialize(std::wostream & stream);

View File

@ -0,0 +1,103 @@
/*
* (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 "PIVOTCACHE.h"
#include "SXFORMULA_bu.h"
#include "FDB.h"
#include "DBB.h"
#include "../Biff_records/SXDB.h"
#include "../Biff_records/SXDBEx.h"
#include "../Biff_records/EOF.h"
namespace XLS
{
PIVOTCACHE::PIVOTCACHE()
{
}
PIVOTCACHE::~PIVOTCACHE()
{
}
BaseObjectPtr PIVOTCACHE::clone()
{
return BaseObjectPtr(new PIVOTCACHE(*this));
}
// PIVOTCACHE = SXDB SXDBEx *SXFORMULA *FDB *DBB EOF
const bool PIVOTCACHE::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXDB>())
{
return false;
}
m_SXDB = elements_.back();
elements_.pop_back();
if(proc.mandatory<SXDBEx>())
{
m_SXDBEx = elements_.back();
elements_.pop_back();
}
int count = 0;
count = proc.repeated<SXFORMULA>(0, 0);
while(count--)
{
m_arSXFORMULA.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<FDB>(0, 0);
while(count--)
{
m_arFDB.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<DBB>(0, 0);
while(count--)
{
m_arDBB.push_back(elements_.front()); elements_.pop_front();
}
if (proc.optional<EOF_T>())
{
elements_.pop_back();
}
return true;
}
} // namespace XLS

View File

@ -0,0 +1,61 @@
/*
* (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 <Logic/CompositeObject.h>
namespace XLS
{
class PIVOTCACHE: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTCACHE)
public:
PIVOTCACHE();
~PIVOTCACHE();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTCACHE;
BaseObjectPtr m_SXDB;
BaseObjectPtr m_SXDBEx;
std::vector<BaseObjectPtr> m_arSXFORMULA;
std::vector<BaseObjectPtr> m_arFDB;
std::vector<BaseObjectPtr> m_arDBB;
};
} // namespace XLS

View File

@ -31,10 +31,14 @@
*/
#include "PIVOTCACHEDEFINITION.h"
#include <Logic/Biff_records/SXStreamID.h>
#include <Logic/Biff_records/SXVS.h>
#include <Logic/Biff_unions/SXSRC.h>
#include <Logic/Biff_unions/SXADDLCACHE.h>
#include "PIVOTCACHE.h"
#include "SXSRC.h"
#include "SXADDLCACHE.h"
#include "../Biff_records/SXStreamID.h"
#include "../Biff_records/SXVS.h"
#include "../Biff_records/SXDB.h"
#include "../Biff_records/SXDBEx.h"
namespace XLS
{
@ -59,6 +63,8 @@ BaseObjectPtr PIVOTCACHEDEFINITION::clone()
// PIVOTCACHEDEFINITION = SXStreamID SXVS [SXSRC] [SXADDLCACHE]
const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
{
global_info_ = proc.getGlobalWorkbookInfo();
if(!proc.mandatory<SXStreamID>())
{
return false;
@ -83,6 +89,93 @@ const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
}
return true;
}
int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
{
SXStreamID* streamId = dynamic_cast<SXStreamID*>(m_SXStreamID.get());
if (!streamId) return 0;
std::map<int, BaseObjectPtr>::iterator pFind = global_info_->mapPivotCache.find(streamId->idStm);
if (pFind == global_info_->mapPivotCache.end()) return 0;
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
if (!pivot_cache) return 0;
SXDB* db = dynamic_cast<SXDB*>(pivot_cache->m_SXDB.get());
SXDBEx* db_ex = dynamic_cast<SXDBEx*>(pivot_cache->m_SXDBEx.get());
if (!db || !db_ex)return 0;
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"pivotCacheDefinition")
{
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
if (pivot_cache->m_arDBB.empty() == false)
{
CP_XML_ATTR(L"r:id", L"rId1" );
}
CP_XML_ATTR(L"recordCount", db->crdbUsed);
CP_XML_ATTR(L"refreshedBy", db->rgb.value());
CP_XML_ATTR(L"refreshedDate", db_ex->numDate.data.value);
//createdVersion="1"
//refreshedVersion="2"
//upgradeOnRefresh="1">
SXSRC* src = dynamic_cast<SXSRC*>(m_SXSRC.get());
if (src)
src->serialize(CP_XML_STREAM());
if (pivot_cache->m_arFDB.empty() == false)
{
CP_XML_NODE(L"cacheFields")
{
CP_XML_ATTR(L"count", pivot_cache->m_arFDB.size());
for (size_t i = 0; i < pivot_cache->m_arFDB.size(); i++)
{
pivot_cache->m_arFDB[i]->serialize(CP_XML_STREAM());
}
}
}
}
}
return 0;
}
int PIVOTCACHEDEFINITION::serialize_records(std::wostream & strm)
{
SXStreamID* streamId = dynamic_cast<SXStreamID*>(m_SXStreamID.get());
if (!streamId) return 0;
std::map<int, BaseObjectPtr>::iterator pFind = global_info_->mapPivotCache.find(streamId->idStm);
if (pFind == global_info_->mapPivotCache.end()) return 0;
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
if (!pivot_cache) return 0;
if (pivot_cache->m_arDBB.empty()) return 0;
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"pivotCacheRecords")
{
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
CP_XML_ATTR(L"count", pivot_cache->m_arDBB.size());
for (size_t i = 0; i < pivot_cache->m_arDBB.size(); i++)
{
pivot_cache->m_arDBB[i]->serialize(CP_XML_STREAM());
}
}
}
return 0;
}
} // namespace XLS

View File

@ -48,6 +48,9 @@ public:
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
int serialize_definitions(std::wostream & stream);
int serialize_records(std::wostream & stream);
static const ElementType type = typePIVOTCACHEDEFINITION;
@ -55,6 +58,8 @@ public:
BaseObjectPtr m_SXVS;
BaseObjectPtr m_SXSRC;
BaseObjectPtr m_SXADDLCACHE;
GlobalWorkbookInfoPtr global_info_;
};
} // namespace XLS

View File

@ -36,18 +36,14 @@
namespace XLS
{
PIVOTRULE::PIVOTRULE()
{
}
PIVOTRULE::~PIVOTRULE()
{
}
BaseObjectPtr PIVOTRULE::clone()
{
return BaseObjectPtr(new PIVOTRULE(*this));
@ -61,7 +57,14 @@ const bool PIVOTRULE::loadContent(BinProcessor& proc)
{
return false;
}
m_SxRule = elements_.back();
elements_.pop_back();
int count = proc.repeated<PRFILTER>(0, 0);
while(count--)
{
m_arPRFILTER.push_back(elements_.front()); elements_.pop_front();
}
return true;
}

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTRULE union of records
class PIVOTRULE: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTRULE)
@ -49,7 +47,10 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTRULE;
static const ElementType type = typePIVOTRULE;
BaseObjectPtr m_SxRule;
std::vector<BaseObjectPtr> m_arPRFILTER;
};
} // namespace XLS

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTSELECT union of records
class PIVOTSELECT: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTSELECT)

View File

@ -0,0 +1,77 @@
/*
* (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 "SXDB.h"
#include <Logic/Biff_unions/DREF.h>
#include <Logic/Biff_unions/SXTBL.h>
#include <Logic/Biff_unions/DBQUERY.h>
namespace XLS
{
SXDB::SXDB()
{
}
SXDB::~SXDB()
{
}
BaseObjectPtr SXDB::clone()
{
return BaseObjectPtr(new SXDB(*this));
}
// SXDB = DREF / SXTBL / DBQUERY
const bool SXDB::loadContent(BinProcessor& proc)
{
if(!proc.optional<DREF>())
{
if(!proc.optional<SXTBL>())
{
if(!proc.optional<DBQUERY>())
{
return false;
}
}
}
m_source = elements_.back();
elements_.pop_back();
return true;
}
} // 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 <Logic/CompositeObject.h>
namespace XLS
{
class SXDB: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXDB)
public:
SXDB();
~SXDB();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXDB;
BaseObjectPtr m_source;
};
} // namespace XLS

View File

@ -0,0 +1,71 @@
/*
* (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 "SXFMLA_bu.h"
#include "../Biff_records/SxFmla.h"
#include "../Biff_records/SxName.h"
#include "../Biff_records/SXPair.h"
namespace XLS
{
SXFMLA::SXFMLA()
{
}
SXFMLA::~SXFMLA()
{
}
BaseObjectPtr SXFMLA::clone()
{
return BaseObjectPtr(new SXFMLA(*this));
}
// SXFMLA = SxFmla *(SxName *SXPair)
const bool SXFMLA::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SxFmla>())
{
return false;
}
m_SxFmla = elements_.back();
elements_.pop_back();
return true;
}
} // 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 <Logic/CompositeObject.h>
namespace XLS
{
class SXFMLA: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXFMLA)
public:
SXFMLA();
~SXFMLA();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXFMLA;
BaseObjectPtr m_SxFmla;
};
} // namespace XLS

View File

@ -0,0 +1,79 @@
/*
* (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 "SXFORMULA_bu.h"
#include "SXFMLA_bu.h"
#include "PIVOTRULE.h"
#include "../Biff_records/SXFormula.h"
namespace XLS
{
SXFORMULA::SXFORMULA()
{
}
SXFORMULA::~SXFORMULA()
{
}
BaseObjectPtr SXFORMULA::clone()
{
return BaseObjectPtr(new SXFORMULA(*this));
}
// SXFORMULA = SXFMLA PIVOTRULE SXFormula
const bool SXFORMULA::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXFMLA>())
{
return false;
}
m_SXFMLA = elements_.back();
elements_.pop_back();
if(proc.mandatory<PIVOTRULE>())
{
m_PIVOTRULE = elements_.back();
elements_.pop_back();
}
if(proc.mandatory<SXFormula>())
{
m_SXFormula = elements_.back();
elements_.pop_back();
} return true;
}
} // 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 <Logic/CompositeObject.h>
namespace XLS
{
class SXFORMULA: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXFORMULA)
public:
SXFORMULA();
~SXFORMULA();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXFORMULA;
BaseObjectPtr m_SXFMLA;
BaseObjectPtr m_PIVOTRULE;
BaseObjectPtr m_SXFormula;
};
} // namespace XLS

View File

@ -0,0 +1,94 @@
/*
* (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 "SXOPER.h"
#include "../Biff_records/SxNil.h"
#include "../Biff_records/SXNum.h"
#include "../Biff_records/SxBool.h"
#include "../Biff_records/SxErr.h"
#include "../Biff_records/SXString.h"
#include "../Biff_records/SXDtr.h"
namespace XLS
{
SXOPER::SXOPER()
{
}
SXOPER::~SXOPER()
{
}
BaseObjectPtr SXOPER::clone()
{
return BaseObjectPtr(new SXOPER(*this));
}
// SXOPER = SxNil / SXNum / SxBool / SxErr / SXString / SXDtr
const bool SXOPER::loadContent(BinProcessor& proc)
{
if(proc.optional<SxNil>())
{
}
else if(proc.optional<SXNum>())
{
}
else if(proc.optional<SxBool>())
{
}
else if(proc.optional<SxErr>())
{
}
else if(proc.optional<SXString>())
{
}
else if(proc.optional<SXDtr>())
{
}
else
return false;
m_element = elements_.back();
elements_.pop_back();
return true;
}
int SXOPER::serialize(std::wostream & strm)
{
if (!m_element) return 0;
m_element->serialize(strm);
return 0;
}
} // 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 <Logic/CompositeObject.h>
namespace XLS
{
class SXOPER: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXOPER)
public:
SXOPER();
~SXOPER();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
int serialize(std::wostream & strm);
static const ElementType type = typeSXOPER;
BaseObjectPtr m_element;
};
} // namespace XLS

View File

@ -0,0 +1,160 @@
/*
* (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 "SXRANGE.h"
#include "../Biff_records/SXRng.h"
#include "../Biff_records/SXNum.h"
#include "../Biff_records/SXDtr.h"
#include "../Biff_records/SXInt.h"
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()
{
}
SXRANGE::~SXRANGE()
{
}
BaseObjectPtr SXRANGE::clone()
{
return BaseObjectPtr(new SXRANGE(*this));
}
// SXRANGE = SXRng (3SXNum / (2SXDtr SXInt))
const bool SXRANGE::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXRng>())
{
return false;
}
m_SXRng = elements_.back();
elements_.pop_back();
if(proc.optional<Parenthesis_SXRANGE>())
{
while(elements_.empty() == false)
{
SXNum* num = dynamic_cast<SXNum*>(elements_.front().get());
if (num)
{
m_arSXNum.push_back(elements_.front());
}
else
{
SXDtr* dtr = dynamic_cast<SXDtr*>(elements_.front().get());
if (dtr)
{
m_arSXDtr.push_back(elements_.front());
}
}
elements_.pop_front();
}
}
return true;
}
int SXRANGE::serialize(std::wostream & strm)
{
SXRng* rng = dynamic_cast<SXRng*>(m_SXRng.get());
if (!rng) return 0;
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"rangePr")
{
switch(rng->iByType)
{
case 0: CP_XML_ATTR(L"groupBy", L"range"); break;
case 1: CP_XML_ATTR(L"groupBy", L"seconds"); break;
case 2: CP_XML_ATTR(L"groupBy", L"minutes"); break;
case 3: CP_XML_ATTR(L"groupBy", L"hours"); break;
case 4: CP_XML_ATTR(L"groupBy", L"days"); break;
case 5: CP_XML_ATTR(L"groupBy", L"months"); break;
case 6: CP_XML_ATTR(L"groupBy", L"quarters"); break;
case 7: CP_XML_ATTR(L"groupBy", L"years"); break;
}
if (m_arSXDtr.size() == 2)
{
SXDtr* startDate = dynamic_cast<SXDtr*>(m_arSXDtr[0].get());
SXDtr* endDate = dynamic_cast<SXDtr*>(m_arSXDtr[1].get());
std::wstringstream s_start, s_end;
s_start << startDate->yr << L"-" << startDate->mon << L"-" << startDate->dom << L"T" << startDate->hr << L":" << startDate->min << L":" << startDate->sec;
s_end << endDate->yr << L"-" << endDate->mon << L"-" << endDate->dom << L"T" << endDate->hr << L":" << endDate->min << L":" << endDate->sec;
CP_XML_ATTR(L"startDate", s_start.str());
CP_XML_ATTR(L"endDate", s_end.str());
}
if (m_arSXNum.size() == 3)
{
}
}
}
return 0;
}
} // 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 <Logic/CompositeObject.h>
namespace XLS
{
class SXRANGE: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(SXRANGE)
public:
SXRANGE();
~SXRANGE();
BaseObjectPtr clone();
virtual const bool loadContent(BinProcessor& proc);
int serialize(std::wostream & strm);
static const ElementType type = typeSXRANGE;
BaseObjectPtr m_SXRng;
std::vector<BaseObjectPtr> m_arSXNum;
std::vector<BaseObjectPtr> m_arSXDtr;
};
} // namespace XLS

View File

@ -73,5 +73,13 @@ const bool SXSRC::loadContent(BinProcessor& proc)
return true;
}
int SXSRC::serialize(std::wostream & stream)
{
if (m_source)
m_source->serialize(stream);
return 0;
}
} // namespace XLS

View File

@ -47,7 +47,9 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typeSXSRC;
int serialize(std::wostream & stream);
static const ElementType type = typeSXSRC;
BaseObjectPtr m_source;
};

View File

@ -294,7 +294,7 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
int iCrt = -1;
for (int i = 0 ; i < charts->m_arSERIESFORMAT.size(); i++)
for (size_t i = 0 ; i < charts->m_arSERIESFORMAT.size(); i++)
{
SERIESFORMAT * series = dynamic_cast<SERIESFORMAT *>(charts->m_arSERIESFORMAT[i].get());
if (series == NULL) continue;
@ -641,8 +641,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
{
CP_XML_NODE(L"c:plotArea")
{
for (int i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
for (size_t i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
{
AXISPARENT* parent = dynamic_cast<AXISPARENT*> (chart_formats->m_arAXISPARENT[i].get());
ax_parent = dynamic_cast<AxisParent*> (parent->m_AxisParent.get());
@ -751,7 +750,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
series->serialize_legend(stream_legend_entries, it->second[i]);
}
for (int i = 0 ; i < crt->m_arCrtLine.size(); i++)
for (size_t i = 0 ; i < crt->m_arCrtLine.size(); i++)
{
CrtLine* crtLine = dynamic_cast<CrtLine*>(crt->m_arCrtLine[i].get());
if (crtLine == NULL) continue;
@ -1068,7 +1067,7 @@ int ChartSheetSubstream::serialize_ser (std::wstring sNodeSer, std::wostream & _
SIIndex * series_cash = NULL;
int type_val = 0;
for (int i = 0; (series_data) && (i < series_data->m_arSIIndex.size()); i++)
for (size_t i = 0; (series_data) && (i < series_data->m_arSIIndex.size()); i++)
{
SIIndex * si_in = dynamic_cast<SIIndex *>(series_data->m_arSIIndex[i].get());

View File

@ -99,6 +99,7 @@ public:
unsigned int last_AXES_id;
const static unsigned int initial_AXES_id = 0x2000000;
std::map<int, BaseObjectPtr> mapPivotCache;
std::map<std::wstring, std::vector<std::wstring>> mapDefineNames;
std::vector<std::wstring> arDefineNames;
std::vector<std::wstring> arExternalNames;

View File

@ -325,7 +325,10 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
count--;
}
}break;
case rt_DocRoute: proc.repeated<DOCROUTE>(0, 0); break;
case rt_DocRoute:
{
count = proc.repeated<DOCROUTE>(0, 0);
}break;
case rt_UserBView:
{
count = proc.repeated<UserBView>(0, 0);

View File

@ -439,6 +439,7 @@ enum ElementType
typePHONETICINFO,
typePICF,
typePIVOTADDL,
typePIVOTCACHE,
typePIVOTCACHEDEFINITION,
typePIVOTCORE,
typePIVOTEX,
@ -498,6 +499,31 @@ enum ElementType
typeSXADDLSXMG,
typeSXADDLSXMGS,
typeSXADDLSXRULE,
typeSXDB,
typeSXDBEx,
typeSxBool,
typeSxErr,
typeSxNil,
typeSxIsxoper,
typeSXFDBType,
typeSXRng,
typeSxName,
typeSXDtr,
typeSXInt,
typeSXNum,
typeSXPair,
typeSXFormula,
typeSxFmla,
typeSXFDB,
typeSXFORMULA,
typeSXFMLA,
typeSXDBB,
typeSXOPER,
typeSXRANGE,
typeFDB,
typeDBB,
//typeGRPSXOPER,
//typeSRCSXOPER,
typeSXSRC,
typeSXTBL,
typeTABLESTYLES,

View File

@ -621,12 +621,12 @@ namespace NSCustomShapesConvert
ConvertSum(oHandle.PolarCentre.y, oHandle.PolarCentreType.y, m_lIndexDst-2, ptFormula, 0, ptValue, false, true, false, m_oGuidsRes);
m_arIndexDst.push_back(m_lIndexDst-1);
std::wstring strMem = boost::lexical_cast<std::wstring>(m_lIndexDst-2);
std::wstring strMem = std::to_wstring(m_lIndexDst - 2);
oHandle.Pos.x = GetHandlePos(strMem, _T("w"), m_lWidth);
oHandle.PosType.x = ptFormula;
strMem = boost::lexical_cast<std::wstring>(m_lIndexDst-2);
strMem = std::to_wstring(m_lIndexDst - 2);
oHandle.Pos.y = GetHandlePos(strMem, _T("h"), m_lHeight);
oHandle.PosType.y = ptFormula;
}
@ -800,20 +800,20 @@ namespace NSCustomShapesConvert
case ptFormula:
{
if (bExtShape)
strValue = boost::lexical_cast<std::wstring>(lParam);
strValue = std::to_wstring(lParam);
else
strValue = boost::lexical_cast<std::wstring>(m_arIndexDst[lParam]);
strValue = std::to_wstring(m_arIndexDst[lParam]);
strValue = _T("gd") + strValue;
break;
}
case ptAdjust:
{
strValue = _T("adj") + boost::lexical_cast<std::wstring>(lParam);
strValue = _T("adj") + std::to_wstring(lParam);
break;
}
case ptValue:
{
strValue = boost::lexical_cast<std::wstring>(lParam);
strValue = std::to_wstring(lParam);
break;
}
default:
@ -1080,7 +1080,7 @@ namespace NSCustomShapesConvert
std::wstring strSize;
std::wstring strIndex;
strSize = boost::lexical_cast<std::wstring>( lSize);
strSize = std::to_wstring( lSize);
if ('#' == strParam[0])
{
@ -1114,7 +1114,7 @@ namespace NSCustomShapesConvert
m_lIndexSrc++;
m_arIndexDst.push_back(m_lIndexDst);
strIndex = boost::lexical_cast<std::wstring>(m_lIndexDst);
strIndex = std::to_wstring(m_lIndexDst);
m_oGuidsRes.WriteString(_T("<a:gd name=\"gd"));
m_oGuidsRes.WriteString(strIndex);

View File

@ -58,6 +58,8 @@
#include "../XlsFormat/Logic/Biff_unions/CHART.h"
#include "../XlsFormat/Logic/Biff_unions/BACKGROUND.h"
#include "../XlsFormat/Logic/Biff_unions/PIVOTVIEW.h"
#include "../XlsFormat/Logic/Biff_unions/PIVOTCACHE.h"
#include "../XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.h"
#include <Logic/Biff_records/BkHim.h>
#include <Logic/Biff_records/HLink.h>
@ -135,28 +137,7 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
if (cfile.isError())
{
//if (0 <= xls_file.rfind(L".xls"))//todooo lower
//{
// unsigned char* fileData = NULL;
// DWORD fileSize = 0;
// if (!NSFile::CFileBinary::ReadAllBytes(xls_file, &fileData, fileSize)) return;
// if (!fileData) return;
// //test/open as list
// std::wstring xls_file_new = _xlsx_path + FILE_SEPARATOR_STR + L"temp.xls";
// if (cfile.Open(xls_file_new, XLS::CompoundFile::cf_WriteMode))
// {
// XLS::CFStreamPtr stream = cfile.createWorkbookStream();
// if (stream)
// stream->write(fileData, fileSize);
// cfile.closeWorkbookStream();
// }
// delete []fileData;
// if (!cfile.Open(xls_file_new, XLS::CompoundFile::cf_ReadMode))
// return;
//}else
return;
return;
}
XLS::CFStreamPtr summary;
@ -164,7 +145,7 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
try
{
summary = cfile.getSummaryInformationStream();
summary = cfile.getNamedStream("SummaryInformation");
}
catch (...)
{
@ -172,7 +153,7 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
try
{
doc_summary = cfile.getDocumentSummaryInformationStream();
doc_summary = cfile.getNamedStream("DocumentSummaryInformation");
}
catch (...)
{
@ -211,7 +192,33 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
{
is_encrypted = true;
if (xls_global_info->decryptor->IsVerify() == false) return;
}
}
if (cfile.storage_->isDirectory("_SX_DB_CUR"))
{
std::list<std::string> listStream = cfile.storage_->entries("_SX_DB_CUR");
for (std::list<std::string>::iterator it = listStream.begin(); it != listStream.end(); it++)
{
XLS::CFStreamCacheReader pivot_cache_reader(cfile.getNamedStream("_SX_DB_CUR/" + *it), xls_global_info);
XLS::BaseObjectPtr pivot_cache = boost::shared_ptr<XLS::PIVOTCACHE>(new XLS::PIVOTCACHE());
XLS::BinReaderProcessor proc(pivot_cache_reader , pivot_cache.get() , true);
proc.mandatory(*pivot_cache.get());
int index = 0;
try
{
index = atoi(it->c_str());
}
catch(...)
{
}
xls_global_info->mapPivotCache.insert(std::make_pair(index, pivot_cache));
}
}
}
catch(...)
{
@ -340,7 +347,7 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook)
count_sheets++;
xls_global_info->current_sheet = count_sheets;
xlsx_context->start_table(xls_global_info->sheets_names.size() > i ? xls_global_info->sheets_names[i] : L"Sheet_" + boost::lexical_cast<std::wstring>(count_sheets));
xlsx_context->start_table(xls_global_info->sheets_names.size() > i ? xls_global_info->sheets_names[i] : L"Sheet_" + std::to_wstring(count_sheets));
xlsx_context->set_state(xls_global_info->sheets_state.size() > i ? xls_global_info->sheets_state[i] : L"visible");
convert(dynamic_cast<XLS::WorksheetSubstream*>(woorkbook->m_arWorksheetSubstream[i].get()));
@ -349,7 +356,7 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook)
{
count_chart_sheets++;
xls_global_info->current_sheet = -1;
xlsx_context->start_table(xls_global_info->sheets_names.size() > i ? xls_global_info->sheets_names[i] : L"ChartSheet_" + boost::lexical_cast<std::wstring>(count_chart_sheets));
xlsx_context->start_table(xls_global_info->sheets_names.size() > i ? xls_global_info->sheets_names[i] : L"ChartSheet_" + std::to_wstring(count_chart_sheets));
convert_chart_sheet(dynamic_cast<XLS::ChartSheetSubstream*>(woorkbook->m_arWorksheetSubstream[i].get()));
}
@ -632,7 +639,7 @@ std::wstring XlsConverter::WriteMediaFile(char *data, int size, std::wstring typ
xlsx_context->get_mediaitems().create_media_path(xlsx_path);
bool res = false;
std::wstring file_name = L"image" + boost::lexical_cast<std::wstring>(id);
std::wstring file_name = L"image" + std::to_wstring(id);
if (type_ext == L"dib_data")
@ -1915,4 +1922,10 @@ void XlsConverter::convert(XLS::PIVOTCACHEDEFINITION * pivot_cached)
{
if (pivot_cached == NULL) return;
std::wstringstream strmD, strmR;
pivot_cached->serialize_definitions(strmD);
pivot_cached->serialize_records(strmR);
xlsx_context->get_pivots_context().add_cache(strmD.str(), strmR.str());
}

View File

@ -86,7 +86,7 @@ std::wstring static get_default_file_name(external_items::Type type)
// }
// //todooo проверить
//
// return get_default_file_name(type) + boost::lexical_cast<std::wstring>(Num) + sExt;
// return get_default_file_name(type) + std::to_wstring(Num) + sExt;
//}
@ -95,7 +95,7 @@ std::wstring external_items::add_image(const std::wstring & image, int bin_id)
{
const bool isMediaInternal = true;
std::wstring rId = std::wstring(L"picId") + boost::lexical_cast<std::wstring>(count_image+1);
std::wstring rId = std::wstring(L"picId") + std::to_wstring(count_image+1);
count_image++;
items_.push_back( item(image, typeImage, isMediaInternal, bin_id, rId) );
@ -108,8 +108,8 @@ std::wstring external_items::add_chart(std::wstring & oox_target)
count_charts++;
std::wstring rId = std::wstring(L"chartId") + boost::lexical_cast<std::wstring>(count_charts);
oox_target = std::wstring(L"charts/chart") + boost::lexical_cast<std::wstring>(count_charts) + L".xml";
std::wstring rId = std::wstring(L"chartId") + std::to_wstring(count_charts);
oox_target = std::wstring(L"charts/chart") + std::to_wstring(count_charts) + L".xml";
items_.push_back( item(oox_target, typeChart, isMediaInternal, -1, rId) );

View File

@ -172,24 +172,16 @@ void rels_files::add(std::wstring const & Id,
{
return add(relationship(Id, Type, Target, TargetMode));
}
///////////////////////////////////////////
//----------------------------------------------------------------------------------------
chart_content::chart_content() : rels_file_(rels_file::create(L""))
{
{
}
_CP_PTR(chart_content) chart_content::create()
{
return boost::make_shared<chart_content>();
}
//void chart_content::add_rel(relationship const & r)
//{
// rels_->get_rels().add(r);
//}
///////////////////////////////////////////
//----------------------------------------------------------------------------------------
element_ptr simple_element::create(const std::wstring & FileName, const std::wstring & Content)
{
return boost::make_shared<simple_element>(FileName, Content);

View File

@ -111,7 +111,7 @@ private:
class rels_file;
typedef boost::shared_ptr<rels_file> rels_file_ptr;
/// \class rels_file
//------------------------------------------------------------------------
class rels_file : public element
{
public:
@ -132,7 +132,7 @@ private:
rels rels_;
};
/// \class rels_files
//------------------------------------------------------------------------
class rels_files : public element
{
public:
@ -150,9 +150,7 @@ private:
rels_file_ptr rels_file_;
};
////////////////////////////////////////
///\class chart_files
//------------------------------------------------------------------------
class chart_content;
typedef _CP_PTR(chart_content) chart_content_ptr;
@ -173,8 +171,7 @@ private:
rels_file_ptr rels_file_;
};
//---------------------------------------------------------------------------------------------
//------------------------------------------------------------------------
class document : public element
{
public:

View File

@ -33,8 +33,6 @@
#include "oox_rels.h"
#include "mediaitems_utils.h"
//#include <boost/lexical_cast.hpp>
#include <boost/foreach.hpp>
#include <boost/make_shared.hpp>
#include <simple_xml_writer.h>
@ -66,8 +64,9 @@ public:
void dump_rels(rels & Rels)
{
BOOST_FOREACH(rel_ const & r, chartRels_)
for (size_t i = 0; i < chartRels_.size(); i++)
{
rel_ & r = chartRels_[i];
if (r.type_ == external_items::typeImage)
{
Rels.add(relationship(
@ -99,8 +98,9 @@ public:
{
bool present = false;
BOOST_FOREACH(rel_ const & r, chartRels_)
{
for (size_t i = 0; i < chartRels_.size(); i++)
{
rel_ & r = chartRels_[i];
if (r.rid_ == rid && r.target_ == target)
present = true;
}

View File

@ -114,14 +114,14 @@ public:
if (c.author_ == author_list_[i])
{
find = true;
c.author_ = boost::lexical_cast<std::wstring>(i);
c.author_ = std::to_wstring(i);
break;
}
}
if (!find)
{
author_list_.push_back(c.author_);
c.author_ = boost::lexical_cast<std::wstring>(author_list_.size()-1);
c.author_ = std::to_wstring(author_list_.size()-1);
}
xlsx_comment_.push_back(c);
}

View File

@ -52,13 +52,13 @@ public:
std::pair<std::wstring, std::wstring> add_comments_xml(std::wstring const & content, xlsx_comments_ptr comments)
{
const std::wstring file_comments_id = boost::lexical_cast<std::wstring>(next_comments_file_id_++);
const std::wstring file_comments_id = std::to_wstring(next_comments_file_id_++);
const std::wstring fileName = std::wstring(L"comments") + file_comments_id + L".xml";
comments_.push_back(comment_elm(fileName, content, comments));
const std::wstring id = boost::lexical_cast<std::wstring>(next_comments_id_++);
const std::wstring id = std::to_wstring(next_comments_id_++);
const std::wstring rId = std::wstring(L"comId") + id;
return std::pair<std::wstring, std::wstring>(fileName, rId);
}

Some files were not shown because too many files have changed in this diff Show More