mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #57858
This commit is contained in:
@ -34,32 +34,43 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
HorizontalPageBreaks::HorizontalPageBreaks() {}
|
||||
HorizontalPageBreaks::~HorizontalPageBreaks() {}
|
||||
|
||||
HorizontalPageBreaks::HorizontalPageBreaks()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HorizontalPageBreaks::~HorizontalPageBreaks()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr HorizontalPageBreaks::clone()
|
||||
{
|
||||
return BaseObjectPtr(new HorizontalPageBreaks(*this));
|
||||
}
|
||||
|
||||
void HorizontalPageBreaks::readFields(CFRecord& record)
|
||||
{
|
||||
record >> cbrk;
|
||||
for (int i = 0; i < cbrk ; i++)
|
||||
BaseObjectPtr HorizontalPageBreaks::clone()
|
||||
{
|
||||
HorzBrkPtr hb(new HorzBrk);
|
||||
record >> *hb;
|
||||
rgbrk.push_back(hb);
|
||||
return BaseObjectPtr(new HorizontalPageBreaks(*this));
|
||||
}
|
||||
}
|
||||
|
||||
void HorizontalPageBreaks::readFields(CFRecord& record)
|
||||
{
|
||||
record >> cbrk;
|
||||
for (int i = 0; i < cbrk; i++)
|
||||
{
|
||||
HorzBrkPtr hb(new HorzBrk);
|
||||
record >> *hb;
|
||||
rgbrk.push_back(hb);
|
||||
}
|
||||
}
|
||||
int HorizontalPageBreaks::serialize(std::wostream & stream)
|
||||
{
|
||||
if (rgbrk.empty()) return 0;
|
||||
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"rowBreaks")
|
||||
{
|
||||
CP_XML_ATTR(L"count", cbrk);
|
||||
CP_XML_ATTR(L"manualBreakCount", cbrk);
|
||||
|
||||
for (size_t i = 0; i < rgbrk.size(); ++i)
|
||||
{
|
||||
if (rgbrk[i])
|
||||
rgbrk[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -37,29 +37,24 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class HorizontalPageBreaks : public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(HorizontalPageBreaks)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(HorizontalPageBreaks)
|
||||
public:
|
||||
HorizontalPageBreaks();
|
||||
~HorizontalPageBreaks();
|
||||
|
||||
// Logical representation of HorizontalPageBreaks record in BIFF8
|
||||
class HorizontalPageBreaks: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(HorizontalPageBreaks)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(HorizontalPageBreaks)
|
||||
public:
|
||||
HorizontalPageBreaks();
|
||||
~HorizontalPageBreaks();
|
||||
BaseObjectPtr clone();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeHorizontalPageBreaks;
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeHorizontalPageBreaks;
|
||||
|
||||
virtual int serialize(std::wostream & stream);
|
||||
//-----------------------------
|
||||
_UINT16 cbrk;
|
||||
BiffStructurePtrVector rgbrk;
|
||||
|
||||
};
|
||||
|
||||
_UINT16 cbrk;
|
||||
BiffStructurePtrVector rgbrk;
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -34,32 +34,43 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
VerticalPageBreaks::VerticalPageBreaks() {}
|
||||
VerticalPageBreaks::~VerticalPageBreaks() {}
|
||||
|
||||
VerticalPageBreaks::VerticalPageBreaks()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
VerticalPageBreaks::~VerticalPageBreaks()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr VerticalPageBreaks::clone()
|
||||
{
|
||||
return BaseObjectPtr(new VerticalPageBreaks(*this));
|
||||
}
|
||||
|
||||
void VerticalPageBreaks::readFields(CFRecord& record)
|
||||
{
|
||||
record >> cbrk;
|
||||
for (int i = 0; i < cbrk ; ++i)
|
||||
BaseObjectPtr VerticalPageBreaks::clone()
|
||||
{
|
||||
VertBrkPtr vb(new VertBrk);
|
||||
record >> *vb;
|
||||
rgbrk.push_back(vb);
|
||||
return BaseObjectPtr(new VerticalPageBreaks(*this));
|
||||
}
|
||||
}
|
||||
|
||||
void VerticalPageBreaks::readFields(CFRecord& record)
|
||||
{
|
||||
record >> cbrk;
|
||||
for (int i = 0; i < cbrk; ++i)
|
||||
{
|
||||
VertBrkPtr vb(new VertBrk);
|
||||
record >> *vb;
|
||||
rgbrk.push_back(vb);
|
||||
}
|
||||
}
|
||||
int VerticalPageBreaks::serialize(std::wostream & stream)
|
||||
{
|
||||
if (rgbrk.empty()) return 0;
|
||||
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"colBreaks")
|
||||
{
|
||||
CP_XML_ATTR(L"count", cbrk);
|
||||
CP_XML_ATTR(L"manualBreakCount", cbrk);
|
||||
|
||||
for (size_t i = 0; i < rgbrk.size(); ++i)
|
||||
{
|
||||
if (rgbrk[i])
|
||||
rgbrk[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -36,27 +36,24 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
class VerticalPageBreaks : public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(VerticalPageBreaks)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(VerticalPageBreaks)
|
||||
public:
|
||||
VerticalPageBreaks();
|
||||
~VerticalPageBreaks();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
// Logical representation of VerticalPageBreaks record in BIFF8
|
||||
class VerticalPageBreaks: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(VerticalPageBreaks)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(VerticalPageBreaks)
|
||||
public:
|
||||
VerticalPageBreaks();
|
||||
~VerticalPageBreaks();
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeVerticalPageBreaks;
|
||||
static const ElementType type = typeVerticalPageBreaks;
|
||||
|
||||
virtual int serialize(std::wostream & stream);
|
||||
//-----------------------------
|
||||
_UINT16 cbrk;
|
||||
BiffStructurePtrVector rgbrk;
|
||||
};
|
||||
|
||||
_UINT16 cbrk;
|
||||
BiffStructurePtrVector rgbrk;
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -31,21 +31,33 @@
|
||||
*/
|
||||
|
||||
#include "HorzBrk.h"
|
||||
#include "../../../Common/simple_xml_writer.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
BiffStructurePtr HorzBrk::clone()
|
||||
{
|
||||
return BiffStructurePtr(new HorzBrk(*this));
|
||||
}
|
||||
|
||||
|
||||
BiffStructurePtr HorzBrk::clone()
|
||||
{
|
||||
return BiffStructurePtr(new HorzBrk(*this));
|
||||
}
|
||||
|
||||
void HorzBrk::load(CFRecord& record)
|
||||
{
|
||||
record >> row >> colStart >> colEnd;
|
||||
}
|
||||
|
||||
|
||||
void HorzBrk::load(CFRecord& record)
|
||||
{
|
||||
record >> row >> colStart >> colEnd;
|
||||
}
|
||||
int HorzBrk::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"brk")
|
||||
{
|
||||
CP_XML_ATTR(L"id", row);
|
||||
CP_XML_ATTR(L"max", colEnd);
|
||||
CP_XML_ATTR(L"man", 1);
|
||||
if (colStart > 0 )
|
||||
CP_XML_ATTR(L"min", colStart);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -36,25 +36,21 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class CFRecord;
|
||||
|
||||
class HorzBrk : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(HorzBrk)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeHorzBrk;
|
||||
static const ElementType type = typeHorzBrk;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
virtual int serialize(std::wostream & stream);
|
||||
|
||||
RwU row;
|
||||
unsigned short colStart;
|
||||
unsigned short colEnd;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<HorzBrk> HorzBrkPtr;
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -31,20 +31,32 @@
|
||||
*/
|
||||
|
||||
#include "VertBrk.h"
|
||||
#include "../../../Common/simple_xml_writer.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
BiffStructurePtr VertBrk::clone()
|
||||
{
|
||||
return BiffStructurePtr(new VertBrk(*this));
|
||||
}
|
||||
|
||||
void VertBrk::load(CFRecord& record)
|
||||
{
|
||||
record >> col >> rowStart >> rowEnd;
|
||||
}
|
||||
|
||||
BiffStructurePtr VertBrk::clone()
|
||||
{
|
||||
return BiffStructurePtr(new VertBrk(*this));
|
||||
}
|
||||
void VertBrk::load(CFRecord& record)
|
||||
{
|
||||
record >> col >> rowStart >> rowEnd;
|
||||
}
|
||||
int VertBrk::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"brk")
|
||||
{
|
||||
CP_XML_ATTR(L"id", col);
|
||||
CP_XML_ATTR(L"max", rowEnd);
|
||||
CP_XML_ATTR(L"man", 1);
|
||||
if (rowStart > 0)
|
||||
CP_XML_ATTR(L"min", rowStart);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -35,26 +35,22 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
class VertBrk : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(VertBrk)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
class CFRecord;
|
||||
static const ElementType type = typeVertBrk;
|
||||
|
||||
class VertBrk : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(VertBrk)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
virtual void load(CFRecord& record);
|
||||
virtual int serialize(std::wostream & stream);
|
||||
|
||||
static const ElementType type = typeVertBrk;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
ColU col;
|
||||
RwU rowStart;
|
||||
RwU rowEnd;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<VertBrk> VertBrkPtr;
|
||||
ColU col;
|
||||
RwU rowStart;
|
||||
RwU rowEnd;
|
||||
};
|
||||
typedef boost::shared_ptr<VertBrk> VertBrkPtr;
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -92,8 +92,16 @@ const bool CUSTOMVIEW::loadContent(BinProcessor& proc)
|
||||
count--;
|
||||
}
|
||||
|
||||
proc.optional<HorizontalPageBreaks>();
|
||||
proc.optional<VerticalPageBreaks>();
|
||||
if (proc.optional<HorizontalPageBreaks>())
|
||||
{
|
||||
m_HorizontalPageBreaks = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
if (proc.optional<VerticalPageBreaks>())
|
||||
{
|
||||
m_VerticalPageBreaks = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
|
||||
proc.optional<Header>();
|
||||
proc.optional<Footer>();
|
||||
@ -188,6 +196,14 @@ int CUSTOMVIEW::serialize(std::wostream & stream)
|
||||
if (m_arSelection[i] == NULL) continue;
|
||||
m_arSelection[i]->serialize(CP_XML_STREAM());
|
||||
}
|
||||
if (m_HorizontalPageBreaks)
|
||||
{
|
||||
m_HorizontalPageBreaks->serialize(CP_XML_STREAM());
|
||||
}
|
||||
if (m_VerticalPageBreaks)
|
||||
{
|
||||
m_VerticalPageBreaks->serialize(CP_XML_STREAM());
|
||||
}
|
||||
//todooo пока не понятно как там определяется ref
|
||||
//if (m_AUTOFILTER)
|
||||
// m_AUTOFILTER->serialize(CP_XML_STREAM());
|
||||
|
||||
@ -35,29 +35,27 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
class CUSTOMVIEW : public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(CUSTOMVIEW)
|
||||
public:
|
||||
CUSTOMVIEW();
|
||||
~CUSTOMVIEW();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
// Logical representation of CUSTOMVIEW union of records
|
||||
class CUSTOMVIEW: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(CUSTOMVIEW)
|
||||
public:
|
||||
CUSTOMVIEW();
|
||||
~CUSTOMVIEW();
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
BaseObjectPtr clone();
|
||||
static const ElementType type = typeCUSTOMVIEW;
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
static const ElementType type = typeCUSTOMVIEW;
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
BaseObjectPtr m_UserSView;
|
||||
std::vector<BaseObjectPtr> m_arSelection;
|
||||
BaseObjectPtr m_pls;
|
||||
BaseObjectPtr m_AUTOFILTER;
|
||||
};
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
BaseObjectPtr m_UserSView;
|
||||
std::vector<BaseObjectPtr> m_arSelection;
|
||||
BaseObjectPtr m_pls;
|
||||
BaseObjectPtr m_AUTOFILTER;
|
||||
BaseObjectPtr m_HorizontalPageBreaks;
|
||||
BaseObjectPtr m_VerticalPageBreaks;
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -125,9 +125,22 @@ const bool GLOBALS::loadContent(BinProcessor& proc)
|
||||
}
|
||||
}break;
|
||||
|
||||
case rt_HorizontalPageBreaks: proc.optional<HorizontalPageBreaks>(); break;
|
||||
case rt_VerticalPageBreaks: proc.optional<VerticalPageBreaks>(); break;
|
||||
|
||||
case rt_HorizontalPageBreaks:
|
||||
{
|
||||
if (proc.optional<HorizontalPageBreaks>())
|
||||
{
|
||||
m_HorizontalPageBreaks = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_VerticalPageBreaks:
|
||||
{
|
||||
if (proc.optional<VerticalPageBreaks>())
|
||||
{
|
||||
m_VerticalPageBreaks = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
default://unknown .... back upper
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -56,6 +56,8 @@ public:
|
||||
BaseObjectPtr m_DefaultRowHeight;
|
||||
BaseObjectPtr m_Guts;
|
||||
BaseObjectPtr m_WsBool;
|
||||
BaseObjectPtr m_HorizontalPageBreaks;
|
||||
BaseObjectPtr m_VerticalPageBreaks;
|
||||
|
||||
//--------------------------------------------------------------
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
|
||||
@ -49,63 +49,55 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
PAGESETUP::PAGESETUP() {}
|
||||
PAGESETUP::~PAGESETUP() {}
|
||||
|
||||
|
||||
PAGESETUP::PAGESETUP()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PAGESETUP::~PAGESETUP()
|
||||
{
|
||||
}
|
||||
|
||||
class Parenthesis_PAGESETUP_1: public ABNFParenthesis
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Parenthesis_PAGESETUP_1)
|
||||
public:
|
||||
BaseObjectPtr clone()
|
||||
class Parenthesis_PAGESETUP_1 : public ABNFParenthesis
|
||||
{
|
||||
return BaseObjectPtr(new Parenthesis_PAGESETUP_1(*this));
|
||||
}
|
||||
|
||||
const bool loadContent(BinProcessor& proc)
|
||||
{
|
||||
//?????????
|
||||
//if(!proc.mandatory(Pls(proc.getParent())))
|
||||
//{
|
||||
return false;
|
||||
//}
|
||||
//proc.repeated<Continue>(0, 0);
|
||||
return true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
BaseObjectPtr PAGESETUP::clone()
|
||||
{
|
||||
return BaseObjectPtr(new PAGESETUP(*this));
|
||||
}
|
||||
|
||||
|
||||
// PAGESETUP = Header Footer HCenter VCenter [LeftMargin] [RightMargin] [TopMargin] [BottomMargin] [Pls *Continue] Setup
|
||||
const bool PAGESETUP::loadContent(BinProcessor& proc)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
CFRecordType::TypeId type = proc.getNextRecordType();
|
||||
|
||||
if (type == rt_NONE)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Parenthesis_PAGESETUP_1)
|
||||
public:
|
||||
BaseObjectPtr clone()
|
||||
{
|
||||
proc.SkipRecord();
|
||||
continue; //file(6).xls
|
||||
//break;
|
||||
return BaseObjectPtr(new Parenthesis_PAGESETUP_1(*this));
|
||||
}
|
||||
|
||||
switch(type)
|
||||
const bool loadContent(BinProcessor& proc)
|
||||
{
|
||||
case rt_Header:
|
||||
//?????????
|
||||
//if(!proc.mandatory(Pls(proc.getParent())))
|
||||
//{
|
||||
return false;
|
||||
//}
|
||||
//proc.repeated<Continue>(0, 0);
|
||||
return true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
BaseObjectPtr PAGESETUP::clone()
|
||||
{
|
||||
return BaseObjectPtr(new PAGESETUP(*this));
|
||||
}
|
||||
|
||||
|
||||
// PAGESETUP = Header Footer HCenter VCenter [LeftMargin] [RightMargin] [TopMargin] [BottomMargin] [Pls *Continue] Setup
|
||||
const bool PAGESETUP::loadContent(BinProcessor& proc)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
CFRecordType::TypeId type = proc.getNextRecordType();
|
||||
|
||||
if (type == rt_NONE)
|
||||
{
|
||||
proc.SkipRecord();
|
||||
continue; //file(6).xls
|
||||
//break;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case rt_Header:
|
||||
{
|
||||
if (proc.optional<Header>())
|
||||
{
|
||||
@ -120,30 +112,31 @@ const bool PAGESETUP::loadContent(BinProcessor& proc)
|
||||
m_Footer = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
}break;
|
||||
case rt_HCenter:
|
||||
{
|
||||
if (proc.optional<HCenter>())
|
||||
{
|
||||
if (proc.optional<HCenter>())
|
||||
{
|
||||
m_HCenter = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
m_HCenter = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_VCenter:
|
||||
{
|
||||
if (proc.optional<VCenter>())
|
||||
{
|
||||
if (proc.optional<VCenter>())
|
||||
{
|
||||
m_VCenter = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
m_VCenter = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_BottomMargin: proc.optional<BottomMargin>(); break;
|
||||
case rt_TopMargin: proc.optional<TopMargin>(); break;
|
||||
case rt_LeftMargin: proc.optional<LeftMargin>(); break;
|
||||
case rt_RightMargin: proc.optional<RightMargin>(); break;
|
||||
|
||||
case rt_HorizontalPageBreaks: proc.optional<HorizontalPageBreaks>(); break;
|
||||
case rt_VerticalPageBreaks: proc.optional<VerticalPageBreaks>(); break;
|
||||
|
||||
case rt_HorizontalPageBreaks: proc.optional<HorizontalPageBreaks>(); break;
|
||||
case rt_VerticalPageBreaks: proc.optional<VerticalPageBreaks>(); break;
|
||||
case rt_Pls:
|
||||
{
|
||||
if (proc.optional<Pls>())
|
||||
@ -275,7 +268,6 @@ int PAGESETUP::serialize(std::wostream & stream)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Header || m_Footer)
|
||||
{
|
||||
CP_XML_NODE(L"headerFooter")
|
||||
@ -300,6 +292,7 @@ int PAGESETUP::serialize(std::wostream & stream)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@ -508,9 +508,11 @@ void XlsConverter::convert_common (XLS::CommonSubstream* sheet)
|
||||
|
||||
xls_global_info->current_sheet = sheet->ws_index_ + 1;
|
||||
|
||||
if (sheet->m_GLOBALS)
|
||||
XLS::GLOBALS *globals = dynamic_cast<XLS::GLOBALS *>(sheet->m_GLOBALS.get());
|
||||
|
||||
if (globals)
|
||||
{
|
||||
sheet->m_GLOBALS->serialize(xlsx_context->current_sheet().sheetFormat());
|
||||
globals->serialize(xlsx_context->current_sheet().sheetFormat());
|
||||
}
|
||||
|
||||
if (!sheet->m_arWINDOW.empty())
|
||||
@ -540,6 +542,17 @@ void XlsConverter::convert_common (XLS::CommonSubstream* sheet)
|
||||
{
|
||||
sheet->m_PAGESETUP->serialize(xlsx_context->current_sheet().pageProperties());
|
||||
}
|
||||
if (globals)
|
||||
{
|
||||
if (globals->m_HorizontalPageBreaks)
|
||||
{
|
||||
globals->m_HorizontalPageBreaks->serialize(xlsx_context->current_sheet().pageProperties());
|
||||
}
|
||||
if (globals->m_VerticalPageBreaks)
|
||||
{
|
||||
globals->m_VerticalPageBreaks->serialize(xlsx_context->current_sheet().pageProperties());
|
||||
}
|
||||
}
|
||||
|
||||
if (sheet->m_arCUSTOMVIEW.size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user