fix user file (WH30HVUkfv0_VF3YRELqjvuWW8ECe6dQlCI5rw)

This commit is contained in:
Elena.Subbotina
2022-06-09 11:53:53 +03:00
parent ffebbbe0af
commit 5e052325ea
7 changed files with 64 additions and 77 deletions

View File

@ -36,9 +36,7 @@
namespace XLS
{
// Logical representation of Continue record in BIFF8
class Continue: public BiffRecord
class Continue: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Continue)
BASE_OBJECT_DEFINE_CLASS_NAME(Continue)
@ -47,7 +45,6 @@ public:
~Continue();
BaseObjectPtr clone();
void readFields(CFRecord& record);

View File

@ -35,27 +35,23 @@
namespace XLS
{
PicF::PicF()
{
}
PicF::PicF() {}
PicF::~PicF() {}
BaseObjectPtr PicF::clone()
{
return BaseObjectPtr(new PicF(*this));
}
PicF::~PicF()
{
}
BaseObjectPtr PicF::clone()
{
return BaseObjectPtr(new PicF(*this));
}
void PicF::readFields(CFRecord& record)
{
Log::error("PicF record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
void PicF::readFields(CFRecord& record)
{
unsigned short unused, flags;
record >> ptyp >> unused >> flags >> numScale;
fTopBottom = GETBIT(flags, 9);
fBackFront = GETBIT(flags, 10);
fSide = GETBIT(flags, 11);
}
} // namespace XLS

View File

@ -31,13 +31,10 @@
*/
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace XLS
{
// Logical representation of PicF record in BIFF8
class PicF: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(PicF)
@ -45,13 +42,20 @@ class PicF: public BiffRecord
public:
PicF();
~PicF();
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typePicF;
static const ElementType type = typePicF;
unsigned short ptyp;
bool fTopBottom;
bool fBackFront;
bool fSide;
Xnum numScale;
};
} // namespace XLS

View File

@ -120,11 +120,17 @@ void OfficeArtRGFOPTE::load(XLS::CFRecord& record)
}
//-----complex load
for(std::vector<OfficeArtFOPTEPtr>::iterator it = rgfopte.begin(), itEnd = rgfopte.end(); it != itEnd; ++it)
for (size_t i = 0; i < rgfopte.size(); ++i)
{
if((*it)->fComplex && (*it)->op > 0)
if (!rgfopte[i]) continue;
if (rgfopte[i]->fComplex)
{
(*it)->ReadComplexData(record);
if (rgfopte[i]->op < 0)
{
break;
}
rgfopte[i]->ReadComplexData(record);
}
}

View File

@ -64,26 +64,24 @@ const bool GELFRAME::loadContent(BinProcessor& proc)
{
global_info = proc.getGlobalWorkbookInfo();
if(!proc.mandatory<GelFrame>())
int count = proc.repeated<GelFrame>(1, 2);
if (elements_.empty()) return false;
if (count > 0)
{
return false;
}
m_GelFrame = elements_.back();
elements_.pop_back();
if (proc.optional<GelFrame>())
{
GelFrame * base = dynamic_cast<GelFrame*>(m_GelFrame.get());
GelFrame * addit = dynamic_cast<GelFrame*>(elements_.back().get());
m_GelFrame = elements_.front();
GelFrame * base = dynamic_cast<GelFrame*>(m_GelFrame.get());
GelFrame * addit = count > 1 ? dynamic_cast<GelFrame*>(elements_.back().get()) : NULL;
if (base && addit)
{
base->concatinate(addit);
}
elements_.pop_back();
elements_.clear();
}
//
int count = proc.repeated<Continue>(0, 0);
count = proc.repeated<Continue>(0, 0);
if (proc.optional<PICF>())
{

View File

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

View File

@ -37,37 +37,25 @@
namespace XLS
{
PICF::PICF()
{
}
PICF::~PICF()
{
}
BaseObjectPtr PICF::clone()
{
return BaseObjectPtr(new PICF(*this));
}
// PICF = Begin PicF End
const bool PICF::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<Begin>())
PICF::PICF() {}
PICF::~PICF() {}
BaseObjectPtr PICF::clone()
{
return false;
} elements_.pop_back();
proc.mandatory<PicF>();
m_PicF = elements_.back(); elements_.pop_back();
proc.mandatory<End>(); elements_.pop_back();
return BaseObjectPtr(new PICF(*this));
}
return true;
}
// PICF = Begin PicF End
const bool PICF::loadContent(BinProcessor& proc)
{
if (!proc.mandatory<Begin>())
{
return false;
} elements_.pop_back();
proc.mandatory<PicF>();
m_PicF = elements_.back(); elements_.pop_back();
proc.mandatory<End>(); elements_.pop_back();
return true;
}
} // namespace XLS