mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-24 10:54:12 +08:00
Compare commits
67 Commits
v4.5.dev.6
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| cf5458c761 | |||
| 9115edbd78 | |||
| 3f18f96171 | |||
| 8a75916944 | |||
| da45eb4f33 | |||
| 59d75ed148 | |||
| ccc4d751d0 | |||
| a020d3dbf9 | |||
| 7852b7fbe8 | |||
| a64fd8792d | |||
| 32448298a3 | |||
| b3384f1466 | |||
| 93274395a9 | |||
| 2726e14445 | |||
| 75e32a1562 | |||
| 8c2637b89c | |||
| ef389872df | |||
| 6fc611fdfc | |||
| 0cabb63336 | |||
| f501bf7930 | |||
| 7b617dc9e9 | |||
| 245f989ae3 | |||
| 429729b979 | |||
| d709652992 | |||
| 776d799fd2 | |||
| a975cb8261 | |||
| c932b5af26 | |||
| 423e8dda86 | |||
| afcf6b079e | |||
| 3ed2224f93 | |||
| 5307855120 | |||
| 3c9a91af45 | |||
| 9f06f94c93 | |||
| 4954ef2934 | |||
| 721e8800f1 | |||
| ef8e5cab6d | |||
| 028e58ad51 | |||
| 424e0e34cc | |||
| d8988cd101 | |||
| 440a884c0a | |||
| 449bab1a70 | |||
| c1e5e33691 | |||
| 8c7515443a | |||
| 1d16f4ab8f | |||
| 122a5cd056 | |||
| b0994759e7 | |||
| 118f1c5736 | |||
| b65703ceb1 | |||
| c08c960c96 | |||
| 02ece25af8 | |||
| 435a27f6d9 | |||
| 85ea22048a | |||
| 87ae0b38fa | |||
| b93d463469 | |||
| 0aa59b0d92 | |||
| 3dbcce8c36 | |||
| cc9459359f | |||
| 465e70759b | |||
| 9f6c833af5 | |||
| f4d16b0d61 | |||
| 398dc42bb2 | |||
| 69b4a09475 | |||
| ab360be66a | |||
| 98285c225d | |||
| bab6e40c2b | |||
| 539cb2f355 | |||
| 64d6c3c872 |
@ -68,12 +68,12 @@ namespace DocFileFormat
|
||||
int cp = m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr;
|
||||
|
||||
size_t count = m_document->AnnotationsReferencePlex->Elements.size();
|
||||
for (unsigned int i = 0; i < count; ++i)
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
|
||||
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( index + 1 ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:author",
|
||||
FormatUtils::XmlEncode(m_document->AnnotationOwners->at( atrdPre10->GetAuthorIndex() ) ));
|
||||
m_pXmlWriter->WriteAttribute( L"w:initials", atrdPre10->GetUserInitials());
|
||||
|
||||
@ -290,17 +290,15 @@ namespace DocFileFormat
|
||||
std::vector<wchar_t>* chpxChars = m_document->GetChars(fcChpxStart, fcChpxEnd, cp);
|
||||
|
||||
//search for bookmarks in the chars
|
||||
std::vector<int> bookmarks = searchBookmarks(chpxChars, cp);
|
||||
|
||||
//if there are bookmarks in this run, split the run into several runs
|
||||
if (!bookmarks.empty())
|
||||
std::vector<int> annot = searchAnnot(chpxChars, cp);
|
||||
if (!annot.empty())
|
||||
{
|
||||
std::list<std::vector<wchar_t>>* runs = splitCharList(chpxChars, &bookmarks);
|
||||
std::list<std::vector<wchar_t>>* runs = splitCharList(chpxChars, &annot);
|
||||
if (runs)
|
||||
{
|
||||
for (std::list<std::vector<wchar_t> >::iterator iter = runs->begin(); iter != runs->end(); ++iter)
|
||||
{
|
||||
if (writeBookmarks(cp))
|
||||
if (writeAnnotations(cp))
|
||||
{
|
||||
cp = writeRun(&(*iter), *cpeIter, cp);
|
||||
}
|
||||
@ -311,7 +309,30 @@ namespace DocFileFormat
|
||||
}
|
||||
else
|
||||
{
|
||||
cp = writeRun(chpxChars, *cpeIter, cp);
|
||||
//search for bookmarks in the chars
|
||||
std::vector<int> bookmarks = searchBookmarks(chpxChars, cp);
|
||||
|
||||
//if there are bookmarks in this run, split the run into several runs
|
||||
if (!bookmarks.empty())
|
||||
{
|
||||
std::list<std::vector<wchar_t>>* runs = splitCharList(chpxChars, &bookmarks);
|
||||
if (runs)
|
||||
{
|
||||
for (std::list<std::vector<wchar_t> >::iterator iter = runs->begin(); iter != runs->end(); ++iter)
|
||||
{
|
||||
if (writeBookmarks(cp))
|
||||
{
|
||||
cp = writeRun(&(*iter), *cpeIter, cp);
|
||||
}
|
||||
}
|
||||
|
||||
RELEASEOBJECT(runs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cp = writeRun(chpxChars, *cpeIter, cp);
|
||||
}
|
||||
}
|
||||
|
||||
RELEASEOBJECT(chpxChars);
|
||||
@ -948,19 +969,17 @@ namespace DocFileFormat
|
||||
}
|
||||
else if (TextMark::AnnotationReference == code)
|
||||
{
|
||||
if (typeid(*this) != typeid(CommentsMapping))
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:commentReference", true );
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( _commentNr ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", true );
|
||||
}
|
||||
else
|
||||
if (typeid(*this) == typeid(CommentsMapping))
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:annotationRef", true );
|
||||
m_pXmlWriter->WriteNodeEnd( L"", true );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin( L"w:commentReference", true );
|
||||
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString( _commentNr ));
|
||||
m_pXmlWriter->WriteNodeEnd( L"", true );
|
||||
}
|
||||
|
||||
_commentNr++;
|
||||
}
|
||||
else if (!FormatUtils::IsControlSymbol(c) && ((int)c != 0xFFFF))
|
||||
{
|
||||
@ -1042,6 +1061,30 @@ namespace DocFileFormat
|
||||
|
||||
return ret;
|
||||
}
|
||||
// Searches for bookmarks in the list of characters.
|
||||
std::vector<int> DocumentMapping::searchAnnot(std::vector<wchar_t>* chars, int initialCp)
|
||||
{
|
||||
std::vector<int> ret;
|
||||
|
||||
if (m_document->AnnotStartPlex->IsValid())
|
||||
{
|
||||
int cp = initialCp;
|
||||
|
||||
size_t count = chars->size();
|
||||
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
if ((m_document->AnnotStartPlex->IsCpExists(cp)) || (m_document->AnnotEndPlex->IsCpExists(cp)))
|
||||
{
|
||||
ret.push_back(i);
|
||||
}
|
||||
|
||||
++cp;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
ParagraphPropertyExceptions* DocumentMapping::findValidPapx(int fc)
|
||||
{
|
||||
@ -1540,7 +1583,6 @@ namespace DocFileFormat
|
||||
return cpCellEnd;
|
||||
}
|
||||
|
||||
//
|
||||
bool DocumentMapping::writeBookmarks(int cp)
|
||||
{
|
||||
bool result = true;
|
||||
@ -1561,7 +1603,27 @@ namespace DocFileFormat
|
||||
|
||||
return result;
|
||||
}
|
||||
bool DocumentMapping::writeAnnotations(int cp)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
for (size_t i = 0; i < m_document->AnnotStartEndCPs.size(); i++)
|
||||
{
|
||||
if (m_document->AnnotStartEndCPs[i].first == cp)
|
||||
{
|
||||
result = writeAnnotationStart(i + 1);
|
||||
_commentNr = i + 1;
|
||||
}
|
||||
|
||||
if (m_document->AnnotStartEndCPs[i].second == cp)
|
||||
{
|
||||
result = writeAnnotationEnd(i + 1);
|
||||
_commentNr = i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
bool DocumentMapping::writeBookmarkStart(short id)
|
||||
{
|
||||
// write bookmark start
|
||||
@ -1585,8 +1647,6 @@ namespace DocFileFormat
|
||||
|
||||
bool DocumentMapping::writeBookmarkEnd(short id)
|
||||
{
|
||||
// write bookmark end
|
||||
|
||||
WideString* bookmarkName = static_cast<WideString*>( m_document->BookmarkNames->operator [] ( id ) );
|
||||
|
||||
if ( ( bookmarkName != NULL ) && ( *bookmarkName != L"_PictureBullets" ) )
|
||||
@ -1602,7 +1662,27 @@ namespace DocFileFormat
|
||||
|
||||
return false;
|
||||
}
|
||||
bool DocumentMapping::writeAnnotationStart(short id)
|
||||
{
|
||||
XMLTools::XMLElement bookmarkElem(L"w:commentRangeStart");
|
||||
|
||||
bookmarkElem.AppendAttribute(L"w:id", FormatUtils::IntToWideString(id));
|
||||
|
||||
m_pXmlWriter->WriteString(bookmarkElem.GetXMLString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DocumentMapping::writeAnnotationEnd(short id)
|
||||
{
|
||||
XMLTools::XMLElement bookmarkElem( L"w:commentRangeEnd" );
|
||||
|
||||
bookmarkElem.AppendAttribute( L"w:id", FormatUtils::IntToWideString( id ));
|
||||
|
||||
m_pXmlWriter->WriteString( bookmarkElem.GetXMLString());
|
||||
|
||||
return true;
|
||||
}
|
||||
// Checks if the CHPX is special
|
||||
bool DocumentMapping::isSpecial(CharacterPropertyExceptions* chpx)
|
||||
{
|
||||
|
||||
@ -99,8 +99,9 @@ namespace DocFileFormat
|
||||
void writeTextStart ( const std::wstring& textType, bool preserve_space);
|
||||
void writeTextEnd ( const std::wstring& textType );
|
||||
|
||||
// Searches for bookmarks in the list of characters.
|
||||
std::vector<int> searchBookmarks( std::vector<wchar_t>* chars, int initialCp );
|
||||
std::vector<int> searchAnnot(std::vector<wchar_t>* chars, int initialCp);
|
||||
|
||||
ParagraphPropertyExceptions* findValidPapx( int fc );
|
||||
// Splits a list of characters into several lists
|
||||
std::list<std::vector<wchar_t> >* splitCharList( std::vector<wchar_t>* chars, std::vector<int>* splitIndices );
|
||||
@ -121,6 +122,10 @@ namespace DocFileFormat
|
||||
bool writeBookmarks ( int cp );
|
||||
bool writeBookmarkStart ( short id );
|
||||
bool writeBookmarkEnd ( short id );
|
||||
|
||||
bool writeAnnotations ( int cp );
|
||||
bool writeAnnotationStart( short id );
|
||||
bool writeAnnotationEnd ( short id );
|
||||
// Checks if the CHPX is special
|
||||
bool isSpecial( CharacterPropertyExceptions* chpx );
|
||||
// Finds the SEPX that is valid for the given CP.
|
||||
|
||||
@ -52,7 +52,8 @@ namespace DocFileFormat
|
||||
TextboxIndividualPlex(NULL),AssocNames(NULL), BookmarkAnnotNames(NULL), Captions(NULL), AutoCaptions(NULL), ListPlex(NULL),
|
||||
OfficeDrawingPlex(NULL), OfficeDrawingPlexHeader(NULL), SectionPlex(NULL), BookmarkStartPlex(NULL), BookmarkEndPlex(NULL),
|
||||
AutoTextPlex(NULL), AllPapxFkps(NULL), AllChpxFkps(NULL), AllPapx(NULL), AllPapxVector(NULL), AllSepx(NULL), Styles(NULL), listTable(NULL),
|
||||
AnnotationOwners(NULL), DocProperties(NULL), listFormatOverrideTable(NULL), headerAndFooterTable(NULL), encryptionHeader(NULL)
|
||||
AnnotationOwners(NULL), DocProperties(NULL), listFormatOverrideTable(NULL), headerAndFooterTable(NULL),
|
||||
AnnotStartPlex(NULL), AnnotEndPlex(NULL), encryptionHeader(NULL)
|
||||
{
|
||||
m_pCallFunc = pCallFunc;
|
||||
m_sTempFolder = sTempFolder;
|
||||
@ -275,12 +276,17 @@ namespace DocFileFormat
|
||||
TextboxIndividualPlex = new Plex<FTXBXS> (FTXBXS::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcftxbxTxt, FIB->m_FibWord97.lcbPlcftxbxTxt, bOlderVersion);
|
||||
|
||||
SectionPlex = new Plex<SectionDescriptor> (SectionDescriptor::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfSed, FIB->m_FibWord97.lcbPlcfSed, bOlderVersion);
|
||||
|
||||
BookmarkStartPlex = new Plex<BookmarkFirst> (BookmarkFirst::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfBkf, FIB->m_FibWord97.lcbPlcfBkf, bOlderVersion);
|
||||
BookmarkEndPlex = new Plex<EmptyStructure> (EmptyStructure::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfBkl, FIB->m_FibWord97.lcbPlcfBkl, bOlderVersion);
|
||||
|
||||
TextboxBreakPlex = new Plex<Tbkd> (Tbkd::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfTxbxBkd, FIB->m_FibWord97.lcbPlcfTxbxBkd, bOlderVersion);
|
||||
TextboxBreakPlexHeader = new Plex<Tbkd> (Tbkd::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfTxbxHdrBkd, FIB->m_FibWord97.lcbPlcfTxbxHdrBkd, bOlderVersion);
|
||||
|
||||
AnnotStartPlex = new Plex<BookmarkFirst> (BookmarkFirst::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfAtnBkf, FIB->m_FibWord97.lcbPlcfAtnBkf, bOlderVersion);
|
||||
AnnotEndPlex = new Plex<EmptyStructure> (EmptyStructure::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfAtnBkl, FIB->m_FibWord97.lcbPlcfAtnBkl, bOlderVersion);
|
||||
|
||||
|
||||
for (size_t i = 0; i < BookmarkStartPlex->Elements.size(); ++i)
|
||||
{
|
||||
BookmarkFirst* pBookmark = static_cast<BookmarkFirst*>(BookmarkStartPlex->Elements[i]);
|
||||
@ -289,7 +295,14 @@ namespace DocFileFormat
|
||||
BookmarkStartEndCPs.push_back(std::make_pair(BookmarkStartPlex->CharacterPositions[i], BookmarkEndPlex->CharacterPositions[pBookmark->GetIndex()]));
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < AnnotStartPlex->Elements.size(); ++i)
|
||||
{
|
||||
BookmarkFirst* pBookmark = static_cast<BookmarkFirst*>(AnnotStartPlex->Elements[i]);
|
||||
if (pBookmark)
|
||||
{
|
||||
AnnotStartEndCPs.push_back(std::make_pair(AnnotStartPlex->CharacterPositions[i], AnnotEndPlex->CharacterPositions[pBookmark->GetIndex()]));
|
||||
}
|
||||
}
|
||||
AutoTextPlex = new Plex<EmptyStructure>(EmptyStructure::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfGlsy, FIB->m_FibWord97.lcbPlcfGlsy, bOlderVersion);
|
||||
FieldsPlex = new Plex<FieldCharacter>(FieldCharacter::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfFldMom, FIB->m_FibWord97.lcbPlcfFldMom, bOlderVersion);
|
||||
FootnoteDocumentFieldsPlex = new Plex<FieldCharacter>(FieldCharacter::STRUCTURE_SIZE, TableStream, FIB->m_FibWord97.fcPlcfFldFtn, FIB->m_FibWord97.lcbPlcfFldFtn, bOlderVersion);
|
||||
@ -659,6 +672,8 @@ namespace DocFileFormat
|
||||
RELEASEOBJECT(SectionPlex);
|
||||
RELEASEOBJECT(BookmarkStartPlex);
|
||||
RELEASEOBJECT(BookmarkEndPlex);
|
||||
RELEASEOBJECT(AnnotStartPlex);
|
||||
RELEASEOBJECT(AnnotEndPlex);
|
||||
RELEASEOBJECT(AutoTextPlex);
|
||||
RELEASEOBJECT(ListPlex);
|
||||
RELEASEOBJECT(Styles);
|
||||
|
||||
@ -162,7 +162,9 @@ namespace DocFileFormat
|
||||
std::vector<int> * AllPapxVector;// A vector to quick find in AllPapx
|
||||
|
||||
std::map<int, int> PictureBulletsCPsMap;
|
||||
|
||||
std::vector<std::pair<int, int>> BookmarkStartEndCPs;
|
||||
std::vector<std::pair<int, int>> AnnotStartEndCPs;
|
||||
|
||||
FileInformationBlock * FIB;
|
||||
StyleSheet * Styles; // The style sheet of the document
|
||||
@ -204,7 +206,10 @@ namespace DocFileFormat
|
||||
Plex<SectionDescriptor> *SectionPlex; // A Plex containing all section descriptors
|
||||
|
||||
Plex<BookmarkFirst> *BookmarkStartPlex;
|
||||
Plex<EmptyStructure> *BookmarkEndPlex;
|
||||
Plex<EmptyStructure> *BookmarkEndPlex;
|
||||
|
||||
Plex<BookmarkFirst> *AnnotStartPlex;
|
||||
Plex<EmptyStructure> *AnnotEndPlex;
|
||||
|
||||
Plex<ListNumCache> *ListPlex;
|
||||
Plex<FieldCharacter> *FieldsPlex;
|
||||
|
||||
@ -49,8 +49,8 @@
|
||||
6967917D1D9E8AEE002CA4BA /* BinReaderWriterDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 696791791D9E8AEE002CA4BA /* BinReaderWriterDefines.h */; };
|
||||
6967917E1D9E8AEE002CA4BA /* BinWriters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967917A1D9E8AEE002CA4BA /* BinWriters.cpp */; };
|
||||
6967917F1D9E8AEE002CA4BA /* BinWriters.h in Headers */ = {isa = PBXBuildFile; fileRef = 6967917B1D9E8AEE002CA4BA /* BinWriters.h */; };
|
||||
69BBDF251F0B8AAC00EB1BF7 /* FileDownloader_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69BBDF241F0B8AAC00EB1BF7 /* FileDownloader_mac.mm */; };
|
||||
69F181AF1C77274E00B2952B /* FileDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F181AD1C77274E00B2952B /* FileDownloader.h */; };
|
||||
69F181B51C77276D00B2952B /* FileDownloader_curl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69F181B31C77276D00B2952B /* FileDownloader_curl.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -97,8 +97,8 @@
|
||||
696791791D9E8AEE002CA4BA /* BinReaderWriterDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BinReaderWriterDefines.h; path = ../../BinWriter/BinReaderWriterDefines.h; sourceTree = "<group>"; };
|
||||
6967917A1D9E8AEE002CA4BA /* BinWriters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BinWriters.cpp; path = ../../BinWriter/BinWriters.cpp; sourceTree = "<group>"; };
|
||||
6967917B1D9E8AEE002CA4BA /* BinWriters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BinWriters.h; path = ../../BinWriter/BinWriters.h; sourceTree = "<group>"; };
|
||||
69BBDF241F0B8AAC00EB1BF7 /* FileDownloader_mac.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; name = FileDownloader_mac.mm; path = ../../../Common/FileDownloader/FileDownloader_mac.mm; sourceTree = "<group>"; };
|
||||
69F181AD1C77274E00B2952B /* FileDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileDownloader.h; path = ../../../Common/FileDownloader/FileDownloader.h; sourceTree = "<group>"; };
|
||||
69F181B31C77276D00B2952B /* FileDownloader_curl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileDownloader_curl.cpp; path = ../../../Common/FileDownloader/FileDownloader_curl.cpp; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -230,7 +230,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
69F181AD1C77274E00B2952B /* FileDownloader.h */,
|
||||
69F181B31C77276D00B2952B /* FileDownloader_curl.cpp */,
|
||||
69BBDF241F0B8AAC00EB1BF7 /* FileDownloader_mac.mm */,
|
||||
);
|
||||
name = Common;
|
||||
sourceTree = "<group>";
|
||||
@ -339,7 +339,6 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
69F181B51C77276D00B2952B /* FileDownloader_curl.cpp in Sources */,
|
||||
17C1FE961ACC42C4006B99B3 /* Common.cpp in Sources */,
|
||||
17C1FE971ACC42C4006B99B3 /* ChartFromToBinary.cpp in Sources */,
|
||||
17C1FE981ACC42C4006B99B3 /* CSVReader.cpp in Sources */,
|
||||
@ -348,6 +347,7 @@
|
||||
17C1FE9B1ACC42C4006B99B3 /* CSVWriter.cpp in Sources */,
|
||||
69414A301CB51666003E771B /* ChartWriter.cpp in Sources */,
|
||||
6967917E1D9E8AEE002CA4BA /* BinWriters.cpp in Sources */,
|
||||
69BBDF251F0B8AAC00EB1BF7 /* FileDownloader_mac.mm in Sources */,
|
||||
17C1FE9C1ACC42C4006B99B3 /* XlsxSerializer.cpp in Sources */,
|
||||
690FE0851E9BBD68004B26D0 /* Readers.cpp in Sources */,
|
||||
17C1FE9D1ACC42C4006B99B3 /* FontProcessor.cpp in Sources */,
|
||||
@ -379,6 +379,7 @@
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
_XCODE,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
@ -416,6 +417,7 @@
|
||||
unix,
|
||||
_IOS,
|
||||
DONT_WRITE_EMBEDDED_FONTS,
|
||||
_XCODE,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
|
||||
@ -107,6 +107,7 @@ static const std::wstring _ooxShapeType[]=
|
||||
L"path",
|
||||
L"custGeom",//uses sub-sub type,
|
||||
L"polygon",
|
||||
L"roundRect",
|
||||
};
|
||||
|
||||
|
||||
@ -355,7 +356,7 @@ void _oox_drawing::serialize_shape(std::wostream & strm)
|
||||
shapeGeomPreset = L"rect";
|
||||
}
|
||||
}
|
||||
else if (sub_type < 9 && sub_type >= 0)
|
||||
else if (sub_type < 10 && sub_type >= 0)
|
||||
{
|
||||
shapeGeomPreset = _ooxShapeType[sub_type]; //odf -> oox
|
||||
}
|
||||
|
||||
@ -189,14 +189,14 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
|
||||
CP_XML_STREAM() << impl_->hyperlinks_.str();
|
||||
}
|
||||
}
|
||||
|
||||
CP_XML_STREAM() << impl_->drawing_.str();
|
||||
|
||||
if (!impl_->page_props_.str().empty())
|
||||
{
|
||||
CP_XML_STREAM() << impl_->page_props_.str();
|
||||
}//props выше legacyDrawing !!
|
||||
|
||||
CP_XML_STREAM() << impl_->drawing_.str();
|
||||
|
||||
if (impl_->commentsId_.length()>0)
|
||||
{
|
||||
CP_XML_NODE(L"legacyDrawing")
|
||||
|
||||
@ -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 )
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -235,7 +235,7 @@ void Compute_HatchFill(draw_hatch * image_style,oox::oox_hatch_fill_ptr fill)
|
||||
int style =0;
|
||||
if (image_style->draw_style_)style = image_style->draw_style_->get_type();
|
||||
|
||||
int angle = (int)(0.5 + *image_style->draw_rotation_/10.);
|
||||
int angle = image_style->draw_rotation_ ? (int)(0.5 + *image_style->draw_rotation_/10.) : 0;
|
||||
|
||||
if (image_style->draw_color_)fill->color_ref = image_style->draw_color_->get_hex_value();
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ void draw_shape::add_child_element( xml::sax * Reader, const std::wstring & Ns,
|
||||
}
|
||||
void draw_shape::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"draw:id", draw_id_);//или сюда draw_shape_attlist_???
|
||||
CP_APPLY_ATTR(L"draw:id", draw_id_);//или сюда draw_shape_attlist_???
|
||||
|
||||
common_draw_attlists_.shape_with_text_and_styles_.add_attributes(Attributes);
|
||||
common_draw_attlists_.position_.add_attributes(Attributes);
|
||||
@ -87,6 +87,7 @@ void draw_shape::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
void draw_rect_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
{
|
||||
CP_APPLY_ATTR(L"draw:filter-name", draw_filter_name_);
|
||||
CP_APPLY_ATTR(L"draw:corner-radius",draw_corner_radius_);
|
||||
}
|
||||
|
||||
const wchar_t * draw_rect::ns = L"draw";
|
||||
@ -98,6 +99,9 @@ void draw_rect::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
draw_shape::add_attributes(Attributes);
|
||||
|
||||
sub_type_ = 2;
|
||||
|
||||
if (draw_rect_attlist_.draw_corner_radius_)
|
||||
sub_type_ = 9;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -101,7 +101,8 @@ public:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
|
||||
|
||||
public:
|
||||
_CP_OPT(std::wstring) draw_filter_name_;
|
||||
_CP_OPT(std::wstring) draw_filter_name_;
|
||||
_CP_OPT(odf_types::length) draw_corner_radius_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -626,6 +626,7 @@ public:
|
||||
// header_footer_content_impl content_;
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(style_footer_first);
|
||||
|
||||
/// style:header-left
|
||||
class style_header_left : public office_element_impl<style_header_left>, public header_footer_impl
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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++)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -601,12 +601,14 @@ void CPPTUserInfo::LoadNotes(DWORD dwNoteID, CSlide* pNotes)
|
||||
|
||||
CSlideInfo* pNotesWrapper = &m_arNotesWrapper.back();
|
||||
|
||||
int indexUser = pRecordSlide->m_IndexUser;
|
||||
int indexUser = pRecordSlide->m_IndexUser;
|
||||
|
||||
if (m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures.empty())
|
||||
pNotesWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[0]->m_arOffsetPictures;
|
||||
else
|
||||
pNotesWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures;
|
||||
|
||||
pNotesWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures;
|
||||
pNotesWrapper->m_mapFilePictures = &m_pDocumentInfo->m_mapStoreImageFile;
|
||||
|
||||
//грузим placeholder
|
||||
pNotesWrapper->m_arTextPlaceHolders = pRecordSlide->m_oPersist.m_arTextAttrs;
|
||||
|
||||
std::vector<CRecordNotesAtom*> oArrayNotesAtoms;
|
||||
@ -627,6 +629,9 @@ void CPPTUserInfo::LoadNotes(DWORD dwNoteID, CSlide* pNotes)
|
||||
//????? у заметок нет слайда !!!
|
||||
}
|
||||
//-----------------------------------------------------
|
||||
size_t index = pPairSlide->second->m_Index;
|
||||
if (index >= m_arSlides.size())
|
||||
return;
|
||||
CSlide* pSlide = m_arSlides[pPairSlide->second->m_Index];
|
||||
|
||||
pNotes->m_lSlideID = pPairSlide->second->m_Index;
|
||||
@ -796,12 +801,14 @@ void CPPTUserInfo::LoadSlide(DWORD dwSlideID, CSlide* pSlide)
|
||||
|
||||
CSlideInfo* pSlideWrapper = &m_arSlideWrapper.back();
|
||||
|
||||
int indexUser = pRecordSlide->m_IndexUser;
|
||||
int indexUser = pRecordSlide->m_IndexUser;
|
||||
|
||||
pSlideWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures;
|
||||
if (m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures.empty())
|
||||
pSlideWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[0]->m_arOffsetPictures;
|
||||
else
|
||||
pSlideWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures;
|
||||
|
||||
pSlideWrapper->m_mapFilePictures = &m_pDocumentInfo->m_mapStoreImageFile;
|
||||
|
||||
// вот, грузим placeholder
|
||||
pSlideWrapper->m_arTextPlaceHolders = pRecordSlide->m_oPersist.m_arTextAttrs;
|
||||
|
||||
// записываем шрифты
|
||||
@ -1402,7 +1409,11 @@ void CPPTUserInfo::LoadMainMaster(DWORD dwMasterID, const LONG& lOriginWidth, co
|
||||
indexUser = pPairMaster1->second->m_IndexUser;
|
||||
pMasterWrapper->m_arTextPlaceHolders = pPairMaster1->second->m_oPersist.m_arTextAttrs;
|
||||
}
|
||||
pMasterWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures;
|
||||
if (m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures.empty() == false)
|
||||
pMasterWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[indexUser]->m_arOffsetPictures;
|
||||
else
|
||||
pMasterWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[0]->m_arOffsetPictures;
|
||||
|
||||
pMasterWrapper->m_mapFilePictures = &m_pDocumentInfo->m_mapStoreImageFile;
|
||||
|
||||
// читаем настройки текстовых стилей -----------------------------------------------
|
||||
@ -1784,11 +1795,13 @@ void CPPTUserInfo::LoadNoMainMaster(DWORD dwMasterID, const LONG& lOriginWidth,
|
||||
|
||||
CSlideInfo* pMasterWrapper = &m_arMasterWrapper[m_arMasterWrapper.size() - 1];
|
||||
|
||||
// вот, грузим placeholder
|
||||
pMasterWrapper->m_arTextPlaceHolders = pCurMaster->m_oPersist.m_arTextAttrs;
|
||||
|
||||
pMasterWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[pCurMaster->m_IndexUser]->m_arOffsetPictures;
|
||||
pMasterWrapper->m_arTextPlaceHolders = pCurMaster->m_oPersist.m_arTextAttrs;
|
||||
pMasterWrapper->m_mapFilePictures = &m_pDocumentInfo->m_mapStoreImageFile;
|
||||
|
||||
if (m_pDocumentInfo->m_arUsers[pCurMaster->m_IndexUser]->m_arOffsetPictures.empty() == false)
|
||||
pMasterWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[pCurMaster->m_IndexUser]->m_arOffsetPictures;
|
||||
else
|
||||
pMasterWrapper->m_parEmptyPictures = &m_pDocumentInfo->m_arUsers[0]->m_arOffsetPictures;
|
||||
|
||||
std::map<DWORD, LONG>::iterator pPairTheme = m_mapMasterToTheme.find(dwID);
|
||||
|
||||
|
||||
@ -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()
|
||||
{
|
||||
@ -232,10 +232,12 @@ void CPPTFileReader::ReadPictures()
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (pStream->isEOF())
|
||||
break;
|
||||
//if (pStream->isEOF()) случаются неверно записанные стримы
|
||||
// break;
|
||||
|
||||
int pos = pStream->getStreamPointer();
|
||||
if (pos >= pStream->getStreamSize())
|
||||
break;
|
||||
|
||||
SRecordHeader oHeader;
|
||||
if (pDecryptor)
|
||||
@ -256,6 +258,9 @@ void CPPTFileReader::ReadPictures()
|
||||
else
|
||||
oHeader.ReadFromStream(pStream->stream_);
|
||||
|
||||
if (oHeader.RecType == 0 && oHeader.RecLen == 0 )
|
||||
break;// окончание стрима забито нулями (выравнивание)
|
||||
|
||||
CRecordOfficeArtBlip art_blip;
|
||||
art_blip.m_strTmpDirectory = m_strTmpDirectory;
|
||||
art_blip.m_oDocumentInfo = &m_oDocumentInfo;
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -83,7 +83,7 @@ namespace PPTX
|
||||
int nParentDepth = oReader.GetDepth();
|
||||
while( oReader.ReadNextSiblingNode( nParentDepth ) )
|
||||
{
|
||||
std::wstring strName = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
std::wstring strName = oReader.GetName();
|
||||
|
||||
if (strName == L"a:cxnSpLocks")
|
||||
{
|
||||
@ -155,7 +155,6 @@ namespace PPTX
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr1;
|
||||
|
||||
18
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
Normal file → Executable file
18
ASCOfficePPTXFile/PPTXFormat/Logic/GraphicFrame.cpp
Normal file → Executable file
@ -124,6 +124,8 @@ namespace PPTX
|
||||
xfrm = oReader;
|
||||
else if (L"cNvGraphicFramePr" == strName)
|
||||
nvGraphicFramePr.cNvGraphicFramePr.fromXML( oReader );
|
||||
else if (L"nvGraphicFramePr" == strName)
|
||||
nvGraphicFramePr.fromXML( oReader );
|
||||
|
||||
else if (L"graphic" == strName)
|
||||
{
|
||||
@ -248,12 +250,26 @@ namespace PPTX
|
||||
}
|
||||
else if (L"oleObj" == strName)
|
||||
{
|
||||
olePic = oNode.ReadNode(L"p:pic");
|
||||
olePic = oNode.ReadNode(L"p:pic"); //нормальный вариант объекта
|
||||
if (olePic.IsInit())
|
||||
{
|
||||
olePic->fromXMLOle(oNode);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
olePic.Init(); //старый вариант описания объекта через spid в VmlDrawing
|
||||
olePic->spPr.xfrm;
|
||||
|
||||
Logic::PrstGeom* geom = new Logic::PrstGeom();
|
||||
geom->prst = L"rect";
|
||||
olePic->spPr.Geometry.m_geometry.reset(geom);
|
||||
|
||||
olePic->fromXMLOle(oNode);
|
||||
result = true;
|
||||
}
|
||||
if (olePic->spPr.xfrm.IsInit() == false)
|
||||
olePic->spPr.xfrm = xfrm;
|
||||
}
|
||||
else if (L"AlternateContent" == strName)
|
||||
{
|
||||
|
||||
@ -619,6 +619,45 @@ namespace PPTX
|
||||
if(oleObject.IsInit())
|
||||
{
|
||||
pWriter->StartRecord(SPTREE_TYPE_OLE);
|
||||
|
||||
if (oleObject->m_sShapeId.IsInit() && (!blipFill.blip->embed.IsInit() && blipFill.blip->oleFilepathImage.empty()) &&
|
||||
parentFileIs<PPTX::Slide>() && parentFileAs<PPTX::Slide>().Vml.IsInit())
|
||||
{
|
||||
OOX::CVmlDrawing *pVml = parentFileAs<PPTX::Slide>().Vml.operator->();
|
||||
|
||||
std::map<std::wstring, OOX::CVmlDrawing::_vml_shape>::iterator pPair = pVml->m_mapShapes.find(*oleObject->m_sShapeId);
|
||||
if (pVml->m_mapShapes.end() != pPair)
|
||||
{
|
||||
pPair->second.bUsed = true;
|
||||
OOX::Vml::CShape* pShape = dynamic_cast<OOX::Vml::CShape*>(pPair->second.pElement);
|
||||
for(size_t j = 0; (pShape) && (j < pShape->m_arrItems.size()); ++j)
|
||||
{
|
||||
OOX::WritingElement* pChildElemShape = pShape->m_arrItems[j];
|
||||
if(OOX::et_v_imagedata == pChildElemShape->getType())
|
||||
{
|
||||
OOX::Vml::CImageData* pImageData = static_cast<OOX::Vml::CImageData*>(pChildElemShape);
|
||||
|
||||
std::wstring sIdImageFileCache;
|
||||
|
||||
if (pImageData->m_oRelId.IsInit()) sIdImageFileCache = pImageData->m_oRelId->GetValue();
|
||||
else if (pImageData->m_rId.IsInit()) sIdImageFileCache = pImageData->m_rId->GetValue();
|
||||
|
||||
if (!sIdImageFileCache.empty())
|
||||
{
|
||||
//ищем физический файл ( rId относительно vml_drawing)
|
||||
smart_ptr<OOX::File> pFile = pVml->Find(sIdImageFileCache);
|
||||
|
||||
if (pFile.IsInit() && ( OOX::FileTypes::Image == pFile->type()))
|
||||
{
|
||||
OOX::Image* pImageFileCache = static_cast<OOX::Image*>(pFile.operator->());
|
||||
|
||||
blipFill.blip->oleFilepathImage = pImageFileCache->filename().GetPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (nvPicPr.nvPr.media.is_init())
|
||||
{
|
||||
@ -630,10 +669,17 @@ namespace PPTX
|
||||
blipFill.blip->mediaFilepath = mediaFile->filename().GetPath();
|
||||
}
|
||||
|
||||
if (nvPicPr.nvPr.media.as<MediaFile>().name == L"audioFile")
|
||||
if (nvPicPr.nvPr.media.is<MediaFile>())
|
||||
{
|
||||
if (nvPicPr.nvPr.media.as<MediaFile>().name == L"audioFile")
|
||||
pWriter->StartRecord(SPTREE_TYPE_AUDIO);
|
||||
else if (nvPicPr.nvPr.media.as<MediaFile>().name == L"videoFile")
|
||||
pWriter->StartRecord(SPTREE_TYPE_VIDEO);
|
||||
}
|
||||
else if (nvPicPr.nvPr.media.is<WavAudioFile>() || nvPicPr.nvPr.media.is<AudioCD>())
|
||||
{
|
||||
pWriter->StartRecord(SPTREE_TYPE_AUDIO);
|
||||
else if (nvPicPr.nvPr.media.as<MediaFile>().name == L"videoFile")
|
||||
pWriter->StartRecord(SPTREE_TYPE_VIDEO);
|
||||
}
|
||||
else
|
||||
pWriter->StartRecord(SPTREE_TYPE_PIC);
|
||||
}
|
||||
@ -1338,6 +1384,7 @@ namespace PPTX
|
||||
blipFill.blip.Init();
|
||||
blipFill.blip->oleRid = oleObject->m_oId->get();
|
||||
}
|
||||
node.ReadAttributeBase(L"spid", oleObject->m_sShapeId);
|
||||
}
|
||||
} // namespace Logic
|
||||
} // namespace PPTX
|
||||
|
||||
@ -259,7 +259,7 @@ namespace PPTX
|
||||
void toXmlWriterVML(NSBinPptxRW::CXmlWriter* pWriter, smart_ptr<PPTX::Theme>& oTheme, smart_ptr<PPTX::Logic::ClrMap>& oClrMap, bool in_group = false);
|
||||
//----------------------------------------------------------------------
|
||||
NvPicPr nvPicPr;
|
||||
BlipFill blipFill;
|
||||
mutable BlipFill blipFill;
|
||||
SpPr spPr;
|
||||
nullable<ShapeStyle> style;
|
||||
//internal
|
||||
|
||||
@ -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 );
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -51,12 +51,12 @@
|
||||
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
|
||||
#endif
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
HRESULT convert_single(std::wstring fileName)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
std::wstring srcFileName = argv[1];
|
||||
std::wstring dstPath = argc > 2 ? argv[2] : srcFileName + L"-my.xlsx";
|
||||
|
||||
std::wstring srcFileName = fileName;
|
||||
std::wstring dstPath = srcFileName + L"-my.xlsx";
|
||||
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
|
||||
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
|
||||
@ -73,3 +73,26 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT convert_directory(std::wstring pathName)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
std::vector<std::wstring> arFiles = NSDirectory::GetFiles(pathName, false);
|
||||
|
||||
for (size_t i = 0; i < arFiles.size(); i++)
|
||||
{
|
||||
convert_single(arFiles[i]);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
if (argc < 2) return 1;
|
||||
|
||||
HRESULT hr = convert_single(argv[1]);
|
||||
|
||||
//HRESULT hr = convert_directory(argv[1]);
|
||||
return hr;
|
||||
}
|
||||
@ -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])
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/LongRGB.h>
|
||||
#include "../Biff_structures/LongRGB.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -66,6 +66,7 @@ static inline void/*std::wstring &*/trim(std::wstring &s)
|
||||
|
||||
AutoFilter::AutoFilter()
|
||||
{
|
||||
wTopN = wJoin = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +87,7 @@ void AutoFilter::readFields(CFRecord& record)
|
||||
unsigned short flags;
|
||||
record >> iEntry >> flags;
|
||||
|
||||
wJoin = static_cast<unsigned char>(GETBITS(flags, 0, 1));
|
||||
wJoin = GETBITS(flags, 0, 1);
|
||||
|
||||
fSimple1 = GETBIT(flags, 2);
|
||||
fSimple2 = GETBIT(flags, 3);
|
||||
@ -94,7 +95,7 @@ void AutoFilter::readFields(CFRecord& record)
|
||||
fTop = GETBIT(flags, 5); //top(1) or bottom(0)
|
||||
fPercent = GETBIT(flags, 6);
|
||||
|
||||
wTopN = static_cast<unsigned short>(GETBITS(flags, 7, 15));
|
||||
wTopN = GETBITS(flags, 7, 15);
|
||||
|
||||
unsigned short _iEntry = iEntry;
|
||||
unsigned char _wJoin = wJoin;
|
||||
|
||||
@ -87,7 +87,7 @@ void BOF::readFields(CFRecord& record)
|
||||
fGlJmp = GETBIT(flags, 10);
|
||||
fFontLimit = GETBIT(flags, 13);
|
||||
|
||||
verXLHigh = static_cast<unsigned char>(GETBITS(flags, 14, 17));
|
||||
verXLHigh = GETBITS(flags, 14, 17);
|
||||
|
||||
record >> verLowestBiff;
|
||||
unsigned char flags2;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -36,9 +36,9 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
BookExt::BookExt()
|
||||
: cb(22)
|
||||
BookExt::BookExt() : cb(22)
|
||||
{
|
||||
mdFactoidDisplay = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -62,15 +62,15 @@ void BookExt::readFields(CFRecord& record)
|
||||
|
||||
if (record.loadAnyData(flags))
|
||||
{
|
||||
fDontAutoRecover = GETBIT(flags, 0);
|
||||
fHidePivotList = GETBIT(flags, 1);
|
||||
fFilterPrivacy = GETBIT(flags, 2);
|
||||
fEmbedFactoids = GETBIT(flags, 3);
|
||||
mdFactoidDisplay = static_cast<unsigned char>(GETBITS(flags, 4, 5));
|
||||
fSavedDuringRecovery = GETBIT(flags, 6);
|
||||
fCreatedViaMinimalSave = GETBIT(flags, 7);
|
||||
fOpenedViaDataRecovery = GETBIT(flags, 8);
|
||||
fOpenedViaSafeLoad = GETBIT(flags, 9);
|
||||
fDontAutoRecover = GETBIT(flags, 0);
|
||||
fHidePivotList = GETBIT(flags, 1);
|
||||
fFilterPrivacy = GETBIT(flags, 2);
|
||||
fEmbedFactoids = GETBIT(flags, 3);
|
||||
mdFactoidDisplay = GETBITS(flags, 4, 5);
|
||||
fSavedDuringRecovery = GETBIT(flags, 6);
|
||||
fCreatedViaMinimalSave = GETBIT(flags, 7);
|
||||
fOpenedViaDataRecovery = GETBIT(flags, 8);
|
||||
fOpenedViaSafeLoad = GETBIT(flags, 9);
|
||||
}
|
||||
else return;
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ namespace XLS
|
||||
|
||||
ColInfo::ColInfo()
|
||||
{
|
||||
iOutLevel = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -35,10 +35,12 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
DbOrParamQry::DbOrParamQry()
|
||||
DbOrParamQry::DbOrParamQry(int typeRecord_)
|
||||
{
|
||||
}
|
||||
typeRecord = typeRecord_;
|
||||
|
||||
param.pbt = query.dbt = 0;
|
||||
}
|
||||
|
||||
DbOrParamQry::~DbOrParamQry()
|
||||
{
|
||||
@ -52,10 +54,32 @@ BaseObjectPtr DbOrParamQry::clone()
|
||||
|
||||
void DbOrParamQry::readFields(CFRecord& record)
|
||||
{
|
||||
#pragma message("####################### DbOrParamQry record is not implemented")
|
||||
Log::error("DbOrParamQry record is not implemented.");
|
||||
size_t size = record.getDataSize() - record.getRdPtr();
|
||||
|
||||
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
|
||||
if (typeRecord == 1)
|
||||
{
|
||||
unsigned short flags;
|
||||
|
||||
record >> param.wTypeSql >> flags >> param.grbit >> param.fVal;
|
||||
|
||||
param.pbt = GETBITS(flags, 0, 1);
|
||||
param.fNonDefaultName = GETBIT(flags, 2);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned short flags;
|
||||
|
||||
record >> flags >> query.cparams >> query.cstQuery >> query.cstWebPost >> query.cstSQLSav >> query.cstOdbcConn;
|
||||
|
||||
query.dbt = GETBITS(flags, 0, 2);
|
||||
query.fOdbcConn = GETBIT(flags, 3);
|
||||
query.fSql = GETBIT(flags, 4);
|
||||
query.fSqlSav = GETBIT(flags, 5);
|
||||
query.fWeb = GETBIT(flags, 6);
|
||||
query.fSavePwd = GETBIT(flags, 7);
|
||||
query.fTablesOnlyHTML = GETBIT(flags, 8);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,24 +36,48 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of DbOrParamQry record in BIFF8
|
||||
class DbOrParamQry: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(DbOrParamQry)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(DbOrParamQry)
|
||||
public:
|
||||
DbOrParamQry();
|
||||
DbOrParamQry(int typeRecord = 2);
|
||||
~DbOrParamQry();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeDbOrParamQry;
|
||||
static const ElementType type = typeDbOrParamQry;
|
||||
|
||||
int typeRecord;
|
||||
|
||||
//PARAMQRY_Fixed - 8 bytes + variable
|
||||
struct
|
||||
{
|
||||
unsigned short wTypeSql;
|
||||
unsigned char pbt;
|
||||
bool fNonDefaultName;
|
||||
unsigned short grbit;
|
||||
unsigned short fVal;
|
||||
}param;
|
||||
|
||||
//---------------------------------------
|
||||
struct
|
||||
{
|
||||
unsigned char dbt;
|
||||
bool fOdbcConn;
|
||||
bool fSql;
|
||||
bool fSqlSav;
|
||||
bool fWeb;
|
||||
bool fSavePwd;
|
||||
bool fTablesOnlyHTML;
|
||||
short cparams;
|
||||
short cstQuery;
|
||||
short cstWebPost;
|
||||
short cstSQLSav;
|
||||
short cstOdbcConn;
|
||||
}query;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -71,12 +71,12 @@ void Dv::readFields(CFRecord& record)
|
||||
record >> flags;
|
||||
|
||||
valType = static_cast<_valTypeDv>(GETBITS(flags, 0, 3));
|
||||
errStyle = static_cast<unsigned char>(GETBITS(flags, 4, 6));
|
||||
errStyle = GETBITS(flags, 4, 6);
|
||||
|
||||
fStrLookup = GETBIT(flags, 7);
|
||||
fAllowBlank = GETBIT(flags, 8);
|
||||
fSuppressCombo = GETBIT(flags, 9);
|
||||
mdImeMode = static_cast<unsigned char>(GETBITS(flags, 10, 17));
|
||||
mdImeMode = GETBITS(flags, 10, 17);
|
||||
fShowInputMsg = GETBIT(flags, 18);
|
||||
fShowErrorMsg = GETBIT(flags, 19);
|
||||
typOperator = static_cast<_typOperatorDv>(GETBITS(flags, 20, 23));
|
||||
|
||||
@ -36,7 +36,7 @@ namespace XLS
|
||||
{
|
||||
|
||||
ExternName::ExternName(const unsigned short supporting_link_type)
|
||||
: supbook_cch(supporting_link_type)
|
||||
: supbook_cch(supporting_link_type), cf(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ const wchar_t* const AutoFilterDefineNames[] =
|
||||
|
||||
|
||||
Lbl::Lbl()
|
||||
: rgce(false)
|
||||
: rgce(false), fGrp(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ namespace XLS
|
||||
|
||||
Qsir::Qsir()
|
||||
{
|
||||
wVerBeforeRefreshAlert = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ namespace XLS
|
||||
|
||||
Row::Row()
|
||||
{
|
||||
iOutLevel = ixfe_val = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
73
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.h
Normal file
73
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.h
Normal 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
|
||||
|
||||
@ -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 "SXDBB.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
SXDBB::SXDBB()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SXDBB::~SXDBB()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr SXDBB::clone()
|
||||
{
|
||||
return BaseObjectPtr(new SXDBB(*this));
|
||||
}
|
||||
|
||||
void SXDBB::readFields(CFRecord& record)
|
||||
{
|
||||
size = record.getDataSize() - record.getRdPtr();
|
||||
|
||||
blob = boost::shared_array<unsigned char>(new unsigned char[size]);
|
||||
|
||||
memcpy(blob.get(), record.getCurData<unsigned char>(), size);
|
||||
|
||||
record.skipNunBytes(size);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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 "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<unsigned char> blob;
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -39,12 +39,10 @@ SXDI::SXDI()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SXDI::~SXDI()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr SXDI::clone()
|
||||
{
|
||||
return BaseObjectPtr(new SXDI(*this));
|
||||
@ -61,5 +59,22 @@ void SXDI::readFields(CFRecord& record)
|
||||
}
|
||||
}
|
||||
|
||||
int SXDI::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"dataField")
|
||||
{
|
||||
if (stName.value().empty() == false)
|
||||
CP_XML_ATTR(L"name", stName.value());
|
||||
|
||||
CP_XML_ATTR(L"fld", isxvdData);
|
||||
CP_XML_ATTR(L"baseField", df);
|
||||
CP_XML_ATTR(L"baseItem", isxvi);
|
||||
CP_XML_ATTR(L"numFmtId", ifmt);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -49,6 +49,8 @@ public:
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
int serialize(std::wostream & strm);
|
||||
|
||||
static const ElementType type = typeSXDI;
|
||||
|
||||
short isxvdData;
|
||||
|
||||
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* (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;
|
||||
}
|
||||
|
||||
std::wstring SXDtr::get_string_date()
|
||||
{
|
||||
std::wstringstream s;
|
||||
s << yr << L"-" << (mon < 10 ? L"0" : L"") << mon << L"-" << (dom < 10 ? L"0" : L"") << dom << L"T"
|
||||
<< (hr < 10 ? L"0" : L"") << hr << L":" << (min < 10 ? L"0" : L"") << min << L":" << (sec < 10 ? L"0" : L"") << sec;
|
||||
|
||||
return s.str();
|
||||
}
|
||||
|
||||
int SXDtr::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"d")
|
||||
{
|
||||
|
||||
CP_XML_ATTR(L"v", get_string_date());
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (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;
|
||||
|
||||
std::wstring get_string_date();
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -37,6 +37,7 @@ namespace XLS
|
||||
|
||||
SXEx::SXEx()
|
||||
{
|
||||
cWrapPage = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* (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);
|
||||
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
global_info->arPivotCacheFieldShortSize.push_back(fShortIitms);
|
||||
global_info->arPivotCacheFields.push_back(fAllAtoms);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
#include "SXFormula.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
SXFormula::SXFormula()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SXFormula::~SXFormula()
|
||||
{
|
||||
}
|
||||
|
||||
BaseObjectPtr SXFormula::clone()
|
||||
{
|
||||
return BaseObjectPtr(new SXFormula(*this));
|
||||
}
|
||||
|
||||
void SXFormula::readFields(CFRecord& record)
|
||||
{
|
||||
unsigned short reserved;
|
||||
|
||||
record >> reserved >> ifdb;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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;
|
||||
|
||||
short ifdb;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -35,8 +35,9 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
SXLI::SXLI()
|
||||
SXLI::SXLI(int count_)
|
||||
{
|
||||
count = count_;
|
||||
}
|
||||
|
||||
|
||||
@ -50,18 +51,16 @@ BaseObjectPtr SXLI::clone()
|
||||
}
|
||||
|
||||
void SXLI::readFields(CFRecord& record)
|
||||
{// 0 or 2 records SXLIItem
|
||||
int size_item = (record.getDataSize() - record.getRdPtr()) / 2;
|
||||
|
||||
if (size_item < 8)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
//??
|
||||
return;
|
||||
}
|
||||
int size_item = record.getDataSize() - record.getRdPtr();
|
||||
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
SXLIItem item;
|
||||
if (size_item < 8)
|
||||
{
|
||||
break;
|
||||
}
|
||||
SXLIItem item = {};
|
||||
|
||||
unsigned short flags;
|
||||
|
||||
@ -74,13 +73,24 @@ void SXLI::readFields(CFRecord& record)
|
||||
item.fGrand = GETBIT(flags, 11);
|
||||
item.fMultiDataOnAxis = GETBIT(flags, 12);
|
||||
|
||||
int count = (size_item - 8) / 2;
|
||||
if (item.fGrand)
|
||||
item.isxviMac = 1;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
if (item.cSic > item.isxviMac)
|
||||
item.cSic = item.isxviMac;
|
||||
|
||||
if (item.fSbt && item.itmType < 0x000D)
|
||||
item.isxviMac++;
|
||||
|
||||
for (short i = 0; i < count/*item.isxviMac*/; i++)
|
||||
{
|
||||
short val; record >> val;
|
||||
item.rgisxvi.push_back(val);
|
||||
if (val >= 0x0000 && val <= 0x7EF4)
|
||||
{
|
||||
item.rgisxvi.push_back(val);
|
||||
}
|
||||
}
|
||||
|
||||
m_arItems.push_back(item);
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ class SXLI: public BiffRecordContinued
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(SXLI)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(SXLI)
|
||||
public:
|
||||
SXLI();
|
||||
SXLI(int count_);
|
||||
~SXLI();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
@ -65,6 +65,7 @@ public:
|
||||
static const ElementType type = typeSXLI;
|
||||
|
||||
std::vector<SXLIItem> m_arItems;
|
||||
int count;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "SXString.h"
|
||||
|
||||
#include "../../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -39,12 +39,10 @@ SXString::SXString()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SXString::~SXString()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr SXString::clone()
|
||||
{
|
||||
return BaseObjectPtr(new SXString(*this));
|
||||
@ -61,6 +59,27 @@ 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;
|
||||
}
|
||||
|
||||
std::wstring SXString::value()
|
||||
{
|
||||
std::wstring s = segment.value();
|
||||
XmlUtils::replace_all(s, L"\x0d", L"_x000d_");
|
||||
XmlUtils::replace_all(s, L"\x0a", L"_x000a_");
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -49,6 +49,10 @@ public:
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
std::wstring value();
|
||||
|
||||
int serialize(std::wostream & strm);
|
||||
|
||||
static const ElementType type = typeSXString;
|
||||
|
||||
unsigned short cch;
|
||||
|
||||
@ -57,8 +57,8 @@ void SXVI::readFields(CFRecord& record)
|
||||
|
||||
fHidden = GETBIT(flags, 0);
|
||||
fHideDetail = GETBIT(flags, 1);
|
||||
fFormula = GETBIT(flags, 4);
|
||||
fMissing = GETBIT(flags, 5);
|
||||
fFormula = GETBIT(flags, 3);
|
||||
fMissing = GETBIT(flags, 4);
|
||||
|
||||
if (cchName > 0 && cchName < 0xFFFF)
|
||||
{
|
||||
@ -67,6 +67,39 @@ void SXVI::readFields(CFRecord& record)
|
||||
|
||||
}
|
||||
}
|
||||
int SXVI::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"item")
|
||||
{
|
||||
if (fMissing) CP_XML_ATTR(L"m", 1);
|
||||
if (fHideDetail)CP_XML_ATTR(L"sd", 0);
|
||||
if (fFormula) CP_XML_ATTR(L"f", 1);
|
||||
|
||||
if (itmType == 0)
|
||||
{
|
||||
if (fHidden) CP_XML_ATTR(L"h", 1);
|
||||
CP_XML_ATTR(L"x", iCache);
|
||||
}
|
||||
switch(itmType)
|
||||
{
|
||||
case 0x0001: CP_XML_ATTR(L"t", L"default"); break;
|
||||
case 0x0002: CP_XML_ATTR(L"t", L"sum"); break;
|
||||
case 0x0003: CP_XML_ATTR(L"t", L"countA"); break;
|
||||
case 0x0004: CP_XML_ATTR(L"t", L"avg"); break;
|
||||
case 0x0005: CP_XML_ATTR(L"t", L"max"); break;
|
||||
case 0x0006: CP_XML_ATTR(L"t", L"min"); break;
|
||||
case 0x0007: CP_XML_ATTR(L"t", L"product"); break;
|
||||
case 0x0008: CP_XML_ATTR(L"t", L"count"); break;
|
||||
case 0x0009: CP_XML_ATTR(L"t", L"stdDev"); break;
|
||||
case 0x000a: CP_XML_ATTR(L"t", L"stdDevP"); break;
|
||||
case 0x000b: CP_XML_ATTR(L"t", L"var"); break;
|
||||
case 0x000c: CP_XML_ATTR(L"t", L"varP"); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,6 +48,8 @@ public:
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
int serialize(std::wostream & strm);
|
||||
|
||||
static const ElementType type = typeSXVI;
|
||||
|
||||
unsigned short itmType; //enum
|
||||
|
||||
@ -37,7 +37,7 @@ namespace XLS
|
||||
|
||||
Setup::Setup()
|
||||
// the following may appear uninitialized but we have to store them
|
||||
: iPaperSize(0), iScale(255), iRes(0), iVRes(0), iCopies(0), fNoOrient(false), fPortrait(false), iPageStart(1)
|
||||
: iPaperSize(0), iScale(255), iRes(0), iVRes(0), iCopies(0), fNoOrient(false), fPortrait(false), iPageStart(1), iErrors(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -56,16 +56,17 @@ void Setup::readFields(CFRecord& record)
|
||||
{
|
||||
unsigned short flags;
|
||||
record >> iPaperSize >> iScale >> iPageStart >> iFitWidth >> iFitHeight >> flags;
|
||||
|
||||
fLeftToRight = GETBIT(flags, 0);
|
||||
fPortrait = GETBIT(flags, 1);
|
||||
fNoPls = GETBIT(flags, 2);
|
||||
fNoColor = GETBIT(flags, 3);
|
||||
fDraft = GETBIT(flags, 4);
|
||||
fNotes = GETBIT(flags, 5);
|
||||
fNoOrient = GETBIT(flags, 6);
|
||||
fUsePage = GETBIT(flags, 7);
|
||||
fEndNotes = GETBIT(flags, 9);
|
||||
iErrors = GETBITS(flags, 10, 11);
|
||||
fPortrait = GETBIT(flags, 1);
|
||||
fNoPls = GETBIT(flags, 2);
|
||||
fNoColor = GETBIT(flags, 3);
|
||||
fDraft = GETBIT(flags, 4);
|
||||
fNotes = GETBIT(flags, 5);
|
||||
fNoOrient = GETBIT(flags, 6);
|
||||
fUsePage = GETBIT(flags, 7);
|
||||
fEndNotes = GETBIT(flags, 9);
|
||||
iErrors = GETBITS(flags, 10, 11);
|
||||
|
||||
record >> iRes >> iVRes >> numHdr >> numFtr >> iCopies;
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ namespace XLS
|
||||
|
||||
SheetExt::SheetExt()
|
||||
{
|
||||
icvPlain = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +62,7 @@ void SheetExt::readFields(CFRecord& record)
|
||||
_UINT32 flags;
|
||||
record >> flags;
|
||||
|
||||
icvPlain = static_cast<unsigned char>(GETBITS(flags, 0, 6));
|
||||
icvPlain = GETBITS(flags, 0, 6);
|
||||
|
||||
if(0x00000028 == cb)
|
||||
{
|
||||
|
||||
@ -37,6 +37,7 @@ namespace XLS
|
||||
|
||||
Style::Style()
|
||||
{
|
||||
ixfe = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
#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);
|
||||
}
|
||||
int SxBool::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"b")
|
||||
{
|
||||
|
||||
CP_XML_ATTR(L"v", val);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
*
|
||||
*/
|
||||
#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);
|
||||
|
||||
int serialize(std::wostream & strm);
|
||||
|
||||
static const ElementType type = typeSxBool;
|
||||
|
||||
bool val;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -54,7 +54,6 @@ public:
|
||||
|
||||
DXFN dxfn;
|
||||
XFExtNoFRT xfext;
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -37,6 +37,7 @@ namespace XLS
|
||||
|
||||
SxFilt::SxFilt()
|
||||
{
|
||||
isxvd = iDim = cisxvi = grbitSbt = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -52,18 +53,18 @@ BaseObjectPtr SxFilt::clone()
|
||||
|
||||
void SxFilt::readFields(CFRecord& record)
|
||||
{
|
||||
unsigned short flags1;
|
||||
unsigned char flags2;
|
||||
unsigned short flags1, flags2;
|
||||
|
||||
record >> flags1 >> isxvd >> flags2 >> grbitSbt >> cisxvi;
|
||||
record >> flags1 >> flags2 >> grbitSbt >> cisxvi;
|
||||
|
||||
sxaxisRw = GETBIT(flags1, 0);
|
||||
sxaxisCol = GETBIT(flags1, 1);
|
||||
sxaxisPage = GETBIT(flags1, 2);
|
||||
sxaxisData = GETBIT(flags1, 3);
|
||||
iDim = GETBITS(flags1, 4, 15);
|
||||
iDim = GETBITS(flags1, 6, 15);
|
||||
|
||||
fSelected = GETBIT(flags2, 0);
|
||||
isxvd = GETBITS(flags2, 0, 9);
|
||||
fSelected = GETBIT(flags2, 10);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -54,11 +54,13 @@ public:
|
||||
bool sxaxisCol;
|
||||
bool sxaxisPage;
|
||||
bool sxaxisData;
|
||||
unsigned short iDim;
|
||||
unsigned short isxvd;
|
||||
|
||||
char iDim;
|
||||
char isxvd;
|
||||
|
||||
bool fSelected;
|
||||
|
||||
unsigned short grbitSbt;
|
||||
short grbitSbt;
|
||||
unsigned short cisxvi;
|
||||
};
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class SxItm: public BiffRecordContinued
|
||||
class SxItm: public BiffRecordContinued
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(SxItm)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(SxItm)
|
||||
|
||||
@ -51,7 +51,6 @@ public:
|
||||
static const ElementType type = typeSxIvd;
|
||||
|
||||
std::vector<short> rgSxivd;
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user