Commit 089d4c7f authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

XlsFile2

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63800 954022d7-b5bf-4e40-9824-e11837661b57
parent 65eab867
......@@ -13,20 +13,6 @@ XLS::BiffStructurePtr OfficeArtFOPTE::clone()
}
//void OfficeArtFOPTE::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
//{
// xml_tag->setAttribute(L"opid", STR::int2hex_wstr(opid, sizeof(opid)).c_str());
// xml_tag->setAttribute(L"fBid", fBid);
// xml_tag->setAttribute(L"fComplex", fComplex);
// xml_tag->setAttribute(L"op", STR::int2hex_wstr(op).c_str());
//}
//
//void OfficeArtFOPTE::getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
//{
// // We don't support xlsx to xls conversion
//}
void OfficeArtFOPTE::store(XLS::CFRecord& record)
{
// We don't support xlsx to xls conversion
......
......@@ -17,15 +17,12 @@ class OfficeArtRGFOPTE : public XLS::BiffStructure
public:
XLS::BiffStructurePtr clone();
virtual void load(XLS::CFRecord& record);
virtual void store(XLS::CFRecord& record);
void SetOptionsNumber(const unsigned short number);
const unsigned short GetOptionsNumber();
private:
std::vector<OfficeArtFOPTEPtr> rgfopte;
unsigned short options_num;
};
......
......@@ -51,7 +51,7 @@ public:
virtual void loadFields(XLS::CFRecord& record) {}
virtual void storeFields(XLS::CFRecord& record) {}
static const ElementType type = XLS::typeOfficeArtClientData;
static const XLS::ElementType type = XLS::typeOfficeArtClientData;
};
......
......@@ -31,6 +31,8 @@
#include <Logic/Biff_structures/ODRAW/OfficeArtBStoreContainer.h>
#include <Logic/Biff_structures/ODRAW/SimpleOfficeArtContainers.h>
#include <Logic/Biff_structures/ODRAW/OfficeArtFOPT.h>
#include <Logic/Biff_structures/ODRAW/OfficeArtBlip.h>
#include "xlsx_conversion_context.h"
#include "xlsx_package.h"
......@@ -482,15 +484,46 @@ void XlsConverter::convert(ODRAW::OfficeArtRecord * art)
std::wstringstream strm;
art->serialize(strm);
switch(art->rh_own.recType)
switch(art->get_type())
{
break;
case XLS::typeOfficeArtFOPT://properties
{
convert(dynamic_cast<ODRAW::OfficeArtFOPT *>(art));
}break;
case XLS::typeOfficeArtFSP:
{
art->serialize(strm);
xlsx_context->get_drawing_context().set_properties(strm.str());
}break;
case XLS::typeOfficeArtClientAnchorSheet:
{
art->serialize(strm);
xlsx_context->get_drawing_context().set_anchor(strm.str());
}break;
}
}
void XlsConverter::convert(ODRAW::OfficeArtFOPT * fort)
{
if (fort == NULL) return;
for (long i = 0 ; i < fort->fopt.rgfopte.size(); i++)
{
switch(fort->fopt.rgfopte[i]->opid)
{
case 0x104:
{
ODRAW::pib * pib = dynamic_cast<ODRAW::pib*>(fort->fopt.rgfopte[i].get());
if (pib)
{
}
}break;
}
}
}
void XlsConverter::convert(XLS::SHAREDSTRINGS* sharedstrings)
{
if (sharedstrings == NULL) return;
......
......@@ -42,6 +42,7 @@ namespace ODRAW
class OfficeArtRecord;
class OfficeArtBStoreContainer;
class OfficeArtSpContainer;
class OfficeArtFOPT;
}
class XlsConverter
......@@ -81,6 +82,7 @@ private:
void convert(ODRAW::OfficeArtRecord * art);
void convert(ODRAW::OfficeArtBStoreContainer* art_bstore);
void convert(ODRAW::OfficeArtSpContainer * sp);
void convert(ODRAW::OfficeArtFOPT * fort);
std::wstring GetTargetMoniker(XLS::BiffStructure *moniker);
......
......@@ -152,6 +152,18 @@ void xlsx_drawing_context::end_drawing()
}
void xlsx_drawing_context::set_anchor(std::wstring & str)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().anchor = str;
}
void xlsx_drawing_context::set_properties(std::wstring & str)
{
if (drawing_state.size() < 1 )return;
drawing_state.back().shape = str;
}
bool xlsx_drawing_context::empty()
{
return xlsx_drawings_->empty();
......
......@@ -57,6 +57,9 @@ public:
void start_image();
void start_shape(int type);
void set_anchor(std::wstring & str);
void set_properties(std::wstring & str);
private:
std::vector<_drawing_state> drawing_state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment