Commit 988a3b43 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander Trofimov

sync AVS & ASC

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53731 954022d7-b5bf-4e40-9824-e11837661b57
parent 9f279ffe
......@@ -416,7 +416,9 @@ const std::wstring toStdWString(const std::string& ansi_string, const UINT code_
{
unsigned int bufferSize = (unsigned int)ansi_string.length() + 1;
boost::scoped_array<wchar_t> pBuffer(new wchar_t[bufferSize]);
MultiByteToWideChar(code_page, 0, ansi_string.c_str(), (int)ansi_string.length(), pBuffer.get(), bufferSize);
UINT code = code_page == 1251 ? 1252 : code_page ;
MultiByteToWideChar(/*code_page*/code, 0, ansi_string.c_str(), (int)ansi_string.length(), pBuffer.get(), bufferSize);
pBuffer[bufferSize - 1] = L'\0';
return pBuffer.get();
}
......
......@@ -47,8 +47,7 @@ void HelpersTagsGenerator::GenIndexedColors(MSXML2::IXMLDOMElementPtr helpers_ta
L"3366FF", L"33CCCC", L"99CC00", L"FFCC00", L"FF9900", L"FF6600", L"666699", L"969696",
L"003366", L"339966", L"003300", L"333300", L"993300", L"993366", L"333399", L"333333"
};
MSXML2::IXMLDOMDocumentPtr doc = document_root_->GetownerDocument();
MSXML2::IXMLDOMElementPtr indexed_colors_tag = XMLSTUFF::makeXMLNode(L"indexedColors", helpers_tag);
for (int i = 0; i < 64; i++)
......@@ -57,7 +56,6 @@ void HelpersTagsGenerator::GenIndexedColors(MSXML2::IXMLDOMElementPtr helpers_ta
indexed_colors_tag->appendChild(rgb_color_tag);
rgb_color_tag->setAttribute(L"rgb", color_strings[i].c_str());
}
}
......
......@@ -4,8 +4,9 @@
namespace XLS
{;
TxO::TxO()
TxO::TxO():fmla(false)
{
cbRuns = 0;
}
......@@ -22,17 +23,47 @@ BaseObjectPtr TxO::clone()
void TxO::writeFields(CFRecord& record)
{
#pragma message("####################### TxO record is not implemented")
Log::error("TxO record is not implemented.");
//record << some_value;
}
void TxO::readFields(CFRecord& record)
{
#pragma message("####################### TxO record is not implemented")
Log::error("TxO record is not implemented.");
//record >> some_value;
WORD flags;
record >> flags;
hAlignment = static_cast<BYTE>(GETBITS(flags, 1, 3));
vAlignment = static_cast<BYTE>(GETBITS(flags, 4, 6)); // reserved2 (2 bits)
fLockText = GETBIT(flags, 9); // reserved3 (4 bits)
fJustLast = GETBIT(flags, 14);
fSecretEdit = GETBIT(flags, 15);
record >> rot;
record.skipNBytes(6); // reserved4 + reserved5
//record >> controlInfo; // The field MUST exist if and only if the value of cmo.ot in the preceding Obj record is 0, 5, 7, 11, 12, or 14.
record >> cchText;
if (cchText != 0)
record >> cbRuns;
record >> ifntEmpty;
fmla.load(record);
if ( cbRuns ) {
std::list<CFRecordPtr>& recs = continue_records[rt_Continue];
if ( recs.size() )
{
while( !recs.empty() )
{
record.appendRawData(recs.front());
recs.pop_front();
}
commentText.setSize(cchText);
record >> commentText;
TxOruns.m_runCount = cbRuns / 8 - 1;
TxOruns.load(record);
}
}
}
} // namespace XLS
......
#pragma once
#include "BiffRecordContinued.h"
#include <XLS_logic/Biff_structures/ControlInfo.h>
#include <XLS_logic/Biff_structures/FontIndex.h>
#include <XLS_logic/Biff_structures/ObjFmla.h>
#include <XLS_logic/Biff_structures/TxORuns.h>
namespace XLS
{;
......@@ -19,11 +23,40 @@ public:
void writeFields(CFRecord& record);
void readFields(CFRecord& record);
private:
// BIFF_WORD userName;
public:
BIFF_BYTE hAlignment;
BIFF_BYTE vAlignment;
BIFF_BYTE fLockText;
BIFF_BYTE fJustLast;
BIFF_BYTE fSecretEdit;
BIFF_WORD rot;
ControlInfo controlInfo;
BIFF_WORD cchText;
BIFF_WORD cbRuns;
FontIndex ifntEmpty;
ObjFmla fmla;
TxORuns TxOruns;
XLUnicodeStringNoCch commentText;
public:
BO_ATTRIB_MARKUP_BEGIN
// BO_ATTRIB_MARKUP_ATTRIB(userName)
BO_ATTRIB_MARKUP_ATTRIB(hAlignment)
BO_ATTRIB_MARKUP_ATTRIB(vAlignment)
BO_ATTRIB_MARKUP_ATTRIB(fLockText)
BO_ATTRIB_MARKUP_ATTRIB(fJustLast)
BO_ATTRIB_MARKUP_ATTRIB(fSecretEdit)
BO_ATTRIB_MARKUP_ATTRIB(rot)
BO_ATTRIB_MARKUP_ATTRIB(cchText)
BO_ATTRIB_MARKUP_ATTRIB(cbRuns)
if (cchText == 0) {
BO_ATTRIB_MARKUP_ATTRIB(ifntEmpty)
}
if ( cbRuns )
{
BO_ATTRIB_MARKUP_COMPLEX(TxOruns)
}
BO_ATTRIB_MARKUP_ATTRIB(commentText)
BO_ATTRIB_MARKUP_END
};
......
#include "stdafx.h"
#include "ControlInfo.h"
#include <XLS_bin/CFRecord.h>
namespace XLS
{;
BiffStructurePtr ControlInfo::clone()
{
return BiffStructurePtr(new ControlInfo(*this));
}
void ControlInfo::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
xml_tag->setAttribute(L"fDefault", fDefault);
xml_tag->setAttribute(L"fHelp", fHelp);
xml_tag->setAttribute(L"fCancel", fCancel);
xml_tag->setAttribute(L"fDismiss", fDismiss);
xml_tag->setAttribute(L"accel1", accel1);
}
void ControlInfo::getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
}
void ControlInfo::store(CFRecord& record)
{
}
void ControlInfo::load(CFRecord& record)
{
WORD flags;
record >> flags;
fDefault = GETBIT(flags, 0);
fHelp = GETBIT(flags, 1);
fCancel = GETBIT(flags, 2);
fDismiss = GETBIT(flags, 3);
record >> accel1;
record.skipNBytes(2); // reserved2
}
} // namespace XLS
#pragma once
#include <XLS_logic/Biff_records/BiffRecord.h>
#include <XLS_logic/Biff_structures/BiffString.h>
namespace XLS
{;
class CFRecord;
class ControlInfo : public BiffStructTagged
{
BASE_OBJECT_DEFINE_CLASS_NAME(ControlInfo)
public:
BiffStructurePtr clone();
virtual void setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
public:
BIFF_BYTE fDefault;
BIFF_BYTE fHelp;
BIFF_BYTE fCancel;
BIFF_BYTE fDismiss;
BIFF_WORD accel1;
};
} // namespace XLS
......@@ -34,6 +34,7 @@ void FormatRun::store(CFRecord& record)
void FormatRun::load(CFRecord& record)
{
record >> ich >> ifnt;
WORD _ich = ich;
}
......
......@@ -49,6 +49,7 @@ void FtNts::load(CFRecord& record)
GUID guid_num;
record >> guid_num >> fSharedNote;
guid = STR::guid2bstr(guid_num);
record.skipNBytes(4);
}
......
......@@ -58,7 +58,7 @@ void OfficeArtBStoreContainerFileBlock::readCompressedData(XLS::CFRecord& record
void OfficeArtBStoreContainerFileBlock::load(XLS::CFRecord& record)
{
OfficeArtRecordHeader rh_child;
OfficeArtRecordHeader rh_child;
record >> rh_child;
record.RollRdPtrBack(rh_child.size());
......
......@@ -24,13 +24,13 @@ void OfficeArtClientAnchorSheet::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_
xml_tag->setAttribute(L"fSize", fSize);
xml_tag->setAttribute(L"colL", colL);
xml_tag->setAttribute(L"dxL", dxL);
xml_tag->setAttribute(L"dxL", _dxL);
xml_tag->setAttribute(L"rwT", rwT);
xml_tag->setAttribute(L"dyT", dyT);
xml_tag->setAttribute(L"dyT", _dyT);
xml_tag->setAttribute(L"colR", colR);
xml_tag->setAttribute(L"dxR", dxR);
xml_tag->setAttribute(L"dxR", _dxR);
xml_tag->setAttribute(L"rwB", rwB);
xml_tag->setAttribute(L"dyB", dyB);
xml_tag->setAttribute(L"dyB", _dyB);
}
......@@ -64,8 +64,12 @@ void OfficeArtClientAnchorSheet::loadFields(XLS::CFRecord& record)
WORD flags;
record >> flags >> colL >> dxL >> rwT >> dyT >> colR >> dxR >> rwB >> dyB;
fMove = GETBIT(flags, 0);
fSize = GETBIT(flags, 1);
fSize = GETBIT(flags, 1);
_dxL = dxL * 595;
_dyT = dyT * 744;
_dxR = dxR * 595;
_dyB = dyB * 744;
}
......
......@@ -36,6 +36,11 @@ private:
short dxR;
XLS::RwU rwB;
short dyB;
DWORD _dxL;
DWORD _dyT;
DWORD _dxR;
DWORD _dyB;
};
typedef boost::shared_ptr<OfficeArtClientAnchorSheet> OfficeArtClientAnchorSheetPtr;
......
#include "stdafx.h"
#include "Run.h"
#include <XLS_bin/CFRecord.h>
namespace XLS
{;
BiffStructurePtr Run::clone()
{
return BiffStructurePtr(new Run(*this));
}
Run::Run()
{
}
Run::~Run()
{
}
void Run::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
formatRun.toXML(xml_tag);
}
void Run::getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
}
void Run::store(CFRecord& record)
{
}
void Run::load(CFRecord& record)
{
formatRun.load(record);
record.skipNBytes(4); // unused1 + unused2
}
} // namespace XLS
#pragma once
#include <XLS_logic/Biff_records/BiffRecord.h>
#include <XLS_logic/Biff_structures/BiffString.h>
#include <XLS_logic/Biff_structures/FormatRun.h>
namespace XLS
{;
class Run: public BiffStructTagged
{
BASE_OBJECT_DEFINE_CLASS_NAME(Run)
public:
BiffStructurePtr clone();
Run();
~Run();
virtual void setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
public:
FormatRun formatRun;
};
typedef boost::shared_ptr<Run> RunPtr;
} // namespace XLS
\ No newline at end of file
#include "stdafx.h"
#include "TxOLastRun.h"
#include <XLS_bin/CFRecord.h>
namespace XLS
{;
BiffStructurePtr TxOLastRun::clone()
{
return BiffStructurePtr(new TxOLastRun(*this));
}
TxOLastRun::TxOLastRun()
{
}
TxOLastRun::~TxOLastRun()
{
}
void TxOLastRun::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
xml_tag->setAttribute(L"cchText", cchText);
}
void TxOLastRun::getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
}
void TxOLastRun::store(CFRecord& record)
{
}
void TxOLastRun::load(CFRecord& record)
{
record >> cchText;
WORD _cchText = cchText;
record.skipNBytes(6); // unused1 + unused2
}
} // namespace XLS
#pragma once
#include <XLS_logic/Biff_records/BiffRecord.h>
#include <XLS_logic/Biff_structures/BiffString.h>
namespace XLS
{;
class TxOLastRun: public BiffStructTagged
{
BASE_OBJECT_DEFINE_CLASS_NAME(TxOLastRun)
public:
BiffStructurePtr clone();
TxOLastRun();
~TxOLastRun();
virtual void setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
public:
BIFF_WORD cchText;
};
typedef boost::shared_ptr<TxOLastRun> TxOLastRunPtr;
} // namespace XLS
\ No newline at end of file
#include "stdafx.h"
#include "TxORuns.h"
#include <XLS_bin/CFRecord.h>
namespace XLS
{;
BiffStructurePtr TxORuns::clone()
{
return BiffStructurePtr(new TxORuns(*this));
}
TxORuns::TxORuns()
{
m_runCount = 0;
}
TxORuns::~TxORuns()
{
}
void TxORuns::setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
std::for_each(rgTxoRuns.begin(), rgTxoRuns.end(), boost::bind(&Run::toXML, _1, xml_tag));
lastRun.toXML(xml_tag);
}
void TxORuns::getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag)
{
}
void TxORuns::store(CFRecord& record)
{
}
void TxORuns::load(CFRecord& record)
{
for (int i = 0; i < m_runCount; i++)
{
RunPtr run(new Run);
run->load(record);
rgTxoRuns.push_back(run);
}
lastRun.load(record);
}
} // namespace XLS
#pragma once
#include <XLS_logic/Biff_records/BiffRecord.h>
#include <XLS_logic/Biff_structures/BiffString.h>
#include "Run.h"
#include "TxOLastRun.h"
namespace XLS
{;
class TxORuns: public BiffStructTagged
{
BASE_OBJECT_DEFINE_CLASS_NAME(TxORuns)
public:
BiffStructurePtr clone();
TxORuns();
~TxORuns();
virtual void setXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void getXMLAttributes(MSXML2::IXMLDOMElementPtr xml_tag);
virtual void load(CFRecord& record);
virtual void store(CFRecord& record);
public:
int m_runCount;
std::vector<RunPtr> rgTxoRuns;
TxOLastRun lastRun;
};
typedef boost::shared_ptr<TxORuns> TxORunsPtr;
} // namespace XLS
\ No newline at end of file
......@@ -62,9 +62,6 @@ public:
return false;
}
// fix
//proc.mandatory<IVAXIS>();
proc.mandatory<DVAXIS>();
proc.optional<SERIESAXIS>();
return true;
......
......@@ -38,7 +38,8 @@ const bool FORMATTING::loadContent(BinProcessor& proc)
proc.repeated<Font>(0, 510); // Wrong records sequence workaround (originally Font follows by Format)
proc.mandatory<XFS>();
proc.repeated<DXF>(0, 0);
proc.mandatory<STYLES>();
//proc.mandatory<STYLES>();
proc.optional<STYLES>();
proc.optional<TABLESTYLES>();
proc.optional<Palette>();
proc.optional<ClrtClient>();
......
#include "stdafx.h"
#include "GLOBALS.h"
#include <XLS_logic/Biff_records/Protect.h>
#include <XLS_logic/Biff_records/CalcMode.h>
#include <XLS_logic/Biff_records/CalcCount.h>
#include <XLS_logic/Biff_records/CalcRefMode.h>
......@@ -48,7 +49,8 @@ const bool GLOBALS::loadContent(BinProcessor& proc)
// {
// return false;
// }
proc.optional<CalcMode>(); // OpenOffice Calc stored files workaround (CalcMode is mandatory according to [MS-XLS])
proc.optional<Protect>();
proc.optional<CalcMode>(); // OpenOffice Calc stored files workaround (CalcMode is mandatory according to [MS-XLS])
proc.mandatory<CalcCount>();
proc.mandatory<CalcRefMode>();
proc.mandatory<CalcIter>();
......
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
<xsl:stylesheet xmlns:xlsx="http://www.avs4you.ru/XLSXConverter/1.0/DirectoryStructure"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlsx="http://www.avs4you.ru/XLSXConverter/1.0/DirectoryStructure">
version="1.0">
<!--<xsl:key name="distinctState" match="Note/NoteSh" use="."></xsl:key>-->
<xsl:template match="WorksheetSubstream[Note]" mode="comments">
<!--<xlsx:file>
<xlsx:file>
<xsl:attribute name="name">comments<xsl:value-of select="count(preceding-sibling::WorksheetSubstream[Note]) + 1"/>.xml</xsl:attribute>
<comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<authors>
<xsl:for-each select="Note/NoteSh">
<author><xsl:value-of select="@stAuthor"/></author>
</xsl:for-each>
<!--<xsl:for-each select="Note/NoteSh[generate-id() = generate-id(key('distinctState', .))]">
<author>
<xsl:value-of select="@stAuthor"></xsl:value-of>
</author>
</xsl:for-each>-->
<!--<xsl:for-each select="Note/NoteSh">
<author>
<xsl:value-of select="@stAuthor"></xsl:value-of>
</author>
</xsl:for-each>-->
<!-- TODO Anylize authors -->
<author>Author</author>
</authors>
<commentList>
<xsl:for-each select="Note/NoteSh">
<comment ref="{@ref}" authorId="{position() - 1}">
<text>111</text>
</comment>
<xsl:variable name="noteId" select="@idObj"></xsl:variable>
<xsl:variable name="cellRef" select="@ref"></xsl:variable>
<xsl:variable name="authorPos" select="position() - 1"></xsl:variable>
<xsl:variable name="authorName" select="@stAuthor"></xsl:variable>
<xsl:for-each select="../../OBJECTS/OBJ/Obj/FtCmo">
<xsl:if test="@id = $noteId">
<xsl:variable name="textObjectId" select="position()"></xsl:variable>
<comment ref="{$cellRef}" authorId="0">
<!--<comment ref="{$cellRef}" authorId="{$authorPos}">-->
<text>
<r>
<rPr>
<b />
<sz val="9" />
<color indexed="81" />
<rFont val="Tahoma" />
<charset val="1" />
</rPr>
<t>
<xsl:value-of select="concat($authorName, ':')"/>
</t>
</r>
<r>
<rPr>
<sz val="9"/>
<color indexed="81"/>
<rFont val="Tahoma"/>
<charset val="1"/>
</rPr>
<t xml:space="preserve"><xsl:call-template name="replace2">
<xsl:with-param name="input" select="../../../TEXTOBJECT[ $textObjectId ]/TxO/@commentText"/>
<xsl:with-param name="from" select="concat($authorName, ':')"/>
<xsl:with-param name="to" select="''"/>
</xsl:call-template></t>
</r>
</text>
</comment>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</commentList>
</comments>
</xlsx:file>-->
</xlsx:file>
</xsl:template>
<xsl:template name="replace2">
<xsl:param name="input"/>
<xsl:param name="from"/>
<xsl:param name="to"/>
<xsl:choose>
<xsl:when test="contains($input, $from)">
<!-- вывод подстроки предшествующей образцу + вывод строки замены -->
<xsl:value-of select="substring-before($input, $from)"/>
<xsl:value-of select="$to"/>
<!-- вход в итерацию -->
<xsl:call-template name="replace2">
<!-- в качестве входного параметра задается подстрока после образца замены -->
<xsl:with-param name="input" select="substring-after($input, $from)"/>
<xsl:with-param name="from" select="$from"/>
<xsl:with-param name="to" select="$to"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$input"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -23,6 +23,7 @@
<Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
<Default Extension="xml" ContentType="application/xml"/>
<Default Extension="vml" ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing" />
<xsl:for-each select="WorkbookStreamObject">
<xsl:if test="WorksheetSubstream/CUSTOMVIEW/Pls or WorksheetSubstream/PAGESETUP/Pls or ChartSheetSubstream/CUSTOMVIEW/Pls or ChartSheetSubstream/PAGESETUP/Pls">
<Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings"/>
......@@ -90,7 +91,7 @@
<xsl:if test="CUSTOMVIEW/Pls or PAGESETUP/Pls or HLINK or Note or OBJECTS or FEAT11">
<xlsx:file name="sheet{position()}.xml.rels">
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<xsl:for-each select="OBJECTS[1]"> <!-- Must not run more than once -->
<xsl:for-each select="OBJECTS[1]"> <!-- Must not run more than once -->
<Relationship>
<xsl:attribute name="Id">
<xsl:text>rId</xsl:text>
......@@ -110,6 +111,15 @@
<xsl:attribute name="Type">http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments</xsl:attribute>
<xsl:attribute name="Target">../comments<xsl:value-of select="count(../preceding-sibling::WorksheetSubstream[Note]) + 1"/>.xml</xsl:attribute>
</Relationship>
<Relationship>
<xsl:attribute name="Id">
<xsl:text>rId</xsl:text>
<xsl:value-of select="1 + $ws_index + count(../PAGESETUP/Pls) + count(../CUSTOMVIEW/Pls) + count(../OBJECTS/OBJ/Obj/FtCmo[@ot = 25]) + count(../preceding-sibling::HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
</xsl:attribute>
<xsl:attribute name="Type">http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing</xsl:attribute>
<xsl:attribute name="Target">../drawings/vmlDrawing<xsl:value-of select="$ws_index"/>.vml</xsl:attribute>
</Relationship>
</xsl:for-each>
<xsl:for-each select="HLINK[HLink/HyperlinkObject/@hlstmfHasMoniker = 'true']">
......
......@@ -8,12 +8,13 @@
<xsl:call-template name="xl_rels"/>
<xsl:apply-templates select="GlobalsSubstream/FORMATTING"/>
<xsl:apply-templates select="GlobalsSubstream/SHAREDSTRINGS/SST[@cstTotal != 0]"/>
<!--<xsl:apply-templates select="WorksheetSubstream" mode="comments"/>-->
<xsl:apply-templates select="WorksheetSubstream" mode="comments"/>
<xsl:if test="WorksheetSubstream[OBJECTS] | ChartSheetSubstream">
<xlsx:dir name="drawings">
<xsl:call-template name="drawings_rels"/>
<xsl:apply-templates select="WorksheetSubstream[OBJECTS] | ChartSheetSubstream" mode="drawing"/>
<xsl:apply-templates select="WorksheetSubstream[OBJECTS]" mode="legacyDrawing"/>
</xlsx:dir>
<xlsx:dir name="charts">
<xsl:apply-templates select="WorksheetSubstream/OBJECTS/CHART | ChartSheetSubstream" mode="charts"/>
......
......@@ -65,6 +65,7 @@
<xsl:call-template name="cellWatches"/>
<xsl:call-template name="drawing"/>
<xsl:call-template name="legacyDrawing"/>
<xsl:call-template name="tableParts"/>
<!-- TODO: Implement the rest -->
......@@ -397,23 +398,19 @@
<xsl:value-of select="count(preceding-sibling::CUSTOMVIEW/Pls) + 1 + count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
</xsl:when>
<xsl:when test="self::PAGESETUP">
<xsl:value-of select="count(preceding-sibling::PAGESETUP/Pls) + 1 + count(../CUSTOMVIEW/Pls) +
count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
<xsl:value-of select="count(preceding-sibling::PAGESETUP/Pls) + 1 + count(../CUSTOMVIEW/Pls) + count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
</xsl:when>
<!-- Note should occur only once-->
<xsl:when test="self::Note">
<xsl:value-of select="1 + 0 + count(../PAGESETUP/Pls) + count(../CUSTOMVIEW/Pls) +
count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
<xsl:value-of select="1 + 0 + count(../PAGESETUP/Pls) + count(../CUSTOMVIEW/Pls) + count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
</xsl:when>
<!-- OBJECTS should occur only once -->
<xsl:when test="self::OBJECTS">
<xsl:value-of select="1 + $Note_present + count(../PAGESETUP/Pls) + count(../CUSTOMVIEW/Pls) +
count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
<xsl:value-of select="1 + $Note_present + count(../PAGESETUP/Pls) + count(../CUSTOMVIEW/Pls) + count(../HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
</xsl:when>
<xsl:when test="self::ChartSheetSubstream">
<xsl:value-of select="1 + count(PAGESETUP/Pls) + count(CUSTOMVIEW/Pls)"/>
</xsl:when>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:template>
......@@ -1341,7 +1338,7 @@
</xsl:template>
<xsl:template name="mergeCells">
<xsl:if test="MergeCells">
<xsl:if test="MergeCells and (MergeCells/@cmcs &gt; 0)">
<mergeCells count="{MergeCells/@cmcs}" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<xsl:for-each select="MergeCells/Ref8">
<mergeCell ref="{@name}"/>
......@@ -1871,11 +1868,26 @@
</xsl:for-each>
</xsl:template>
<xsl:template name="legacyDrawing">
<!-- Only one <legacyDrawing> tag is necessary per sheet -->
<xsl:variable name="commentObjects" select="OBJECTS/OBJ/Obj/FtCmo[@ot = 25]"></xsl:variable>
<xsl:if test="$commentObjects">
<legacyDrawing xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<xsl:attribute name="r:id">
<xsl:text>rId</xsl:text>
<xsl:value-of select="1 + position() + count(PAGESETUP/Pls) + count(CUSTOMVIEW/Pls) + count(OBJECTS/OBJ/Obj/FtCmo[@ot = 25]) + count(preceding-sibling::HLINK/HLink/HyperlinkObject[@hlstmfHasMoniker = 'true'])"/>
</xsl:attribute>
</legacyDrawing>
</xsl:if>
</xsl:template>
<xsl:template name="tableParts">
<xsl:variable name="countTables" select="count(FEAT11/Feature11)" />
<xsl:if test="$countTables > 0">
<xsl:if test="$countTables &gt; 0">
<tableParts xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<xsl:attribute name="count">
<xsl:value-of select="$countTables"/>
......
......@@ -5331,6 +5331,14 @@
RelativePath="..\XLS_logic\Biff_structures\CondFmtStructure.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\ControlInfo.cpp"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\ControlInfo.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\DropDownObjId.cpp"
>
......@@ -6163,6 +6171,14 @@
RelativePath="..\XLS_logic\Biff_structures\RRD.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\Run.cpp"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\Run.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\SDContainer.cpp"
>
......@@ -6315,6 +6331,22 @@
RelativePath="..\XLS_logic\Biff_structures\TableFeatureType.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\TxOLastRun.cpp"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\TxOLastRun.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\TxORuns.cpp"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\TxORuns.h"
>
</File>
<File
RelativePath="..\XLS_logic\Biff_structures\URICreateFlags.cpp"
>
......
......@@ -2,6 +2,6 @@
//1
//0
//0
//56
#define INTVER 1,0,0,56
#define STRVER "1,0,0,56\0"
//57
#define INTVER 1,0,0,57
#define STRVER "1,0,0,57\0"
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