Compare commits

..

53 Commits

Author SHA1 Message Date
16bdbafa75 fix for build 2017-09-08 10:40:25 +03:00
089871d3ae . 2017-09-07 19:35:58 +03:00
a43639587f Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  fix cfb
  fix cryptopp
2017-09-07 18:08:40 +03:00
46d022388d up 2017-09-07 18:08:28 +03:00
0366bcb341 fix cfb 2017-09-07 12:36:36 +03:00
ab3add9577 fix cryptopp 2017-09-07 11:39:50 +03:00
54939bca61 revert project 2017-09-07 10:27:18 +03:00
6bdfa26c7e up 2017-09-06 18:27:38 +03:00
a5bae64959 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  .
  x2t version up
  XlsFormat pivots .. fix after testing
  ppsm
  dotm2docx_dir, xltm2xlsx_dir, potm2pptx_dir in params.xml
  .
  getIsNoBase64 true by default
  docm->docx with params.xml
  XlsFormat - support macros x2t  - oom->oox
  fix derypt file
  .
  fix bug after testing
  fix bugs after testing
  variations for oox formats
2017-09-06 16:00:07 +03:00
4d04a0d649 up 2017-09-06 15:59:57 +03:00
fb7af5b902 update crypto++ to 5.6.5 2017-09-06 15:59:48 +03:00
77172fb39c Merge remote-tracking branch 'origin/release/v5.0.0' into develop 2017-09-06 14:34:25 +03:00
78ecdc676c . 2017-09-05 18:27:29 +03:00
bbccdf009b x2t version up 2017-09-05 14:52:58 +03:00
4b26066377 XlsFormat pivots .. fix after testing 2017-09-05 13:59:00 +03:00
8742163d51 ppsm 2017-09-05 13:48:57 +03:00
212753f831 dotm2docx_dir, xltm2xlsx_dir, potm2pptx_dir in params.xml 2017-09-01 15:58:10 +03:00
903236d890 . 2017-09-01 15:35:38 +03:00
15bd732b22 getIsNoBase64 true by default 2017-09-01 14:51:27 +03:00
3e86bf7644 docm->docx with params.xml 2017-09-01 14:45:40 +03:00
d6cd7c30f5 XlsFormat - support macros
x2t  - oom->oox
2017-09-01 13:29:13 +03:00
89b384abfe fix derypt file 2017-09-01 10:52:35 +03:00
f54baf3aa8 . 2017-08-31 18:50:01 +03:00
b2184f7167 fix bug after testing 2017-08-31 16:27:11 +03:00
3a10eabfe9 fix bugs after testing 2017-08-31 15:33:49 +03:00
f9e80f3602 variations for oox formats 2017-08-31 15:09:17 +03:00
80b1e5e886 . 2017-08-25 19:42:58 +03:00
d1a7800f36 restore commit DocBuilder 2017-08-25 17:22:36 +03:00
e223ffd0db Merge remote-tracking branch 'origin/release/v5.0.0' into develop 2017-08-25 17:14:15 +03:00
b140f4b521 fix revert up (from release) 2017-08-25 17:11:59 +03:00
2d570818be fix docx under office 2007 2017-08-25 12:07:18 +03:00
1462f08825 Added multithread flag 2017-08-24 19:37:22 +03:00
92fb4ac40b . 2017-08-24 19:21:00 +03:00
2bf55b7c8b Merge pull request #38 from ONLYOFFICE/release/v5.0.0
Release/v5.0.0
2017-08-24 19:01:31 +03:00
cf2159cd54 Merge commit '50f47caea96d96f16cbb301b4283beabc29798d1' into develop 2017-08-24 17:59:14 +03:00
decfeec7a1 Merge branch 'release/v5.0.0' of https://github.com/ONLYOFFICE/core into release/v5.0.0 2017-08-24 17:52:28 +03:00
50f47caea9 fix write video/audio in oox 2017-08-24 17:51:43 +03:00
89cd81ecfd Added 'deploy' target 2017-08-24 17:25:23 +03:00
8df6286e80 Merge remote-tracking branch 'origin/release/v5.0.0' into develop 2017-08-24 16:23:10 +03:00
e947c91a7b . 2017-08-24 16:22:03 +03:00
ef53ac4c63 RtfFormatReader - fix styles (change equals id & name) 2017-08-24 16:05:47 +03:00
f50dd716ad . 2017-08-24 14:37:52 +03:00
54d0260ea2 Merge remote-tracking branch 'origin/release/v5.0.0' into develop
# Conflicts:
#	XlsxSerializerCom/Writer/BinaryReader.h
2017-08-24 13:40:13 +03:00
2577365e08 RtfFormatWriter - small refactoring + fix users file 2017-08-24 13:34:08 +03:00
792a722063 Revert "up"
This reverts commit a7a78a09c1.
2017-08-24 12:09:29 +03:00
00df026108 fix open docx by office2007 2017-08-23 19:05:21 +03:00
56a4e80c83 XlsFormat - tabletyled pivot tables 2017-08-23 13:23:49 +03:00
a7a78a09c1 up 2017-08-23 11:29:42 +03:00
6f93eeae69 disable base64 on save to T format 2017-08-23 10:11:05 +03:00
0fc749f839 Merge remote-tracking branch 'origin/release/v5.0.0' into develop 2017-08-21 19:14:46 +03:00
c0a061f2cb Merge remote-tracking branch 'origin/release/v5.0.0' into develop 2017-08-21 12:10:37 +03:00
65e7372cf7 Merge remote-tracking branch 'origin/release/v5.0.0' into develop 2017-08-18 16:07:56 +03:00
1ea27ad7f8 Added multithread flag 2017-08-18 15:45:06 +03:00
521 changed files with 115724 additions and 130973 deletions

3
.gitignore vendored
View File

@ -45,3 +45,6 @@ OfficeUtils/win32/OfficeUtilsLib/OfficeUtilsLib/ReadMe.txt
*.tlb
*.idb
**/.hg
*.zip
*.tar.gz
**/*.build/

View File

@ -483,26 +483,27 @@ namespace DocFileFormat
delete storageOut;
return false;
}
DecryptStream( 0, "/", storageIn, storageOut, Decryptor);
std::list<std::string> listStream = storageIn->entries();
//std::list<std::string> listStream = storageIn->entries();
for (std::list<std::string>::iterator it = listStream.begin(); it != listStream.end(); it++)
{
if (storageIn->isDirectory(*it))
{
std::list<std::string> list_entry = storageIn->GetAllStreams(*it);
for (std::list<std::string>::iterator it2 = list_entry.begin(); it2 != list_entry.end(); it2++)
{
DecryptStream(Decryptor, *it2, storageIn, storageOut);
}
}
else
{
DecryptStream(Decryptor, *it, storageIn, storageOut);
}
//for (std::list<std::string>::iterator it = listStream.begin(); it != listStream.end(); it++)
//{
// if (storageIn->isDirectory(*it))
// {
// std::list<std::string> list_entry = storageIn->GetAllStreams(*it);
//
// for (std::list<std::string>::iterator it2 = list_entry.begin(); it2 != list_entry.end(); it2++)
// {
// DecryptStream(Decryptor, *it2, storageIn, storageOut);
// }
// }
// else
// {
// DecryptStream(Decryptor, *it, storageIn, storageOut);
// }
}
//}
storageOut->close();
delete storageOut;
@ -525,34 +526,28 @@ namespace DocFileFormat
}
return true;
}
bool WordDocument::CopyStream (std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut)
void WordDocument::DecryptStream( int level, std::string path, POLE::Storage * storageIn, POLE::Storage * storageOut, CRYPT::Decryptor* Decryptor)
{
POLE::Stream *stream = new POLE::Stream(storageIn, streamName);
if (!stream) return false;
stream->seek(0);
int sz_stream = stream->size();
POLE::Stream *streamNew = new POLE::Stream(storageOut, streamName, true, sz_stream);
if (!streamNew) return false;
unsigned char* data_stream = new unsigned char[sz_stream];
stream->read(data_stream, sz_stream);
streamNew->write(data_stream, sz_stream);
RELEASEARRAYOBJECTS(data_stream);
streamNew->flush();
delete streamNew;
delete stream;
return true;
std::list<std::string> entries;
entries = storageIn->entries( path );
std::list<std::string>::iterator it;
for( it = entries.begin(); it != entries.end(); ++it )
{
std::string name = *it;
std::string fullname = path + name;
if( storageIn->isDirectory( fullname ) )
{
DecryptStream( level + 1, fullname + "/", storageIn, storageOut, Decryptor );
}
else
{
DecryptStream(fullname, storageIn, storageOut, Decryptor );
}
}
}
bool WordDocument::DecryptStream(CRYPT::Decryptor* Decryptor, std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut)
bool WordDocument::DecryptStream(std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut, CRYPT::Decryptor* Decryptor)
{
POLE::Stream *stream = new POLE::Stream(storageIn, streamName);
if (!stream) return false;
@ -567,9 +562,9 @@ namespace DocFileFormat
stream->read(data_stream, size_stream);
unsigned char* data_store = NULL;
int size_data_store = 0;
int size_data_store = 0;
if ("WordDocument" == streamName)
if ( std::wstring::npos != streamName.find("WordDocument") )
{
size_data_store = 68;
data_store = new unsigned char[size_data_store];

View File

@ -102,9 +102,10 @@ namespace DocFileFormat
private:
bool DecryptOfficeFile (CRYPT::Decryptor* Decryptor);
bool DecryptStream (CRYPT::Decryptor* Decryptor, std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut);
bool CopyStream (std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut);
bool DecryptStream (std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut, CRYPT::Decryptor* Decryptor);
void DecryptStream (int level, std::string streamName, POLE::Storage * storageIn, POLE::Storage * storageOut, CRYPT::Decryptor* Decryptor);
inline StructuredStorageReader* GetStorage() const
{
return m_pStorage;

View File

@ -54,7 +54,22 @@ namespace Writers
NSFile::CFileBinary oFile;
oFile.CreateFileW(filePath.GetPath());
oFile.WriteStringUTF8( std::wstring(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>")));
oFile.WriteStringUTF8( std::wstring(_T("<w:document xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" mc:Ignorable=\"w14 wp14\">")));
oFile.WriteStringUTF8( std::wstring(_T("<w:document \
xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" \
xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" \
xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" \
xmlns:v=\"urn:schemas-microsoft-com:vml\" \
xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" \
xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" \
xmlns:w10=\"urn:schemas-microsoft-com:office:word\" \
xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" \
xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" \
xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" \
xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" \
xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" \
xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" \
xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" \
mc:Ignorable=\"w14 wp14\">")));
oFile.WriteStringUTF8(m_oBackground.GetData());

View File

@ -36,7 +36,7 @@ namespace BinDocxRW {
int Binary_VbaProjectTableReader::Read()
{
m_oFileWriter.m_pVbaProject = new OOX::VbaProject();
m_oFileWriter.m_pVbaProject = new OOX::VbaProject();
m_oFileWriter.m_pVbaProject->fromPPTY(&m_oBufferedStream);
return c_oSerConstants::ReadOk;
@ -118,4 +118,4 @@ int Binary_HdrFtrTableReader::ReadHdrFtrItemContent(BYTE type, long length, void
return pBinary_DocumentTableReader->ReadDocumentContent(type, length, NULL);
}
}
}

View File

@ -285,7 +285,7 @@ public:
}
int Read ();
};
};
class Binary_HdrFtrTableReader : public Binary_CommonReader<Binary_HdrFtrTableReader>
{

View File

@ -95,7 +95,7 @@ bool BinDocxRW::CDocxSerializer::saveToFile(const std::wstring& sSrcFileName, co
oDrawingConverter.SetMainDocument(this);
oDrawingConverter.SetDstPath(pathMain.GetDirectory() + FILE_SEPARATOR_STR + L"word");
oDrawingConverter.SetMediaDstPath(pathMedia.GetPath());
oDrawingConverter.SetMediaDstPath(pathMedia.GetPath());
m_pParamsWriter = new ParamsWriter(&oBufferedStream, &fp, &oDrawingConverter, pEmbeddedFontsManager);
@ -265,10 +265,10 @@ bool BinDocxRW::CDocxSerializer::loadFromFile(const std::wstring& sSrcFileName,
if (NULL != pData)
{
oDrawingConverter.SetMainDocument(this);
oDrawingConverter.SetMainDocument(this);
oDrawingConverter.SetDstPath(sDstPath + FILE_SEPARATOR_STR + L"word");
oDrawingConverter.SetMediaDstPath(sMediaPath);
oDrawingConverter.SetMediaDstPath(sMediaPath);
oDrawingConverter.SetEmbedDstPath(sEmbedPath);
m_pCurFileWriter = new Writers::FileWriter(sDstPath, m_sFontDir, false, nVersion, m_bSaveChartAsImg, &oDrawingConverter, sThemePath);

View File

@ -88,12 +88,12 @@ namespace BinXlsxRW{
{
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
NSBinPptxRW::CDrawingConverter oDrawingConverter;
NSBinPptxRW::CDrawingConverter oDrawingConverter;
oDrawingConverter.SetDstPath(sDstPath + FILE_SEPARATOR_STR + L"xl");
oDrawingConverter.SetSrcPath(strFileInDir, 2);
oDrawingConverter.SetMediaDstPath(sMediaDir);
oDrawingConverter.SetMediaDstPath(sMediaDir);
oDrawingConverter.SetEmbedDstPath(sEmbedDir);
BinXlsxRW::BinaryFileReader oBinaryFileReader;

View File

@ -314,7 +314,7 @@
17E17ED41AC453F800BEA2EA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17E17ED71AC453F800BEA2EA /* Build configuration list for PBXProject "ASCOfficeDocxFile2Lib" */;
@ -446,8 +446,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
@ -455,6 +457,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -488,8 +491,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
@ -497,6 +502,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -32,6 +32,7 @@
#pragma once
#include <string>
#include <vector>
#include "../include/cpdoccore/CPScopedPtr.h"
namespace cpdoccore {
@ -58,6 +59,8 @@ public:
//Sheet2.C3:Sheet2.C19 -> Sheet2!C3:C19
std::wstring convert_chart_distance(std::wstring const & expr);
void split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out);
std::wstring convert_ref(std::wstring const & expr);

View File

@ -32,7 +32,6 @@
#include "formulasconvert.h"
#include <boost/regex.hpp>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include"../../Common/DocxFormat/Source/XML/Utils.h"
@ -46,6 +45,9 @@ namespace formulasconvert {
std::wstring convert(const std::wstring& expr);
std::wstring convert_chart_distance(const std::wstring& expr);
void split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out);
void replace_cells_range(std::wstring& expr, bool withTableName);
bool check_formula(std::wstring& expr);
void replace_semicolons(std::wstring& expr);
@ -189,7 +191,7 @@ namespace formulasconvert {
if (convert_with_TableName)
{
return (sheet1 + L"!") + c1 + (c2.empty() ? L"" : (L":" + c3) );
return (sheet1 + L"!") + c1 + (c3.empty() ? L"" : (L":" + c3) );
}
else
{
@ -389,25 +391,24 @@ namespace formulasconvert {
std::wstring forbidden_formulas[] =
{
L"NULLFORMULA"
/*
L"BETADIST",
L"CEILING",
L"FLOOR",
L"RANK",
L"ROUND",
L"ROUNDDOWN",
L"ROUNDUP",
L"SUBTOTAL",
L"FORMULA",
L"ISREF"*/
L"NULLFORMULA"
//L"BETADIST",
//L"CEILING",
//L"FLOOR",
//L"RANK",
//L"ROUND",
//L"ROUNDDOWN",
//L"ROUNDUP",
//L"SUBTOTAL",
//L"FORMULA",
//L"ISREF"
};
bool is_forbidden(const std::wstring & formula)
{
BOOST_FOREACH(const std::wstring & s, forbidden_formulas)
for (size_t i = 0; i < 1/*forbidden_formulas.size()*/; i++)
{
if (boost::algorithm::contains(formula, s))
if (boost::algorithm::contains(formula, forbidden_formulas[i]))
return true;
}
return false;
@ -490,10 +491,30 @@ namespace formulasconvert {
return workstr;
}
void odf2oox_converter::Impl::split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out)
{
std::wstring workstr = expr;
boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// поиск того что в апострофах и замена там
workstr = boost::regex_replace(
expr,
complexRef,
&replace_point_space,
boost::match_default | boost::format_all);
boost::algorithm::split(out, workstr, boost::algorithm::is_any_of(by), boost::algorithm::token_compress_on);
for (size_t i = 0; i < out.size(); i++)
{
XmlUtils::replace_all( out[i], L"PROBEL", L" ");
XmlUtils::replace_all( out[i], L"TOCHKA", L".");
}
}
//Sheet2.C3:Sheet2.C19 Sheet2.L29:Sheet2.L36
//в
//Sheet2!C3:C19,Sheet2!L27:L34
std::wstring odf2oox_converter::Impl::convert_chart_distance(const std::wstring& expr)
{
if (is_forbidden(expr))
@ -515,25 +536,27 @@ namespace formulasconvert {
boost::algorithm::split(distance_inp, workstr, boost::algorithm::is_any_of(L" "), boost::algorithm::token_compress_on);
BOOST_FOREACH(std::wstring &d,distance_inp)
for (size_t i = 0; i < distance_inp.size(); i++)
{
std::wstring sheet;
std::vector<std::wstring> range;
std::vector<std::wstring> cells;
boost::algorithm::split(range,d, boost::algorithm::is_any_of(L":"), boost::algorithm::token_compress_on);
boost::algorithm::split(range, distance_inp[i], boost::algorithm::is_any_of(L":"), boost::algorithm::token_compress_on);
BOOST_FOREACH(std::wstring &c,range)
for (size_t j = 0; j < range.size(); j++)
{
const std::string::size_type colon = c.find('.');
cells.push_back(c.substr(colon+1));
if (sheet.size()<1)
sheet=c.substr(0, colon);
const std::string::size_type colon = range[j].find('.');
cells.push_back(range[j].substr(colon + 1));
if (sheet.size() < 1)
{
sheet = range[j].substr(0, colon);
}
}
std::wstring cells_out;
BOOST_FOREACH(std::wstring &c,cells)
for (size_t j = 0; j < cells.size(); j++)
{
cells_out.append(c);
cells_out.append(cells[j]);
cells_out.append(L":");
}
int res1 = sheet.find(L"-");
@ -544,19 +567,19 @@ namespace formulasconvert {
sheet = L"'" + sheet + L"'";
}
distance_out.push_back(sheet+L"!" + cells_out.substr(0, cells_out.size()-1));
distance_out.push_back(sheet + L"!" + cells_out.substr(0, cells_out.size()-1));
}
std::wstring result;
BOOST_FOREACH(std::wstring &d, distance_out)
for (size_t i = 0; i < distance_out.size(); i++)
{
result.append(d);
result.append(distance_out[i]);
result.append(L",");
}
XmlUtils::replace_all( result, L"PROBEL" , L" ");
XmlUtils::replace_all( result, L"TOCHKA" , L".");
XmlUtils::replace_all( result, L"TOCHKA", L".");
return result.substr(0, result.size()-1);// минус последняя лишняя запятая
return result.substr(0, result.size() - 1);// минус последняя лишняя запятая
}
odf2oox_converter::odf2oox_converter(): impl_(new odf2oox_converter::Impl)
{
@ -579,6 +602,10 @@ namespace formulasconvert {
{
return impl_->convert_chart_distance(expr);
}
void odf2oox_converter::split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out)
{
return impl_->split_distance_by(expr, by, out);
}
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
{
boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// поиск того что в апострофах и замена там

View File

@ -588,7 +588,7 @@ namespace NSPresentationEditor
#else
std::wstring ConvertPPTtoPPTX(CPPTShape* pPPTShape, const NSGuidesVML::CFormParam& pCoef, bool bIsNamespace = false)
{
if (pPPTShape->m_eType == PPTShapes::sptCRect)
if (pPPTShape->m_eType == PPTShapes::sptCRect || pPPTShape->m_eType == PPTShapes::sptCFrame)
{
if (bIsNamespace)
{
@ -604,7 +604,14 @@ namespace NSPresentationEditor
}
return _T("<a:prstGeom prst=\"line\"><a:avLst/></a:prstGeom>");
}
else if (pPPTShape->m_eType == PPTShapes::sptCEllipse)
{
if (bIsNamespace)
{
return _T("<a:prstGeom xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" prst=\"line\"><a:avLst/></a:prstGeom>");
}
return _T("<a:prstGeom prst=\"ellipse\"><a:avLst/></a:prstGeom>");
}
std::wstring strXmlPPTX = bIsNamespace ? _T("<a:custGeom xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">") : _T("<a:custGeom>");
CFormulaConverter pFormulaConverter;

View File

@ -121,7 +121,7 @@ namespace PPTX
oAttr.Write(_T("noSelect"), noSelect);
std::wstring namespaceLocks = L"a";
if (m_namespace == L"wp") namespaceLocks = L"wp";
//if (m_namespace == L"wp") namespaceLocks = L"wp";
return XmlUtils::CreateNode(m_namespace + L":cNvGraphicFramePr", oAttr.m_strValue.empty() ? L"" : XmlUtils::CreateNode(namespaceLocks + L":graphicFrameLocks", oAttr));
}
@ -134,7 +134,7 @@ namespace PPTX
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX) namespace_ = L"xdr";
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
{
namespaceLock_ = L"wp";
namespaceLock_ = L"a";
namespace_ = L"wp";
}

View File

@ -160,7 +160,8 @@ namespace PPTX
COfficeFileFormatChecker office_checker;
office_checker.isOOXFormatFile(oox_file.GetPath());
//if ( std::wstring::npos != sProgID.find(L"Word.Document"))
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX)
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX ||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM )
{
pWriter->StartRecord(1);
pWriter->WriteBYTE(1);
@ -189,7 +190,8 @@ namespace PPTX
*pWriter->m_pCurrentContainer = old_rels;
pWriter->m_pMainDocument = old_serial;
}
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX)
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX ||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM)
//if ( std::wstring::npos != sProgID.find(L"Excel.Sheet")) //"ET.Xlsx.6" !!!
{
pWriter->StartRecord(1);
@ -905,23 +907,28 @@ namespace PPTX
}
if (!blipFill.blip->mediaRid.empty())
{
PPTX::Logic::Ext ext;
PPTX::Logic::Ext ext;
ext.link = OOX::RId(blipFill.blip->mediaRid);
nvPicPr.nvPr.extLst.push_back(ext);
int nRId = -1;
std::wstring strMediaRelsPath;
if (pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_DOCX) strMediaRelsPath = L"media/";
else strMediaRelsPath = L"../media/";
smart_ptr<OOX::Media> mediaFile = blipFill.additionalFile.smart_dynamic_cast<OOX::Media>();
strMediaRelsPath += mediaFile->filename().GetFilename();
int nRId = -1;
if (blipFill.additionalFile.is<OOX::Audio>())
{
nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"audioFile");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio",
L"NULL", L"External");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio", strMediaRelsPath, L"");
}
if (blipFill.additionalFile.is<OOX::Video>())
{
nvPicPr.nvPr.media.Media = new PPTX::Logic::MediaFile(L"videoFile");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",
L"NULL", L"External");
nRId = pReader->m_pRels->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video", strMediaRelsPath, L"");
}
if (nvPicPr.nvPr.media.Media.IsInit() && nRId > 0)

View File

@ -1922,7 +1922,7 @@
17063B5B1AC5708E0056A3F1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17063B5E1AC5708E0056A3F1 /* Build configuration list for PBXProject "PPTXFormatLib" */;
@ -2009,8 +2009,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
@ -2018,6 +2020,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -2051,8 +2054,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
@ -2060,6 +2065,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -44,13 +44,13 @@ int OOXGraphicReader::Parse( ReaderParameter oParam , RtfShapePtr & pOutput)
{
if (m_ooxGraphic->element.getType() == OOX::et_p_ShapeTree)
{
OOXShapeReader shapeReader(m_ooxGraphic->element.GetElem().operator->());
return (shapeReader.Parse(oParam, pOutput) ? 1 : 0);
OOXShapeGroupReader groupReader(dynamic_cast<PPTX::Logic::SpTree*>(m_ooxGraphic->element.GetElem().operator->()));
return (groupReader.Parse(oParam, pOutput) ? 1 : 0);
}
else
{
OOXShapeGroupReader groupReader(dynamic_cast<PPTX::Logic::SpTree*>(m_ooxGraphic->element.GetElem().operator->()));
return (groupReader.Parse(oParam, pOutput) ? 1 : 0);
OOXShapeReader shapeReader(m_ooxGraphic->element.GetElem().operator->());
return (shapeReader.Parse(oParam, pOutput) ? 1 : 0);
}
}
if (m_ooxGraphic->olePic.IsInit())

View File

@ -1003,7 +1003,7 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
oNewProperty = oParam.oRtf->m_oDefaultCharProp;
//применяем внешний стиль
//oNewProperty.Merge( oOutputParagraph.m_oProperty.m_oCharProperty );
oNewProperty.Merge( oOutputParagraph.m_oProperty.m_oCharProperty );
oNewProperty.Merge( m_oCharProperty );
if( NULL != poStyle && TYPE_RTF_PROPERTY_STYLE_CHAR == poStyle->GetType() )

View File

@ -49,6 +49,15 @@ public:
pOutput->m_eAnchorTypeShape = RtfShape::st_anchor;
if ( m_ooxAnchor->m_oDocPr.IsInit() )
{
pOutput->m_nID = m_ooxAnchor->m_oDocPr->id + 1025;
pOutput->m_sName = m_ooxAnchor->m_oDocPr->name;
if (m_ooxAnchor->m_oDocPr->descr.IsInit())
pOutput->m_sDescription = m_ooxAnchor->m_oDocPr->descr.get();
}
pOutput->m_bAllowOverlap = m_ooxAnchor->m_oAllowOverlap.IsInit() ? m_ooxAnchor->m_oAllowOverlap->ToBool() : false;
pOutput->m_nZOrderRelative = m_ooxAnchor->m_oBehindDoc.IsInit() ? m_ooxAnchor->m_oBehindDoc->ToBool() : false;
pOutput->m_bHidden = m_ooxAnchor->m_oHidden.IsInit() ? m_ooxAnchor->m_oHidden->ToBool() : false;

View File

@ -77,6 +77,15 @@ public:
}
}
}
if ( m_ooxInline->m_oDocPr.IsInit() )
{
pOutput->m_nID = m_ooxInline->m_oDocPr->id + 1025;
pOutput->m_sName = m_ooxInline->m_oDocPr->name;
if (m_ooxInline->m_oDocPr->descr.IsInit())
pOutput->m_sDescription = m_ooxInline->m_oDocPr->descr.get();
}
OOXGraphicReader oGraphicReader(&m_ooxInline->m_oGraphic);

View File

@ -749,32 +749,44 @@ bool OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::L
if( PROP_DEF != nCropedWidthGoal )
{
//делаем crop
double nCropLeft = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->l.get()) / 100. ;
//pOutput->m_oPicture->m_nCropL = nCropLeft * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
pOutput->m_oPicture->m_nCropL = (int)(nCropLeft * pOutput->m_oPicture->m_nWidthGoal);
pOutput->m_nCropFromLeft = (int)(nCropLeft* 65536);
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropL;
if (oox_bitmap_fill->srcRect->l.IsInit())
{
double nCropLeft = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->l.get()) / 100. ;
//pOutput->m_oPicture->m_nCropL = nCropLeft * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
pOutput->m_oPicture->m_nCropL = (int)(nCropLeft * pOutput->m_oPicture->m_nWidthGoal);
pOutput->m_nCropFromLeft = (int)(nCropLeft* 65536);
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropL;
}
double nCropRight = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->r.get()) / 100. ;
//pOutput->m_oPicture->m_nCropR = nCropRight * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
pOutput->m_oPicture->m_nCropR = (int)(nCropRight * pOutput->m_oPicture->m_nWidthGoal);
pOutput->m_nCropFromRight = (int)(nCropRight * 65536);
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropR;
if (oox_bitmap_fill->srcRect->r.IsInit())
{
double nCropRight = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->r.get()) / 100. ;
//pOutput->m_oPicture->m_nCropR = nCropRight * pOutput->m_oPicture->m_nWidthGoal * pOutput->m_oPicture->m_nScaleX / 100;
pOutput->m_oPicture->m_nCropR = (int)(nCropRight * pOutput->m_oPicture->m_nWidthGoal);
pOutput->m_nCropFromRight = (int)(nCropRight * 65536);
nCropedWidthGoal -= pOutput->m_oPicture->m_nCropR;
}
}
int nCropedHeightGoal = pOutput->m_oPicture->m_nHeightGoal;
if( PROP_DEF != nCropedHeightGoal )
{
double nCropTop = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->t.get()) / 100. ;
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
pOutput->m_oPicture->m_nCropT = (int)(nCropTop * pOutput->m_oPicture->m_nHeightGoal);
pOutput->m_nCropFromTop = (int)(nCropTop * 65536);
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropT;
if (oox_bitmap_fill->srcRect->t.IsInit())
{
double nCropTop = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->t.get()) / 100. ;
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
pOutput->m_oPicture->m_nCropT = (int)(nCropTop * pOutput->m_oPicture->m_nHeightGoal);
pOutput->m_nCropFromTop = (int)(nCropTop * 65536);
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropT;
}
double nCropBottom = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->b.get()) / 100. ;
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
pOutput->m_oPicture->m_nCropB = (int)(nCropBottom * pOutput->m_oPicture->m_nHeightGoal);
pOutput->m_nCropFromBottom = (int)(nCropBottom * 65536);
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropB;
if (oox_bitmap_fill->srcRect->b.IsInit())
{
double nCropBottom = XmlUtils::GetInteger( oox_bitmap_fill->srcRect->b.get()) / 100. ;
//pOutput->m_oPicture->m_nCropT = nCropTop * pOutput->m_oPicture->m_nHeightGoal * pOutput->m_oPicture->m_dScaleY / 100;
pOutput->m_oPicture->m_nCropB = (int)(nCropBottom * pOutput->m_oPicture->m_nHeightGoal);
pOutput->m_nCropFromBottom = (int)(nCropBottom * 65536);
nCropedHeightGoal -= pOutput->m_oPicture->m_nCropB;
}
}
//устанавливаем scale
if( PROP_DEF != pOutput->m_nLeft && PROP_DEF != pOutput->m_nRight && PROP_DEF != nCropedWidthGoal && 0 != nCropedWidthGoal )
@ -916,7 +928,7 @@ void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::L
}
if (oox_line_prop->w.IsInit())
{
pOutput->m_nLineWidth = oox_line_prop->w.get() * 12700;
pOutput->m_nLineWidth = oox_line_prop->w.get();
}
if (oox_line_prop->headEnd.IsInit())
{
@ -1006,22 +1018,50 @@ void OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::
// //Parse(theme->m_oThemeElements.m_oFmtScheme.m_oEffectStyleLst.m_arrEffectStyle[fmt_index].m_oSp3D.GetPointer(), &color);
//}
}
//-----------------------------------------------------------------------------------------------------------------------------
bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
void OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::Xfrm *xfrm)
{
if (!m_vmlElement && !m_arrElement && !m_ooxShape) return false;
if (!xfrm) return;
if (m_vmlElement || m_arrElement) return ParseVml(oParam , pOutput);
double rot = xfrm->rot.IsInit() ? xfrm->rot.get() / 60000. : 0;
if (rot > 0.01)
pOutput->m_nRotation = rot * 65535;
if (xfrm->flipH.get_value_or(false)) pOutput->m_bFlipH = 1;
if (xfrm->flipV.get_value_or(false)) pOutput->m_bFlipV = 1;
if (pOutput->m_bInGroup)
{
if (xfrm->offX.IsInit() && xfrm->offY.IsInit())
{
pOutput->m_nRelLeft = (int)xfrm->offX.get();
pOutput->m_nRelTop = (int)xfrm->offY.get();
}
else
{
pOutput->m_nRelLeft = 0;
pOutput->m_nRelTop = 0;
}
if (xfrm->extX.IsInit() && xfrm->extY.IsInit())
{
pOutput->m_nRelRight = (int)pOutput->m_nRelLeft + xfrm->offX.get();
pOutput->m_nRelBottom = (int)pOutput->m_nRelTop + xfrm->offY.get();
}
else
{
pOutput->m_nRelRight = 0;
pOutput->m_nRelBottom = 0;
}
pOutput->m_nRelRotation = pOutput->m_nRotation;
}
}
bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
{
PPTX::Logic::Shape * ooxShape = dynamic_cast<PPTX::Logic::Shape*> (m_ooxShape);
//PPTX::Logic::CxnSp* cxnShape = dynamic_cast<PPTX::Logic::CxnSp*> (m_ooxShape);
//PPTX::Logic::Pic * ooxPic = dynamic_cast<PPTX::Logic::Pic*> (m_ooxShape);
if (ooxShape == NULL) return false;
if (!ooxShape) return false;
if (ooxShape->oTextBoxBodyPr.IsInit())
{
if (ooxShape->oTextBoxBodyPr->fromWordArt.get_value_or(false))
@ -1051,7 +1091,9 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
if (ooxShape->spPr.Geometry.getType() == OOX::et_a_prstGeom)
{
PPTX::Logic::PrstGeom& geometry = ooxShape->spPr.Geometry.as<PPTX::Logic::PrstGeom>();
SimpleTypes::EShapeType type = (SimpleTypes::EShapeType)geometry.prst.GetBYTECode();
SimpleTypes::CShapeType<> prst_type(geometry.prst.get());
SimpleTypes::EShapeType type = prst_type.GetValue();
pOutput->m_nShapeType = OOX::PrstGeom2VmlShapeType(type);
if (pOutput->m_nShapeType == SimpleTypes::Vml::sptNotPrimitive)
@ -1087,40 +1129,9 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
pOutput->m_nGeoRight = 100000;
pOutput->m_nGeoBottom = 100000;
}
if (ooxShape->spPr.xfrm.IsInit())
{
double rot = ooxShape->spPr.xfrm->rot.get() / 60000.;
if (rot > 0.01)
pOutput->m_nRotation = rot * 65535;
if (ooxShape->spPr.xfrm->flipH.get_value_or(false)) pOutput->m_bFlipH = 1;
if (ooxShape->spPr.xfrm->flipV.get_value_or(false)) pOutput->m_bFlipV = 1;
Parse(oParam, pOutput, ooxShape->spPr.xfrm.GetPointer());
if (pOutput->m_bInGroup)
{
if (ooxShape->spPr.xfrm->offX.IsInit() && ooxShape->spPr.xfrm->offY.IsInit())
{
pOutput->m_nRelLeft = (int)ooxShape->spPr.xfrm->offX.get();
pOutput->m_nRelTop = (int)ooxShape->spPr.xfrm->offY.get();
}
else
{
pOutput->m_nRelLeft = 0;
pOutput->m_nRelTop = 0;
}
if (ooxShape->spPr.xfrm->extX.IsInit() && ooxShape->spPr.xfrm->extY.IsInit())
{
pOutput->m_nRelRight = (int)pOutput->m_nRelLeft + ooxShape->spPr.xfrm->offX.get();
pOutput->m_nRelBottom = (int)pOutput->m_nRelTop + ooxShape->spPr.xfrm->offY.get();
}
else
{
pOutput->m_nRelRight = 0;
pOutput->m_nRelBottom = 0;
}
pOutput->m_nRelRotation = pOutput->m_nRotation;
}
}
PPTX::Logic::ShapeStyle* oox_sp_style = ooxShape->style.GetPointer();
bool use_fill_from_style = false;
@ -1132,8 +1143,8 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
case PPTX::Logic::UniFill::gradFill:
case PPTX::Logic::UniFill::pattFill:
case PPTX::Logic::UniFill::solidFill:
Parse(oParam, pOutput, &ooxShape->spPr.Fill);
Parse(oParam, pOutput, &ooxShape->spPr.Fill);
break;
case PPTX::Logic::UniFill::noFill:
pOutput->m_bFilled = false; break;
default:
@ -1185,7 +1196,56 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
}
}
return true;
return true;
}
bool OOXShapeReader::ParsePic( ReaderParameter oParam, RtfShapePtr& pOutput)
{
PPTX::Logic::Pic * ooxPic = dynamic_cast<PPTX::Logic::Pic*>(m_ooxShape);
if (!ooxPic) return false;
std::wstring strXml;
pOutput->m_nShapeType = SimpleTypes::Vml::sptPictureFrame;
Parse(oParam, pOutput, ooxPic->spPr.xfrm.GetPointer());
PPTX::Logic::ShapeStyle* oox_sp_style = ooxPic->style.GetPointer();
pOutput->m_bFilled = true;
Parse(oParam, pOutput, &ooxPic->blipFill);
if ((oox_sp_style) && (oox_sp_style->lnRef.idx.IsInit()))
{
Parse(oParam, pOutput, &oox_sp_style->lnRef, 2);
}
if (ooxPic->spPr.ln.IsInit())
{
Parse(oParam, pOutput, ooxPic->spPr.ln.GetPointer());
}
return true;
}
bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
{
if (!m_vmlElement && !m_arrElement && !m_ooxShape) return false;
if (OOX::CHdrFtr *pHdrFtr = dynamic_cast<OOX::CHdrFtr *>(oParam.oReader->m_currentContainer))
pOutput->m_nHeader = 1;//shape in header/footer
else
pOutput->m_nHeader = 0;
if (m_vmlElement || m_arrElement) return ParseVml(oParam , pOutput);
PPTX::Logic::Shape * ooxShape = dynamic_cast<PPTX::Logic::Shape*> (m_ooxShape);
// PPTX::Logic::CxnSp * cxnShape = dynamic_cast<PPTX::Logic::CxnSp*> (m_ooxShape);
PPTX::Logic::Pic * ooxPic = dynamic_cast<PPTX::Logic::Pic*> (m_ooxShape);
if (ooxShape) return ParseShape(oParam, pOutput);
if (ooxPic) return ParsePic(oParam, pOutput);
//if (cxnShape) return ParseConnector(oParam, pOutput);
return false;
}
void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::UniFill *oox_fill, std::wstring *change_sheme_color)
{
@ -1401,12 +1461,6 @@ bool OOXShapeReader::ParseVml( ReaderParameter oParam , RtfShapePtr& pOutput)
}
//---------------------
if (OOX::CHdrFtr *pHdrFtr = dynamic_cast<OOX::CHdrFtr *>(oParam.oReader->m_currentContainer))
{
pOutput->m_nHeader = 1;//shape in header/footer
}
return ParseVmlChild(oParam, pOutput);
}
bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
@ -1499,11 +1553,6 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
}
if (m_ooxGroup)
{
//if( m_ooxGroup->m_sId.IsInit())
//{
// pOutput->m_nID = oParam.oReader->m_oOOXIdGenerator.GetId( m_ooxGroup->m_oId.get());
//}
pOutput->m_nZOrderRelative = 0;
pOutput->m_nWrapType = 3; //def

View File

@ -67,6 +67,12 @@ public:
static bool Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::BlipFill *oox_bitmap_fill);
private:
bool ParseShape( ReaderParameter oParam , RtfShapePtr& oOutput);
bool ParsePic( ReaderParameter oParam , RtfShapePtr& oOutput);
void Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::Xfrm *xfrm);
void Parse(ReaderParameter oParam, PPTX::Logic::ColorBase *oox_color, unsigned int & nColor, _CP_OPT(double) &opacity);
void Parse(ReaderParameter oParam, PPTX::Logic::SolidFill *oox_solid_fill, unsigned int & nColor, _CP_OPT(double) &opacity);

View File

@ -779,7 +779,7 @@ std::wstring RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
if( true == poRtfDocument->m_oStyleTable.GetStyle( m_nCharStyle, oStyle ) )
{
sResult += L"<w:pStyle w:val=\"";
sResult += oStyle->m_sName;
sResult += L"Style_" + std::to_wstring(m_nCharStyle); //oStyle->m_sName;
sResult += L"\"/>";
}
}
@ -1179,28 +1179,32 @@ std::wstring RtfStyle::RenderToOOXBegin(RenderParameter oRenderParameter)
case stSection : sType = L"numbering"; break;
case stTable : sType = L"table"; break;
}
sResult += L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\">";
sResult += L"<w:name w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>";
//sResult += L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\">";
sResult += L"<w:style w:type=\"" + sType + L"\" w:styleId=\"" + L"Style_" + std::to_wstring(m_nID) + L"\">";
sResult += L"<w:name w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>";
if( PROP_DEF != m_nBasedOn )
{
RtfStylePtr oBaseStyle;
if( true == poDocument->m_oStyleTable.GetStyle( m_nBasedOn, oBaseStyle ) )
sResult += L"<w:basedOn w:val=\"" + XmlUtils::EncodeXmlString( oBaseStyle->m_sName ) + L"\"/>";
{
sResult += L"<w:basedOn w:val=\"Style_" + std::to_wstring(m_nBasedOn) + L"\"/>";
//sResult += L"<w:basedOn w:val=\"" + XmlUtils::EncodeXmlString( oBaseStyle->m_sName ) + L"\"/>";
}
}
//if( PROP_DEF != m_nNext )
// sResult += L"<w:next w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>", );//Todo
//if( PROP_DEF != m_nLink )
// sResult += L"<w:link w:val=\"" + XmlUtils::EncodeXmlString( m_sName ) + L"\"/>", );//Todo
if( PROP_DEF != m_bHidden ) sResult += L"<w:hidden/>";
if( PROP_DEF != m_bLocked ) sResult += L"<w:locked/>";
if( PROP_DEF != m_bPersonal ) sResult += L"<w:personal w:val=\"true\" />";
if( PROP_DEF != m_bCompose ) sResult += L"<w:personalCompose w:val=\"true\" />";
if( PROP_DEF != m_bReply ) sResult += L"<w:personalReply w:val=\"true\" />";
if( 1 == m_nSemiHidden ) sResult += L"<w:semiHidden/>";
if( PROP_DEF != m_bQFormat ) sResult += L"<w:qformat/>";
if( PROP_DEF != m_nPriority ) sResult += L"<w:uiPriority w:val=\"" + std::to_wstring(m_nPriority) + L"\"/>";
if( PROP_DEF != m_bUnhiddenWhenUse ) sResult += L"<w:unhideWhenUsed/>";
if( 1 == m_bHidden ) sResult += L"<w:hidden/>";
if( 1 == m_bLocked ) sResult += L"<w:locked/>";
if( 1 == m_bPersonal ) sResult += L"<w:personal w:val=\"true\" />";
if( 1 == m_bCompose ) sResult += L"<w:personalCompose w:val=\"true\" />";
if( 1 == m_bReply ) sResult += L"<w:personalReply w:val=\"true\" />";
if( 1 == m_nSemiHidden ) sResult += L"<w:semiHidden/>";
if( 1 == m_bQFormat ) sResult += L"<w:qFormat/>";
if( 1 == m_bUnhiddenWhenUse ) sResult += L"<w:unhideWhenUsed/>";
if( PROP_DEF != m_nPriority ) sResult += L"<w:uiPriority w:val=\"" + std::to_wstring(m_nPriority) + L"\"/>";
return sResult;
}
@ -1965,7 +1969,7 @@ std::wstring RtfParagraphProperty::RenderToOOX(RenderParameter oRenderParameter)
if( true == poRtfDocument->m_oStyleTable.GetStyle( m_nStyle, oCurStile ) )
{
sResult += L"<w:pStyle w:val=\"";
sResult += oCurStile->m_sName;
sResult += L"Style_" + std::to_wstring(m_nStyle);//oCurStile->m_sName;
sResult += L"\"/>" ;
}
}
@ -2558,7 +2562,7 @@ std::wstring RtfTableProperty::RenderToOOX(RenderParameter oRenderParameter)
if( true == poDocument->m_oStyleTable.GetStyle( m_nStyle, oCurStyle) )
{
sResult += L"<w:tblStyle w:val=\"";
sResult += oCurStyle->m_sName;
sResult += L"Style_" + std::to_wstring(m_nStyle); //oCurStyle->m_sName;
sResult += L"\"/>";
}
}

View File

@ -256,8 +256,6 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
sResult += L"{\\shp";
sResult += L"{\\*\\shpinst";
RENDER_RTF_INT( m_nID , sResult, L"shplid" );
if (!m_bInGroup)
{
m_bAllowOverlap = 1;
@ -265,8 +263,8 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
m_nWrapType = 3;
m_nWrapSideType = 0;
m_bLockAnchor = 0;
m_nZOrder = PROP_DEF;
m_nZOrderRelative = PROP_DEF;
//m_nZOrder = PROP_DEF;
m_nZOrderRelative = 0;
m_nLeft = m_nTop = 0;
m_nRelBottom = m_nRelRight = PROP_DEF;
m_nPositionV = m_nPositionH = PROP_DEF;
@ -278,26 +276,28 @@ std::wstring RtfShape::RenderToRtf(RenderParameter oRenderParameter)
RENDER_RTF_INT ( m_nHeader , sResult, L"shpfhdr" );
//sResult += L"\\shpbxcolumn";
sResult += L"\\shpbxcolumn";
sResult += L"\\shpbxignore";
//sResult += L"\\shpbypara";
sResult += L"\\shpbypara";
sResult += L"\\shpbyignore";
RENDER_RTF_INT ( m_nWrapType , sResult, L"shpwr" );
RENDER_RTF_INT ( m_nWrapSideType , sResult, L"shpwrk" );
//sResult += L"\\shpfblwtxt0";
RENDER_RTF_INT( m_nZOrderRelative, sResult, L"shpfblwtxt");
RENDER_RTF_INT ( m_nZOrder, sResult, L"shpz" );
sResult += L"\\shplockanchor";
RENDER_RTF_INT ( m_nZOrder , sResult, L"shpz" );
RENDER_RTF_INT( m_nID, sResult, L"shplid" );
sResult += L"{\\sp{\\sn fUseShapeAnchor}{\\sv 0}}";
sResult += L"{\\sp{\\sn fPseudoInline}{\\sv 1}}";
}
sResult += RenderToRtfShapeProperty( oRenderParameter );
sResult += L"{\\sp{\\sn fLockPosition}{\\sv 1}}";
sResult += L"{\\sp{\\sn fLockRotation}{\\sv 1}}";
//sResult += L"{\\sp{\\sn fLockPosition}{\\sv 1}}";
//sResult += L"{\\sp{\\sn fLockRotation}{\\sv 1}}";
//picture
if( 0 != m_oPicture && m_nFillType == 1 || m_nFillType == 2 || m_nFillType == 3 || m_nFillType == 9)
@ -421,11 +421,11 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
std::wstring sResult;
//Position absolute
RENDER_RTF_SHAPE_PROP(L"posh", sResult, m_nPositionH);
RENDER_RTF_SHAPE_PROP(L"posrelh", sResult, m_nPositionHRelative);
RENDER_RTF_SHAPE_PROP(L"posv", sResult, m_nPositionV);
RENDER_RTF_SHAPE_PROP(L"posh", sResult, m_nPositionH);
RENDER_RTF_SHAPE_PROP(L"posrelh", sResult, m_nPositionHRelative);
RENDER_RTF_SHAPE_PROP(L"posv", sResult, m_nPositionV);
RENDER_RTF_SHAPE_PROP(L"posrelv", sResult, m_nPositionVRelative);
RENDER_RTF_SHAPE_PROP(L"posrelv", sResult, m_nPositionVRelative);
RENDER_RTF_SHAPE_PROP(L"fLayoutInCell", sResult, m_bLayoutInCell);
RENDER_RTF_SHAPE_PROP(L"fAllowOverlap", sResult, m_bAllowOverlap);
@ -438,6 +438,17 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
RENDER_RTF_SHAPE_PROP(L"sizerelv", sResult, m_nPctHeightRelative);
RENDER_RTF_SHAPE_PROP(L"colStart", sResult, m_nColStart);
RENDER_RTF_SHAPE_PROP(L"colSpan", sResult, m_nColSpan);
if (m_sName.empty() == false)
{
sResult += L"{\\sp{\\sn wzName}{\\sv ";
sResult += m_sName + L"}}";
}
if (m_sDescription.empty() == false)
{
sResult += L"{\\sp{\\sn wzDescription}{\\sv ";
sResult += m_sDescription + L"}}";
}
//Rehydration
//RENDER_RTF_SHAPE_PROP(L"metroBlob", sResult, m_sMetroBlob);
@ -449,7 +460,7 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
RENDER_RTF_SHAPE_PROP(L"shapeType", sResult, m_nShapeType);
RENDER_RTF_SHAPE_PROP(L"fBehindDocument",sResult, m_nZOrderRelative);
RENDER_RTF_SHAPE_PROP(L"fHidden", sResult, m_bHidden);
RENDER_RTF_SHAPE_PROP(L"fBackground", sResult, m_bBackground);
//RENDER_RTF_SHAPE_PROP(L"fBackground", sResult, m_bBackground);
//Text
//sResult += L"{\\sp{\\sn fLockText}{\\sv 0}}";
@ -586,7 +597,7 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
int nCodePage = -1;
if( !m_sGtextFont.empty() )
if( m_sGtextFont.empty() == false)
{
sResult += L"{\\sp{\\sn gtextFont}{\\sv ";
sResult += m_sGtextFont + L"}}";
@ -1487,8 +1498,8 @@ std::wstring RtfShape::GroupRenderToRtf(RenderParameter oRenderParameter)
RENDER_RTF_INT( m_nWrapSideType , sResult, L"shpwrk" );
RENDER_RTF_BOOL( m_bLockAnchor , sResult, L"shplockanchor" );
//sResult += L"{\\sp{\\sn fUseShapeAnchor}{\\sv 0}}";
//sResult += L"{\\sp{\\sn fPseudoInline}{\\sv 1}}";
sResult += L"{\\sp{\\sn fUseShapeAnchor}{\\sv 0}}";
sResult += L"{\\sp{\\sn fPseudoInline}{\\sv 1}}";
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="RtfFormatTest"
ProjectGUID="{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
RootNamespace="RtfFormatTest"
@ -44,7 +44,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\Common\OfficeDrawing;&quot;..\..\DesktopEditor\freetype-2.5.2\include&quot;;..\..\..\..\..\Common\OfficeDrawing\Shapes"
AdditionalIncludeDirectories="../../DesktopEditor/xml/libxml2/include;../../DesktopEditor/xml/build/vs2005"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="false"
BasicRuntimeChecks="3"

View File

@ -51,18 +51,26 @@
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
HRESULT convert_single(std::wstring fileName)
HRESULT convert_single(std::wstring srcFileName)
{
HRESULT hr = S_OK;
std::wstring srcFileName = fileName;
std::wstring dstPath = srcFileName + L"-my.xlsx";
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
std::wstring outputDir = NSDirectory::GetFolderPath(srcFileName);
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
std::wstring dstPath;
hr = ConvertXls2Xlsx(srcFileName, dstTempPath, L"password", L"C:\\Windows\\Fonts", NULL);
bool bMacros = true;
hr = ConvertXls2Xlsx(srcFileName, dstTempPath, L"password", L"C:\\Windows\\Fonts", NULL, bMacros);
if (bMacros)
{
dstPath = srcFileName + L"-my.xlsm";
}
else
{
dstPath = srcFileName + L"-my.xlsx";
}
if (hr == S_OK)
{
COfficeUtils oCOfficeUtils(NULL);
@ -71,6 +79,7 @@ HRESULT convert_single(std::wstring fileName)
NSDirectory::DeleteDirectory(dstTempPath);
return hr;
}

View File

@ -96,7 +96,63 @@ CompoundFile::CompoundFile(const std::wstring & file_path, const ReadWriteMode m
storage_ = NULL;
Open(file_path, mode);
}
// Opens "Workbook" stream and returns the only reference
void CompoundFile::copy_stream(std::string streamName, POLE::Storage * storageOut, bool withRoot)
{
POLE::Stream *stream = new POLE::Stream(storage_, streamName);
if (!stream) return;
stream->seek(0);
int size_stream = stream->size();
if (withRoot == false)
{
int pos = streamName.find("/");
if (pos >= 0)
streamName = streamName.substr(pos + 1);
}
POLE::Stream *streamNew = new POLE::Stream(storageOut, streamName, true, size_stream);
if (!streamNew) return;
unsigned char* data_stream = new unsigned char[size_stream];
if (data_stream)
{
stream->read(data_stream, size_stream);
streamNew->write(data_stream, size_stream);
delete []data_stream;
data_stream = NULL;
}
streamNew->flush();
delete streamNew;
delete stream;
}
void CompoundFile::copy( int indent, std::string path, POLE::Storage * storageOut, bool withRoot)
{
std::list<std::string> entries;
entries = storage_->entries( path );
std::list<std::string>::iterator it;
for( it = entries.begin(); it != entries.end(); ++it )
{
std::string name = *it;
std::string fullname = path + name;
if( storage_->isDirectory( fullname ) )
{
copy( indent + 1, fullname + "/", storageOut, withRoot );
}
else
{
copy_stream(fullname, storageOut, withRoot);
}
}
}
CFStreamPtr CompoundFile::getWorkbookStream()
{
CFStreamPtr stream = getNamedStream("Workbook");
@ -123,7 +179,6 @@ CFStreamPtr CompoundFile::getNamedStream(const std::string& name)
return streams[name];
}
CFStreamPtr CompoundFile::createNamedStream(const std::string& name)
{
if(!streams[name])

View File

@ -58,11 +58,15 @@ public:
bool isError();
void copy( int indent, std::string path, POLE::Storage * storageOut, bool withRoot = true);
CFStreamPtr getWorkbookStream ();
CFStreamPtr getNamedStream (const std::string& name);
POLE::Storage *storage_;
private:
void copy_stream(std::string streamName, POLE::Storage * storageOut, bool withRoot = true);
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

View File

@ -65,60 +65,427 @@ BaseObjectPtr SXAddl::clone()
void SXAddl::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
record >> frtHeaderOld >> sxc >> sxd;
switch(sxc)
{
case 0x00: content = createSxcView (record); break;
case 0x01: content = createSxcField (record); break;
case 0x02: content = createSxcHierarchy(record); break;
case 0x03: content = createSxcCache (record); break;
case 0x04: content = createSxcCacheField(record); break;
case 0x05: content = createSxcQsi (record); break;
case 0x06: content = createSxcQuery (record); break;
case 0x07: content = createSxcGrpLevel (record); break;
case 0x08: content = createSxcGroup (record); break;
case 0x09: content = createSxcCacheItem(record); break;
case 0x0C: content = createSxcSXRule (record); break;
case 0x0D: content = createSxcSXFilt (record); break;
case 0x10: content = createSxcSXDH (record); break;
case 0x12: content = createSxcAutoSort (record); break;
case 0x13: content = createSxcSXMgs (record); break;
case 0x14: content = createSxcSXMg (record); break;
case 0x17: content = createSxcField12 (record); break;
case 0x1A: content = createSxcSXCondFmts(record); break;
case 0x1B: content = createSxcSXCondFmt(record); break;
case 0x1C: content = createSxcSXFilters12(record); break;
case 0x1D: content = createSxcSXFilter12(record); break;
}
if (content)
content->load(record);
Log::error("SXAddl record is not implemented.");
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
}
//-------------------------------------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDId::clone()
BiffStructurePtr SXAddl::createSxcView(CFRecord& record)
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDId(*this));
}
void SXAddl_SXCCache_SXDId::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
BiffStructurePtr result;
short reserved;
record >> idCache >> reserved;
switch(sxd)
{
case 0x00: result = BiffStructurePtr(new SXAddl_SXCView_SXDId()); break;
case 0x02: result = BiffStructurePtr(new SXAddl_SXCView_SXDVer10Info()); break;
case 0x19: result = BiffStructurePtr(new SXAddl_SXCView_SXDVer12Info()); break;
case 0x1E: result = BiffStructurePtr(new SXAddl_SXCView_SXDTableStyleClient()); break;
case 0xff: result = BiffStructurePtr(new SXAddl_SXCView_SXDEnd()); break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcField(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0x00: result = BiffStructurePtr(new SXAddl_SXCField_SXDId()); break;
case 0x02: result = BiffStructurePtr(new SXAddl_SXCField_SXDVer10Info()); break;
case 0xff: result = BiffStructurePtr(new SXAddl_SXCField_SXDEnd()); break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcHierarchy(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
if (result)
result->load(record);
return result;
}
BiffStructurePtr SXAddl::createSxcCache (CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0x00: result = BiffStructurePtr(new SXAddl_SXCCache_SXDId()); break;
case 0x01: result = BiffStructurePtr(new SXAddl_SXCCache_SXDVerUpdInv()); break;
case 0x02: result = BiffStructurePtr(new SXAddl_SXCCache_SXDVer10Info()); break;
case 0x18: result = BiffStructurePtr(new SXAddl_SXCCache_SXDVerSXMacro()); break;
case 0x34: result = BiffStructurePtr(new SXAddl_SXCCache_SXDInvRefreshReal()); break;
case 0x41: result = BiffStructurePtr(new SXAddl_SXCCache_SXDInfo12()); break;
case 0xff: result = BiffStructurePtr(new SXAddl_SXCCache_SXDEnd()); break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcCacheField(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0x00: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDId()); break;
case 0x05: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDProperty()); break;
case 0x2d: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDSxrmitmCount()); break;
case 0x2f: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDCaption()); break;
case 0x30: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDIfdbMempropMap()); break;
case 0x31: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDIfdbMpMapCount()); break;
case 0x40: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDPropName()); break;
case 0xff: result = BiffStructurePtr(new SXAddl_SXCCacheField_SXDEnd()); break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcQsi(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcQuery(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcGrpLevel(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcGroup(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcCacheItem(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXRule(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXFilt(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXDH(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcAutoSort(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXMgs(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXMg(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcField12(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXCondFmts(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXCondFmt(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXFilters12(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
BiffStructurePtr SXAddl::createSxcSXFilter12(CFRecord& record)
{
BiffStructurePtr result;
switch(sxd)
{
case 0xff: break;
}
return result;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDEnd::clone()
BiffStructurePtr SXAddl_SXCField_SXDId::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDEnd(*this));
return BiffStructurePtr(new SXAddl_SXCField_SXDId(*this));
}
void SXAddl_SXCCache_SXDEnd::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
void SXAddl_SXCField_SXDId::load(CFRecord& record)
{
record >> stName;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCView_SXDId::clone()
{
return BiffStructurePtr(new SXAddl_SXCView_SXDId(*this));
}
void SXAddl_SXCView_SXDId::load(CFRecord& record)
{
record >> stName;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCView_SXDVer10Info::clone()
{
return BiffStructurePtr(new SXAddl_SXCView_SXDVer10Info(*this));
}
void SXAddl_SXCView_SXDVer10Info::load(CFRecord& record)
{
unsigned short flags, reserved2;
unsigned char unused;
record >> bVerSxMacro >> flags >> unused >> reserved2;
fDisplayImmediateItems = GETBIT(flags, 0);
fEnableDataEd = GETBIT(flags, 1);
fDisableFList = GETBIT(flags, 2);
fReenterOnLoadOnce = GETBIT(flags, 3);
fNotViewCalculatedMembers = GETBIT(flags, 4);
fNotVisualTotals = GETBIT(flags, 5);
fPageMultipleItemLabel = GETBIT(flags, 6);
fTensorFillCv = GETBIT(flags, 7);
fHideDDData = GETBIT(flags, 8);
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCView_SXDVer12Info::clone()
{
return BiffStructurePtr(new SXAddl_SXCView_SXDVer12Info(*this));
}
void SXAddl_SXCView_SXDVer12Info::load(CFRecord& record)
{
_UINT32 flags;
unsigned short reserved3;
record >> flags >> reserved3;
fDefaultCompact = GETBIT(flags, 0);
fDefaultOutline = GETBIT(flags, 1);
fOutlineData = GETBIT(flags, 2);
fCompactData = GETBIT(flags, 3);
fNewDropZones = GETBIT(flags, 4);
fPublished = GETBIT(flags, 5);
fTurnOffImmersive = GETBIT(flags, 6);
fSingleFilterPerField = GETBIT(flags, 7);
fNonDefaultSortInFlist = GETBIT(flags, 8);
fDontUseCustomLists = GETBIT(flags, 10);
fHideDrillIndicators = GETBIT(flags, 12);
fPrintDrillIndicators = GETBIT(flags, 13);
fMemPropsInTips = GETBIT(flags, 14);
fNoPivotTips = GETBIT(flags, 15);
cIndentInc = GETBITS(flags, 16, 22);
fNoHeaders = GETBIT(flags, 23);
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCField_SXDEnd::clone()
{
return BiffStructurePtr(new SXAddl_SXCField_SXDEnd(*this));
}
void SXAddl_SXCField_SXDEnd::load(CFRecord& record)
{
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
}
//----------------------------------------------------------------------------
BaseObjectPtr Continue_SxaddlSxString::clone()
BiffStructurePtr SXAddl_SXCView_SXDEnd::clone()
{
return BaseObjectPtr(new Continue_SxaddlSxString(*this));
return BiffStructurePtr(new SXAddl_SXCView_SXDEnd(*this));
}
void Continue_SxaddlSxString::readFields(CFRecord& record)
void SXAddl_SXCView_SXDEnd::load(CFRecord& record)
{
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
}
//-------------------------------------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheItem_SXDId::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheItem_SXDId(*this));
}
void SXAddl_SXCCacheItem_SXDId::load(CFRecord& record)
{
short reserved;
record >> dwItem >> reserved;
}
//-------------------------------------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDId::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDId(*this));
}
void SXAddl_SXCCacheField_SXDId::load(CFRecord& record)
{
record >> stSourceName;
}
//-------------------------------------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCache_SXDId::clone()
{
return BiffStructurePtr(new SXAddl_SXCCache_SXDId(*this));
}
void SXAddl_SXCCache_SXDId::load(CFRecord& record)
{
short reserved;
record >> idCache >> reserved;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCache_SXDEnd::clone()
{
return BiffStructurePtr(new SXAddl_SXCCache_SXDEnd(*this));
}
void SXAddl_SXCCache_SXDEnd::load(CFRecord& record)
{
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCField_SXDVer10Info::clone()
{
return BiffStructurePtr(new SXAddl_SXCField_SXDVer10Info(*this));
}
void SXAddl_SXCField_SXDVer10Info::load(CFRecord& record)
{
_UINT32 flags;
short reserved2;
record >> flags >> reserved2;
fHideDD = GETBIT(flags, 0);
}
//----------------------------------------------------------------------------
BiffStructurePtr Continue_SxaddlSxString::clone()
{
return BiffStructurePtr(new Continue_SxaddlSxString(*this));
}
void Continue_SxaddlSxString::load(CFRecord& record)
{
m_SXAddlHdr.load(record);
int sz = record.getDataSize() - record.getRdPtr();
if (sz > 0)
record >> stContinue;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDVer10Info::clone()
BiffStructurePtr SXAddl_SXCCache_SXDVer10Info::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDVer10Info(*this));
return BiffStructurePtr(new SXAddl_SXCCache_SXDVer10Info(*this));
}
void SXAddl_SXCCache_SXDVer10Info::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
void SXAddl_SXCCache_SXDVer10Info::load(CFRecord& record)
{
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
@ -131,28 +498,28 @@ void SXAddl_SXCCache_SXDVer10Info::readFields(CFRecord& record)
record >> reserved2;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDVerUpdInv::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDVerUpdInv(*this));
}
void SXAddl_SXCCache_SXDVerUpdInv::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
BiffStructurePtr SXAddl_SXCCache_SXDVerUpdInv::clone()
{
return BiffStructurePtr(new SXAddl_SXCCache_SXDVerUpdInv(*this));
}
void SXAddl_SXCCache_SXDVerUpdInv::load(CFRecord& record)
{
record >> dwVersionInvalidates;
record.skipNunBytes(5);
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDInfo12::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDInfo12(*this));
}
void SXAddl_SXCCache_SXDInfo12::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
BiffStructurePtr SXAddl_SXCCache_SXDInfo12::clone()
{
return BiffStructurePtr(new SXAddl_SXCCache_SXDInfo12(*this));
}
void SXAddl_SXCCache_SXDInfo12::load(CFRecord& record)
{
_UINT32 flags;
short reserved;
@ -163,39 +530,27 @@ void SXAddl_SXCCache_SXDInfo12::readFields(CFRecord& record)
fSrvSupportSubQuery = GETBIT(flags, 2);
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCache_SXDVerSXMacro::clone()
{
return BaseObjectPtr(new SXAddl_SXCCache_SXDVerSXMacro(*this));
}
void SXAddl_SXCCache_SXDVerSXMacro::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
BiffStructurePtr SXAddl_SXCCache_SXDVerSXMacro::clone()
{
return BiffStructurePtr(new SXAddl_SXCCache_SXDVerSXMacro(*this));
}
void SXAddl_SXCCache_SXDVerSXMacro::load(CFRecord& record)
{
unsigned char reserved1;
short reserved2, reserved3;
record >> dwVer >> reserved1 >> reserved2 >> reserved3;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCView_SXDId::clone()
BiffStructurePtr SXAddl_SXCCacheField_SXDIfdbMempropMap::clone()
{
return BaseObjectPtr(new SXAddl_SXCView_SXDId(*this));
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDIfdbMempropMap(*this));
}
void SXAddl_SXCView_SXDId::readFields(CFRecord& record)
void SXAddl_SXCCacheField_SXDIfdbMempropMap::load(CFRecord& record)
{
m_SXAddlHdr.load(record);
record >> stName;
}
//----------------------------------------------------------------------------
BaseObjectPtr SXAddl_SXCCacheField_SXDIfdbMempropMap::clone()
{
return BaseObjectPtr(new SXAddl_SXCCacheField_SXDIfdbMempropMap(*this));
}
void SXAddl_SXCCacheField_SXDIfdbMempropMap::readFields(CFRecord& record)
{
m_SXAddlHdr.load(record);
record.skipNunBytes(6);
int sz = record.getDataSize() - record.getRdPtr();
@ -208,6 +563,106 @@ void SXAddl_SXCCacheField_SXDIfdbMempropMap::readFields(CFRecord& record)
rgMap.push_back(val);
}
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCView_SXDTableStyleClient::clone()
{
return BiffStructurePtr(new SXAddl_SXCView_SXDTableStyleClient(*this));
}
void SXAddl_SXCView_SXDTableStyleClient::load(CFRecord& record)
{
record.skipNunBytes(6);
unsigned short flags;
record >> flags >> stName;
fLastColumn = GETBIT(flags, 1);
fRowStrips = GETBIT(flags, 2);
fColumnStrips = GETBIT(flags, 3);
fRowHeaders = GETBIT(flags, 4);
fColumnHeaders = GETBIT(flags, 5);
fDefaultStyle = GETBIT(flags, 6);
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDSxrmitmCount::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDSxrmitmCount(*this));
}
void SXAddl_SXCCacheField_SXDSxrmitmCount::load(CFRecord& record)
{
short reserved2;
record >> citm >> reserved2;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDPropName::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDPropName(*this));
}
void SXAddl_SXCCacheField_SXDPropName::load(CFRecord& record)
{
record >> stPropName;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDProperty::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDProperty(*this));
}
void SXAddl_SXCCacheField_SXDProperty::load(CFRecord& record)
{
short reserved2;
record >> ihdb >> reserved2;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDIfdbMpMapCount::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDIfdbMpMapCount(*this));
}
void SXAddl_SXCCacheField_SXDIfdbMpMapCount::load(CFRecord& record)
{
short reserved2;
record >> ifdbMemProp >> reserved2;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDEnd::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDEnd(*this));
}
void SXAddl_SXCCacheField_SXDEnd::load(CFRecord& record)
{
_UINT32 reserved1;
short reserved2;
record >> reserved1 >> reserved2;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCacheField_SXDCaption::clone()
{
return BiffStructurePtr(new SXAddl_SXCCacheField_SXDCaption(*this));
}
void SXAddl_SXCCacheField_SXDCaption::load(CFRecord& record)
{
record >> stCaption;
}
//----------------------------------------------------------------------------
BiffStructurePtr SXAddl_SXCCache_SXDInvRefreshReal::clone()
{
return BiffStructurePtr(new SXAddl_SXCCache_SXDInvRefreshReal(*this));
}
void SXAddl_SXCCache_SXDInvRefreshReal::load(CFRecord& record)
{
_UINT32 flags;
short reserved2;
record >> flags >> reserved2;
fEnableRefresh = GETBIT(flags, 0);
fInvalid = GETBIT(flags, 1);
}
} // namespace XLS

View File

@ -60,18 +60,6 @@ class SXAddl: public BiffRecord
BIFF_RECORD_DEFINE_TYPE_INFO(SXAddl)
BASE_OBJECT_DEFINE_CLASS_NAME(SXAddl)
public:
struct _SXAddlHdr
{
_UINT32 frtHeaderOld;
unsigned char sxc;
unsigned char sxd;
void load(CFRecord& record)
{
record >> frtHeaderOld >> sxc >> sxd;
}
}m_SXAddlHdr;
SXAddl();
~SXAddl();
@ -79,57 +67,249 @@ public:
virtual void readFields(CFRecord& record);
static const ElementType type = typeSXAddl;
};
class Continue_SxaddlSxString : public SXAddl
{
_UINT32 frtHeaderOld;
unsigned char sxc;
unsigned char sxd;
BiffStructurePtr content;
private:
BiffStructurePtr createSxcView (CFRecord& record);
BiffStructurePtr createSxcField (CFRecord& record);
BiffStructurePtr createSxcHierarchy (CFRecord& record);
BiffStructurePtr createSxcCache (CFRecord& record);
BiffStructurePtr createSxcCacheField(CFRecord& record);
BiffStructurePtr createSxcQsi (CFRecord& record);
BiffStructurePtr createSxcQuery (CFRecord& record);
BiffStructurePtr createSxcGrpLevel (CFRecord& record);
BiffStructurePtr createSxcGroup (CFRecord& record);
BiffStructurePtr createSxcCacheItem (CFRecord& record);
BiffStructurePtr createSxcSXRule (CFRecord& record);
BiffStructurePtr createSxcSXFilt (CFRecord& record);
BiffStructurePtr createSxcSXDH (CFRecord& record);
BiffStructurePtr createSxcAutoSort (CFRecord& record);
BiffStructurePtr createSxcSXMgs (CFRecord& record);
BiffStructurePtr createSxcSXMg (CFRecord& record);
BiffStructurePtr createSxcField12 (CFRecord& record);
BiffStructurePtr createSxcSXCondFmts(CFRecord& record);
BiffStructurePtr createSxcSXCondFmt (CFRecord& record);
BiffStructurePtr createSxcSXFilters12(CFRecord& record);
BiffStructurePtr createSxcSXFilter12(CFRecord& record);
};
class Continue_SxaddlSxString : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(Continue_SxaddlSxString)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
Continue_SxaddlSxString(){}
~Continue_SxaddlSxString(){}
static const ElementType type = typeSXAddl;
virtual void load(CFRecord& record);
XLUnicodeStringSegmentedSXADDL stContinue;
};
class SXAddl_SXCAutoSort_SXDEnd : public SXAddl {};
class SXAddl_SXCAutoSort_SXDId : public SXAddl {};
class SXAddl_SXCCache_SXDEnd : public SXAddl
{
class SXAddl_SXCField_SXDId : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCField_SXDId)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
SXAddl_SXCField_SXDId(){}
~SXAddl_SXCField_SXDId(){}
static const ElementType type = typeSXAddl;
virtual void load(CFRecord& record);
XLUnicodeStringSegmentedSXADDL stName;
};
class SXAddl_SXCField_SXDEnd : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCField_SXDEnd)
public:
BiffStructurePtr clone();
SXAddl_SXCField_SXDEnd(){}
~SXAddl_SXCField_SXDEnd(){}
static const ElementType type = typeSXAddl;
virtual void load(CFRecord& record);
};
class SXAddl_SXCField_SXDVer10Info : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCField_SXDVer10Info)
public:
BiffStructurePtr clone();
SXAddl_SXCField_SXDVer10Info(){}
~SXAddl_SXCField_SXDVer10Info(){}
static const ElementType type = typeSXAddl;
virtual void load(CFRecord& record);
bool fHideDD;
};
class SXAddl_SXCCache_SXDId : public SXAddl
{
class SXAddl_SXCView_SXDId : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCView_SXDId)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
SXAddl_SXCView_SXDId(){}
~SXAddl_SXCView_SXDId(){}
static const ElementType type = typeSXAddl;
virtual void load(CFRecord& record);
XLUnicodeStringSegmentedSXADDL stName;
};
class SXAddl_SXCView_SXDEnd : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCView_SXDEnd)
public:
BiffStructurePtr clone();
SXAddl_SXCView_SXDEnd(){}
~SXAddl_SXCView_SXDEnd(){}
static const ElementType type = typeSXAddl;
virtual void load(CFRecord& record);
};
class SXAddl_SXCView_SXDTableStyleClient : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCView_SXDTableStyleClient)
public:
BiffStructurePtr clone();
SXAddl_SXCView_SXDTableStyleClient(){}
~SXAddl_SXCView_SXDTableStyleClient(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
bool fLastColumn;
bool fRowStrips;
bool fColumnStrips;
bool fRowHeaders;
bool fColumnHeaders;
bool fDefaultStyle;
LPWideString stName;
};
class SXAddl_SXCAutoSort_SXDEnd : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCAutoSort_SXDEnd)
public:
BiffStructurePtr clone();
SXAddl_SXCAutoSort_SXDEnd(){}
~SXAddl_SXCAutoSort_SXDEnd(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
};
class SXAddl_SXCAutoSort_SXDId : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCAutoSort_SXDId)
public:
BiffStructurePtr clone();
SXAddl_SXCAutoSort_SXDId(){}
~SXAddl_SXCAutoSort_SXDId(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
bool fAscendSort;
};
class SXAddl_SXCCache_SXDEnd : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDEnd)
public:
BiffStructurePtr clone();
SXAddl_SXCCache_SXDEnd(){}
~SXAddl_SXCCache_SXDEnd(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
SXAddl_SXCCache_SXDEnd(CFRecord& record);
};
class SXAddl_SXCCache_SXDId : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDId)
public:
BiffStructurePtr clone();
SXAddl_SXCCache_SXDId(){}
~SXAddl_SXCCache_SXDId(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
_UINT32 idCache;
};
class SXAddl_SXCCache_SXDInfo12 : public SXAddl
{
class SXAddl_SXCCache_SXDInfo12 : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDInfo12)
public:
BiffStructurePtr clone();
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
SXAddl_SXCCache_SXDInfo12(){}
~SXAddl_SXCCache_SXDInfo12(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
bool fSheetData;
bool fSrvSupportAttribDrill;
bool fSrvSupportSubQuery;
};
class SXAddl_SXCCache_SXDInvRefreshReal : public SXAddl
{
};
class SXAddl_SXCCache_SXDVer10Info : public SXAddl
{
class SXAddl_SXCCache_SXDInvRefreshReal : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDInvRefreshReal)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
SXAddl_SXCCache_SXDInvRefreshReal(){}
~SXAddl_SXCCache_SXDInvRefreshReal(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
bool fEnableRefresh;
bool fInvalid;
};
class SXAddl_SXCCache_SXDVer10Info : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDVer10Info)
public:
BiffStructurePtr clone();
SXAddl_SXCCache_SXDVer10Info(){}
~SXAddl_SXCCache_SXDVer10Info(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
_INT32 citmGhostMax;
unsigned char bVerCacheLastRefresh;
@ -138,155 +318,344 @@ public:
unsigned char numDateCopy[8];
};
class SXAddl_SXCCache_SXDVerSXMacro : public SXAddl
{
class SXAddl_SXCCache_SXDVerSXMacro : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDVerSXMacro)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
SXAddl_SXCCache_SXDVerSXMacro(){}
~SXAddl_SXCCache_SXDVerSXMacro(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
unsigned char dwVer;
};
class SXAddl_SXCCache_SXDVerUpdInv : public SXAddl
{
class SXAddl_SXCCache_SXDVerUpdInv : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCache_SXDVerUpdInv)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
SXAddl_SXCCache_SXDVerUpdInv(){}
~SXAddl_SXCCache_SXDVerUpdInv(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
unsigned char dwVersionInvalidates;
};
class SXAddl_SXCCacheField_SXDCaption : public SXAddl {};
class SXAddl_SXCCacheField_SXDEnd : public SXAddl {};
class SXAddl_SXCCacheField_SXDId : public SXAddl {};
class SXAddl_SXCCacheField_SXDIfdbMempropMap: public SXAddl
{
class SXAddl_SXCCacheField_SXDCaption : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDCaption)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDCaption(){}
~SXAddl_SXCCacheField_SXDCaption(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
XLUnicodeStringSegmentedSXADDL stCaption;
};
class SXAddl_SXCCacheField_SXDEnd : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDEnd)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDEnd(){}
~SXAddl_SXCCacheField_SXDEnd(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
};
class SXAddl_SXCCacheField_SXDId : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDId)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDId(){}
~SXAddl_SXCCacheField_SXDId(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
XLUnicodeStringSegmentedSXADDL stSourceName;
};
class SXAddl_SXCCacheField_SXDIfdbMempropMap : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDIfdbMempropMap)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDIfdbMempropMap(){}
~SXAddl_SXCCacheField_SXDIfdbMempropMap(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
std::vector<unsigned short> rgMap;
};
class SXAddl_SXCCacheField_SXDIfdbMpMapCount: public SXAddl {};
class SXAddl_SXCCacheField_SXDProperty : public SXAddl {};
class SXAddl_SXCCacheField_SXDPropName : public SXAddl {};
class SXAddl_SXCCacheField_SXDSxrmitmCount : public SXAddl {};
class SXAddl_SXCCacheItem_SXDEnd : public SXAddl {};
class SXAddl_SXCCacheItem_SXDId : public SXAddl {};
class SXAddl_SXCCacheItem_SXDItmMpMapCount : public SXAddl {};
class SXAddl_SXCCacheItem_SXDItmMpropMap : public SXAddl {};
class SXAddl_SXCCacheItem_SXDSxrmitmDisp : public SXAddl {};
class SXAddl_SXCField12_SXDAutoshow : public SXAddl {};
class SXAddl_SXCField12_SXDEnd : public SXAddl {};
class SXAddl_SXCField12_SXDId : public SXAddl {};
class SXAddl_SXCField12_SXDISXTH : public SXAddl {};
class SXAddl_SXCField12_SXDMemberCaption : public SXAddl {};
class SXAddl_SXCField12_SXDVer12Info : public SXAddl {};
class SXAddl_SXCField12_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCField_SXDEnd : public SXAddl {};
class SXAddl_SXCField_SXDId : public SXAddl {};
class SXAddl_SXCField_SXDVer10Info : public SXAddl {};
class SXAddl_SXCGroup_SXDEnd : public SXAddl {};
class SXAddl_SXCGroup_SXDGrpInfo : public SXAddl {};
class SXAddl_SXCGroup_SXDId : public SXAddl {};
class SXAddl_SXCGroup_SXDMember : public SXAddl {};
class SXAddl_SXCGrpLevel_SXDEnd : public SXAddl {};
class SXAddl_SXCGrpLevel_SXDGrpLevelInfo : public SXAddl {};
class SXAddl_SXCGrpLevel_SXDId : public SXAddl {};
class SXAddl_SXCHierarchy_SXDDisplayFolder : public SXAddl {};
class SXAddl_SXCHierarchy_SXDEnd : public SXAddl {};
class SXAddl_SXCHierarchy_SXDFilterMember : public SXAddl {};
class SXAddl_SXCHierarchy_SXDFilterMember12 : public SXAddl {};
class SXAddl_SXCHierarchy_SXDIconSet : public SXAddl {};
class SXAddl_SXCHierarchy_SXDId : public SXAddl {};
class SXAddl_SXCHierarchy_SXDInfo12 : public SXAddl {};
class SXAddl_SXCHierarchy_SXDKPIGoal : public SXAddl {};
class SXAddl_SXCHierarchy_SXDKPIStatus : public SXAddl {};
class SXAddl_SXCHierarchy_SXDKPITime : public SXAddl {};
class SXAddl_SXCHierarchy_SXDKPITrend : public SXAddl {};
class SXAddl_SXCHierarchy_SXDKPIValue : public SXAddl {};
class SXAddl_SXCHierarchy_SXDKPIWeight : public SXAddl {};
class SXAddl_SXCHierarchy_SXDMeasureGrp : public SXAddl {};
class SXAddl_SXCHierarchy_SXDParentKPI : public SXAddl {};
class SXAddl_SXCHierarchy_SXDProperty : public SXAddl {};
class SXAddl_SXCHierarchy_SXDSXSetParentUnique : public SXAddl {};
class SXAddl_SXCHierarchy_SXDUserCaption : public SXAddl {};
class SXAddl_SXCHierarchy_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCQsi_SXDEnd : public SXAddl {};
class SXAddl_SXCQsi_SXDId : public SXAddl {};
class SXAddl_SXCQuery_SXDEnd : public SXAddl {};
class SXAddl_SXCQuery_SXDReconnCond : public SXAddl {};
class SXAddl_SXCQuery_SXDSrcConnFile : public SXAddl {};
class SXAddl_SXCQuery_SXDSrcDataFile : public SXAddl {};
class SXAddl_SXCQuery_SXDXMLSource : public SXAddl {};
class SXAddl_SXCSXCondFmt_SXDEnd : public SXAddl {};
class SXAddl_SXCSXCondFmt_SXDSXCondFmt : public SXAddl {};
class SXAddl_SXCSXCondFmts_SXDEnd : public SXAddl {};
class SXAddl_SXCSXCondFmts_SXDId : public SXAddl {};
class SXAddl_SXCSXDH_SXDEnd : public SXAddl {};
class SXAddl_SXCSXDH_SXDId : public SXAddl {};
class SXAddl_SXCSXDH_SXDSxdh : public SXAddl {};
class SXAddl_SXCSXfilt_SXDEnd : public SXAddl {};
class SXAddl_SXCSXfilt_SXDId : public SXAddl {};
class SXAddl_SXCSXfilt_SXDSXfilt : public SXAddl {};
class SXAddl_SXCSXfilt_SXDSXItm : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDCaption : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDId : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilter : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterDesc : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue1: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDSXFilterValue2: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilter : public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue1: public SXAddl {};
class SXAddl_SXCSXFilter12_SXDXlsFilterValue2: public SXAddl {};
class SXAddl_SXCSXFilters12_SXDEnd : public SXAddl {};
class SXAddl_SXCSXFilters12_SXDId : public SXAddl {};
class SXAddl_SXCSXMg_SXDEnd : public SXAddl {};
class SXAddl_SXCSXMg_SXDId : public SXAddl {};
class SXAddl_SXCSXMg_SXDUserCaption : public SXAddl {};
class SXAddl_SXCSXMgs_SXDEnd : public SXAddl {};
class SXAddl_SXCSXMgs_SXDId : public SXAddl {};
class SXAddl_SXCSXMgs_SXDMGrpSXDHMap : public SXAddl {};
class SXAddl_SXCSXrule_SXDEnd : public SXAddl {};
class SXAddl_SXCSXrule_SXDId : public SXAddl {};
class SXAddl_SXCSXrule_SXDSXrule : public SXAddl {};
class SXAddl_SXCView_SXDCalcMember : public SXAddl {};
class SXAddl_SXCView_SXDCalcMemString : public SXAddl {};
class SXAddl_SXCView_SXDCompactColHdr : public SXAddl {};
class SXAddl_SXCView_SXDCompactRwHdr : public SXAddl {};
class SXAddl_SXCView_SXDEnd : public SXAddl {};
class SXAddl_SXCView_SXDId : public SXAddl
{
class SXAddl_SXCCacheField_SXDIfdbMpMapCount : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDIfdbMpMapCount)
public:
virtual void readFields(CFRecord& record);
virtual BaseObjectPtr clone();
BiffStructurePtr clone();
XLUnicodeStringSegmentedSXADDL stName;
SXAddl_SXCCacheField_SXDIfdbMpMapCount(){}
~SXAddl_SXCCacheField_SXDIfdbMpMapCount(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
_UINT32 ifdbMemProp;
};
class SXAddl_SXCCacheField_SXDProperty : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDProperty)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDProperty(){}
~SXAddl_SXCCacheField_SXDProperty(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
_UINT32 ihdb;
};
class SXAddl_SXCCacheField_SXDPropName : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDPropName)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDPropName(){}
~SXAddl_SXCCacheField_SXDPropName(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
XLUnicodeStringSegmentedSXADDL stPropName;
};
class SXAddl_SXCCacheField_SXDSxrmitmCount : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheField_SXDSxrmitmCount)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheField_SXDSxrmitmCount(){}
~SXAddl_SXCCacheField_SXDSxrmitmCount(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
_UINT32 citm;
};
class SXAddl_SXCView_SXDSXPIIvmb : public SXAddl {};
class SXAddl_SXCView_SXDTableStyleClient : public SXAddl {};
class SXAddl_SXCView_SXDVer10Info : public SXAddl {};
class SXAddl_SXCView_SXDVer12Info : public SXAddl {};
class SXAddl_SXCView_SXDVerUpdInv : public SXAddl {};
class SXAddl_SXCCacheItem_SXDEnd : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheItem_SXDEnd)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheItem_SXDEnd(){}
~SXAddl_SXCCacheItem_SXDEnd(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
};
class SXAddl_SXCCacheItem_SXDId : public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCCacheItem_SXDId)
public:
BiffStructurePtr clone();
SXAddl_SXCCacheItem_SXDId(){}
~SXAddl_SXCCacheItem_SXDId(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
_UINT32 dwItem;
};
class SXAddl_SXCView_SXDVer10Info: public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCView_SXDVer10Info)
public:
BiffStructurePtr clone();
SXAddl_SXCView_SXDVer10Info(){}
~SXAddl_SXCView_SXDVer10Info(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
unsigned char bVerSxMacro;
bool fDisplayImmediateItems;
bool fEnableDataEd;
bool fDisableFList;
bool fReenterOnLoadOnce;
bool fNotViewCalculatedMembers;
bool fNotVisualTotals;
bool fPageMultipleItemLabel;
bool fTensorFillCv;
bool fHideDDData;
};
class SXAddl_SXCView_SXDVer12Info: public BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(SXAddl_SXCView_SXDVer12Info)
public:
BiffStructurePtr clone();
SXAddl_SXCView_SXDVer12Info(){}
~SXAddl_SXCView_SXDVer12Info(){}
virtual void load(CFRecord& record);
static const ElementType type = typeSXAddl;
bool fDefaultCompact;
bool fDefaultOutline;
bool fOutlineData;
bool fCompactData;
bool fNewDropZones;
bool fPublished;
bool fTurnOffImmersive;
bool fSingleFilterPerField;
bool fNonDefaultSortInFlist;
bool fDontUseCustomLists;
bool fHideDrillIndicators;
bool fPrintDrillIndicators;
bool fMemPropsInTips;
bool fNoPivotTips;
unsigned char cIndentInc;
bool fNoHeaders;
};
//class SXAddl_SXCCacheItem_SXDItmMpMapCount : public SXAddl {};
//class SXAddl_SXCCacheItem_SXDItmMpropMap : public SXAddl {};
//class SXAddl_SXCCacheItem_SXDSxrmitmDisp : public SXAddl {};
//
//class SXAddl_SXCField12_SXDAutoshow : public SXAddl {};
//class SXAddl_SXCField12_SXDEnd : public SXAddl {};
//class SXAddl_SXCField12_SXDId : public SXAddl {};
//class SXAddl_SXCField12_SXDISXTH : public SXAddl {};
//class SXAddl_SXCField12_SXDMemberCaption : public SXAddl {};
//class SXAddl_SXCField12_SXDVer12Info : public SXAddl {};
//class SXAddl_SXCField12_SXDVerUpdInv : public SXAddl {};
//
//
//class SXAddl_SXCGroup_SXDEnd : public SXAddl {};
//class SXAddl_SXCGroup_SXDGrpInfo : public SXAddl {};
//class SXAddl_SXCGroup_SXDId : public SXAddl {};
//class SXAddl_SXCGroup_SXDMember : public SXAddl {};
//
//class SXAddl_SXCGrpLevel_SXDEnd : public SXAddl {};
//class SXAddl_SXCGrpLevel_SXDGrpLevelInfo : public SXAddl {};
//class SXAddl_SXCGrpLevel_SXDId : public SXAddl {};
//
//class SXAddl_SXCHierarchy_SXDDisplayFolder : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDEnd : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDFilterMember : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDFilterMember12 : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDIconSet : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDId : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDInfo12 : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDKPIGoal : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDKPIStatus : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDKPITime : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDKPITrend : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDKPIValue : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDKPIWeight : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDMeasureGrp : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDParentKPI : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDProperty : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDSXSetParentUnique : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDUserCaption : public SXAddl {};
//class SXAddl_SXCHierarchy_SXDVerUpdInv : public SXAddl {};
//
//class SXAddl_SXCQsi_SXDEnd : public SXAddl {};
//class SXAddl_SXCQsi_SXDId : public SXAddl {};
//
//class SXAddl_SXCQuery_SXDEnd : public SXAddl {};
//class SXAddl_SXCQuery_SXDReconnCond : public SXAddl {};
//class SXAddl_SXCQuery_SXDSrcConnFile : public SXAddl {};
//class SXAddl_SXCQuery_SXDSrcDataFile : public SXAddl {};
//class SXAddl_SXCQuery_SXDXMLSource : public SXAddl {};
//
//class SXAddl_SXCSXCondFmt_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXCondFmt_SXDSXCondFmt : public SXAddl {};
//class SXAddl_SXCSXCondFmts_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXCondFmts_SXDId : public SXAddl {};
//class SXAddl_SXCSXDH_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXDH_SXDId : public SXAddl {};
//class SXAddl_SXCSXDH_SXDSxdh : public SXAddl {};
//
//class SXAddl_SXCSXfilt_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXfilt_SXDId : public SXAddl {};
//class SXAddl_SXCSXfilt_SXDSXfilt : public SXAddl {};
//class SXAddl_SXCSXfilt_SXDSXItm : public SXAddl {};
//
//class SXAddl_SXCSXFilter12_SXDCaption : public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDId : public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDSXFilter : public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDSXFilterDesc : public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDSXFilterValue1: public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDSXFilterValue2: public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDXlsFilter : public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDXlsFilterValue1: public SXAddl {};
//class SXAddl_SXCSXFilter12_SXDXlsFilterValue2: public SXAddl {};
//class SXAddl_SXCSXFilters12_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXFilters12_SXDId : public SXAddl {};
//
//class SXAddl_SXCSXMg_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXMg_SXDId : public SXAddl {};
//class SXAddl_SXCSXMg_SXDUserCaption : public SXAddl {};
//
//class SXAddl_SXCSXMgs_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXMgs_SXDId : public SXAddl {};
//class SXAddl_SXCSXMgs_SXDMGrpSXDHMap : public SXAddl {};
//
//class SXAddl_SXCSXrule_SXDEnd : public SXAddl {};
//class SXAddl_SXCSXrule_SXDId : public SXAddl {};
//class SXAddl_SXCSXrule_SXDSXrule : public SXAddl {};
//
//class SXAddl_SXCView_SXDCalcMember : public SXAddl {};
//class SXAddl_SXCView_SXDCalcMemString : public SXAddl {};
//class SXAddl_SXCView_SXDCompactColHdr : public SXAddl {};
//class SXAddl_SXCView_SXDCompactRwHdr : public SXAddl {};
//class SXAddl_SXCView_SXDSXPIIvmb
//{
// SXAddl_SXCView_SXDSXPIIvmb(CFRecord& record);
//};
//class SXAddl_SXCView_SXDVerUpdInv : public SXAddl {};
} // namespace XLS

View File

@ -53,7 +53,10 @@ BaseObjectPtr SXStreamID::clone()
void SXStreamID::readFields(CFRecord& record)
{
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
record >> idStm;
global_info->arPivotCacheStream.push_back(idStm);
}
} // namespace XLS

View File

@ -73,13 +73,14 @@ int SXVI::serialize(std::wostream & strm)
{
CP_XML_NODE(L"item")
{
if (fHidden) CP_XML_ATTR(L"h", 1);
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)

View File

@ -77,8 +77,8 @@ void PtgSxName::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool f
SXPair *pair = dynamic_cast<SXPair*>(global_info->arPivotSxNames[sxIndex].pair[0].get());
if (pair)
{
std::map<int, BaseObjectPtr>::iterator pFind = global_info->mapPivotCache.find(global_info->idPivotCache);
if (pFind != global_info->mapPivotCache.end())
std::unordered_map<int, BaseObjectPtr>::iterator pFind = global_info->mapPivotCacheStream.find(global_info->idPivotCache);
if (pFind != global_info->mapPivotCacheStream.end())
{
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
if (pivot_cache)

View File

@ -254,8 +254,10 @@ int FDB::serialize(std::wostream & strm, bool bSql)
{
CP_XML_ATTR(L"containsSemiMixedTypes", 1);
}
else if (bDate & bString)
else if ((bDate & bString) || (bEmpty & bInteger & bString))
{
if (bEmpty && bInteger)
bNumber = true;
CP_XML_ATTR(L"containsMixedTypes", 1);
}
else if (!bEmpty && !bString && !bBool)

View File

@ -69,109 +69,135 @@ PIVOTADDL = SXAddl_SXCView_SXDId *Continue_SxaddlSxString
[SXADDLSXFILTERS12] *SXAddl_SXCView_SXDVerUpdInv *SXAddl_SXCView_SXDSXPIIvmb
[SXAddl_SXCView_SXDVerUpdInv] SXAddl_SXCView_SXDEnd
*/
const bool PIVOTADDL::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCView_SXDId>())
{
return false;
}
m_SXAddl_SXCView_SXDId = elements_.back();
elements_.pop_back();
int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDVer10Info>())
{
m_SXAddl_SXCView_SXDVer10Info = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXAddl_SXCView_SXDVer12Info>())
{
m_SXAddl_SXCView_SXDVer12Info = elements_.back();
elements_.pop_back();
}
count = proc.repeated<SXADDLCALCMEMBER>(0, 0);
while(count > 0)
{
m_arSXADDLCALCMEMBER.push_back(elements_.front());
elements_.pop_front(); count--;
}
int count = proc.repeated<SXAddl>(0, 0);
count = proc.repeated<SXADDLHIERARCHY>(0, 0);
while(count > 0)
for (std::list<BaseObjectPtr>::iterator it = elements_.begin(); it != elements_.end(); it++)
{
m_arSXADDLHIERARCHY.push_back(elements_.front());
elements_.pop_front(); count--;
}
count = proc.repeated<SXADDLFIELD>(0, 0);
while(count > 0)
{
m_arSXADDLFIELD.push_back(elements_.front());
elements_.pop_front(); count--;
}
SXAddl* addl = dynamic_cast<SXAddl*>(it->get());
if (!addl) continue;
SXAddl_SXCView_SXDTableStyleClient* p1 = dynamic_cast<SXAddl_SXCView_SXDTableStyleClient*>(addl->content.get());
if (p1)
{
m_SXAddl_SXCView_SXDTableStyleClient = addl->content;
continue;
}
SXAddl_SXCView_SXDVer10Info* p2 = dynamic_cast<SXAddl_SXCView_SXDVer10Info*>(addl->content.get());
if (p2)
{
m_SXAddl_SXCView_SXDVer10Info = addl->content;
continue;
}
SXAddl_SXCView_SXDVer12Info* p3 = dynamic_cast<SXAddl_SXCView_SXDVer12Info*>(addl->content.get());
if (p3)
{
m_SXAddl_SXCView_SXDVer12Info = addl->content;
continue;
}
}
//if(!proc.mandatory<SXAddl_SXCView_SXDId>())
//{
// return false;
//}
//m_SXAddl_SXCView_SXDId = elements_.back();
//elements_.pop_back();
//
//int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//
//if (proc.optional<SXAddl_SXCView_SXDVer10Info>())
//{
// m_SXAddl_SXCView_SXDVer10Info = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXAddl_SXCView_SXDVer12Info>())
//{
// m_SXAddl_SXCView_SXDVer12Info = elements_.back();
// elements_.pop_back();
//}
//count = proc.repeated<SXADDLCALCMEMBER>(0, 0);
//while(count > 0)
//{
// m_arSXADDLCALCMEMBER.push_back(elements_.front());
// elements_.pop_front(); count--;
//}
count = proc.repeated<UNKNOWNFRT>(0, 0);
if (proc.optional<SXAddl_SXCView_SXDTableStyleClient>())
{
m_SXAddl_SXCView_SXDTableStyleClient = elements_.back();
elements_.pop_back();
}
//count = proc.repeated<SXADDLHIERARCHY>(0, 0);
//while(count > 0)
//{
// m_arSXADDLHIERARCHY.push_back(elements_.front());
// elements_.pop_front(); count--;
//}
//count = proc.repeated<SXADDLFIELD>(0, 0);
//while(count > 0)
//{
// m_arSXADDLFIELD.push_back(elements_.front());
// elements_.pop_front(); count--;
//}
if(proc.optional<SXAddl_SXCView_SXDCompactRwHdr>())
{
m_SXAddl_SXCView_SXDCompactRwHdr = elements_.back();
elements_.pop_back();
//count = proc.repeated<UNKNOWNFRT>(0, 0);
//
//if (proc.optional<SXAddl_SXCView_SXDTableStyleClient>())
//{
// m_SXAddl_SXCView_SXDTableStyleClient = elements_.back();
// elements_.pop_back();
//}
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCView_SXDCompactColHdr>())
{
m_SXAddl_SXCView_SXDCompactColHdr = elements_.back();
elements_.pop_back();
//if(proc.optional<SXAddl_SXCView_SXDCompactRwHdr>())
//{
// m_SXAddl_SXCView_SXDCompactRwHdr = elements_.back();
// elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
// count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCView_SXDCompactColHdr>())
//{
// m_SXAddl_SXCView_SXDCompactColHdr = elements_.back();
// elements_.pop_back();
if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
{
m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.back());
elements_.pop_back();
}
if (proc.optional<SXADDLCONDFMTS>())
{
m_SXADDLCONDFMTS = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLSXFILTERS12>())
{
m_SXAddl_SXADDLSXFILTERS12 = elements_.back();
elements_.pop_back();
}
count = proc.repeated<SXAddl_SXCView_SXDVerUpdInv>(0, 0);
while(count > 0)
{
m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.front());
elements_.pop_front(); count--;
}
// count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
count = proc.repeated<SXAddl_SXCView_SXDSXPIIvmb>(0, 0);
while(count > 0)
{
m_arSXAddl_SXCView_SXDSXPIIvmb.push_back(elements_.front());
elements_.pop_front(); count--;
}
//if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
//{
// m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.back());
// elements_.pop_back();
//}
//if (proc.optional<SXADDLCONDFMTS>())
//{
// m_SXADDLCONDFMTS = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXADDLSXFILTERS12>())
//{
// m_SXAddl_SXADDLSXFILTERS12 = elements_.back();
// elements_.pop_back();
//}
//count = proc.repeated<SXAddl_SXCView_SXDVerUpdInv>(0, 0);
//while(count > 0)
//{
// m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.front());
// elements_.pop_front(); count--;
//}
if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
{
m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.front());
elements_.pop_front();
}
//count = proc.repeated<SXAddl_SXCView_SXDSXPIIvmb>(0, 0);
//while(count > 0)
//{
// m_arSXAddl_SXCView_SXDSXPIIvmb.push_back(elements_.front());
// elements_.pop_front(); count--;
//}
if (proc.optional<SXAddl_SXCView_SXDEnd>())
{
elements_.pop_back();
}
//if (proc.optional<SXAddl_SXCView_SXDVerUpdInv>())
//{
// m_arSXAddl_SXCView_SXDVerUpdInv.push_back(elements_.front());
// elements_.pop_front();
//}
//if (proc.optional<SXAddl_SXCView_SXDEnd>())
//{
// elements_.pop_back();
//}
return true;
}

View File

@ -49,21 +49,21 @@ public:
static const ElementType type = typePIVOTADDL;
BaseObjectPtr m_SXAddl_SXCView_SXDId;
BaseObjectPtr m_SXAddl_SXCView_SXDVer10Info;
BaseObjectPtr m_SXAddl_SXCView_SXDVer12Info;
BiffStructurePtr m_SXAddl_SXCView_SXDId;
BiffStructurePtr m_SXAddl_SXCView_SXDVer10Info;
BiffStructurePtr m_SXAddl_SXCView_SXDVer12Info;
BaseObjectPtr m_SXAddl_SXCView_SXDCompactRwHdr;
BaseObjectPtr m_SXAddl_SXCView_SXDCompactColHdr;
BaseObjectPtr m_SXAddl_SXADDLSXFILTERS12;
BaseObjectPtr m_SXADDLCONDFMTS;
BaseObjectPtr m_SXAddl_SXCView_SXDTableStyleClient;
BiffStructurePtr m_SXAddl_SXCView_SXDCompactRwHdr;
BiffStructurePtr m_SXAddl_SXCView_SXDCompactColHdr;
BiffStructurePtr m_SXAddl_SXADDLSXFILTERS12;
BiffStructurePtr m_SXADDLCONDFMTS;
BiffStructurePtr m_SXAddl_SXCView_SXDTableStyleClient;
std::vector<BaseObjectPtr> m_arSXAddl_SXCView_SXDVerUpdInv;
std::vector<BaseObjectPtr> m_arSXAddl_SXCView_SXDSXPIIvmb;
std::vector<BaseObjectPtr> m_arSXADDLFIELD;
std::vector<BaseObjectPtr> m_arSXADDLHIERARCHY;
std::vector<BaseObjectPtr> m_arSXADDLCALCMEMBER;
std::vector<BiffStructurePtr> m_arSXAddl_SXCView_SXDVerUpdInv;
std::vector<BiffStructurePtr> m_arSXAddl_SXCView_SXDSXPIIvmb;
std::vector<BiffStructurePtr> m_arSXADDLFIELD;
std::vector<BiffStructurePtr> m_arSXADDLHIERARCHY;
std::vector<BiffStructurePtr> m_arSXADDLCALCMEMBER;
};

View File

@ -98,11 +98,13 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
SXStreamID* streamId = dynamic_cast<SXStreamID*>(m_SXStreamID.get());
if (!streamId) return 0;
std::map<int, BaseObjectPtr>::iterator pFind = global_info_->mapPivotCache.find(streamId->idStm);
if (pFind == global_info_->mapPivotCache.end()) return 0;
std::unordered_map<int, BaseObjectPtr>::iterator pFind = global_info_->mapPivotCacheStream.find(streamId->idStm);
if (pFind == global_info_->mapPivotCacheStream.end()) return 0;
global_info_->idPivotCache = streamId->idStm;
global_info_->mapPivotCacheIndex.insert(std::make_pair(global_info_->idPivotCache, global_info_->mapPivotCacheIndex.size()));
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
if (!pivot_cache) return 0;
@ -124,13 +126,15 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
{
CP_XML_ATTR(L"r:id", L"rId1" );
}
else
{
CP_XML_ATTR(L"saveData", 0);
}
CP_XML_ATTR(L"enableRefresh", 1);
CP_XML_ATTR(L"refreshedBy", db->rgb.value());
CP_XML_ATTR(L"refreshedDate", db_ex->numDate.data.value);
CP_XML_ATTR(L"recordCount", db->crdbdb);
//createdVersion="1"
//refreshedVersion="2"
//upgradeOnRefresh="1">
//upgradeOnRefresh="1"
SXSRC* src = dynamic_cast<SXSRC*>(m_SXSRC.get());
if (src)
{
@ -176,8 +180,8 @@ int PIVOTCACHEDEFINITION::serialize_records(std::wostream & strm)
SXStreamID* streamId = dynamic_cast<SXStreamID*>(m_SXStreamID.get());
if (!streamId) return 0;
std::map<int, BaseObjectPtr>::iterator pFind = global_info_->mapPivotCache.find(streamId->idStm);
if (pFind == global_info_->mapPivotCache.end()) return 0;
std::unordered_map<int, BaseObjectPtr>::iterator pFind = global_info_->mapPivotCacheStream.find(streamId->idStm);
if (pFind == global_info_->mapPivotCacheStream.end()) return 0;
PIVOTCACHE* pivot_cache = dynamic_cast<PIVOTCACHE*>(pFind->second.get());
if (!pivot_cache) return 0;

View File

@ -31,9 +31,10 @@
*/
#include "PIVOTEX.h"
#include <Logic/Biff_records/SXEx.h>
#include <Logic/Biff_unions/PIVOTSELECT.h>
#include <Logic/Biff_unions/PIVOTFORMAT.h>
#include "PIVOTSELECT.h"
#include "PIVOTFORMAT.h"
#include "../Biff_records/SXEx.h"
namespace XLS
{
@ -54,7 +55,6 @@ BaseObjectPtr PIVOTEX::clone()
return BaseObjectPtr(new PIVOTEX(*this));
}
// PIVOTEX = SXEx *PIVOTSELECT *PIVOTFORMAT
const bool PIVOTEX::loadContent(BinProcessor& proc)
{
@ -62,9 +62,21 @@ const bool PIVOTEX::loadContent(BinProcessor& proc)
{
return false;
}
m_SXEx = elements_.back();
elements_.pop_back();
int count = 0;
count = proc.repeated<PIVOTSELECT>(0, 0);
while(count--)
{
m_arPIVOTSELECT.push_back(elements_.front()); elements_.pop_front();
}
count = proc.repeated<PIVOTFORMAT>(0, 0);
while(count--)
{
m_arPIVOTFORMAT.push_back(elements_.front()); elements_.pop_front();
}
return true;
}

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTEX union of records
class PIVOTEX: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTEX)
@ -49,7 +47,12 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTEX;
static const ElementType type = typePIVOTEX;
BaseObjectPtr m_SXEx;
std::vector<BaseObjectPtr> m_arPIVOTSELECT;
std::vector<BaseObjectPtr> m_arPIVOTFORMAT;
};
} // namespace XLS

View File

@ -31,9 +31,10 @@
*/
#include "PIVOTFORMAT.h"
#include <Logic/Biff_records/SxFormat.h>
#include <Logic/Biff_unions/PIVOTRULE.h>
#include <Logic/Biff_records/SxDXF.h>
#include "PIVOTRULE.h"
#include "../Biff_records/SxFormat.h"
#include "../Biff_records/SxDXF.h"
namespace XLS
{
@ -54,7 +55,6 @@ BaseObjectPtr PIVOTFORMAT::clone()
return BaseObjectPtr(new PIVOTFORMAT(*this));
}
// PIVOTFORMAT = SxFormat PIVOTRULE [SxDXF]
const bool PIVOTFORMAT::loadContent(BinProcessor& proc)
{
@ -62,11 +62,18 @@ const bool PIVOTFORMAT::loadContent(BinProcessor& proc)
{
return false;
}
m_SxFormat = elements_.back();
elements_.pop_back();
if (proc.mandatory<PIVOTRULE>())
{
m_PIVOTRULE = elements_.back();
elements_.pop_back();
}
if (proc.optional<SxDXF>())
{
m_SxDXF = elements_.back();
elements_.pop_back();
}
return true;

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of PIVOTFORMAT union of records
class PIVOTFORMAT: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(PIVOTFORMAT)
@ -49,7 +47,11 @@ public:
virtual const bool loadContent(BinProcessor& proc);
static const ElementType type = typePIVOTFORMAT;
static const ElementType type = typePIVOTFORMAT;
BaseObjectPtr m_SxFormat;
BaseObjectPtr m_PIVOTRULE;
BaseObjectPtr m_SxDXF;
};
} // namespace XLS

View File

@ -31,8 +31,8 @@
*/
#include "PIVOTFRT.h"
#include <Logic/Biff_unions/PIVOTFRT9.h>
#include <Logic/Biff_unions/PIVOTADDL.h>
#include "PIVOTFRT9.h"
#include "PIVOTADDL.h"
namespace XLS
{

View File

@ -99,7 +99,7 @@ int PIVOTVD::serialize(std::wostream & strm)
if (vd_ex->ifmt > 0)
{
CP_XML_ATTR(L"numFmtId", vd_ex->ifmt);
CP_XML_ATTR(L"numFmtId", vd_ex->ifmt != 44 ? vd_ex->ifmt : 0);
}
if (vd->stName.value().empty() == false)

View File

@ -38,16 +38,25 @@
#include "PIVOTPI.h"
#include "PIVOTLI.h"
#include "PIVOTEX.h"
#include "PIVOTADDL.h"
#include "PIVOTFORMAT.h"
#include "PIVOTFRT9.h"
#include "../Biff_records/SXDI.h"
#include "../Biff_records/SxView.h"
#include "../Biff_records/SXAddl.h"
#include "../Biff_records/SXEx.h"
#include "../Biff_records/SxFormat.h"
#include "../Biff_records/SxDXF.h"
#include "../Biff_records/SXViewEx9.h"
namespace XLS
{
PIVOTVIEW::PIVOTVIEW()
{
indexCache = -1;
indexStream = -1;
indexCache = -1;
}
PIVOTVIEW::~PIVOTVIEW()
@ -62,6 +71,8 @@ BaseObjectPtr PIVOTVIEW::clone()
// PIVOTVIEW = PIVOTCORE [PIVOTFRT]
const bool PIVOTVIEW::loadContent(BinProcessor& proc)
{
global_info_ = proc.getGlobalWorkbookInfo();
if(!proc.mandatory<PIVOTCORE>())
{
return false;
@ -95,8 +106,20 @@ int PIVOTVIEW::serialize(std::wostream & strm)
if (!view) return 0;
PIVOTFRT* frt = dynamic_cast<PIVOTFRT*>(m_PIVOTFRT.get());
PIVOTEX* pivot_ex = dynamic_cast<PIVOTEX*>(core->m_PIVOTEX.get());
indexCache = view->iCache;
PIVOTADDL* addls = frt ? dynamic_cast<PIVOTADDL*>(frt->m_PIVOTADDL.get()) : NULL;
PIVOTFRT9* frt9 = frt ? dynamic_cast<PIVOTFRT9*>(frt->m_PIVOTFRT9.get()) : NULL;
SXEx *view_ex = pivot_ex ? dynamic_cast<SXEx*>(pivot_ex->m_SXEx.get()) : NULL;
SXViewEx9 *view_ex9 = pivot_ex ? dynamic_cast<SXViewEx9*>(frt9->m_SXViewEx9.get()) : NULL;
SXAddl_SXCView_SXDVer10Info *view_ex10 = addls ? dynamic_cast<SXAddl_SXCView_SXDVer10Info*>(addls->m_SXAddl_SXCView_SXDTableStyleClient.get()) : NULL;
SXAddl_SXCView_SXDVer12Info *view_ex12 = addls ? dynamic_cast<SXAddl_SXCView_SXDVer12Info*>(addls->m_SXAddl_SXCView_SXDTableStyleClient.get()) : NULL;
indexStream = global_info_->arPivotCacheStream[view->iCache];
std::map<int, int>::iterator pFindIndex = global_info_->mapPivotCacheIndex.find(indexStream);
indexCache = pFindIndex->second;
CP_XML_WRITER(strm)
{
@ -105,8 +128,11 @@ int PIVOTVIEW::serialize(std::wostream & strm)
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
CP_XML_ATTR(L"name", view->stTable.value());
CP_XML_ATTR(L"cacheId", view->iCache);
CP_XML_ATTR(L"dataOnRows", view->sxaxis4Data.bRw);
CP_XML_ATTR(L"cacheId", indexCache);
if (view->sxaxis4Data.bRw)
{
CP_XML_ATTR(L"dataOnRows", view->sxaxis4Data.bRw);
}
CP_XML_ATTR(L"applyNumberFormats", view->fAtrNum);
CP_XML_ATTR(L"applyBorderFormats", view->fAtrBdr);
CP_XML_ATTR(L"applyFontFormats", view->fAtrFnt);
@ -117,15 +143,39 @@ int PIVOTVIEW::serialize(std::wostream & strm)
{
CP_XML_ATTR(L"dataCaption", view->stData.value());
}
CP_XML_ATTR(L"asteriskTotals", 1);
CP_XML_ATTR(L"showMemberPropertyTips", 0);
CP_XML_ATTR(L"useAutoFormatting", view->fAutoFormat);
CP_XML_ATTR(L"autoFormatId", view->itblAutoFmt);
CP_XML_ATTR(L"itemPrintTitles", 1);
CP_XML_ATTR(L"indent", 0);
CP_XML_ATTR(L"compact", 0);
CP_XML_ATTR(L"compactData", 0);
CP_XML_ATTR(L"gridDropZones", 1);
CP_XML_ATTR(L"autoFormatId", view->itblAutoFmt);
if (view_ex9)
{
CP_XML_ATTR(L"itemPrintTitles", view_ex9->fPrintTitles);
CP_XML_ATTR(L"outline", view_ex9->fLineMode);
CP_XML_ATTR(L"outlineData", view_ex12 ? view_ex12->fOutlineData : view_ex9->fLineMode);
}
CP_XML_ATTR(L"asteriskTotals", view_ex10 ? view_ex10->fNotVisualTotals : 0);
if (view_ex12)
{
CP_XML_ATTR(L"indent", view_ex12->cIndentInc );
CP_XML_ATTR(L"published", view_ex12->fPublished);
CP_XML_ATTR(L"compact", view_ex12->fCompactData);
CP_XML_ATTR(L"compactData", view_ex12->fCompactData);
CP_XML_ATTR(L"gridDropZones", view_ex12->fNewDropZones);
CP_XML_ATTR(L"showDrill", !view_ex12->fHideDrillIndicators);
CP_XML_ATTR(L"printDrill", view_ex12->fPrintDrillIndicators);
}
if (view_ex)
{
if (!view_ex->fEnableWizard) CP_XML_ATTR(L"enableWizard", 0);
if (!view_ex->fEnableDrilldown) CP_XML_ATTR(L"enableDrill", 0);
//CP_XML_ATTR(L"disableFieldList", !view_ex->fEnableFieldDialog);//enableFieldPropert
if (!view_ex->stError.value().empty())
CP_XML_ATTR(L"errorCaption", view_ex->stError.value());
}
CP_XML_NODE(L"location")
{
@ -133,8 +183,12 @@ int PIVOTVIEW::serialize(std::wostream & strm)
CP_XML_ATTR(L"firstHeaderRow", view->rwFirstHead - view->ref.rowFirst );
CP_XML_ATTR(L"firstDataRow", view->rwFirstData - view->ref.rowFirst);
CP_XML_ATTR(L"firstDataCol", view->colFirstData - view->ref.columnFirst);
CP_XML_ATTR(L"rowPageCount", 1);
CP_XML_ATTR(L"colPageCount", 1);
if (view->cDimPg > 0)
{
CP_XML_ATTR(L"rowPageCount", view->cDimPg);
CP_XML_ATTR(L"colPageCount", 1);
}
}
CP_XML_NODE(L"pivotFields")
{
@ -204,14 +258,23 @@ int PIVOTVIEW::serialize(std::wostream & strm)
}
}
}
//CP_XML_NODE(L"pivotTableStyleInfo")
//{
// CP_XML_ATTR(L"showRowHeaders", 1);
// CP_XML_ATTR(L"showColHeaders", 1);
// CP_XML_ATTR(L"showRowStripes", 0);
// CP_XML_ATTR(L"showColStripes", 0);
// CP_XML_ATTR(L"showLastColumn", 1);
//}
if ((addls) && (addls->m_SXAddl_SXCView_SXDTableStyleClient))
{
SXAddl_SXCView_SXDTableStyleClient* table_style = dynamic_cast<SXAddl_SXCView_SXDTableStyleClient*>(addls->m_SXAddl_SXCView_SXDTableStyleClient.get());
CP_XML_NODE(L"pivotTableStyleInfo")
{
if (!table_style->stName.value().empty())
CP_XML_ATTR(L"name", table_style->stName.value());
CP_XML_ATTR(L"showRowHeaders", table_style->fRowHeaders);
CP_XML_ATTR(L"showColHeaders", table_style->fColumnHeaders);
CP_XML_ATTR(L"showRowStripes", table_style->fRowStrips);
CP_XML_ATTR(L"showColStripes", table_style->fColumnStrips);
CP_XML_ATTR(L"showLastColumn", table_style->fLastColumn);
}
}
}
}

View File

@ -54,8 +54,11 @@ public:
BaseObjectPtr m_PIVOTCORE;
BaseObjectPtr m_PIVOTFRT;
//----------------------------------
int indexStream;
int indexCache;
std::wstring name;
GlobalWorkbookInfoPtr global_info_;
};
} // namespace XLS

View File

@ -57,12 +57,12 @@ BaseObjectPtr SXADDLAUTOSORT::clone()
// SXADDLAUTOSORT = SXAddl_SXCAutoSort_SXDId SXADDLSXRULE SXAddl_SXCAutoSort_SXDEnd
const bool SXADDLAUTOSORT::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCAutoSort_SXDId>())
{
return false;
}
proc.mandatory<SXADDLSXRULE>();
proc.mandatory<SXAddl_SXCAutoSort_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCAutoSort_SXDId>())
//{
// return false;
//}
//proc.mandatory<SXADDLSXRULE>();
//proc.mandatory<SXAddl_SXCAutoSort_SXDEnd>();
return true;
}

View File

@ -60,39 +60,39 @@ BaseObjectPtr SXADDLCACHE::clone()
//[SXADDLCACHE12] [SXADDLDBQUERY] *UNKNOWNFRT SXAddl_SXCCache_SXDEnd
const bool SXADDLCACHE::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCache_SXDId>())
{
return false;
}
m_SXCCache_SXDId = elements_.back();
elements_.pop_back();
//if(!proc.mandatory<SXAddl_SXCCache_SXDId>())
//{
// return false;
//}
//m_SXCCache_SXDId = elements_.back();
//elements_.pop_back();
if (proc.optional<SXAddl_SXCCache_SXDVer10Info>())
{
m_SXDVer10Info = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXAddl_SXCCache_SXDVerSXMacro>())
{
m_SXDVerSXMacro = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLCACHE12>())
{
m_SXADDLCACHE12 = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLDBQUERY>())
{
m_SXADDLDBQUERY = elements_.back();
elements_.pop_back();
}
int count = proc.repeated<UNKNOWNFRT>(0, 0);
//if (proc.optional<SXAddl_SXCCache_SXDVer10Info>())
//{
// m_SXDVer10Info = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXAddl_SXCCache_SXDVerSXMacro>())
//{
// m_SXDVerSXMacro = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXADDLCACHE12>())
//{
// m_SXADDLCACHE12 = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXADDLDBQUERY>())
//{
// m_SXADDLDBQUERY = elements_.back();
// elements_.pop_back();
//}
//int count = proc.repeated<UNKNOWNFRT>(0, 0);
if (proc.optional<SXAddl_SXCCache_SXDEnd>())
{
elements_.pop_back();
}
//if (proc.optional<SXAddl_SXCCache_SXDEnd>())
//{
// elements_.pop_back();
//}
return true;
}

View File

@ -60,45 +60,45 @@ BaseObjectPtr SXADDLCACHE12::clone()
// *SXADDLCACHEFIELD [SXADDLSXDH] [SXADDLSXMGS] SXAddl_SXCCache_SXDVerUpdInv
const bool SXADDLCACHE12::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>())
{
return false;
}
m_SXAddl_SXCCache_SXDVerUpdInv = elements_.back();
elements_.pop_back();
//if(!proc.mandatory<SXAddl_SXCCache_SXDVerUpdInv>())
//{
// return false;
//}
//m_SXAddl_SXCCache_SXDVerUpdInv = elements_.back();
//elements_.pop_back();
if (proc.optional<SXAddl_SXCCache_SXDInfo12>())
{
m_SXAddl_SXCCache_SXDInfo12 = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXAddl_SXCCache_SXDInvRefreshReal>())
{
m_SXAddl_SXCCache_SXDInvRefreshReal = elements_.back();
elements_.pop_back();
}
int count = proc.repeated<SXADDLCACHEFIELD>(0, 0);
while(count > 0)
{
m_arSXADDLCACHEFIELD.push_back(elements_.front());
elements_.pop_front(); count--;
}
if (proc.optional<SXADDLSXDH>())
{
m_SXADDLSXDH = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXADDLSXMGS>())
{
m_SXADDLSXMGS = elements_.back();
elements_.pop_back();
}
if (proc.optional<SXAddl_SXCCache_SXDVerUpdInv>())
{
m_SXAddl_SXCCache_SXDVerUpdInvS = elements_.back();
elements_.pop_back();
}
//if (proc.optional<SXAddl_SXCCache_SXDInfo12>())
//{
// m_SXAddl_SXCCache_SXDInfo12 = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXAddl_SXCCache_SXDInvRefreshReal>())
//{
// m_SXAddl_SXCCache_SXDInvRefreshReal = elements_.back();
// elements_.pop_back();
//}
//
//int count = proc.repeated<SXADDLCACHEFIELD>(0, 0);
//while(count > 0)
//{
// m_arSXADDLCACHEFIELD.push_back(elements_.front());
// elements_.pop_front(); count--;
//}
//if (proc.optional<SXADDLSXDH>())
//{
// m_SXADDLSXDH = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXADDLSXMGS>())
//{
// m_SXADDLSXMGS = elements_.back();
// elements_.pop_back();
//}
//if (proc.optional<SXAddl_SXCCache_SXDVerUpdInv>())
//{
// m_SXAddl_SXCCache_SXDVerUpdInvS = elements_.back();
// elements_.pop_back();
//}
return true;
}

View File

@ -59,11 +59,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheField_SXDCaption>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
//if(!proc.mandatory<SXAddl_SXCCacheField_SXDCaption>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
return true;
};
};
@ -81,11 +81,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheField_SXDPropName>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
//if(!proc.mandatory<SXAddl_SXCCacheField_SXDPropName>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
return true;
};
};
@ -102,11 +102,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheField_SXDProperty>())
{
return false;
}
proc.optional<Parenthesis_SXADDLCACHEFIELD_3>();
//if(!proc.mandatory<SXAddl_SXCCacheField_SXDProperty>())
//{
// return false;
//}
//proc.optional<Parenthesis_SXADDLCACHEFIELD_3>();
return true;
};
};
@ -123,11 +123,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheField_SXDIfdbMpMapCount>())
{
return false;
}
proc.mandatory<SXAddl_SXCCacheField_SXDIfdbMempropMap>();
//if(!proc.mandatory<SXAddl_SXCCacheField_SXDIfdbMpMapCount>())
//{
// return false;
//}
//proc.mandatory<SXAddl_SXCCacheField_SXDIfdbMempropMap>();
return true;
};
};
@ -144,12 +144,12 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheField_SXDSxrmitmCount>())
{
return false;
}
proc.repeated<SXADDLCACHEITEM>(0, 0);
proc.mandatory<SXAddl_SXCCacheItem_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCCacheField_SXDSxrmitmCount>())
//{
// return false;
//}
//proc.repeated<SXADDLCACHEITEM>(0, 0);
//proc.mandatory<SXAddl_SXCCacheItem_SXDEnd>();
return true;
};
};
@ -171,16 +171,16 @@ BaseObjectPtr SXADDLCACHEFIELD::clone()
// SXAddl_SXCCacheField_SXDEnd
const bool SXADDLCACHEFIELD::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheField_SXDId>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.optional<Parenthesis_SXADDLCACHEFIELD_1>();
proc.optional<Parenthesis_SXADDLCACHEFIELD_2>();
proc.optional<Parenthesis_SXADDLCACHEFIELD_4>();
proc.optional<Parenthesis_SXADDLCACHEFIELD_5>();
proc.optional<SXAddl_SXCCacheField_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCCacheField_SXDId>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
//proc.optional<Parenthesis_SXADDLCACHEFIELD_1>();
//proc.optional<Parenthesis_SXADDLCACHEFIELD_2>();
//proc.optional<Parenthesis_SXADDLCACHEFIELD_4>();
//proc.optional<Parenthesis_SXADDLCACHEFIELD_5>();
//proc.optional<SXAddl_SXCCacheField_SXDEnd>();
return true;
}

View File

@ -58,11 +58,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheItem_SXDSxrmitmDisp>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
//if(!proc.mandatory<SXAddl_SXCCacheItem_SXDSxrmitmDisp>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
return true;
};
};
@ -79,11 +79,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheItem_SXDItmMpMapCount>())
{
return false;
}
proc.mandatory<SXAddl_SXCCacheItem_SXDItmMpropMap>();
//if(!proc.mandatory<SXAddl_SXCCacheItem_SXDItmMpMapCount>())
//{
// return false;
//}
//proc.mandatory<SXAddl_SXCCacheItem_SXDItmMpropMap>();
return true;
};
};
@ -99,12 +99,12 @@ BaseObjectPtr SXADDLCACHEITEM::clone()
// *(SXAddl_SXCCacheItem_SXDItmMpMapCount SXAddl_SXCCacheItem_SXDItmMpropMap)
const bool SXADDLCACHEITEM::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCCacheItem_SXDId>())
{
return false;
}
proc.optional<Parenthesis_SXADDLCACHEITEM_1>();
proc.repeated<Parenthesis_SXADDLCACHEITEM_2>(0, 0);
//if(!proc.mandatory<SXAddl_SXCCacheItem_SXDId>())
//{
// return false;
//}
//proc.optional<Parenthesis_SXADDLCACHEITEM_1>();
//proc.repeated<Parenthesis_SXADDLCACHEITEM_2>(0, 0);
return true;
}

View File

@ -56,14 +56,14 @@ BaseObjectPtr SXADDLCALCMEMBER::clone()
// SXADDLCALCMEMBER = (SXAddl_SXCView_SXDCalcMember [SXAddl_SXCView_SXDCalcMemString *Continue_SxaddlSxString])
const bool SXADDLCALCMEMBER::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCView_SXDCalcMember>())
{
return false;
}
if(proc.optional<SXAddl_SXCView_SXDCalcMemString>())
{
int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
//if(!proc.mandatory<SXAddl_SXCView_SXDCalcMember>())
//{
// return false;
//}
//if(proc.optional<SXAddl_SXCView_SXDCalcMemString>())
//{
// int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
return true;
}

View File

@ -57,12 +57,12 @@ BaseObjectPtr SXADDLCONDFMT::clone()
// SXADDLCONDFMT = SXAddl_SXCSXCondFmt_SXDSXCondFmt *SXADDLSXRULE SXAddl_SXCSXCondFmt_SXDEnd
const bool SXADDLCONDFMT::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXCondFmt_SXDSXCondFmt>())
{
return false;
}
proc.repeated<SXADDLSXRULE>(0, 0);
proc.mandatory<SXAddl_SXCSXCondFmt_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXCondFmt_SXDSXCondFmt>())
//{
// return false;
//}
//proc.repeated<SXADDLSXRULE>(0, 0);
//proc.mandatory<SXAddl_SXCSXCondFmt_SXDEnd>();
return true;
}

View File

@ -57,12 +57,12 @@ BaseObjectPtr SXADDLCONDFMTS::clone()
// SXADDLCONDFMTS = SXAddl_SXCSXCondFmts_SXDId *SXADDLCONDFMT SXAddl_SXCSXCondFmts_SXDEnd
const bool SXADDLCONDFMTS::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXCondFmts_SXDId>())
{
return false;
}
proc.repeated<SXADDLCONDFMT>(0, 0);
proc.optional<SXAddl_SXCSXCondFmts_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXCondFmts_SXDId>())
//{
// return false;
//}
//proc.repeated<SXADDLCONDFMT>(0, 0);
//proc.optional<SXAddl_SXCSXCondFmts_SXDEnd>();
return true;
}

View File

@ -61,39 +61,39 @@ SXADDLDBQUERY = [SXAddl_SXCQuery_SXDXMLSource *Continue_SxaddlSxString]
*/
const bool SXADDLDBQUERY::loadContent(BinProcessor& proc)
{
int count = 0;
if(proc.optional<SXAddl_SXCQuery_SXDXMLSource>())
{
m_XMLSource = elements_.back();
elements_.pop_back();
//int count = 0;
//
//if(proc.optional<SXAddl_SXCQuery_SXDXMLSource>())
//{
// m_XMLSource = elements_.back();
// elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCQuery_SXDSrcDataFile>())
{
m_SrcDataFile = elements_.back();
elements_.pop_back();
// count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCQuery_SXDSrcDataFile>())
//{
// m_SrcDataFile = elements_.back();
// elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCQuery_SXDSrcConnFile>())
{
m_SrcConnFile = elements_.back();
elements_.pop_back();
// count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCQuery_SXDSrcConnFile>())
//{
// m_SrcConnFile = elements_.back();
// elements_.pop_back();
count = proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCQuery_SXDReconnCond>())
{
m_ReconnCond = elements_.back();
elements_.pop_back();
}
// count = proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCQuery_SXDReconnCond>())
//{
// m_ReconnCond = elements_.back();
// elements_.pop_back();
//}
if(proc.mandatory<SXAddl_SXCQuery_SXDEnd>())
{
elements_.pop_back();
}
//if(proc.mandatory<SXAddl_SXCQuery_SXDEnd>())
//{
// elements_.pop_back();
//}
return m_XMLSource || m_SrcConnFile || m_SrcDataFile || m_ReconnCond;
}

View File

@ -60,22 +60,23 @@ SXADDLFIELD = [SXAddl_SXCField_SXDId *Continue_SxaddlSxString SXAddl_SXCField_SX
*/
const bool SXADDLFIELD::loadContent(BinProcessor& proc)
{
if(proc.optional<SXAddl_SXCField_SXDId>())
{
int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
if (proc.mandatory<SXAddl_SXCField_SXDVer10Info>())
{
}
if (proc.mandatory<SXAddl_SXCField_SXDEnd>())
{
}
if (proc.optional<SXADDLFIELD12>())
{
}
return true;
}
//if(proc.optional<SXAddl_SXCField_SXDId>())
//{
// int count = proc.repeated<Continue_SxaddlSxString>(0, 0);
// if (proc.mandatory<SXAddl_SXCField_SXDVer10Info>())
// {
// }
// if (proc.mandatory<SXAddl_SXCField_SXDEnd>())
// {
// }
// if (proc.optional<SXADDLFIELD12>())
// {
// }
// return true;
//}
return proc.optional<SXADDLFIELD12>();
//return proc.optional<SXADDLFIELD12>();
return true;
}
} // namespace XLS

View File

@ -63,23 +63,23 @@ SXADDLFIELD12 = SXAddl_SXCField12_SXDId *Continue_SxaddlSxString SXAddl_SXCField
*/
const bool SXADDLFIELD12::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCField12_SXDId>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.mandatory<SXAddl_SXCField12_SXDVer12Info>();
proc.mandatory<SXAddl_SXCField12_SXDVerUpdInv>();
if(proc.optional<SXAddl_SXCField12_SXDMemberCaption>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
proc.optional<SXAddl_SXCField12_SXDAutoshow>();
proc.optional<SXAddl_SXCField12_SXDISXTH>();
proc.optional<SXADDLAUTOSORT>();
proc.mandatory<SXAddl_SXCField12_SXDVerUpdInv>();
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCField12_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCField12_SXDId>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
//proc.mandatory<SXAddl_SXCField12_SXDVer12Info>();
//proc.mandatory<SXAddl_SXCField12_SXDVerUpdInv>();
//if(proc.optional<SXAddl_SXCField12_SXDMemberCaption>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//proc.optional<SXAddl_SXCField12_SXDAutoshow>();
//proc.optional<SXAddl_SXCField12_SXDISXTH>();
//proc.optional<SXADDLAUTOSORT>();
//proc.mandatory<SXAddl_SXCField12_SXDVerUpdInv>();
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.mandatory<SXAddl_SXCField12_SXDEnd>();
return true;
}

View File

@ -60,15 +60,15 @@ SXADDLGROUP = SXAddl_SXCGroup_SXDId *Continue_SxaddlSxString SXAddl_SXCGroup_SXD
*/
const bool SXADDLGROUP::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCGroup_SXDId>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.mandatory<SXAddl_SXCGroup_SXDGrpInfo>();
proc.repeated<SXAddl_SXCGroup_SXDMember>(0, 0);
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCGroup_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCGroup_SXDId>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
//proc.mandatory<SXAddl_SXCGroup_SXDGrpInfo>();
//proc.repeated<SXAddl_SXCGroup_SXDMember>(0, 0);
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.mandatory<SXAddl_SXCGroup_SXDEnd>();
return true;
}

View File

@ -61,15 +61,15 @@ SXADDLGRPLEVEL = SXAddl_SXCGrpLevel_SXDId *Continue_SxaddlSxString SXAddl_SXCGrp
*/
const bool SXADDLGRPLEVEL::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCGrpLevel_SXDId>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.mandatory<SXAddl_SXCGrpLevel_SXDGrpLevelInfo>();
proc.repeated<SXADDLGROUP>(0, 0);
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCGrpLevel_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCGrpLevel_SXDId>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
//proc.mandatory<SXAddl_SXCGrpLevel_SXDGrpLevelInfo>();
//proc.repeated<SXADDLGROUP>(0, 0);
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.mandatory<SXAddl_SXCGrpLevel_SXDEnd>();
return true;
}

View File

@ -75,67 +75,67 @@ SXADDLHIERARCHY = SXAddl_SXCHierarchy_SXDId *Continue_SxaddlSxString *SXAddl_SXC
*/
const bool SXADDLHIERARCHY::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCHierarchy_SXDId>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.repeated<SXAddl_SXCHierarchy_SXDProperty>(0, 0);
proc.repeated<SXADDLGRPLEVEL>(0, 0);
proc.optional<SXAddl_SXCHierarchy_SXDVerUpdInv>();
//if(!proc.mandatory<SXAddl_SXCHierarchy_SXDId>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
//proc.repeated<SXAddl_SXCHierarchy_SXDProperty>(0, 0);
//proc.repeated<SXADDLGRPLEVEL>(0, 0);
//proc.optional<SXAddl_SXCHierarchy_SXDVerUpdInv>();
if(proc.optional<SXAddl_SXCHierarchy_SXDSXSetParentUnique>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
proc.optional<SXAddl_SXCHierarchy_SXDIconSet>();
if(proc.optional<SXAddl_SXCHierarchy_SXDUserCaption>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
proc.repeated<UNKNOWNFRT>(0, 0);
proc.optional<SXAddl_SXCHierarchy_SXDVerUpdInv>();
proc.repeated<SXAddl_SXCHierarchy_SXDUserCaption>(0, 0);
proc.optional<SXAddl_SXCHierarchy_SXDVerUpdInv>();
proc.optional<SXAddl_SXCHierarchy_SXDInfo12>();
if(proc.optional<SXAddl_SXCHierarchy_SXDDisplayFolder>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDMeasureGrp>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDParentKPI>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDKPIValue>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDKPIGoal>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDKPIStatus>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDKPITrend>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDKPIWeight>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCHierarchy_SXDKPITime>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
//if(proc.optional<SXAddl_SXCHierarchy_SXDSXSetParentUnique>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//proc.optional<SXAddl_SXCHierarchy_SXDIconSet>();
//if(proc.optional<SXAddl_SXCHierarchy_SXDUserCaption>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.optional<SXAddl_SXCHierarchy_SXDVerUpdInv>();
//proc.repeated<SXAddl_SXCHierarchy_SXDUserCaption>(0, 0);
//proc.optional<SXAddl_SXCHierarchy_SXDVerUpdInv>();
//proc.optional<SXAddl_SXCHierarchy_SXDInfo12>();
//if(proc.optional<SXAddl_SXCHierarchy_SXDDisplayFolder>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDMeasureGrp>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDParentKPI>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDKPIValue>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDKPIGoal>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDKPIStatus>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDKPITrend>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDKPIWeight>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCHierarchy_SXDKPITime>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
proc.mandatory<SXAddl_SXCHierarchy_SXDEnd>();
//proc.mandatory<SXAddl_SXCHierarchy_SXDEnd>();
return true;
}

View File

@ -58,13 +58,13 @@ BaseObjectPtr SXADDLQSI::clone()
// SXADDLQSI = SXAddl_SXCQsi_SXDId SXADDLDBQUERY *UNKNOWNFRT SXAddl_SXCQsi_SXDEnd
const bool SXADDLQSI::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCQsi_SXDId>())
{
return false;
}
proc.mandatory<SXADDLDBQUERY>();
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCQsi_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCQsi_SXDId>())
//{
// return false;
//}
//proc.mandatory<SXADDLDBQUERY>();
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.mandatory<SXAddl_SXCQsi_SXDEnd>();
return true;
}

View File

@ -57,12 +57,12 @@ BaseObjectPtr SXADDLSXDH::clone()
const bool SXADDLSXDH::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXDH_SXDId>())
{
return false;
}
proc.repeated<SXAddl_SXCSXDH_SXDSxdh>(0, 0);
proc.mandatory<SXAddl_SXCSXDH_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXDH_SXDId>())
//{
// return false;
//}
//proc.repeated<SXAddl_SXCSXDH_SXDSxdh>(0, 0);
//proc.mandatory<SXAddl_SXCSXDH_SXDEnd>();
return true;
}

View File

@ -56,13 +56,13 @@ BaseObjectPtr SXADDLSXFILT::clone()
// SXADDLSXFILT = SXAddl_SXCSXfilt_SXDId SXAddl_SXCSXfilt_SXDSXfilt [SXAddl_SXCSXfilt_SXDSXItm] SXAddl_SXCSXfilt_SXDEnd
const bool SXADDLSXFILT::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXfilt_SXDId>())
{
return false;
}
proc.mandatory<SXAddl_SXCSXfilt_SXDSXfilt>();
proc.optional<SXAddl_SXCSXfilt_SXDSXItm>();
proc.mandatory<SXAddl_SXCSXfilt_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXfilt_SXDId>())
//{
// return false;
//}
//proc.mandatory<SXAddl_SXCSXfilt_SXDSXfilt>();
//proc.optional<SXAddl_SXCSXfilt_SXDSXItm>();
//proc.mandatory<SXAddl_SXCSXfilt_SXDEnd>();
return true;
}

View File

@ -65,38 +65,38 @@ SXADDLSXFILTER12 = SXAddl_SXCSXFilter12_SXDId SXAddl_SXCSXFilter12_SXDSXFilter
*/
const bool SXADDLSXFILTER12::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXFilter12_SXDId>())
{
return false;
}
proc.mandatory<SXAddl_SXCSXFilter12_SXDSXFilter>();
//if(!proc.mandatory<SXAddl_SXCSXFilter12_SXDId>())
//{
// return false;
//}
//proc.mandatory<SXAddl_SXCSXFilter12_SXDSXFilter>();
if(proc.optional<SXAddl_SXCSXFilter12_SXDCaption>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCSXFilter12_SXDSXFilterDesc>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCSXFilter12_SXDSXFilterValue1>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCSXFilter12_SXDSXFilterValue2>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
proc.mandatory<SXAddl_SXCSXFilter12_SXDXlsFilter>();
if(proc.optional<SXAddl_SXCSXFilter12_SXDXlsFilterValue1>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
if(proc.optional<SXAddl_SXCSXFilter12_SXDXlsFilterValue2>())
{
proc.repeated<Continue_SxaddlSxString>(0, 0);
}
proc.mandatory<SXAddl_SXCSXFilter12_SXDEnd>();
//if(proc.optional<SXAddl_SXCSXFilter12_SXDCaption>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCSXFilter12_SXDSXFilterDesc>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCSXFilter12_SXDSXFilterValue1>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCSXFilter12_SXDSXFilterValue2>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//proc.mandatory<SXAddl_SXCSXFilter12_SXDXlsFilter>();
//if(proc.optional<SXAddl_SXCSXFilter12_SXDXlsFilterValue1>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//if(proc.optional<SXAddl_SXCSXFilter12_SXDXlsFilterValue2>())
//{
// proc.repeated<Continue_SxaddlSxString>(0, 0);
//}
//proc.mandatory<SXAddl_SXCSXFilter12_SXDEnd>();
return true;
}

View File

@ -57,12 +57,12 @@ BaseObjectPtr SXADDLSXFILTERS12::clone()
// SXADDLSXFILTERS12 = SXAddl_SXCSXFilters12_SXDId *SXADDLSXFILTER12 SXAddl_SXCSXFilters12_SXDEnd
const bool SXADDLSXFILTERS12::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXFilters12_SXDId>())
{
return false;
}
proc.repeated<SXADDLSXFILTER12>(0, 0);
proc.mandatory<SXAddl_SXCSXFilters12_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXFilters12_SXDId>())
//{
// return false;
//}
//proc.repeated<SXADDLSXFILTER12>(0, 0);
//proc.mandatory<SXAddl_SXCSXFilters12_SXDEnd>();
return true;
}

View File

@ -59,11 +59,11 @@ public:
const bool loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXMg_SXDUserCaption>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
//if(!proc.mandatory<SXAddl_SXCSXMg_SXDUserCaption>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
return true;
};
};
@ -80,14 +80,14 @@ BaseObjectPtr SXADDLSXMG::clone()
// [SXAddl_SXCSXMg_SXDUserCaption *Continue_SxaddlSxString] *UNKNOWNFRT SXAddl_SXCSXMg_SXDEnd
const bool SXADDLSXMG::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXMg_SXDId>())
{
return false;
}
proc.repeated<Continue_SxaddlSxString>(0, 0);
proc.optional<Parenthesis_SXADDLSXMG_1>();
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCSXMg_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXMg_SXDId>())
//{
// return false;
//}
//proc.repeated<Continue_SxaddlSxString>(0, 0);
//proc.optional<Parenthesis_SXADDLSXMG_1>();
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.mandatory<SXAddl_SXCSXMg_SXDEnd>();
return true;
}

View File

@ -58,14 +58,14 @@ BaseObjectPtr SXADDLSXMGS::clone()
// SXADDLSXMGS = SXAddl_SXCSXMgs_SXDId *SXADDLSXMG *SXAddl_SXCSXMgs_SXDMGrpSXDHMap *UNKNOWNFRT SXAddl_SXCSXMgs_SXDEnd
const bool SXADDLSXMGS::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXMgs_SXDId>())
{
return false;
}
proc.repeated<SXADDLSXMG>(0, 0);
proc.repeated<SXAddl_SXCSXMgs_SXDMGrpSXDHMap>(0, 0);
proc.repeated<UNKNOWNFRT>(0, 0);
proc.mandatory<SXAddl_SXCSXMgs_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXMgs_SXDId>())
//{
// return false;
//}
//proc.repeated<SXADDLSXMG>(0, 0);
//proc.repeated<SXAddl_SXCSXMgs_SXDMGrpSXDHMap>(0, 0);
//proc.repeated<UNKNOWNFRT>(0, 0);
//proc.mandatory<SXAddl_SXCSXMgs_SXDEnd>();
return true;
}

View File

@ -57,13 +57,13 @@ BaseObjectPtr SXADDLSXRULE::clone()
// SXADDLSXRULE = SXAddl_SXCSXrule_SXDId SXAddl_SXCSXrule_SXDSXrule *SXADDLSXFILT SXAddl_SXCSXrule_SXDEnd
const bool SXADDLSXRULE::loadContent(BinProcessor& proc)
{
if(!proc.mandatory<SXAddl_SXCSXrule_SXDId>())
{
return false;
}
proc.mandatory<SXAddl_SXCSXrule_SXDSXrule>();
proc.repeated<SXADDLSXFILT>(0, 0);
proc.mandatory<SXAddl_SXCSXrule_SXDEnd>();
//if(!proc.mandatory<SXAddl_SXCSXrule_SXDId>())
//{
// return false;
//}
//proc.mandatory<SXAddl_SXCSXrule_SXDSXrule>();
//proc.repeated<SXADDLSXFILT>(0, 0);
//proc.mandatory<SXAddl_SXCSXrule_SXDEnd>();
return true;
}

View File

@ -35,6 +35,7 @@
#include <boost/smart_ptr/shared_array.hpp>
#include <vector>
#include <map>
#include <unordered_map>
#include "Biff_structures/BorderFillInfo.h"
@ -106,7 +107,10 @@ public:
const static unsigned int initial_AXES_id = 0x2000000;
short idPivotCache;
std::map<int, BaseObjectPtr> mapPivotCache;
std::map<int, int> mapPivotCacheIndex; //streamIdCache, write index order
std::unordered_map<int, BaseObjectPtr> mapPivotCacheStream;//streamIdCache, object
std::vector<int> arPivotCacheStream; //order streamIdCache = iCache
std::vector<bool> arPivotCacheFields;
std::vector<bool> arPivotCacheFieldShortSize;

View File

@ -310,6 +310,7 @@ enum ElementType
typeStringSegmented,
typeStringSegmentedSXADDL,
typeSXAddl,
typeSxaddlSxString,
typeSXDI,
typeSxDXF,
typeSXEx,

View File

@ -36,9 +36,9 @@
#include "../../../Common/OfficeFileErrorDescription.h"
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring & fontsPath, const ProgressCallback* pCallBack)
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring & fontsPath, const ProgressCallback* pCallBack, bool &bMacros)
{
XlsConverter converter(srcFile, dstPath, password, fontsPath, pCallBack);
XlsConverter converter(srcFile, dstPath, password, fontsPath, pCallBack, bMacros);
if (converter.isError())
{

View File

@ -33,4 +33,4 @@
struct ProgressCallback;
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring& fontsPath, const ProgressCallback* CallBack);
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring& fontsPath, const ProgressCallback* CallBack, bool & bMacros);

View File

@ -121,7 +121,7 @@ typedef struct tagBITMAPCOREHEADER {
} BITMAPCOREHEADER;
#endif
XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _xlsx_path, const std::wstring & password, const std::wstring & fontsPath, const ProgressCallback* CallBack)
XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _xlsx_path, const std::wstring & password, const std::wstring & fontsPath, const ProgressCallback* CallBack, bool & bMacros)
{
xlsx_path = _xlsx_path;
output_document = NULL;
@ -131,8 +131,10 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
bUserStopConvert = false;
is_older_version = false;
is_encrypted = false;
output_document = new oox::package::xlsx_document();
try{
try
{
XLS::CompoundFile cfile(xls_file, XLS::CompoundFile::cf_ReadMode);
if (cfile.isError())
@ -215,9 +217,30 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
{
}
xls_global_info->mapPivotCache.insert(std::make_pair(index, pivot_cache));
xls_global_info->mapPivotCacheStream.insert(std::make_pair(index, pivot_cache));
}
}
if (bMacros && cfile.storage_->isDirectory("_VBA_PROJECT_CUR"))
{
std::wstring xl_path = xlsx_path + FILE_SEPARATOR_STR + L"xl";
NSDirectory::CreateDirectory(xl_path.c_str());
std::wstring sVbaProjectFile = xl_path + FILE_SEPARATOR_STR + L"vbaProject.bin";
POLE::Storage *storageVbaProject = new POLE::Storage(sVbaProjectFile.c_str());
if ((storageVbaProject) && (storageVbaProject->open(true, true)))
{
cfile.copy(0, "_VBA_PROJECT_CUR/", storageVbaProject, false);
storageVbaProject->close();
delete storageVbaProject;
output_document->get_xl_files().add_vba_project();
}
}
else
bMacros = false;
}
catch(...)
{
@ -231,8 +254,7 @@ XlsConverter::XlsConverter(const std::wstring & xls_file, const std::wstring & _
Log::error("Version xls is old !!! - " + std::string(sVer.begin(), sVer.end()));
is_older_version = true;
}
output_document = new oox::package::xlsx_document();
xlsx_context = new oox::xlsx_conversion_context(output_document);
xlsx_context = new oox::xlsx_conversion_context(output_document);
}
XlsConverter::~XlsConverter()
@ -268,6 +290,7 @@ bool XlsConverter::UpdateProgress(long nComplete)
void XlsConverter::write()
{
if (!output_document)return;
output_document->write(xlsx_path);
delete output_document; output_document = NULL;
@ -1924,6 +1947,7 @@ void XlsConverter::convert(XLS::PIVOTVIEW * pivot_view)
pivot_view->serialize(strm);
int index_view = xlsx_context->get_pivots_context().add_view(strm.str(), pivot_view->indexCache);
if (index_view > 0)

View File

@ -93,7 +93,7 @@ namespace ODRAW
class XlsConverter
{
public:
XlsConverter(const std::wstring & xls_file, const std::wstring & xlsx_path, const std::wstring & password, const std::wstring & fontsPath, const ProgressCallback* ffCallBack);
XlsConverter(const std::wstring & xls_file, const std::wstring & xlsx_path, const std::wstring & password, const std::wstring & fontsPath, const ProgressCallback* ffCallBack, bool & bMacros);
~XlsConverter() ;
oox::xlsx_conversion_context * xlsx_context;

View File

@ -161,9 +161,9 @@ std::wstring external_items::media_path()
void external_items::create_media_path(const std::wstring & out_path)
{
if (!media_path_.empty()) return;
std::wstring xl_path = out_path + FILE_SEPARATOR_STR + L"xl";
NSDirectory::CreateDirectory(xl_path.c_str());
NSDirectory::CreateDirectory(xl_path.c_str());
NSDirectory::CreateDirectory((xl_path + FILE_SEPARATOR_STR + L"media").c_str());

View File

@ -53,7 +53,6 @@ xlsx_content_types_file::xlsx_content_types_file()
content_type_.add_override(L"/_rels/.rels", L"application/vnd.openxmlformats-package.relationships+xml");
content_type_.add_override(L"/xl/_rels/workbook.xml.rels", L"application/vnd.openxmlformats-package.relationships+xml");
content_type_.add_override(L"/xl/workbook.xml", L"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml");
content_type_.add_override(L"/xl/styles.xml", L"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml");
content_type_.add_override(L"/docProps/app.xml", L"application/vnd.openxmlformats-officedocument.extended-properties+xml");
content_type_.add_override(L"/docProps/core.xml", L"application/vnd.openxmlformats-package.core-properties+xml");
@ -61,7 +60,7 @@ xlsx_content_types_file::xlsx_content_types_file()
xlsx_document::xlsx_document()
{
xl_files_.set_main_document(this);
xl_files_.set_main_document(this);
rels_file_ptr relFile = rels_file::create(L".rels");
relFile->get_rels().add(relationship(L"rId1", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", L"xl/workbook.xml"));
@ -73,7 +72,7 @@ xlsx_document::xlsx_document()
void xlsx_document::write(const std::wstring & RootPath)
{
xl_files_.write(RootPath);
xl_files_.write(RootPath);
docProps_files_.write(RootPath);
content_type_.write(RootPath);
rels_files_.write(RootPath);
@ -140,6 +139,7 @@ void sheets_files::write(const std::wstring & RootPath)
const std::wstring fileName = std::wstring(L"sheet") + std::to_wstring(i + 1) + L".xml";
content_type & contentTypes = this->get_main_document()->content_type().get_content_type();
static const std::wstring kWSConType = L"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml";
contentTypes.add_override(std::wstring(L"/xl/worksheets/") + fileName, kWSConType);
@ -167,15 +167,18 @@ void sheets_files::write(const std::wstring & RootPath)
xl_files::xl_files()
{
rels_files_.add_rel_file(rels_file::create(L"workbook.xml.rels"));
rels_files_.add_rel_file(rels_file::create(L"workbook.xml.rels"));
bVbaProject = false;
}
void xl_files::write(const std::wstring & RootPath)
{
std::wstring path = RootPath + FILE_SEPARATOR_STR + L"xl";
NSDirectory::CreateDirectory(path.c_str());
NSDirectory::CreateDirectory(path.c_str());
{
content_type & contentTypes = this->get_main_document()->content_type().get_content_type();
{
pivot_cache_files_.set_rels(&rels_files_);
pivot_cache_files_.set_main_document(get_main_document());
pivot_cache_files_.write(path);
@ -204,7 +207,6 @@ void xl_files::write(const std::wstring & RootPath)
connections_->write(path);
rels_files_.add( relationship( L"cnId1", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections", L"connections.xml" ) );
content_type & contentTypes = this->get_main_document()->content_type().get_content_type();
contentTypes.add_override(L"/xl/connections.xml", L"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml");
}
@ -217,6 +219,18 @@ void xl_files::write(const std::wstring & RootPath)
if (workbook_)
{
workbook_->write(path);
if (bVbaProject)
{
rels_files_.add( relationship( L"vbId1", L"http://schemas.microsoft.com/office/2006/relationships/vbaProject", L"vbaProject.bin" ) );
contentTypes.add_override(L"/xl/vbaProject.bin", L"application/vnd.ms-office.vbaProject");
contentTypes.add_override(L"/xl/workbook.xml", L"application/vnd.ms-excel.sheet.macroEnabled.main+xml");
}
else
{
contentTypes.add_override(L"/xl/workbook.xml", L"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml");
}
}
if (theme_)
@ -253,6 +267,11 @@ void xl_files::write(const std::wstring & RootPath)
rels_files_.write(path);
}
void xl_files::add_vba_project()
{
bVbaProject = true;
}
void xl_files::set_workbook(element_ptr Element)
{
workbook_ = Element;

View File

@ -226,6 +226,8 @@ public:
void add_charts (chart_content_ptr chart);
void add_pivot_cache (pivot_cache_content_ptr cache);
void add_pivot_table (pivot_table_content_ptr table);
void add_vba_project ();
private:
rels_files rels_files_;
sheets_files sheets_files_;
@ -244,14 +246,15 @@ private:
element_ptr vml_drawings_;
element_ptr comments_;
bool bVbaProject;
};
class xlsx_document : public document
{
public:
xlsx_document();
xlsx_document();
public:
virtual void write(const std::wstring & RootPath);
virtual content_types_file & content_type() { return content_type_; }
xl_files & get_xl_files() { return xl_files_; }

View File

@ -34,6 +34,8 @@
#include <boost/make_shared.hpp>
#include <simple_xml_writer.h>
#include <map>
namespace oox {
class xlsx_pivots_context::Impl
@ -86,11 +88,11 @@ void xlsx_pivots_context::dump_rels_cache(int index, rels & Rels)
}
void xlsx_pivots_context::dump_rels_view(int index, rels & Rels)
{
if (impl_->views_[index].indexCache_ >= 0)
if (impl_->views_[index].indexCache_ > 0)
{
Rels.add(relationship(L"rId1",
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition",
L"../pivotCache/pivotCacheDefinition" + std::to_wstring(impl_->views_[index].indexCache_ + 1) + L".xml", L""));
L"../pivotCache/pivotCacheDefinition" + std::to_wstring( impl_->views_[index].indexCache_ ) + L".xml", L""));
}
}
void xlsx_pivots_context::write_cache_definitions_to(int index, std::wostream & strm)
@ -122,7 +124,7 @@ int xlsx_pivots_context::add_view(std::wstring table_view, int indexCache)
{
if (table_view.empty()) return 0;
Impl::_pivot_view v = {table_view, indexCache};
Impl::_pivot_view v = {table_view, indexCache + 1};
impl_->views_.push_back(v);
return (int)impl_->views_.size();

View File

@ -1,143 +1,146 @@
// 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c
// The original code and all modifications are in the public domain.
#include "pch.h"
#include "3way.h"
#include "misc.h"
NAMESPACE_BEGIN(CryptoPP)
#if !defined(NDEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ThreeWay_TestInstantiations()
{
ThreeWay::Encryption x1;
ThreeWay::Decryption x2;
}
#endif
static const word32 START_E = 0x0b0b; // round constant of first encryption round
static const word32 START_D = 0xb1b1; // round constant of first decryption round
#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
static const word32 RC_MODULUS = 0x11011;
#endif
static inline word32 reverseBits(word32 a)
{
a = ((a & 0xAAAAAAAA) >> 1) | ((a & 0x55555555) << 1);
a = ((a & 0xCCCCCCCC) >> 2) | ((a & 0x33333333) << 2);
return ((a & 0xF0F0F0F0) >> 4) | ((a & 0x0F0F0F0F) << 4);
}
#define mu(a0, a1, a2) \
{ \
a1 = reverseBits(a1); \
word32 t = reverseBits(a0); \
a0 = reverseBits(a2); \
a2 = t; \
}
#define pi_gamma_pi(a0, a1, a2) \
{ \
word32 b0, b2; \
b2 = rotlFixed(a2, 1U); \
b0 = rotlFixed(a0, 22U); \
a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \
a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\
a1 ^= (b2|(~b0)); \
}
// thanks to Paulo Barreto for this optimized theta()
#define theta(a0, a1, a2) \
{ \
word32 b0, b1, c; \
c = a0 ^ a1 ^ a2; \
c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \
b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \
b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \
a0 ^= c ^ b0; \
a1 ^= c ^ b1; \
a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \
}
#define rho(a0, a1, a2) \
{ \
theta(a0, a1, a2); \
pi_gamma_pi(a0, a1, a2); \
}
void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs &params)
{
AssertValidKeyLength(length);
m_rounds = GetRoundsAndThrowIfInvalid(params, this);
for (unsigned int i=0; i<3; i++)
m_k[i] = (word32)uk[4*i+3] | ((word32)uk[4*i+2]<<8) | ((word32)uk[4*i+1]<<16) | ((word32)uk[4*i]<<24);
if (!IsForwardTransformation())
{
theta(m_k[0], m_k[1], m_k[2]);
mu(m_k[0], m_k[1], m_k[2]);
m_k[0] = ByteReverse(m_k[0]);
m_k[1] = ByteReverse(m_k[1]);
m_k[2] = ByteReverse(m_k[2]);
}
}
void ThreeWay::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
typedef BlockGetAndPut<word32, BigEndian> Block;
word32 a0, a1, a2;
Block::Get(inBlock)(a0)(a1)(a2);
word32 rc = START_E;
for(unsigned i=0; i<m_rounds; i++)
{
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
rho(a0, a1, a2);
rc <<= 1;
if (rc&0x10000) rc ^= 0x11011;
}
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
theta(a0, a1, a2);
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
}
void ThreeWay::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
typedef BlockGetAndPut<word32, LittleEndian> Block;
word32 a0, a1, a2;
Block::Get(inBlock)(a0)(a1)(a2);
word32 rc = START_D;
mu(a0, a1, a2);
for(unsigned i=0; i<m_rounds; i++)
{
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
rho(a0, a1, a2);
rc <<= 1;
if (rc&0x10000) rc ^= 0x11011;
}
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
theta(a0, a1, a2);
mu(a0, a1, a2);
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
}
NAMESPACE_END
// 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c
// The original code and all modifications are in the public domain.
#include "pch.h"
#include "3way.h"
#include "misc.h"
NAMESPACE_BEGIN(CryptoPP)
#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ThreeWay_TestInstantiations()
{
ThreeWay::Encryption x1;
ThreeWay::Decryption x2;
}
#endif
namespace
{
const word32 START_E = 0x0b0b; // round constant of first encryption round
const word32 START_D = 0xb1b1; // round constant of first decryption round
#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
const word32 RC_MODULUS = 0x11011;
#endif
}
static inline word32 reverseBits(word32 a)
{
a = ((a & 0xAAAAAAAA) >> 1) | ((a & 0x55555555) << 1);
a = ((a & 0xCCCCCCCC) >> 2) | ((a & 0x33333333) << 2);
return ((a & 0xF0F0F0F0) >> 4) | ((a & 0x0F0F0F0F) << 4);
}
#define mu(a0, a1, a2) \
{ \
a1 = reverseBits(a1); \
word32 t = reverseBits(a0); \
a0 = reverseBits(a2); \
a2 = t; \
}
#define pi_gamma_pi(a0, a1, a2) \
{ \
word32 b0, b2; \
b2 = rotlFixed(a2, 1U); \
b0 = rotlFixed(a0, 22U); \
a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \
a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\
a1 ^= (b2|(~b0)); \
}
// thanks to Paulo Barreto for this optimized theta()
#define theta(a0, a1, a2) \
{ \
word32 b0, b1, c; \
c = a0 ^ a1 ^ a2; \
c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \
b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \
b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \
a0 ^= c ^ b0; \
a1 ^= c ^ b1; \
a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \
}
#define rho(a0, a1, a2) \
{ \
theta(a0, a1, a2); \
pi_gamma_pi(a0, a1, a2); \
}
void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs &params)
{
AssertValidKeyLength(length);
m_rounds = GetRoundsAndThrowIfInvalid(params, this);
for (unsigned int i=0; i<3; i++)
m_k[i] = (word32)uk[4*i+3] | ((word32)uk[4*i+2]<<8) | ((word32)uk[4*i+1]<<16) | ((word32)uk[4*i]<<24);
if (!IsForwardTransformation())
{
theta(m_k[0], m_k[1], m_k[2]);
mu(m_k[0], m_k[1], m_k[2]);
m_k[0] = ByteReverse(m_k[0]);
m_k[1] = ByteReverse(m_k[1]);
m_k[2] = ByteReverse(m_k[2]);
}
}
void ThreeWay::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
typedef BlockGetAndPut<word32, BigEndian> Block;
word32 a0, a1, a2;
Block::Get(inBlock)(a0)(a1)(a2);
word32 rc = START_E;
for(unsigned i=0; i<m_rounds; i++)
{
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
rho(a0, a1, a2);
rc <<= 1;
if (rc&0x10000) rc ^= 0x11011;
}
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
theta(a0, a1, a2);
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
}
void ThreeWay::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
typedef BlockGetAndPut<word32, LittleEndian> Block;
word32 a0, a1, a2;
Block::Get(inBlock)(a0)(a1)(a2);
word32 rc = START_D;
mu(a0, a1, a2);
for(unsigned i=0; i<m_rounds; i++)
{
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
rho(a0, a1, a2);
rc <<= 1;
if (rc&0x10000) rc ^= 0x11011;
}
a0 ^= m_k[0] ^ (rc<<16);
a1 ^= m_k[1];
a2 ^= m_k[2] ^ rc;
theta(a0, a1, a2);
mu(a0, a1, a2);
Block::Put(xorBlock, outBlock)(a0)(a1)(a2);
}
NAMESPACE_END

View File

@ -1,69 +1,68 @@
// 3way.h - written and placed in the public domain by Wei Dai
//! \file 3way.h
//! \brief Classes for the 3-Way block cipher
#ifndef CRYPTOPP_THREEWAY_H
#define CRYPTOPP_THREEWAY_H
#include "config.h"
#include "seckey.h"
#include "secblock.h"
NAMESPACE_BEGIN(CryptoPP)
//! \class ThreeWay_Info
//! \brief The cipher's key, iv, block size and name information.
struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
{
static const char *StaticAlgorithmName() {return "3-Way";}
};
// <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
//! \class ThreeWay
//! \brief Provides 3-Way encryption and decryption
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
{
//! \class Base
//! \brief Class specific implementation and overrides used to operate the cipher.
//! \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
{
public:
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
protected:
unsigned int m_rounds;
FixedSizeSecBlock<word32, 3> m_k;
};
//! \class Enc
//! \brief Class specific methods used to operate the cipher in the forward direction.
//! \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
class CRYPTOPP_NO_VTABLE Enc : public Base
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
};
//! \class Dec
//! \brief Class specific methods used to operate the cipher in the reverse direction.
//! \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
class CRYPTOPP_NO_VTABLE Dec : public Base
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
};
public:
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
};
typedef ThreeWay::Encryption ThreeWayEncryption;
typedef ThreeWay::Decryption ThreeWayDecryption;
NAMESPACE_END
#endif
// 3way.h - written and placed in the public domain by Wei Dai
//! \file 3way.h
//! \brief Classes for the 3-Way block cipher
#ifndef CRYPTOPP_THREEWAY_H
#define CRYPTOPP_THREEWAY_H
#include "config.h"
#include "seckey.h"
#include "secblock.h"
NAMESPACE_BEGIN(CryptoPP)
//! \class ThreeWay_Info
//! \brief ThreeWay block cipher information
struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
{
CRYPTOPP_CONSTEXPR static const char *StaticAlgorithmName() {return "3-Way";}
};
//! \class ThreeWay
//! \brief ThreeWay block cipher
//! \sa <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
{
//! \class Base
//! \brief Class specific implementation and overrides used to operate the cipher.
//! \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
{
public:
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
protected:
unsigned int m_rounds;
FixedSizeSecBlock<word32, 3> m_k;
};
//! \class Enc
//! \brief Class specific methods used to operate the cipher in the forward direction.
//! \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
class CRYPTOPP_NO_VTABLE Enc : public Base
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
};
//! \class Dec
//! \brief Class specific methods used to operate the cipher in the reverse direction.
//! \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
class CRYPTOPP_NO_VTABLE Dec : public Base
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
};
public:
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
};
typedef ThreeWay::Encryption ThreeWayEncryption;
typedef ThreeWay::Decryption ThreeWayDecryption;
NAMESPACE_END
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,393 +1,420 @@
3way.cpp
3way.h
adhoc.cpp.proto
adler32.cpp
adler32.h
aes.h
algebra.cpp
algebra.h
algparam.cpp
algparam.h
arc4.cpp
arc4.h
argnames.h
asn.cpp
asn.h
authenc.cpp
authenc.h
base32.cpp
base32.h
base64.cpp
base64.h
basecode.cpp
basecode.h
bench.cpp
bench.h
bench2.cpp
bfinit.cpp
blowfish.cpp
blowfish.h
blumshub.cpp
blumshub.h
camellia.cpp
camellia.h
cast.cpp
cast.h
casts.cpp
cbcmac.cpp
cbcmac.h
ccm.cpp
ccm.h
channels.cpp
channels.h
cmac.cpp
cmac.h
config.h
config.recommend
cpu.cpp
cpu.h
crc.cpp
crc.h
cryptdll.dsp
cryptdll.vcproj
cryptest.dsp
cryptest.dsw
cryptest.sh
cryptest.sln
cryptest.vcproj
cryptest_bds.bdsgroup
cryptest_bds.bdsproj
cryptest_bds.bpf
cryptlib.cpp
cryptlib.dsp
cryptlib.h
cryptlib.vcproj
cryptlib_bds.bdsproj
cryptlib_bds.cpp
cryptopp.rc
cryptopp563.diff
datatest.cpp
default.cpp
default.h
des.cpp
des.h
dessp.cpp
dh.cpp
dh.h
dh2.cpp
dh2.h
dll.cpp
dll.h
dlltest.cpp
dlltest.dsp
dlltest.vcproj
dmac.h
dsa.cpp
dsa.h
eax.cpp
eax.h
ec2n.cpp
ec2n.h
eccrypto.cpp
eccrypto.h
ecp.cpp
ecp.h
elgamal.cpp
elgamal.h
emsa2.cpp
emsa2.h
eprecomp.cpp
eprecomp.h
esign.cpp
esign.h
factory.h
files.cpp
files.h
filters.cpp
filters.h
fips140.cpp
fips140.h
fipsalgt.cpp
fipstest.cpp
fltrimpl.h
gcm.cpp
gcm.h
gf256.cpp
gf256.h
gf2_32.cpp
gf2_32.h
gf2n.cpp
gf2n.h
gfpcrypt.cpp
gfpcrypt.h
gost.cpp
gost.h
gzip.cpp
gzip.h
hex.cpp
hex.h
hkdf.h
hmac.cpp
hmac.h
hrtimer.cpp
hrtimer.h
ida.cpp
ida.h
idea.cpp
idea.h
integer.cpp
integer.h
iterhash.cpp
iterhash.h
lubyrack.h
luc.cpp
luc.h
mars.cpp
mars.h
marss.cpp
md2.cpp
md2.h
md4.cpp
md4.h
md5.cpp
md5.h
mdc.h
mersenne.h
misc.cpp
misc.h
modarith.h
modes.cpp
modes.h
modexppc.h
mqueue.cpp
mqueue.h
mqv.cpp
mqv.h
nbtheory.cpp
nbtheory.h
network.cpp
network.h
nr.h
oaep.cpp
oaep.h
oids.h
osrng.cpp
osrng.h
panama.cpp
panama.h
pch.cpp
pch.h
pkcspad.cpp
pkcspad.h
polynomi.cpp
polynomi.h
pssr.cpp
pssr.h
pubkey.cpp
pubkey.h
pwdbased.h
queue.cpp
queue.h
rabin.cpp
rabin.h
randpool.cpp
randpool.h
rc2.cpp
rc2.h
rc5.cpp
rc5.h
rc6.cpp
rc6.h
rdrand-masm.cmd
rdrand-nasm.sh
rdrand.S
rdrand.asm
rdrand.cpp
rdrand.h
rdtables.cpp
regtest.cpp
resource.h
rijndael.cpp
rijndael.h
ripemd.cpp
ripemd.h
rng.cpp
rng.h
rsa.cpp
rsa.h
rw.cpp
rw.h
safer.cpp
safer.h
salsa.cpp
salsa.h
seal.cpp
seal.h
secblock.h
seckey.h
seed.cpp
seed.h
serpent.cpp
serpent.h
serpentp.h
sha.cpp
sha.h
sha3.cpp
sha3.h
shacal2.cpp
shacal2.h
shark.cpp
shark.h
sharkbox.cpp
simple.cpp
simple.h
skipjack.cpp
skipjack.h
smartptr.h
socketft.cpp
socketft.h
sosemanuk.cpp
sosemanuk.h
square.cpp
square.h
squaretb.cpp
stdcpp.h
strciphr.cpp
strciphr.h
tea.cpp
tea.h
test.cpp
tftables.cpp
tiger.cpp
tiger.h
tigertab.cpp
trdlocal.cpp
trdlocal.h
trunhash.h
ttmac.cpp
ttmac.h
twofish.cpp
twofish.h
validat1.cpp
validat2.cpp
validat3.cpp
validate.h
vmac.cpp
vmac.h
vs2010.zip
wait.cpp
wait.h
wake.cpp
wake.h
whrlpool.cpp
whrlpool.h
winpipes.cpp
winpipes.h
words.h
x64dll.asm
x64masm.asm
xtr.cpp
xtr.h
xtrcrypt.cpp
xtrcrypt.h
zdeflate.cpp
zdeflate.h
zinflate.cpp
zinflate.h
zlib.cpp
zlib.h
Doxyfile
GNUmakefile
GNUmakefile-cross
License.txt
Readme.txt
Install.txt
Filelist.txt
TestData/3desval.dat
TestData/3wayval.dat
TestData/camellia.dat
TestData/cast128v.dat
TestData/cast256v.dat
TestData/descert.dat
TestData/dh1024.dat
TestData/dh2048.dat
TestData/dlie1024.dat
TestData/dlie2048.dat
TestData/dsa1024.dat
TestData/dsa1024b.dat
TestData/dsa512.dat
TestData/elgc1024.dat
TestData/esig1023.dat
TestData/esig1536.dat
TestData/esig2046.dat
TestData/gostval.dat
TestData/ideaval.dat
TestData/luc1024.dat
TestData/luc2048.dat
TestData/lucc1024.dat
TestData/lucc512.dat
TestData/lucd1024.dat
TestData/lucd512.dat
TestData/lucs1024.dat
TestData/lucs512.dat
TestData/marsval.dat
TestData/mqv1024.dat
TestData/mqv2048.dat
TestData/nr1024.dat
TestData/nr2048.dat
TestData/rabi1024.dat
TestData/rabi2048.dat
TestData/rc2val.dat
TestData/rc5val.dat
TestData/rc6val.dat
TestData/rijndael.dat
TestData/rsa1024.dat
TestData/rsa2048.dat
TestData/rsa400pb.dat
TestData/rsa400pv.dat
TestData/rsa512a.dat
TestData/rw1024.dat
TestData/rw2048.dat
TestData/saferval.dat
TestData/serpentv.dat
TestData/shacal2v.dat
TestData/sharkval.dat
TestData/skipjack.dat
TestData/squareva.dat
TestData/twofishv.dat
TestData/usage.dat
TestData/xtrdh171.dat
TestData/xtrdh342.dat
TestVectors/Readme.txt
TestVectors/aes.txt
TestVectors/all.txt
TestVectors/camellia.txt
TestVectors/ccm.txt
TestVectors/cmac.txt
TestVectors/dlies.txt
TestVectors/dsa.txt
TestVectors/dsa_1363.txt
TestVectors/eax.txt
TestVectors/esign.txt
TestVectors/gcm.txt
TestVectors/hkdf.txt
TestVectors/hmac.txt
TestVectors/mars.txt
TestVectors/nr.txt
TestVectors/panama.txt
TestVectors/rsa_oaep.txt
TestVectors/rsa_pkcs1_1_5.txt
TestVectors/rsa_pss.txt
TestVectors/rw.txt
TestVectors/salsa.txt
TestVectors/seal.txt
TestVectors/seed.txt
TestVectors/sha.txt
TestVectors/sha3.txt
TestVectors/shacal2.txt
TestVectors/sosemanuk.txt
TestVectors/tea.txt
TestVectors/ttmac.txt
TestVectors/vmac.txt
TestVectors/wake.txt
TestVectors/whrlpool.txt
3way.cpp
3way.h
adhoc.cpp.proto
adler32.cpp
adler32.h
aes.h
algebra.cpp
algebra.h
algparam.cpp
algparam.h
arc4.cpp
arc4.h
argnames.h
asn.cpp
asn.h
authenc.cpp
authenc.h
base32.cpp
base32.h
base64.cpp
base64.h
basecode.cpp
basecode.h
bench.h
bds10.zip
bench1.cpp
bench2.cpp
bfinit.cpp
blake2.cpp
blake2.h
blowfish.cpp
blowfish.h
blumshub.cpp
blumshub.h
camellia.cpp
camellia.h
cast.cpp
cast.h
casts.cpp
cbcmac.cpp
cbcmac.h
ccm.cpp
ccm.h
chacha.cpp
chacha.h
channels.cpp
channels.h
cmac.cpp
cmac.h
config.h
config.compat
cpu.cpp
cpu.h
crc.cpp
crc.h
cryptdll.vcxproj
cryptdll.vcxproj.filters
cryptest.sh
cryptest.sln
cryptest.vcxproj
cryptest.vcxproj.user
cryptest.vcxproj.filters
cryptest.nmake
cryptlib.cpp
cryptlib.h
cryptlib.vcxproj
cryptlib.vcxproj.filters
cryptopp.rc
datatest.cpp
default.cpp
default.h
des.cpp
des.h
dessp.cpp
dh.cpp
dh.h
dh2.cpp
dh2.h
dll.cpp
dll.h
dlltest.cpp
dlltest.vcxproj
dlltest.vcxproj.filters
dmac.h
dsa.cpp
dsa.h
eax.cpp
eax.h
ec2n.cpp
ec2n.h
eccrypto.cpp
eccrypto.h
ecp.cpp
ecp.h
elgamal.cpp
elgamal.h
emsa2.cpp
emsa2.h
eprecomp.cpp
eprecomp.h
esign.cpp
esign.h
factory.h
fhmqv.cpp
fhmqv.h
files.cpp
files.h
filters.cpp
filters.h
fips140.cpp
fips140.h
fipsalgt.cpp
fipstest.cpp
fltrimpl.h
gcm.cpp
gcm.h
gf256.cpp
gf256.h
gf2_32.cpp
gf2_32.h
gf2n.cpp
gf2n.h
gfpcrypt.cpp
gfpcrypt.h
gost.cpp
gost.h
gzip.cpp
gzip.h
hex.cpp
hex.h
hkdf.h
hmac.cpp
hmac.h
hmqv.cpp
hmqv.h
hrtimer.cpp
hrtimer.h
ida.cpp
ida.h
idea.cpp
idea.h
integer.cpp
integer.h
iterhash.cpp
iterhash.h
keccak.cpp
keccak.h
lubyrack.h
luc.cpp
luc.h
mars.cpp
mars.h
marss.cpp
md2.cpp
md2.h
md4.cpp
md4.h
md5.cpp
md5.h
mdc.h
mersenne.h
misc.cpp
misc.h
modarith.h
modes.cpp
modes.h
modexppc.h
mqueue.cpp
mqueue.h
mqv.cpp
mqv.h
nbtheory.cpp
nbtheory.h
network.cpp
network.h
nr.h
oaep.cpp
oaep.h
oids.h
osrng.cpp
osrng.h
ossig.h
panama.cpp
panama.h
pch.cpp
pch.h
pkcspad.cpp
pkcspad.h
polynomi.cpp
polynomi.h
pssr.cpp
pssr.h
pubkey.cpp
pubkey.h
pwdbased.h
queue.cpp
queue.h
rabin.cpp
rabin.h
randpool.cpp
randpool.h
rc2.cpp
rc2.h
rc5.cpp
rc5.h
rc6.cpp
rc6.h
rdrand-masm.cmd
rdrand-nasm.sh
rdrand.S
rdrand.asm
rdrand.cpp
rdrand.h
rdtables.cpp
regtest.cpp
resource.h
rijndael.cpp
rijndael.h
ripemd.cpp
ripemd.h
rng.cpp
rng.h
rsa.cpp
rsa.h
rw.cpp
rw.h
safer.cpp
safer.h
salsa.cpp
salsa.h
seal.cpp
seal.h
secblock.h
seckey.h
seed.cpp
seed.h
serpent.cpp
serpent.h
serpentp.h
sha.cpp
sha.h
sha3.cpp
sha3.h
shacal2.cpp
shacal2.h
shark.cpp
shark.h
sharkbox.cpp
simple.cpp
simple.h
skipjack.cpp
skipjack.h
smartptr.h
socketft.cpp
socketft.h
sosemanuk.cpp
sosemanuk.h
square.cpp
square.h
squaretb.cpp
stdcpp.h
strciphr.cpp
strciphr.h
tea.cpp
tea.h
test.cpp
trap.h
tftables.cpp
tiger.cpp
tiger.h
tigertab.cpp
trdlocal.cpp
trdlocal.h
trunhash.h
ttmac.cpp
ttmac.h
twofish.cpp
twofish.h
validat1.cpp
validat2.cpp
validat3.cpp
validate.h
vmac.cpp
vmac.h
vc60.zip
vs2005.zip
wait.cpp
wait.h
wake.cpp
wake.h
whrlpool.cpp
whrlpool.h
winpipes.cpp
winpipes.h
words.h
x64dll.asm
x64masm.asm
xtr.cpp
xtr.h
xtrcrypt.cpp
xtrcrypt.h
zdeflate.cpp
zdeflate.h
zinflate.cpp
zinflate.h
zlib.cpp
zlib.h
Doxyfile
GNUmakefile
GNUmakefile-cross
License.txt
Readme.txt
Install.txt
Filelist.txt
TestData/3desval.dat
TestData/3wayval.dat
TestData/camellia.dat
TestData/cast128v.dat
TestData/cast256v.dat
TestData/descert.dat
TestData/dh1024.dat
TestData/dh2048.dat
TestData/dlie1024.dat
TestData/dlie2048.dat
TestData/dsa1024.dat
TestData/dsa1024b.dat
TestData/dsa512.dat
TestData/elgc1024.dat
TestData/esig1023.dat
TestData/esig1536.dat
TestData/esig2046.dat
TestData/fhmqv160.dat
TestData/fhmqv256.dat
TestData/fhmqv384.dat
TestData/fhmqv512.dat
TestData/gostval.dat
TestData/hmqv160.dat
TestData/hmqv256.dat
TestData/hmqv384.dat
TestData/hmqv512.dat
TestData/ideaval.dat
TestData/luc1024.dat
TestData/luc2048.dat
TestData/lucc1024.dat
TestData/lucc512.dat
TestData/lucd1024.dat
TestData/lucd512.dat
TestData/lucs1024.dat
TestData/lucs512.dat
TestData/marsval.dat
TestData/mqv1024.dat
TestData/mqv2048.dat
TestData/nr1024.dat
TestData/nr2048.dat
TestData/rabi1024.dat
TestData/rabi2048.dat
TestData/rc2val.dat
TestData/rc5val.dat
TestData/rc6val.dat
TestData/rijndael.dat
TestData/rsa1024.dat
TestData/rsa2048.dat
TestData/rsa400pb.dat
TestData/rsa400pv.dat
TestData/rsa512a.dat
TestData/rw1024.dat
TestData/rw2048.dat
TestData/saferval.dat
TestData/serpentv.dat
TestData/shacal2v.dat
TestData/sharkval.dat
TestData/skipjack.dat
TestData/squareva.dat
TestData/twofishv.dat
TestData/usage.dat
TestData/xtrdh171.dat
TestData/xtrdh342.dat
TestVectors/Readme.txt
TestVectors/aes.txt
TestVectors/all.txt
TestVectors/blake2.txt
TestVectors/blake2b.txt
TestVectors/blake2s.txt
TestVectors/camellia.txt
TestVectors/ccm.txt
TestVectors/chacha.txt
TestVectors/cmac.txt
TestVectors/dlies.txt
TestVectors/dsa.txt
TestVectors/dsa_1363.txt
TestVectors/eax.txt
TestVectors/esign.txt
TestVectors/gcm.txt
TestVectors/hkdf.txt
TestVectors/hmac.txt
TestVectors/keccak.txt
TestVectors/mars.txt
TestVectors/nr.txt
TestVectors/panama.txt
TestVectors/rsa_oaep.txt
TestVectors/rsa_pkcs1_1_5.txt
TestVectors/rsa_pss.txt
TestVectors/dsa_rfc6979.txt
TestVectors/rw.txt
TestVectors/salsa.txt
TestVectors/seal.txt
TestVectors/seed.txt
TestVectors/sha.txt
TestVectors/sha3_fips_202.txt
TestVectors/sha3_224_fips_202.txt
TestVectors/sha3_256_fips_202.txt
TestVectors/sha3_384_fips_202.txt
TestVectors/sha3_512_fips_202.txt
TestVectors/shacal2.txt
TestVectors/sosemanuk.txt
TestVectors/tea.txt
TestVectors/ttmac.txt
TestVectors/vmac.txt
TestVectors/wake.txt
TestVectors/whrlpool.txt

661
Common/3dParty/cryptopp/GNUmakefile Normal file → Executable file
View File

@ -1,104 +1,162 @@
# Base CXXFLAGS used if the user did not specify them
CXXFLAGS ?= -DNDEBUG -g2 -O2
# -fPIC is supported, please report failures with steps to reproduce
# If PIC is required but results in a crash, then use -DCRYPTOPP_DISABLE_ASM
# CXXFLAGS += -fPIC
# Add the following options reduce code size, but breaks link
# or makes link very slow on some systems
# CXXFLAGS += -ffunction-sections -fdata-sections
# On OS X, you need to use "LDFLAGS += -Wl,-dead_strip"
# LDFLAGS += -Wl,--gc-sections
###########################################################
##### System Attributes and Programs #####
###########################################################
AR ?= ar
ARFLAGS ?= -cr # ar needs the dash on OpenBSD
ARFLAGS ?= -cr # ar needs the dash on OpenBSD
RANLIB ?= ranlib
CP ?= cp
MV ?= mv
EGREP ?= egrep
CHMOD ?= chmod
MKDIR ?= mkdir
EGREP ?= egrep
LN ?= ln -sf
LDCONF ?= /sbin/ldconfig -n
UNAME := $(shell uname)
IS_X86 := $(shell uname -m | $(EGREP) -i -c "i.86|x86|i86|amd64")
IS_X86_64 := $(shell uname -m | $(EGREP) -i -c "(_64|d64)")
IS_AARCH64 := $(shell uname -m | $(EGREP) -i -c "aarch64")
IS_X86 := $(shell uname -m | $(EGREP) -v "x86_64" | $(EGREP) -i -c "i.86|x86|i86")
IS_X32 ?= 0
IS_X64 := $(shell uname -m | $(EGREP) -i -c "(_64|d64)")
IS_PPC := $(shell uname -m | $(EGREP) -i -c "ppc|power")
IS_ARM32 := $(shell uname -m | $(EGREP) -i -c "arm")
IS_ARM64 := $(shell uname -m | $(EGREP) -i -c "aarch64")
IS_SUN := $(shell uname | $(EGREP) -i -c "SunOS")
IS_LINUX := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "Linux")
IS_MINGW := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "MinGW")
IS_CYGWIN := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "Cygwin")
IS_DARWIN := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "Darwin")
IS_NETBSD := $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "NetBSD")
SUN_COMPILER := $(shell $(CXX) -V 2>&1 | $(EGREP) -i -c "CC: Sun")
GCC_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "(gcc|g\+\+)")
SUN_COMPILER := $(shell $(CXX) -V 2>&1 | $(EGREP) -i -c "CC: (Sun|Studio)")
GCC_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -v "clang" | $(EGREP) -i -c "(gcc|g\+\+)")
CLANG_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)")
INTEL_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "\(icc\)")
MACPORTS_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "macports")
# Sun Studio 12.0 provides SunCC 0x0510; and Sun Studio 12.3 provides SunCC 0x0512
SUNCC_510_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[0-9]|5\.[2-9]|6\.)")
SUNCC_511_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[1-9]|5\.[2-9]|6\.)")
SUNCC_512_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[2-9]|5\.[2-9]|6\.)")
SUNCC_513_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[3-9]|5\.[2-9]|6\.)")
HAS_SOLIB_VERSION := $(IS_LINUX)
# Fixup SunOS
ifeq ($(IS_SUN),1)
IS_X86 := $(shell isainfo -k 2>/dev/null | grep -i -c "i386")
IS_X64 := $(shell isainfo -k 2>/dev/null | grep -i -c "amd64")
endif
###########################################################
##### General Variables #####
###########################################################
# Base CXXFLAGS used if the user did not specify them
ifeq ($(SUN_COMPILER),1)
ifeq ($(SUNCC_512_OR_LATER),1)
CXXFLAGS ?= -DNDEBUG -g3 -xO2
else
CXXFLAGS ?= -DNDEBUG -g -xO2
endif
else
CXXFLAGS ?= -DNDEBUG -g2 -O2
endif
# Default prefix for make install
ifeq ($(PREFIX),)
PREFIX = /usr
PREFIX = /usr/local
endif
ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
ifeq ($(DATADIR),)
DATADIR := $(PREFIX)/share
endif
ifeq ($(LIBDIR),)
LIBDIR := $(PREFIX)/lib
endif
ifeq ($(BINDIR),)
BINDIR := $(PREFIX)/bin
endif
ifeq ($(INCLUDEDIR),)
INCLUDEDIR := $(PREFIX)/include
endif
# Fix CXX on Cygwin 1.1.4
ifeq ($(CXX),gcc)
CXX := g++
endif
# We honor ARFLAGS, but the "v" often option used by default causes a noisy make
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
ifeq ($(ARFLAGS),rv)
ARFLAGS = r
endif
ifeq ($(IS_X86),1)
###########################################################
##### X86/X32/X64 Options #####
###########################################################
IS_GCC_29 := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c gcc-9[0-9][0-9])
GCC42_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[2-9]|[5-9]\.)")
GCC46_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[6-9]|[5-9]\.)")
GCC48_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[8-9]|[5-9]\.)")
GCC49_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.9|[5-9]\.)")
ifneq ($(IS_X86)$(IS_X32)$(IS_X64),000)
# Fixup. Clang integrated assembler will be used (-Wa,-q)
ifneq ($(MACPORTS_COMPILER),1)
IS_GAS := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler")
endif
ifneq ($(GCC_COMPILER),0)
IS_GCC_29 := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c gcc-9[0-9][0-9])
GCC42_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[2-9]|[5-9]\.)")
GCC46_OR_LATER := $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "gcc version (4\.[6-9]|[5-9]\.)")
endif
ifneq ($(IS_GAS),0)
GAS210_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
GAS217_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
GAS219_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
endif
ICC111_OR_LATER := $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])")
GAS210_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
GAS217_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
GAS219_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
# Add -fPIC for x86_64, but not X32, Cygwin or MinGW
ifneq ($(IS_X86_64),0)
IS_X32 := $(shell $(CXX) -dM -E - < /dev/null 2>&1 | $(EGREP) -c "ILP32")
ifeq ($(IS_X32)$(IS_CYGWIN)$(IS_MINGW),000)
# Add -fPIC for targets *except* X86, X32, Cygwin or MinGW
ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS_MINGW)$(SUN_COMPILER),00000)
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
CXXFLAGS += -fPIC
endif
endif
endif
# Guard use of -march=native
ifeq ($(GCC_COMPILER),0)
ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10)
CXXFLAGS += -march=native
else ifneq ($(GCC42_OR_LATER),0)
else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00)
CXXFLAGS += -march=native
else
# GCC 3.3 and "unknown option -march="
# GCC 4.1 compiler crash with -march=native.
ifneq ($(IS_X86_64),0)
# Ubuntu GCC 4.1 compiler crash with -march=native
# NetBSD GCC 4.8 compiler and "bad value (native) for -march= switch"
# Sun compiler is handled below
ifeq ($(SUN_COMPILER)$(IS_X64),01)
CXXFLAGS += -m64
else
else ifeq ($(SUN_COMPILER)$(IS_X86),01)
CXXFLAGS += -m32
endif # X86/X32/X64
endif
# Aligned access required at -O3 for GCC due to vectorization (circa 08/2008). Expect other compilers to do the same.
# Aligned access required for -O3 and above due to vectorization
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
ifeq ($(findstring -O3,$(CXXFLAGS)),-O3)
ifneq ($(UNALIGNED_ACCESS),0)
ifeq ($(GCC46_OR_LATER),1)
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
ifeq ($(findstring -O3,$(CXXFLAGS)),-O3)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # -O3
ifeq ($(findstring -O5,$(CXXFLAGS)),-O5)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # -O5
ifeq ($(findstring -Ofast,$(CXXFLAGS)),-Ofast)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # -Ofast
endif # CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # GCC 4.6
endif # UNALIGNED_ACCESS
endif # Vectorization
ifneq ($(INTEL_COMPILER),0)
CXXFLAGS += -wd68 -wd186 -wd279 -wd327 -wd161 -wd3180
@ -109,34 +167,100 @@ CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif
endif
ifeq ($(GCC_COMPILER)$(GAS210_OR_LATER),10) # .intel_syntax wasn't supported until GNU assembler 2.10
# .intel_syntax wasn't supported until GNU assembler 2.10
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS210_OR_LATER),100)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
else
ifeq ($(GCC_COMPILER)$(GAS217_OR_LATER),10)
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS217_OR_LATER),100)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
else
ifeq ($(GCC_COMPILER)$(GAS219_OR_LATER),10)
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER)$(GAS219_OR_LATER),100)
CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
endif
endif
endif
ifneq ($(IS_SUN),0)
CXXFLAGS += -Wa,--divide # allow use of "/" operator
# Tell MacPorts GCC to use Clang integrated assembler
# http://github.com/weidai11/cryptopp/issues/190
ifeq ($(GCC_COMPILER)$(MACPORTS_COMPILER),11)
ifneq ($(findstring -Wa,-q,$(CXXFLAGS)),-Wa,-q)
CXXFLAGS += -Wa,-q
endif
ifneq ($(findstring -Wa,-q,$(CXXFLAGS)),-DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
CXXFLAGS += -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1
endif
endif
endif # IS_X86
# GCC on Solaris needs -m64. Otherwise, i386 is default
# http://github.com/weidai11/cryptopp/issues/230
ifeq ($(IS_SUN)$(GCC_COMPILER)$(IS_X64),111)
CXXFLAGS += -m64
endif
# Allow use of "/" operator for GNU Assembler.
# http://sourceware.org/bugzilla/show_bug.cgi?id=4572
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
ifeq ($(IS_SUN)$(GCC_COMPILER),11)
CXXFLAGS += -Wa,--divide
endif
endif
ifeq ($(UNAME),) # for DJGPP, where uname doesn't exist
CXXFLAGS += -mbnu210
else ifneq ($(findstring -save-temps,$(CXXFLAGS)),-save-temps)
ifeq ($(SUN_COMPILER),0)
CXXFLAGS += -pipe
endif
endif
else
###########################################################
##### Not X86/X32/X64 #####
###########################################################
# Add PIC
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
CXXFLAGS += -fPIC
endif
# Add -pipe for everything except ARM (allow ARM-64 because they seems to have > 1 GB of memory)
ifeq ($(IS_ARM32),0)
ifeq ($(findstring -save-temps,$(CXXFLAGS)),)
CXXFLAGS += -pipe
endif
endif
# Aligned access required for -O3 and above due to vectorization
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
ifneq ($(UNALIGNED_ACCESS),0)
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
ifeq ($(findstring -O3,$(CXXFLAGS)),-O3)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # -O3
ifeq ($(findstring -O5,$(CXXFLAGS)),-O5)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # -O5
ifeq ($(findstring -Ofast,$(CXXFLAGS)),-Ofast)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # -Ofast
endif # CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # UNALIGNED_ACCESS
endif # IS_X86
###########################################################
##### Common #####
###########################################################
ifneq ($(IS_MINGW),0)
LDLIBS += -lws2_32
endif
ifneq ($(IS_SUN),0)
LDLIBS += -lnsl -lsocket
endif
ifeq ($(IS_LINUX),1)
LDFLAGS += -pthread
ifeq ($(findstring -fopenmp,$(CXXFLAGS)),-fopenmp)
@ -144,18 +268,8 @@ ifeq ($(findstring -lgomp,$(LDLIBS)),)
LDLIBS += -lgomp
endif # LDLIBS
endif # OpenMP
ifneq ($(IS_X86_64),0)
M32OR64 = -m64
endif
endif # IS_LINUX
# And add it for ARM64, too
ifneq ($(IS_AARCH64),0)
ifeq ($(findstring -fPIC,$(CXXFLAGS)),)
CXXFLAGS += -fPIC
endif
endif
ifneq ($(IS_DARWIN),0)
AR = libtool
ARFLAGS = -static -o
@ -167,23 +281,35 @@ LDFLAGS += -flat_namespace -undefined suppress -m
endif
endif
ifneq ($(IS_SUN),0)
LDLIBS += -lnsl -lsocket
M32OR64 = -m$(shell isainfo -b)
endif
# Add -errtags=yes to get the name for a warning suppression
ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler
CXXFLAGS ?= -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
LDFLAGS =
AR = $(CXX)
ARFLAGS = -xar -o
RANLIB = true
IS_64 := $(shell isainfo -b 2>/dev/null | grep -i -c "64")
ifeq ($(IS_64),1)
CXXFLAGS += -m64
else ifeq ($(IS_64),0)
CXXFLAGS += -m32
endif
ifneq ($(SUNCC_513_OR_LATER),0)
CXXFLAGS += -native
endif
# Add for non-i386
ifneq ($(IS_X86),1)
CXXFLAGS += -KPIC
endif
# Add to all Solaris
CXXFLAGS += -template=no%extdef
SUN_CC10_BUGGY := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: Sun .* 5\.10 .* (2009|2010/0[1-4])")
ifneq ($(SUN_CC10_BUGGY),0)
# -DCRYPTOPP_INCLUDE_VECTOR_CC is needed for Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21 and was fixed in May 2010
# remove it if you get "already had a body defined" errors in vector.cc
CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC
endif
#ifneq ($SUNCC_512_OR_LATER),0)
#CXXFLAGS += -xarch=aes -D__AES__=1 -xarch=no%sse4_1 -xarch=no%sse4_2
#endif
AR = $(CXX)
ARFLAGS = -xar -o
RANLIB = true
endif
# Undefined Behavior Sanitizer (UBsan) testing. There's no sense in
@ -197,71 +323,72 @@ CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # CXXFLAGS
endif # UBsan
# Address Sanitizer (Asan) testing
# Address Sanitizer (Asan) testing. Issue 'make asan'.
ifeq ($(findstring asan,$(MAKECMDGOALS)),asan)
ifeq ($(findstring -fsanitize=address,$(CXXFLAGS)),)
CXXFLAGS += -fsanitize=address
endif # CXXFLAGS
ifeq ($(findstring -fno-omit-frame-pointer,$(CXXFLAGS)),)
CXXFLAGS += -fno-omit-frame-pointer
endif # CXXFLAGS
endif # Asan
# LD gold linker testing
# LD gold linker testing. Triggered by 'LD=ld.gold'.
ifeq ($(findstring ld.gold,$(LD)),ld.gold)
ifeq ($(findstring -Wl,-fuse-ld=gold,$(CXXFLAGS)),)
ifeq ($(findstring -fuse-ld=gold,$(CXXFLAGS)),)
ELF_FORMAT := $(shell file `which ld.gold` 2>&1 | cut -d":" -f 2 | $(EGREP) -i -c "elf")
ifneq ($(ELF_FORMAT),0)
GOLD_OPTION = -Wl,-fuse-ld=gold
LDFLAGS += -fuse-ld=gold
endif # ELF/ELF64
endif # CXXFLAGS
endif # Gold
# Aligned access testing
# Aligned access testing. Issue 'make aligned'.
ifneq ($(filter align aligned,$(MAKECMDGOALS)),)
ifeq ($(findstring -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
endif # # CXXFLAGS
endif # CXXFLAGS
endif # Aligned access
# Debug testing on GNU systems
# GCC code coverage. Issue 'make coverage'.
ifneq ($(filter coverage,$(MAKECMDGOALS)),)
ifeq ($(findstring -coverage,$(CXXFLAGS)),)
CXXFLAGS += -coverage
endif # -coverage
endif # GCC code coverage
# Debug testing on GNU systems. Triggered by -DDEBUG.
# Newlib test due to http://sourceware.org/bugzilla/show_bug.cgi?id=20268
ifneq ($(filter -DDEBUG -DDEBUG=1,$(CXXFLAGS)),)
USING_GLIBCXX := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__GLIBCXX__")
ifneq ($(USING_GLIBCXX),0)
HAS_NEWLIB := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__NEWLIB__")
ifeq ($(HAS_NEWLIB),0)
ifeq ($(findstring -D_GLIBCXX_DEBUG,$(CXXFLAGS)),)
CXXFLAGS += -D_GLIBCXX_DEBUG
endif # CXXFLAGS
ifeq ($(findstring -D_GLIBCXX_CONCEPT_CHECKS,$(CXXFLAGS)),)
CXXFLAGS += -D_GLIBCXX_CONCEPT_CHECKS
endif # CXXFLAGS
endif # NAS_NEWLIB
endif # USING_GLIBCXX
endif # GNU Debug build
# List cryptlib.cpp first and cpu.o second in an attempt to tame C++ static initialization problems. The issue
# spills into POD data types, so cpu.cpp is the second candidate for explicit initialization order.
SRCS := cryptlib.cpp cpu.cpp $(filter-out cryptlib.cpp cpu.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
# No need for CPU or RDRAND on non-X86 systems. X32 is represented with X64.
ifeq ($(IS_X86)$(IS_X86_64),00)
SRCS := $(filter-out cpu.cpp rdrand.cpp, $(SRCS))
endif
ifneq ($(IS_MINGW),0)
SRCS += winpipes.cpp
endif
# List of objects with crytlib.o and cpu.o at the first and second index position
OBJS := $(SRCS:.cpp=.o)
# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
TESTOBJS := bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
# List cryptlib.cpp first in an attempt to tame C++ static initialization problems
DLLSRCS := cryptlib.cpp algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
DLLOBJS := $(DLLSRCS:.cpp=.export.o)
# Import lib testing
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
DLLTESTOBJS := dlltest.dllonly.o
# Dead code stripping. Issue 'make lean'.
ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
ifeq ($(findstring -ffunction-sections,$(CXXFLAGS)),)
CXXFLAGS += -ffunction-sections
endif # CXXFLAGS
ifeq ($(findstring -fdata-sections,$(CXXFLAGS)),)
CXXFLAGS += -fdata-sections
endif # CXXFLAGS
ifneq ($(IS_DARWIN),0)
ifeq ($(findstring -Wl,-dead_strip,$(LDFLAGS)),)
LDFLAGS += -Wl,-dead_strip
endif # CXXFLAGS
else # BSD, Linux and Unix
ifeq ($(findstring -Wl,--gc-sections,$(LDFLAGS)),)
LDFLAGS += -Wl,--gc-sections
endif # LDFLAGS
endif # MAKECMDGOALS
endif # Dead code stripping
# For Shared Objects, Diff, Dist/Zip rules
LIB_VER := $(shell $(EGREP) "define CRYPTOPP_VERSION" config.h | cut -d" " -f 3)
@ -273,6 +400,56 @@ ifeq ($(strip $(LIB_PATCH)),)
LIB_PATCH := 0
endif
ifeq ($(HAS_SOLIB_VERSION),1)
# Full version suffix for shared library
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
# Different patchlevels are compatible, minor versions are not
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif # HAS_SOLIB_VERSION
###########################################################
##### Source and object files #####
###########################################################
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
# Need CPU for X86/X64/X32 and ARM
ifeq ($(IS_X86)$(IS_X64)$(IS_ARM32)$(IS_ARM64),0000)
SRCS := $(filter-out cpu.cpp, $(SRCS))
endif
# Need RDRAND for X86/X64/X32
ifeq ($(IS_X86)$(IS_X64),00)
SRCS := $(filter-out rdrand.cpp, $(SRCS))
endif
ifneq ($(IS_MINGW),0)
SRCS += winpipes.cpp
endif
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
OBJS := $(SRCS:.cpp=.o)
# List test.cpp first to tame C++ static initialization problems.
TESTSRCS := test.cpp bench1.cpp bench2.cpp validat1.cpp validat2.cpp validat3.cpp adhoc.cpp datatest.cpp regtest.cpp fipsalgt.cpp dlltest.cpp
TESTOBJS := $(TESTSRCS:.cpp=.o)
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
DLLSRCS := cryptlib.cpp cpu.cpp integer.cpp shacal2.cpp md5.cpp shark.cpp zinflate.cpp gf2n.cpp salsa.cpp xtr.cpp oaep.cpp polynomi.cpp rc2.cpp default.cpp wait.cpp wake.cpp twofish.cpp iterhash.cpp adler32.cpp elgamal.cpp marss.cpp blowfish.cpp ecp.cpp filters.cpp strciphr.cpp camellia.cpp ida.cpp zlib.cpp des.cpp crc.cpp algparam.cpp dessp.cpp tea.cpp eax.cpp network.cpp emsa2.cpp pkcspad.cpp squaretb.cpp idea.cpp authenc.cpp hmac.cpp zdeflate.cpp xtrcrypt.cpp queue.cpp mars.cpp rc5.cpp blake2.cpp hrtimer.cpp eprecomp.cpp hex.cpp dsa.cpp sha.cpp fips140.cpp gzip.cpp seal.cpp files.cpp base32.cpp vmac.cpp tigertab.cpp sharkbox.cpp safer.cpp randpool.cpp esign.cpp arc4.cpp osrng.cpp skipjack.cpp seed.cpp sha3.cpp sosemanuk.cpp bfinit.cpp rabin.cpp 3way.cpp rw.cpp rdrand.cpp rsa.cpp rdtables.cpp gost.cpp socketft.cpp tftables.cpp nbtheory.cpp panama.cpp modes.cpp rijndael.cpp casts.cpp chacha.cpp gfpcrypt.cpp poly1305.cpp dll.cpp ec2n.cpp blumshub.cpp algebra.cpp basecode.cpp base64.cpp cbcmac.cpp rc6.cpp dh2.cpp gf256.cpp mqueue.cpp misc.cpp pssr.cpp channels.cpp tiger.cpp cast.cpp rng.cpp square.cpp asn.cpp whrlpool.cpp md4.cpp dh.cpp ccm.cpp md2.cpp mqv.cpp gf2_32.cpp ttmac.cpp luc.cpp trdlocal.cpp pubkey.cpp gcm.cpp ripemd.cpp eccrypto.cpp serpent.cpp cmac.cpp
DLLOBJS := $(DLLSRCS:.cpp=.export.o)
# Import lib testing
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
DLLTESTOBJS := dlltest.dllonly.o
###########################################################
##### Targets and Recipes #####
###########################################################
.PHONY: all
all: cryptest.exe
ifneq ($(IS_DARWIN),0)
@ -280,49 +457,82 @@ static: libcryptopp.a
shared dynamic dylib: libcryptopp.dylib
else
static: libcryptopp.a
shared dynamic: libcryptopp.so
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
endif
.PHONY: deps
deps GNUmakefile.deps:
$(CXX) $(CXXFLAGS) -MM *.cpp > GNUmakefile.deps
# CXXFLAGS are tuned earlier.
.PHONY: asan ubsan align aligned
asan ubsan align aligned: libcryptopp.a cryptest.exe
# CXXFLAGS are tuned earlier. Applications must use linker flags
# -Wl,--gc-sections (Linux and Unix) or -Wl,-dead_strip (OS X)
.PHONY: lean
lean: static dynamic cryptest.exe
# May want to export CXXFLAGS="-g3 -O1"
.PHONY: coverage
coverage: libcryptopp.a cryptest.exe
lcov --base-directory . --directory . --zerocounters -q
./cryptest.exe v
./cryptest.exe tv all
lcov --base-directory . --directory . -c -o cryptest.info
lcov --remove cryptest.info "*test.*" "bench*.cpp" "validat*.*" "/usr/*" -o cryptest.info
rm -rf ./TestCoverage/
genhtml -o ./TestCoverage/ -t "cryptest.exe test coverage" --num-spaces 4 cryptest.info
.PHONY: test check
test check: cryptest.exe
./cryptest.exe v
# Used to generate list of source files for Autotools, CMakeList, Android.mk, etc
.PHONY: sources
sources:
$(info Library sources: $(filter-out fipstest.cpp $(TESTSRCS),$(SRCS)))
$(info )
$(info Test sources: $(TESTSRCS))
# Directory we want (can't specify on Doygen command line)
DOCUMENT_DIRECTORY := ref$(LIB_VER)
# Directory Doxygen uses (specified in Doygen config file)
ifeq ($(wildcard Doxyfile),Doxyfile)
DOXYGEN_DIRECTORY := $(strip $(shell $(EGREP) "OUTPUT_DIRECTORY" Doxyfile | grep -v "\#" | cut -d "=" -f 2))
endif
# Default directory (missing in config file)
# Default directory (in case its missing in the config file)
ifeq ($(strip $(DOXYGEN_DIRECTORY)),)
DOXYGEN_DIRECTORY := html-docs
endif
# Builds the documentation. Directory name is ref563, ref570, etc.
.PHONY: docs html
docs html:
-$(RM) -r $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/ html-docs/
doxygen Doxyfile -d CRYPTOPP_DOXYGEN_PROCESSING
mv $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/
$(MV) $(DOXYGEN_DIRECTORY)/ $(DOCUMENT_DIRECTORY)/
-$(RM) CryptoPPRef.zip
zip -9 CryptoPPRef.zip -x ".*" -x "*/.*" -r $(DOCUMENT_DIRECTORY)/
.PHONY: clean
clean:
-$(RM) libcryptopp.a libcryptopp.so libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS) *.stackdump core-*
-$(RM) cryptest.exe dlltest.exe cryptest.import.exe ct rdrand-???.o
-$(RM) libcryptopp.a libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a
ifeq ($(HAS_SOLIB_VERSION),1)
-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct rdrand-???.o
-$(RM) *.gcno *.gcda *.stackdump core-*
-$(RM) /tmp/adhoc.exe
ifneq ($(wildcard /tmp/cryptopp_test/),)
-$(RM) -r /tmp/cryptopp_test/
endif
ifneq ($(wildcard *.exe.dSYM),)
-$(RM) -r *.exe.dSYM/
endif
ifneq ($(wildcard $(DOCUMENT_DIRECTORY)/),)
-$(RM) -r $(DOCUMENT_DIRECTORY)/
ifneq ($(wildcard *.dylib.dSYM),)
-$(RM) -r *.dylib.dSYM/
endif
ifneq ($(wildcard cov-int/),)
-$(RM) -r cov-int/
@ -330,7 +540,18 @@ endif
.PHONY: distclean
distclean: clean
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt *.o *.ii *.s
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt cryptest-*.txt
-$(RM) CMakeCache.txt Makefile CTestTestfile.cmake cmake_install.cmake cryptopp-config-version.cmake
-$(RM) cryptopp.tgz *.o *.bc *.ii *.s *~
ifneq ($(wildcard CMakeFiles/),)
-$(RM) -r CMakeFiles/
endif
ifneq ($(wildcard $(DOCUMENT_DIRECTORY)/),)
-$(RM) -r $(DOCUMENT_DIRECTORY)/
endif
ifneq ($(wildcard TestCoverage/),)
-$(RM) -r TestCoverage/
endif
ifneq ($(wildcard cryptopp$(LIB_VER)\.*),)
-$(RM) cryptopp$(LIB_VER)\.*
endif
@ -343,47 +564,87 @@ endif
.PHONY: install
install:
$(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
-$(CP) *.h $(PREFIX)/include/cryptopp
-$(CHMOD) 755 $(PREFIX)/include/cryptopp
-$(CHMOD) 644 $(PREFIX)/include/cryptopp/*.h
-$(CP) libcryptopp.a $(PREFIX)/lib
-$(CHMOD) 644 $(PREFIX)/lib/libcryptopp.a
-$(CP) cryptest.exe $(PREFIX)/bin
-$(CHMOD) 755 $(PREFIX)/bin/cryptest.exe
ifneq ($(IS_DARWIN),0)
-$(CP) libcryptopp.dylib $(PREFIX)/lib
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.dylib
else
-$(CP) libcryptopp.so $(PREFIX)/lib
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.so
$(MKDIR) -p $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(CHMOD) 0755 $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
ifneq ($(wildcard libcryptopp.a),)
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
-$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
endif
ifneq ($(wildcard cryptest.exe),)
$(MKDIR) -p $(DESTDIR)$(BINDIR)
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
-$(CHMOD) 0755 $(DESTDIR)$(BINDIR)/cryptest.exe
$(MKDIR) -p $(DESTDIR)$(DATADIR)/cryptopp
$(CP) -r TestData $(DESTDIR)$(DATADIR)/cryptopp
$(CP) -r TestVectors $(DESTDIR)$(DATADIR)/cryptopp
-$(CHMOD) 0755 $(DESTDIR)$(DATADIR)/cryptopp
-$(CHMOD) 0755 $(DESTDIR)$(DATADIR)/cryptopp/TestData
-$(CHMOD) 0755 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
-$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestData/*.dat
-$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors/*.txt
endif
ifneq ($(wildcard libcryptopp.dylib),)
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
-$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
endif
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
-$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) -sf libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
$(LDCONF) $(DESTDIR)$(LIBDIR)
endif
endif
.PHONY: remove uninstall
remove uninstall:
-$(RM) -r $(PREFIX)/include/cryptopp
-$(RM) $(PREFIX)/lib/libcryptopp.a
-$(RM) $(PREFIX)/bin/cryptest.exe
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
-$(RM) -r $(DESTDIR)$(DATADIR)/cryptopp
ifneq ($(IS_DARWIN),0)
-$(RM) $(PREFIX)/lib/libcryptopp.dylib
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
else
-$(RM) $(PREFIX)/lib/libcryptopp.so
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so
$(LDCONF) $(DESTDIR)$(LIBDIR)
endif
endif
libcryptopp.a: public_service | $(LIBOBJS)
libcryptopp.a: $(LIBOBJS)
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
ifeq ($(IS_SUN),0)
$(RANLIB) $@
endif
libcryptopp.so: public_service | $(LIBOBJS)
$(CXX) -shared -o $@ $(CXXFLAGS) $(GOLD_OPTION) $(LIBOBJS) $(LDLIBS)
ifeq ($(HAS_SOLIB_VERSION),1)
.PHONY: libcryptopp.so
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX) | so_warning
endif
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS)
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(CXXFLAGS) $(LDFLAGS) $(LIBOBJS) $(LDLIBS)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif
libcryptopp.dylib: $(LIBOBJS)
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" $(LIBOBJS)
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
cryptest.exe: public_service | libcryptopp.a $(TESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(GOLD_OPTION) $(LDLIBS)
cryptest.exe: libcryptopp.a $(TESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
nolib: $(OBJS) # makes it faster to test changes
# Makes it faster to test changes
nolib: $(OBJS)
$(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
dll: cryptest.import.exe dlltest.exe
@ -393,7 +654,9 @@ cryptopp.dll: $(DLLOBJS)
libcryptopp.import.a: $(LIBIMPORTOBJS)
$(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS)
ifeq ($(IS_SUN),0)
$(RANLIB) $@
endif
cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(TESTIMPORTOBJS) -L. -lcryptopp.dll -lcryptopp.import $(LDFLAGS) $(LDLIBS)
@ -401,36 +664,58 @@ cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
dlltest.exe: cryptopp.dll $(DLLTESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
# This recipe requires a previous "svn co -r 541 http://svn.code.sf.net/p/cryptopp/code/trunk/c5"
.PHONY: diff
diff:
-$(RM) cryptopp$(LIB_VER).diff
-svn diff -r 541 > cryptopp$(LIB_VER).diff
# This recipe prepares the distro files
TEXT_FILES := *.h *.cpp adhoc.cpp.proto License.txt Readme.txt Install.txt Filelist.txt config.recommend Doxyfile cryptest* cryptlib* dlltest* cryptdll* *.sln *.vcproj *.dsw *.dsp cryptopp.rc TestVectors/*.txt TestData/*.dat
EXEC_FILES := GNUmakefile GNUmakefile-cross cryptest.sh rdrand-nasm.sh TestData/ TestVectors/
TEXT_FILES := *.h *.cpp adhoc.cpp.proto License.txt Readme.txt Install.txt Filelist.txt CMakeLists.txt config.compat Doxyfile cryptest* cryptlib* dlltest* cryptdll* *.sln *.vcxproj *.filters cryptopp.rc TestVectors/*.txt TestData/*.dat TestScripts/*.sh TestScripts/*.pl TestScripts/*.cmd
EXEC_FILES := GNUmakefile GNUmakefile-cross TestData/ TestVectors/ TestScripts/
ifeq ($(wildcard Filelist.txt),Filelist.txt)
DIST_FILES := $(shell cat Filelist.txt)
endif
.PHONY: convert
convert:
chmod 0700 TestVectors/ TestData/
chmod 0600 $(TEXT_FILES) *.zip
chmod 0700 $(EXEC_FILES)
chmod u+x *.cmd *.sh
unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd
dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.S *.sh
.PHONY: trim
trim:
ifneq ($(IS_DARWIN),0)
xattr -c *
sed -i '' -e's/[[:space:]]*$$//' *.compat *.sh *.h *.cpp *.sln *.vcxproj GNUmakefile GNUmakefile-cross
make convert
else
sed -i -e's/[[:space:]]*$$//' *.compat *.sh *.h *.cpp *.sln *.vcxproj GNUmakefile GNUmakefile-cross
make convert
endif
.PHONY: convert
convert:
-$(CHMOD) 0700 TestVectors/ TestData/ TestScripts/
-$(CHMOD) 0600 $(TEXT_FILES) *.asm *.S *.zip *.cmake TestVectors/*.txt TestData/*.dat
-$(CHMOD) 0700 $(EXEC_FILES) *.sh *.cmd TestScripts/*.sh TestScripts/*.pl TestScripts/*.cmd
-$(CHMOD) 0700 *.cmd *.sh GNUmakefile GNUmakefile-cross TestScripts/*.sh TestScripts/*.pl
-unix2dos --keepdate --quiet $(TEXT_FILES) *.asm *.cmd *.cmake TestScripts/*.pl TestScripts/*.cmd
-dos2unix --keepdate --quiet GNUmakefile GNUmakefile-cross *.S *.sh TestScripts/*.sh
ifneq ($(IS_DARWIN),0)
-xattr -c *
endif
# Build the ZIP file with source files. No documentation.
.PHONY: zip dist
zip dist: | distclean convert diff
zip dist: | distclean convert
zip -q -9 cryptopp$(LIB_VER).zip $(DIST_FILES)
# Build the ISO to transfer the ZIP to old distros via CDROM
.PHONY: iso
iso: | zip
ifneq ($(IS_DARWIN),0)
$(MKDIR) -p $(PWD)/cryptopp$(LIB_VER)
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
hdiutil makehybrid -iso -joliet -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
else ifneq ($(IS_LINUX),0)
$(MKDIR) -p $(PWD)/cryptopp$(LIB_VER)
$(CP) cryptopp$(LIB_VER).zip $(PWD)/cryptopp$(LIB_VER)
genisoimage -q -o cryptopp$(LIB_VER).iso $(PWD)/cryptopp$(LIB_VER)
-$(RM) -r $(PWD)/cryptopp$(LIB_VER)
endif
# CRYPTOPP_CPU_SPEED in GHz
CRYPTOPP_CPU_SPEED ?= 2.4
.PHONY: bench benchmark benchmarks
bench benchmark benchmarks: cryptest.exe
rm -f benchmarks.html
@ -440,9 +725,9 @@ bench benchmark benchmarks: cryptest.exe
echo "<TITLE>Speed Comparison of Popular Crypto Algorithms</TITLE>" >> benchmarks.html
echo "</HEAD>" >> benchmarks.html
echo "<BODY>" >> benchmarks.html
echo "<H1><a href=\"http://www.cryptopp.com\">Crypto++</a>" $(LIB_MAJOR).$(LIB_MINOR).$(LIB_REVISION) "Benchmarks</H1>" >> benchmarks.html
echo "<H1><a href=\"http://www.cryptopp.com\">Crypto++</a>" $(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH) "Benchmarks</H1>" >> benchmarks.html
echo "<P>Here are speed benchmarks for some commonly used cryptographic algorithms.</P>" >> benchmarks.html
./cryptest.exe b 3 2.4 >> benchmarks.html
./cryptest.exe b 3 $(CRYPTOPP_CPU_SPEED) >> benchmarks.html
echo "</BODY>" >> benchmarks.html
echo "</HTML>" >> benchmarks.html
@ -469,6 +754,20 @@ cpu.o:
endif
endif
# Only use CRYPTOPP_DATA_DIR if its not set in CXXFLAGS
ifeq ($(findstring -DCRYPTOPP_DATA_DIR,$(CXXFLAGS)),)
ifneq ($(strip $(CRYPTOPP_DATA_DIR)),)
validat%.o : validat%.cpp
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
bench%.o : bench%.cpp
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
datatest.o : datatest.cpp
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
test.o : test.cpp
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DATA_DIR=\"$(CRYPTOPP_DATA_DIR)\" -c $<
endif
endif
%.dllonly.o : %.cpp
$(CXX) $(CXXFLAGS) -DCRYPTOPP_DLL_ONLY -c $< -o $@
@ -478,27 +777,17 @@ endif
%.export.o : %.cpp
$(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
%.bc : %.cpp
$(CXX) $(CXXFLAGS) -c $<
%.o : %.cpp
$(CXX) $(CXXFLAGS) -c $<
# Warn of potential configurations issues. They will go away after 5.6.3.
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
NO_INIT_PRIORITY := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_INIT_PRIORITY" config.h)
COMPATIBILITY_562 := $(shell $(EGREP) -c "^[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562" config.h)
.PHONY: public_service
public_service:
ifneq ($(UNALIGNED_ACCESS),0)
$(info WARNING: CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined in config.h.)
endif
ifneq ($(NO_INIT_PRIORITY),0)
$(info WARNING: CRYPTOPP_INIT_PRIORITY is not defined in config.h.)
endif
ifneq ($(COMPATIBILITY_562),0)
$(info WARNING: CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 is defined in config.h.)
endif
ifneq ($(UNALIGNED_ACCESS)$(NO_INIT_PRIORITY)$(COMPATIBILITY_562),000)
$(info WARNING: You should make these changes in config.h, and not CXXFLAGS.)
$(info WARNING: You can 'mv config.recommend config.h', but it breaks versioning.)
$(info WARNING: See http://cryptopp.com/wiki/config.h for more details.)
.PHONY: so_warning
so_warning:
ifeq ($(HAS_SOLIB_VERSION),1)
$(info WARNING: Only the symlinks to the shared-object library have been updated.)
$(info WARNING: If the library is installed in a system directory you will need)
$(info WARNING: to run 'ldconfig' to update the shared-object library cache.)
$(info )
endif

252
Common/3dParty/cryptopp/GNUmakefile-cross Normal file → Executable file
View File

@ -4,26 +4,50 @@ CXXFLAGS ?= -DNDEBUG -g2 -Os -fPIC -pipe
# CXXFLAGS += -ffunction-sections -fdata-sections
# LDFLAGS += -Wl,--gc-sections
ARFLAGS = -cr # ar needs the dash on OpenBSD
AR ?= ar
ARFLAGS ?= cr
RANLIB ?= ranlib
CP = cp
MKDIR = mkdir
EGREP = egrep
CHMOD = chmod
CP ?= cp
MV ?= mv
CHMOD ?= chmod
MKDIR ?= mkdir
EGREP ?= egrep
LN ?= ln -sf
CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
IS_X86=0
IS_LINUX=0
IS_MINGW=0
IS_DARWIN=0
UNAME=CrossCompile
IS_IOS ?= 0
IS_ANDROID ?= 0
IS_ARM_EMBEDDED ?= 0
# Can be used by Android and Embeeded cross-compiles. Disable by default because
# Android and embedded users typically don't run this configuration.
HAS_SOLIB_VERSION ?= 0
# Default prefix for make install
ifeq ($(PREFIX),)
PREFIX = /usr/local
endif
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
ifeq ($(DATADIR),)
DATADIR := $(PREFIX)/share
endif
ifeq ($(LIBDIR),)
LIBDIR := $(PREFIX)/lib
endif
ifeq ($(BINDIR),)
BINDIR := $(PREFIX)/bin
endif
ifeq ($(INCLUDEDIR),)
INCLUDEDIR := $(PREFIX)/include
endif
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
ifeq ($(ARFLAGS),rv)
ARFLAGS = r
endif
# Sadly, we can't actually use GCC_PRAGMA_AWARE because of GCC bug 53431.
# Its a shame because GCC has so much to offer by the way of analysis.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
@ -31,120 +55,200 @@ ifneq ($(CLANG_COMPILER),0)
CXXFLAGS += -Wall
endif
# iOS cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
# iOS cross-compile configuration.
# See http://www.cryptopp.com/wiki/iOS_(Command_Line).
ifeq ($(IS_IOS),1)
CXX = clang++
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(IOS_FLAGS)
CXXFLAGS += -arch $(IOS_ARCH) -isysroot $(IOS_SYSROOT)
CXXFLAGS += -stdlib=libc++
CXXFLAGS += $(IOS_FLAGS) -arch $(IOS_ARCH)
CXXFLAGS += -isysroot $(IOS_SYSROOT) -stdlib=libc++
AR = libtool
ARFLAGS = -static -o
RANLIB = ranlib
endif
# Android cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
# Android cross-compile configuration.
# See http://www.cryptopp.com/wiki/Android_(Command_Line).
ifeq ($(IS_ANDROID),1)
# CPP, CXX, AR, RANLIB, LD, etc are set in 'setenv-android.sh'
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(ANDROID_FLAGS)
CXXFLAGS += --sysroot=$(ANDROID_SYSROOT) -I$(ANDROID_STL_INC)
LDLIBS += $(ANDROID_STL_LIB)
CXXFLAGS += $(AOSP_FLAGS) -DANDROID --sysroot=$(AOSP_SYSROOT)
CXXFLAGS += -Wa,--noexecstack -I$(AOSP_STL_INC)
# c++config.h shows up in odd places at times.
ifneq ($(AOSP_BITS_INC),)
CXXFLAGS += -I$(AOSP_BITS_INC)
endif
LDLIBS += $(AOSP_STL_LIB)
endif
# ARM embedded cross-compile configuration. Works in conjunction with IS_CROSS_COMPILE.
# ARM embedded cross-compile configuration.
# See http://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line)
# and http://www.cryptopp.com/wiki/ARM_Embedded_(Bare Metal).
ifeq ($(IS_ARM_EMBEDDED),1)
# CPP, CXX, AR, RANLIB, LD, etc are set in 'setenv-embedded.sh'
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM $(ARM_EMBEDDED_FLAGS)
CXXFLAGS += --sysroot=$(ARM_EMBEDDED_SYSROOT)
CXXFLAGS += $(ARM_EMBEDDED_FLAGS) --sysroot=$(ARM_EMBEDDED_SYSROOT)
endif
# List cryptlib.cpp first in an attempt to tame C++ static initialization problems
SRCS := cryptlib.cpp cpu.cpp $(filter-out cryptlib.cpp cpu.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
# Dead code stripping. Issue 'make lean'.
ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
ifeq ($(findstring -ffunction-sections,$(CXXFLAGS)),)
CXXFLAGS += -ffunction-sections
endif # CXXFLAGS
ifeq ($(findstring -fdata-sections,$(CXXFLAGS)),)
CXXFLAGS += -fdata-sections
endif # CXXFLAGS
ifeq ($(IS_IOS),1)
ifeq ($(findstring -Wl,-dead_strip,$(LDFLAGS)),)
LDFLAGS += -Wl,-dead_strip
endif # CXXFLAGS
else # BSD, Linux and Unix
ifeq ($(findstring -Wl,--gc-sections,$(LDFLAGS)),)
LDFLAGS += -Wl,--gc-sections
endif # LDFLAGS
endif # MAKECMDGOALS
endif # Dead code stripping
# List of objects with crytlib.o at the first index position
# List cryptlib.cpp first and cpu.cpp second in an attempt to tame C++ static initialization problems.
# The issue spills into POD data types of cpu.cpp due to the storage class of the bools, so cpu.cpp
# is the second candidate for explicit initialization order.
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp winpipes.cpp cryptlib_bds.cpp,$(wildcard *.cpp))
OBJS := $(SRCS:.cpp=.o)
# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
TESTOBJS := bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
TESTSRCS := bench1.cpp bench2.cpp test.cpp validat1.cpp validat2.cpp validat3.cpp adhoc.cpp datatest.cpp regtest.cpp fipsalgt.cpp dlltest.cpp
TESTOBJS := $(TESTSRCS:.cpp=.o)
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
# List cryptlib.cpp first in an attempt to tame C++ static initialization problems
DLLSRCS := cryptlib.cpp cpu.cpp algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
DLLOBJS := $(DLLSRCS:.cpp=.export.o)
# For Shared Objects, Diff, Dist/Zip rules
LIB_VER := $(shell $(EGREP) "define CRYPTOPP_VERSION" config.h | cut -d" " -f 3)
LIB_MAJOR := $(shell echo $(LIB_VER) | cut -c 1)
LIB_MINOR := $(shell echo $(LIB_VER) | cut -c 2)
LIB_PATCH := $(shell echo $(LIB_VER) | cut -c 3)
# Import lib testing
LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o)
TESTIMPORTOBJS := $(TESTOBJS:.o=.import.o)
DLLTESTOBJS := dlltest.dllonly.o
ifeq ($(strip $(LIB_PATCH)),)
LIB_PATCH := 0
endif
ifeq ($(HAS_SOLIB_VERSION),1)
# Full version suffix for shared library
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
# Different patchlevels are compatible, minor versions are not
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif # HAS_SOLIB_VERSION
.PHONY: all
all: cryptest.exe
ifneq ($(IS_DARWIN),0)
ifneq ($(IS_IOS),0)
static: libcryptopp.a
shared dynamic dylib: libcryptopp.dylib
else
static: libcryptopp.a
shared dynamic: libcryptopp.so
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
endif
test: cryptest.exe
./cryptest.exe v
# CXXFLAGS are tuned earlier. Applications must use linker flags
# -Wl,--gc-sections (Linux and Unix) or -Wl,-dead_strip (OS X)
.PHONY: lean
lean: static dynamic cryptest.exe
.PHONY: clean
clean:
-$(RM) cryptest.exe dlltest.exe libcryptopp.a libcryptopp.so libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe ct
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
ifneq ($(wildcard *.dSYM),)
-$(RM) -r cryptest.exe.dSYM dlltest.exe.dSYM
-$(RM) cryptest.exe libcryptopp.a libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.dylib
ifeq ($(HAS_SOLIB_VERSION),1)
-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(TESTOBJS)
ifneq ($(wildcard *.exe.dSYM),)
-$(RM) -r *.exe.dSYM/
endif
ifneq ($(wildcard *.dylib.dSYM),)
-$(RM) -r *.dylib.dSYM/
endif
.PHONY: distclean
distclean: clean
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps cryptopp$(LIB_VER).diff cryptopp$(LIB_VER).zip *.o *.ii *.s
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps cryptopp.tgz *.o *.ii *.s
.PHONY: install
install:
$(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
-$(CP) *.h $(PREFIX)/include/cryptopp
-$(CHMOD) 755 $(PREFIX)/include/cryptopp
-$(CHMOD) 644 $(PREFIX)/include/cryptopp/*.h
-$(CP) libcryptopp.a $(PREFIX)/lib
-$(CHMOD) 644 $(PREFIX)/lib/libcryptopp.a
-$(CP) cryptest.exe $(PREFIX)/bin
-$(CHMOD) 755 $(PREFIX)/bin/cryptest.exe
ifneq ($(IS_DARWIN),0)
-$(CP) libcryptopp.dylib $(PREFIX)/lib
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.dylib
else
-$(CP) libcryptopp.so $(PREFIX)/lib
-$(CHMOD) 755 $(PREFIX)/lib/libcryptopp.so
$(MKDIR) -p $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(CHMOD) 755 $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(CHMOD) 644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
ifneq ($(wildcard cryptest.exe),)
$(MKDIR) -p $(DESTDIR)$(BINDIR)
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
-$(CHMOD) 755 $(DESTDIR)$(BINDIR)/cryptest.exe
endif
ifneq ($(wildcard libcryptopp.a),)
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
-$(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
endif
ifneq ($(wildcard libcryptopp.dylib),)
$(MKDIR) -p $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
-$(CHMOD) 755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
endif
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
$(CP) libcryptopp.so $(DESTDIR)$(LIBDIR)
-$(CHMOD) 755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) -sf libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
endif
endif
.PHONY: remove uninstall
remove uninstall:
-$(RM) -r $(PREFIX)/include/cryptopp
-$(RM) $(PREFIX)/lib/libcryptopp.a
-$(RM) $(PREFIX)/bin/cryptest.exe
ifneq ($(IS_DARWIN),0)
-$(RM) $(PREFIX)/lib/libcryptopp.dylib
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
ifneq ($(IS_IOS),0)
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
else
-$(RM) $(PREFIX)/lib/libcryptopp.so
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so
endif
endif
libcryptopp.a: public_service | $(LIBOBJS)
libcryptopp.a: $(LIBOBJS)
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
$(RANLIB) $@
libcryptopp.so: public_service | $(LIBOBJS)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
ifeq ($(HAS_SOLIB_VERSION),1)
.PHONY: libcryptopp.so
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
endif
cryptest.exe: public_service | libcryptopp.a $(TESTOBJS)
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS)
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(CXXFLAGS) -Wl,--exclude-libs,ALL $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif
libcryptopp.dylib: $(LIBOBJS)
$(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
cryptest.exe: libcryptopp.a $(TESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
# Used to generate list of source files for Autotools, CMakeList and Android.mk
.PHONY: sources
sources:
$(info Library sources: $(filter-out fipstest.cpp $(TESTSRCS),$(SRCS)))
$(info )
$(info Test sources: $(TESTSRCS))
adhoc.cpp: adhoc.cpp.proto
ifeq ($(wildcard adhoc.cpp),)
cp adhoc.cpp.proto adhoc.cpp
@ -162,25 +266,3 @@ endif # Dependencies
GNUmakefile.deps:
$(CXX) $(CXXFLAGS) -MM *.cpp > GNUmakefile.deps
# Warn of potential configurations issues. This will go away after 5.6.3
UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
NO_INIT_PRIORITY := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_INIT_PRIORITY" config.h)
COMPATIBILITY_562 := $(shell $(EGREP) -c "^[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562" config.h)
.PHONY: public_service
public_service:
ifneq ($(UNALIGNED_ACCESS),0)
$(info WARNING: CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined in config.h.)
endif
ifneq ($(NO_INIT_PRIORITY),0)
$(info WARNING: CRYPTOPP_INIT_PRIORITY is not defined in config.h.)
endif
ifneq ($(COMPATIBILITY_562),0)
$(info WARNING: CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 is defined in config.h.)
endif
ifneq (x$(UNALIGNED_ACCESS)$(NO_INIT_PRIORITY)$(COMPATIBILITY_562),x000)
$(info WARNING: You should make these changes in config.h, and not CXXFLAGS.)
$(info WARNING: You can 'mv config.recommend config.h', but it breaks versioning.)
$(info WARNING: See http://cryptopp.com/wiki/config.h for more details.)
$(info )
endif

View File

@ -1,169 +1,185 @@
CONTENTS OF THIS FILE
---------------------
* Introduction
* Building the Library
* Installing the Library
* Makefile Targets
* DataDir Patch
* Dynamic Analysis
* Acceptance Testing
* Reporting problems
INTRODUCTION
------------
Crypto++ Library is a free C++ class library of cryptographic algorithms and schemes. It was written and placed in public domain by Wei Dai. The library homepage is at http://www.cryptopp.com/. The latest library source code can be found at https://github.com/weidai11/cryptopp. For licensing and copyright information, please see License.txt.
These are general instructions for the BSDs, Linux, OS X, Solaris and Unix. On BSD you will likely have to use `gmake` to build the library. On Linux, OS X, Solaris and Unix, the system's make should be OK. On Windows, Crypto++ provides Borland and Visual Studio solutions.
Crypto++ uses a GNU makefile, which combines configuration and a non-anemic make. You should look through the GNUmakefile and config.h to ensure settings look reasonable before building. Please pay particular attention to CRYPTOPP_NO_UNALIGNED_DATA_ACCESS in config.h.
Crypto++ does not depend upon other tools or libraries. It does not use Autotools, does not use Cmake, and does not use Boost.
BUILDING THE LIBRARY
--------------------
In general, all you should have to do is open a terminal, and then:
make
make test
sudo make install
The command above builds the static library and cryptest.exe program. If you want to build the shared object, then issue:
make static dynamic cryptest.exe
Or:
make libcryptopp.a libcryptopp.so cryptest.exe
If you would like to use a different compiler, the set CXX:
export CXX=/opt/intel/bin/icpc
make
If you want to build using C++11, then:
make CXXFLAGS="-std=c++11"
Or:
CXXFLAGS="-std=c++11"
make
LLVM's libc++ is also supported, so you can:
CXXFLAGS="-std=c++11 -stdlib=libc++"
make
INSTALLING THE LIBRARY
----------------------
To install the library into a user selected directory, perform:
make install PREFIX=/usr/local
During install, the makefile copies cryptest.exe into $PREFIX/bin, copies headers into $PREFIX/include/cryptopp, and copies libraries into $PREFIX/lib. If you only built a static or dynamic version of the library, then only one library is copied. The install recipe does not fail if the static library or shared object is not built.
PREFIX is non-standard, but its retained for historical purposes. The makefile also responds to `prefix=<path>`.
There are some open issues installing the library because cryptest.exe is not sympathetic to path changes of of its test vectors and test data. See the DataDir patch below to fix it.
MAKEFILE TARGETS
----------------
The following are some of the targets provided by the GNU makefile.
`make` invokes the default rule, which builds the Crypto++ static library and test harness. They are called `libcryptopp.a` and `cryptest.exe`, respectively. `cryptest.exe` links against `libcryptopp.a`, so the static library is a prerequisite for the target.
`make libcryptopp.a` and `make static` build the static version of the library.
`make libcryptopp.so` and `make dynamic` build the dynamic version of the library. On Mac OS X, the recipe builds `libcryptopp.dylib` instead.
`make cryptest.exe` builds the library test harness.
`make test` and `make check` are the same recipe and invoke the test harness with the the validation option. That is, it executes `cryptest.exe v`.
`make install` installs the library. By default, the makefile copies into `/usr`. On OpenBSD, `make install` uses `/usr/local` by default because C++ headers should not be placed with the system headers.
`make clean` cleans most transient and temporary objects.
`make disclean` cleans most objects that are not part of the original distribution.
`make dist` and `make zip` build s ZIP file that is suitable for distribution.
DATADIR PATCH
-------------
The library offers a DataDir patch to help with post-installation issues regarding the location of the test vectors and test data. Its a patch provided by the community, so it must be applied manually. To acquire the patch, see http://www.cryptopp.com/wiki/DataDir.
DYNAMIC ANALYSIS
----------------
The Crypto++ embraces tools like Undefined Behavior sanitizer (UBsan), Address sanitizer (Asan) and Valgrind. Both Clang 3.2 and above and GCC 4.8 and above provide sanitizers. Please check with your distribution on how to install the compiler with its sanitizer libraries (they are sometimes a separate install item).
UBsan and Asan are mutually exclusive options, so you can perform only one of these at a time:
make ubsan
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
Or:
make asan
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
If you experience self test failures or see reports of undefined behavior, then you should ensure CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is defined in config.h. CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined due to historical purposes.
If you experience failures under Asan, then gather more information with:
./cryptest.exe v 2>&1 | asan_symbolize
If you moved Crypto++ such that the paths have changed, then perform:
./cryptest.exe v 2>&1 | sed "s/<old path>/<new path>/g" | asan_symbolize
ACCEPTANCE TESTING
------------------
Crypto++ uses five security gates in its engineering process. The library must maintain the quality provided by the review system and integrity of the test suites. You can use the information to decide if the Crypto++ library suits your needs and provides a compatible security posture.
The first gate is code review and discussion of proposed patches. Git commits often cross reference a User Group discussions.
Second is the compiler warning system. The code must clean compile under the equivalent of GCC's -Wall -Wextra (modulo -Wno-type-limits -Wno-unknown-pragmas). This is a moving target as compiler analysis improves.
Third, the code must pass cleanly though GCC and Clang's Undefined Behavior sanitizer (UBsan) and Address sanitizer (Asan) with CRYPTOPP_NO_UNALIGNED_DATA_ACCESS defined in config.h. See DYNAMIC ANALYSIS above on how to execute them.
Fourth, the test harness provides a "validation" option which performs basic system checks (like endianess and word sizes) and exercises algorithms (like AES and SHA). You run the validation suite as shown below. The tail of the output should indicate 0 failed tests.
./cryptest.exe v
...
All tests passed!
Test ended at Sun Jul 26 02:10:57 2015
Seed used was: 1437891055
Fifth, the test harness provides a "test vector" option which uses many known test vectors, even those published by other people (like Brian Gladman for AES). You run the test vectors as shown below. The tail of the output should indicate 0 failed tests.
./cryptest.exe tv all
...
Testing SymmetricCipher algorithm MARS/ECB.
.................
Tests complete. Total tests = 4094. Failed tests = 0.
REPORTING PROBLEMS
------------------
Dirty compiles and failures in the validation suite or test vectors should be reported at the Crypto++ User Group. The User Group is located at https://groups.google.com/forum/#!forum/cryptopp-users.
Also see http://www.cryptopp.com/wiki/Bug_Report.
CONTENTS OF THIS FILE
---------------------
* Introduction
* Building the Library
* Alternate Build Systems
* Installing the Library
* Makefile Targets
* Dynamic Analysis
* Acceptance Testing
* Reporting problems
INTRODUCTION
------------
Crypto++ Library is a free C++ class library of cryptographic algorithms and schemes. It was written and placed in public domain by Wei Dai. The library homepage is at http://www.cryptopp.com/. The latest library source code can be found at http://github.com/weidai11/cryptopp. For licensing and copyright information, please see License.txt.
These are general instructions for the BSDs, Linux, OS X, Solaris and Unix. The library uses a GNU makefile, which combines configuration and a non-anemic make. On BSD and Solaris you will likely have to use `gmake` to build the library. On Linux, OS X and Unix, the system's make should be OK. On Windows, Crypto++ provides Borland and Visual Studio solutions.
You should look through the GNUmakefile and config.h to ensure settings look reasonable before building. If you need compatibility with Crypto++ 5.6.2, then you can use `config.compat` in place of `config.h`. You are discouraged from using `config.compat` because it re-introduces undefined behavior that was cleared at Crypto++ 5.6.3.
Wiki pages are available for some platforms with specific build instructions. The wiki can be found at http://cryptopp.com/wiki/. The pages include Android, ARM, iOS and Solaris. Solaris users should visit the wiki for important information on compiling the library with different versions of SunCC and options, and information on improving library performance and features.
Crypto++ does not depend upon other tools or libraries. It does not use Autotools, does not use CMake, and does not use Boost. If you use an alternate build system, like Autotools or CMake, then see the warning below about CXXFLAGS and lack of -DNDEBUG. CMake is available in Master as a matter of convenience, but its not officially supported.
BUILDING THE LIBRARY
--------------------
In general, all you should have to do is open a terminal, and then:
make
make test
sudo make install
The command above builds the static library and cryptest.exe program. If you want to build the shared object, then issue:
make static dynamic cryptest.exe
Or:
make libcryptopp.a libcryptopp.so cryptest.exe
If you would like to use a different compiler, the set CXX:
export CXX=/opt/intel/bin/icpc
make
If you want to build using C++11, then:
make CXXFLAGS="-std=c++11"
Or:
CXXFLAGS="-std=c++11"
make
LLVM's libc++ is also supported, so you can:
CXXFLAGS="-std=c++11 -stdlib=libc++"
make
ALTERNATE BUILD SYSTEMS
-----------------------
The Crypto++ library is Make based and uses GNU Make by default. The makefile uses '-DNDEBUG -g2 -O2' CXXFLAGS by default. If you use an alternate build system, like Autotools or CMake, then ensure the build system includes '-DNDEBUG' for production or release builds. The Crypto++ library uses asserts for debugging and diagnostics during development; it does not rely on them to crash a program at runtime.
If an assert triggers in production software, then unprotected sensitive information could be egressed from the program to the filesystem or the platform's error reporting program, like Apport on Ubuntu or CrashReporter on Apple.
The makefile orders object files to help remediate problems associated with C++ static initialization order. The library does not use custom linker scripts. If you use an alternate build system, like Autotools or CMake, and collect source files into a list, then ensure these three are at the head of the list: 'cryptlib.cpp cpu.cpp integer.cpp <other sources>'. They should be linked in the same order: 'cryptlib.o cpu.o integer.o <other objects>'.
If your linker supports initialization attributes, like init_priority, then you can define CRYPTOPP_INIT_PRIORITY to control object initialization order. Set it to a value like 250. User programs can use CRYPTOPP_USER_PRIORITY to avoid conflicts with library values. Initialization attributes are more reliable than object file ordering, but its not ubiquitously supported by linkers.
The makefile links to the static version of the Crypto++ library to avoid binary planting and other LD_PRELOAD tricks. You should use the static version of the library in your programs to help avoid unwanted redirections.
INSTALLING THE LIBRARY
----------------------
To install the library into a user selected directory, perform:
make install PREFIX=/usr/local
If you are going to run `make install PREFIX=/usr/local`, then you should build with '-DCRYPTOPP_DATA_DIR='\"$PREFIX/share/cryptopp/\"' to ensure cryptest.exe can locate the test data files and test vectors after installation. The trailing slash in the path is needed because simple preprocessor concatenation is used.
During install, the makefile copies cryptest.exe into $PREFIX/bin, copies headers into $PREFIX/include/cryptopp, and copies libraries into $PREFIX/lib. If you only built a static or dynamic version of the library, then only one library is copied. The install recipe does not fail if the static library or shared object is not built.
PREFIX is non-standard, but its retained for historical purposes. The makefile also responds to `prefix=<path>`.
MAKEFILE TARGETS
----------------
The following are some of the targets provided by the GNU makefile.
`make` invokes the default rule, which builds the Crypto++ static library and test harness. They are called `libcryptopp.a` and `cryptest.exe`, respectively. `cryptest.exe` links against `libcryptopp.a`, so the static library is a prerequisite for the target.
`make libcryptopp.a` and `make static` build the static version of the library.
`make libcryptopp.so` and `make dynamic` build the dynamic version of the library. On Mac OS X, the recipe builds `libcryptopp.dylib` instead.
`make cryptest.exe` builds the library test harness.
`make test` and `make check` are the same recipe and invoke the test harness with the the validation option. That is, it executes `cryptest.exe v`.
`make install` installs the library. By default, the makefile copies into `/usr/local` by default.
`make clean` cleans most transient and temporary objects.
`make disclean` cleans most objects that are not part of the original distribution.
`make dist` and `make zip` builds ZIP file that is suitable for distribution.
`make iso` builds an ISO on Linux or OS X that is suitable for alternate distribution.
`make ubsan` and `make asan` builds the library with the respective sanitizer.
DYNAMIC ANALYSIS
----------------
The Crypto++ embraces tools like Undefined Behavior sanitizer (UBsan), Address sanitizer (Asan) and Valgrind. Both Clang 3.2 and above and GCC 4.8 and above provide sanitizers. Please check with your distribution on how to install the compiler with its sanitizer libraries (they are sometimes a separate install item).
UBsan and Asan are mutually exclusive options, so you can perform only one of these at a time:
make ubsan
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
Or:
make asan
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
If you experience self test failures or see reports of undefined behavior, then you should ensure CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is defined in config.h. CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined due to historical purposes.
If you experience failures under Asan, then gather more information with:
./cryptest.exe v 2>&1 | asan_symbolize
If you moved Crypto++ such that the paths have changed, then perform:
./cryptest.exe v 2>&1 | sed "s/<old path>/<new path>/g" | asan_symbolize
ACCEPTANCE TESTING
------------------
Crypto++ uses five security gates in its engineering process. The library must maintain the quality provided by the review system and integrity of the test suites. You can use the information to decide if the Crypto++ library suits your needs and provides a compatible security posture.
The first gate is code review and discussion of proposed patches. Git commits often cross reference a User Group discussions.
Second is the compiler warning system. The code must clean compile under the equivalent of GCC's -Wall -Wextra (modulo -Wno-type-limits -Wno-unknown-pragmas). This is a moving target as compiler analysis improves.
Third, the code must pass cleanly though GCC and Clang's Undefined Behavior sanitizer (UBsan) and Address sanitizer (Asan) with CRYPTOPP_NO_UNALIGNED_DATA_ACCESS defined in config.h. See DYNAMIC ANALYSIS above on how to execute them.
Fourth, the test harness provides a "validation" option which performs basic system checks (like endianess and word sizes) and exercises algorithms (like AES and SHA). You run the validation suite as shown below. The tail of the output should indicate 0 failed tests.
./cryptest.exe v
...
All tests passed!
Test ended at Sun Jul 26 02:10:57 2015
Seed used was: 1437891055
Fifth, the test harness provides a "test vector" option which uses many known test vectors, even those published by other people (like Brian Gladman for AES). You run the test vectors as shown below. The tail of the output should indicate 0 failed tests.
./cryptest.exe tv all
...
Testing SymmetricCipher algorithm MARS/ECB.
.................
Tests complete. Total tests = 4094. Failed tests = 0.
The library also offers its test script for those who want to use it. The test script is names cryptest.sh, and it repeatedly builds the library and exectues the tests under various configurations. It takes 2 to 4 hours to run on a semi-modern desktop or server; and days to run on an IoT gadget. Also see http://github.com/weidai11/cryptopp/blob/master/cryptest.sh and http://cryptopp.com/wiki/Cryptest.sh.
REPORTING PROBLEMS
------------------
Dirty compiles and failures in the validation suite or test vectors should be reported at the Crypto++ User Group. The User Group is located at http://groups.google.com/forum/#!forum/cryptopp-users.
Also see http://www.cryptopp.com/wiki/Bug_Report.

View File

@ -1,51 +1,51 @@
Compilation Copyright (c) 1995-2013 by Wei Dai. All rights reserved.
This copyright applies only to this software distribution package
as a compilation, and does not imply a copyright on any particular
file in the package.
All individual files in this compilation are placed in the public domain by
Wei Dai and other contributors.
I would like to thank the following authors for placing their works into
the public domain:
Joan Daemen - 3way.cpp
Leonard Janke - cast.cpp, seal.cpp
Steve Reid - cast.cpp
Phil Karn - des.cpp
Andrew M. Kuchling - md2.cpp, md4.cpp
Colin Plumb - md5.cpp
Seal Woods - rc6.cpp
Chris Morgan - rijndael.cpp
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
Richard De Moliner - safer.cpp
Matthew Skala - twofish.cpp
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
Ronny Van Keer - sha3.cpp
The Crypto++ Library (as a compilation) is currently licensed under the Boost
Software License 1.0 (http://www.boost.org/users/license.html).
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Compilation Copyright (c) 1995-2016 by Wei Dai. All rights reserved.
This copyright applies only to this software distribution package
as a compilation, and does not imply a copyright on any particular
file in the package.
All individual files in this compilation are placed in the public domain by
Wei Dai and other contributors.
I would like to thank the following authors for placing their works into
the public domain:
Joan Daemen - 3way.cpp
Leonard Janke - cast.cpp, seal.cpp
Steve Reid - cast.cpp
Phil Karn - des.cpp
Andrew M. Kuchling - md2.cpp, md4.cpp
Colin Plumb - md5.cpp
Seal Woods - rc6.cpp
Chris Morgan - rijndael.cpp
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
Richard De Moliner - safer.cpp
Matthew Skala - twofish.cpp
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
Ronny Van Keer - sha3.cpp
The Crypto++ Library (as a compilation) is currently licensed under the Boost
Software License 1.0 (http://www.boost.org/users/license.html).
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
0123456789abcdeffedcba9876543210 0123456789abcde7 7f1d0a77826b8aff
0123456789abcdeffedcba987654321089abcdef01234567 0123456789abcde7 de0b7c06ae5e0ed5
0123456789ABCDEF01010101010101011011121314151617 94DBE082549A14EF 9011121314151617

View File

@ -1,5 +0,0 @@
000000000000000000000000 000000010000000100000001 4059c76e83ae9dc4ad21ecf7
000000060000000500000004 000000030000000200000001 d2f05b5ed6144138cab920cd
def01234456789abbcdef012 234567899abcdef001234567 0aa55dbb9cdddb6d7cdb76b2
d2f05b5ed6144138cab920cd 4059c76e83ae9dc4ad21ecf7 478ea8716b13f17c15b155ed

View File

@ -1,45 +0,0 @@
0123456789ABCDEFFEDCBA9876543210 0123456789ABCDEFFEDCBA9876543210 67673138549669730857065648EABE43
80000000000000000000000000000000 00000000000000000000000000000000 6C227F749319A3AA7DA235A9BBA05A2C
00000000000000000000000000000001 00000000000000000000000000000000 41E0E6DC2DDEC65D8B8120E60977B82D
00000000000000000000000000000000 80000000000000000000000000000000 07923A39EB0A817D1C4D87BDB82D1F1C
00000000000000000000000000000000 00000000000000000000000000000001 F5574ACC3148DFCB9015200631024DF9
00000000000000000000000000000000 00000000000000000000000000000000 3D028025B156327C17F762C1F2CBCA71
01010101010101010101010101010101 01010101010101010101010101010101 637084CB1120D6F25DB618893040AA27
02020202020202020202020202020202 02020202020202020202020202020202 612834AAC9EF906BAEAA076E1C75179D
04040404040404040404040404040404 04040404040404040404040404040404 B24FAF8A579E4EFE986571FB2F68B5B4
08080808080808080808080808080808 08080808080808080808080808080808 3E5CAFBB70545AABB1109293A1C44C14
10101010101010101010101010101010 10101010101010101010101010101010 E1FA5FD3F40B766BBE3DF469AF41B420
20202020202020202020202020202020 20202020202020202020202020202020 7E724027BB2F591C63254D936FCC4B43
40404040404040404040404040404040 40404040404040404040404040404040 538ADCBE104A3483B3C2A3D8CE72FBD6
80808080808080808080808080808080 80808080808080808080808080808080 AA7627F70F6B54C217C3EF232D362459
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 25DD9EB9DD67FBC6E8431F56F4FBE651
0123456789ABCDEFFEDCBA98765432100011223344556677 0123456789ABCDEFFEDCBA9876543210 B4993401B3E996F84EE5CEE7D79B09B9
800000000000000000000000000000000000000000000000 00000000000000000000000000000000 1B6220D365C2176C1D41A5826520FCA1
000000000000000000000000000000000000000000000001 00000000000000000000000000000000 E37577F71E0E643C4D3F55219ABA1394
000000000000000000000000000000000000000000000000 80000000000000000000000000000000 3EB6CC5618EFC98455B5992050D474E7
000000000000000000000000000000000000000000000000 00000000000000000000000000000001 BA9AE89FDDCE4B51131E17C4D65CE587
000000000000000000000000000000000000000000000000 00000000000000000000000000000000 56E1E129CA5C02C7F9AC6AFDEF86ADC3
010101010101010101010101010101010101010101010101 01010101010101010101010101010101 8F764397C10BE84BA876CEEFA4225BFF
020202020202020202020202020202020202020202020202 02020202020202020202020202020202 60B00674BFD444D07B5A19851E6151CD
040404040404040404040404040404040404040404040404 04040404040404040404040404040404 81B26FF4F6B4377CC555873504B3A38B
080808080808080808080808080808080808080808080808 08080808080808080808080808080808 A2AA1C6693DC2B70D75C9B39B9B214D0
101010101010101010101010101010101010101010101010 10101010101010101010101010101010 A907BFDAEEF8C81D05855235E8D3BE08
202020202020202020202020202020202020202020202020 20202020202020202020202020202020 87F8EA30332036F17CEAC0097CE33BC1
404040404040404040404040404040404040404040404040 40404040404040404040404040404040 A2C32EA499E41A248565253BACC11E3B
808080808080808080808080808080808080808080808080 80808080808080808080808080808080 F602BA7F515B082983B8F7A27F92408F
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 3F8D5676F51CE23DC3BDB627F8B3883E
0123456789ABCDEFFEDCBA987654321000112233445566778899AABBCCDDEEFF 0123456789ABCDEFFEDCBA9876543210 9ACC237DFF16D76C20EF7C919E3A7509
8000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 2136FABDA091DFB5171B94B8EFBB5D08
0000000000000000000000000000000000000000000000000000000000000001 00000000000000000000000000000000 AFCD38B195E0A736304E89B9AE3019D3
0000000000000000000000000000000000000000000000000000000000000000 80000000000000000000000000000000 B0C6B88AEA518AB09E847248E91B1B9D
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000001 9CDB269B5D293BC5DB9C55B057D9B591
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 396154111ADEFC500CF6E5C99038BC17
0101010101010101010101010101010101010101010101010101010101010101 01010101010101010101010101010101 438D0C2E7E86869B56EBA23B66086A01
0202020202020202020202020202020202020202020202020202020202020202 02020202020202020202020202020202 D4F553BFA794F55EF3B7A578629F6DEA
0404040404040404040404040404040404040404040404040404040404040404 04040404040404040404040404040404 5E858730ABC9823A93CA4CAB67F0B423
0808080808080808080808080808080808080808080808080808080808080808 08080808080808080808080808080808 F9A9C1540AE1B314DBEDF9A49054DC9D
1010101010101010101010101010101010101010101010101010101010101010 10101010101010101010101010101010 6693FC130669F194F81E8D175194DDA2
2020202020202020202020202020202020202020202020202020202020202020 20202020202020202020202020202020 F3E1FDA6B9C8314799F4654C29F1C690
4040404040404040404040404040404040404040404040404040404040404040 40404040404040404040404040404040 4A30476F1141FBF303ED63FCD3CB0536
8080808080808080808080808080808080808080808080808080808080808080 80808080808080808080808080808080 0C765AA494E048FC8BB23139F2124CB6
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 4F05F28CA23EEAE205B67B1C95CD5280

View File

@ -1,11 +0,0 @@
01 23 45 67 12 34 56 78 23 45 67 89 34 56 78 9A
01 23 45 67 89 AB CD EF
23 8B 4F E5 84 7E 44 B2
01 23 45 67 12 34 56 78 23 45
01 23 45 67 89 AB CD EF
EB 6A 71 1A 2C 02 27 1B
01 23 45 67 12
01 23 45 67 89 AB CD EF
7A C8 16 D1 6E 9B 30 2E

View File

@ -1,11 +0,0 @@
2342bb9efa38542c0af75647f29f615d
00000000000000000000000000000000
c842a08972b43d20836c91d1b7530f6b
2342bb9efa38542cbed0ac83940ac298bac77a7717942863
00000000000000000000000000000000
1b386c0210dcadcbdd0e41aa08a7a7e8
2342bb9efa38542cbed0ac83940ac2988d7c47ce264908461cc1b5137ae6b604
00000000000000000000000000000000
4f6a2038286897b9c9870136553317fa

View File

@ -1,171 +0,0 @@
0101010101010101 95F8A5E5DD31D900 8000000000000000
0101010101010101 DD7F121CA5015619 4000000000000000
0101010101010101 2E8653104F3834EA 2000000000000000
0101010101010101 4BD388FF6CD81D4F 1000000000000000
0101010101010101 20B9E767B2FB1456 0800000000000000
0101010101010101 55579380D77138EF 0400000000000000
0101010101010101 6CC5DEFAAF04512F 0200000000000000
0101010101010101 0D9F279BA5D87260 0100000000000000
0101010101010101 D9031B0271BD5A0A 0080000000000000
0101010101010101 424250B37C3DD951 0040000000000000
0101010101010101 B8061B7ECD9A21E5 0020000000000000
0101010101010101 F15D0F286B65BD28 0010000000000000
0101010101010101 ADD0CC8D6E5DEBA1 0008000000000000
0101010101010101 E6D5F82752AD63D1 0004000000000000
0101010101010101 ECBFE3BD3F591A5E 0002000000000000
0101010101010101 F356834379D165CD 0001000000000000
0101010101010101 2B9F982F20037FA9 0000800000000000
0101010101010101 889DE068A16F0BE6 0000400000000000
0101010101010101 E19E275D846A1298 0000200000000000
0101010101010101 329A8ED523D71AEC 0000100000000000
0101010101010101 E7FCE22557D23C97 0000080000000000
0101010101010101 12A9F5817FF2D65D 0000040000000000
0101010101010101 A484C3AD38DC9C19 0000020000000000
0101010101010101 FBE00A8A1EF8AD72 0000010000000000
0101010101010101 750D079407521363 0000008000000000
0101010101010101 64FEED9C724C2FAF 0000004000000000
0101010101010101 F02B263B328E2B60 0000002000000000
0101010101010101 9D64555A9A10B852 0000001000000000
0101010101010101 D106FF0BED5255D7 0000000800000000
0101010101010101 E1652C6B138C64A5 0000000400000000
0101010101010101 E428581186EC8F46 0000000200000000
0101010101010101 AEB5F5EDE22D1A36 0000000100000000
0101010101010101 E943D7568AEC0C5C 0000000080000000
0101010101010101 DF98C8276F54B04B 0000000040000000
0101010101010101 B160E4680F6C696F 0000000020000000
0101010101010101 FA0752B07D9C4AB8 0000000010000000
0101010101010101 CA3A2B036DBC8502 0000000008000000
0101010101010101 5E0905517BB59BCF 0000000004000000
0101010101010101 814EEB3B91D90726 0000000002000000
0101010101010101 4D49DB1532919C9F 0000000001000000
0101010101010101 25EB5FC3F8CF0621 0000000000800000
0101010101010101 AB6A20C0620D1C6F 0000000000400000
0101010101010101 79E90DBC98F92CCA 0000000000200000
0101010101010101 866ECEDD8072BB0E 0000000000100000
0101010101010101 8B54536F2F3E64A8 0000000000080000
0101010101010101 EA51D3975595B86B 0000000000040000
0101010101010101 CAFFC6AC4542DE31 0000000000020000
0101010101010101 8DD45A2DDF90796C 0000000000010000
0101010101010101 1029D55E880EC2D0 0000000000008000
0101010101010101 5D86CB23639DBEA9 0000000000004000
0101010101010101 1D1CA853AE7C0C5F 0000000000002000
0101010101010101 CE332329248F3228 0000000000001000
0101010101010101 8405D1ABE24FB942 0000000000000800
0101010101010101 E643D78090CA4207 0000000000000400
0101010101010101 48221B9937748A23 0000000000000200
0101010101010101 DD7C0BBD61FAFD54 0000000000000100
0101010101010101 2FBC291A570DB5C4 0000000000000080
0101010101010101 E07C30D7E4E26E12 0000000000000040
0101010101010101 0953E2258E8E90A1 0000000000000020
0101010101010101 5B711BC4CEEBF2EE 0000000000000010
0101010101010101 CC083F1E6D9E85F6 0000000000000008
0101010101010101 D2FD8867D50D2DFE 0000000000000004
0101010101010101 06E7EA22CE92708F 0000000000000002
0101010101010101 166B40B44ABA4BD6 0000000000000001
8001010101010101 0000000000000000 95A8D72813DAA94D
4001010101010101 0000000000000000 0EEC1487DD8C26D5
2001010101010101 0000000000000000 7AD16FFB79C45926
1001010101010101 0000000000000000 D3746294CA6A6CF3
0801010101010101 0000000000000000 809F5F873C1FD761
0401010101010101 0000000000000000 C02FAFFEC989D1FC
0201010101010101 0000000000000000 4615AA1D33E72F10
0180010101010101 0000000000000000 2055123350C00858
0140010101010101 0000000000000000 DF3B99D6577397C8
0120010101010101 0000000000000000 31FE17369B5288C9
0110010101010101 0000000000000000 DFDD3CC64DAE1642
0108010101010101 0000000000000000 178C83CE2B399D94
0104010101010101 0000000000000000 50F636324A9B7F80
0102010101010101 0000000000000000 A8468EE3BC18F06D
0101800101010101 0000000000000000 A2DC9E92FD3CDE92
0101400101010101 0000000000000000 CAC09F797D031287
0101200101010101 0000000000000000 90BA680B22AEB525
0101100101010101 0000000000000000 CE7A24F350E280B6
0101080101010101 0000000000000000 882BFF0AA01A0B87
0101040101010101 0000000000000000 25610288924511C2
0101020101010101 0000000000000000 C71516C29C75D170
0101018001010101 0000000000000000 5199C29A52C9F059
0101014001010101 0000000000000000 C22F0A294A71F29F
0101012001010101 0000000000000000 EE371483714C02EA
0101011001010101 0000000000000000 A81FBD448F9E522F
0101010801010101 0000000000000000 4F644C92E192DFED
0101010401010101 0000000000000000 1AFA9A66A6DF92AE
0101010201010101 0000000000000000 B3C1CC715CB879D8
0101010180010101 0000000000000000 19D032E64AB0BD8B
0101010140010101 0000000000000000 3CFAA7A7DC8720DC
0101010120010101 0000000000000000 B7265F7F447AC6F3
0101010110010101 0000000000000000 9DB73B3C0D163F54
0101010108010101 0000000000000000 8181B65BABF4A975
0101010104010101 0000000000000000 93C9B64042EAA240
0101010102010101 0000000000000000 5570530829705592
0101010101800101 0000000000000000 8638809E878787A0
0101010101400101 0000000000000000 41B9A79AF79AC208
0101010101200101 0000000000000000 7A9BE42F2009A892
0101010101100101 0000000000000000 29038D56BA6D2745
0101010101080101 0000000000000000 5495C6ABF1E5DF51
0101010101040101 0000000000000000 AE13DBD561488933
0101010101020101 0000000000000000 024D1FFA8904E389
0101010101018001 0000000000000000 D1399712F99BF02E
0101010101014001 0000000000000000 14C1D7C1CFFEC79E
0101010101012001 0000000000000000 1DE5279DAE3BED6F
0101010101011001 0000000000000000 E941A33F85501303
0101010101010801 0000000000000000 DA99DBBC9A03F379
0101010101010401 0000000000000000 B7FC92F91D8E92E9
0101010101010201 0000000000000000 AE8E5CAA3CA04E85
0101010101010180 0000000000000000 9CC62DF43B6EED74
0101010101010140 0000000000000000 D863DBB5C59A91A0
0101010101010120 0000000000000000 A1AB2190545B91D7
0101010101010110 0000000000000000 0875041E64C570F7
0101010101010108 0000000000000000 5A594528BEBEF1CC
0101010101010104 0000000000000000 FCDB3291DE21F0C0
0101010101010102 0000000000000000 869EFD7F9F265A09
1046913489980131 0000000000000000 88D55E54F54C97B4
1007103489988020 0000000000000000 0C0CC00C83EA48FD
10071034C8980120 0000000000000000 83BC8EF3A6570183
1046103489988020 0000000000000000 DF725DCAD94EA2E9
1086911519190101 0000000000000000 E652B53B550BE8B0
1086911519580101 0000000000000000 AF527120C485CBB0
5107B01519580101 0000000000000000 0F04CE393DB926D5
1007B01519190101 0000000000000000 C9F00FFC74079067
3107915498080101 0000000000000000 7CFD82A593252B4E
3107919498080101 0000000000000000 CB49A2F9E91363E3
10079115B9080140 0000000000000000 00B588BE70D23F56
3107911598090140 0000000000000000 406A9A6AB43399AE
1007D01589980101 0000000000000000 6CB773611DCA9ADA
9107911589980101 0000000000000000 67FD21C17DBB5D70
9107D01589190101 0000000000000000 9592CB4110430787
1007D01598980120 0000000000000000 A6B7FF68A318DDD3
1007940498190101 0000000000000000 4D102196C914CA16
0107910491190401 0000000000000000 2DFA9F4573594965
0107910491190101 0000000000000000 B46604816C0E0774
0107940491190401 0000000000000000 6E7E6221A4F34E87
19079210981A0101 0000000000000000 AA85E74643233199
1007911998190801 0000000000000000 2E5A19DB4D1962D6
10079119981A0801 0000000000000000 23A866A809D30894
1007921098190101 0000000000000000 D812D961F017D320
100791159819010B 0000000000000000 055605816E58608F
1004801598190101 0000000000000000 ABD88E8B1B7716F1
1004801598190102 0000000000000000 537AC95BE69DA1E1
1004801598190108 0000000000000000 AED0F6AE3C25CDD8
1002911598100104 0000000000000000 B3E35A5EE53E7B8D
1002911598190104 0000000000000000 61C79C71921A2EF8
1002911598100201 0000000000000000 E2F5728F0995013C
1002911698100101 0000000000000000 1AEAC39A61F0A464
7CA110454A1A6E57 01A1D6D039776742 690F5B0D9A26939B
0131D9619DC1376E 5CD54CA83DEF57DA 7A389D10354BD271
07A1133E4A0B2686 0248D43806F67172 868EBB51CAB4599A
3849674C2602319E 51454B582DDF440A 7178876E01F19B2A
04B915BA43FEB5B6 42FD443059577FA2 AF37FB421F8C4095
0113B970FD34F2CE 059B5E0851CF143A 86A560F10EC6D85B
0170F175468FB5E6 0756D8E0774761D2 0CD3DA020021DC09
43297FAD38E373FE 762514B829BF486A EA676B2CB7DB2B7A
07A7137045DA2A16 3BDD119049372802 DFD64A815CAF1A0F
04689104C2FD3B2F 26955F6835AF609A 5C513C9C4886C088
37D06BB516CB7546 164D5E404F275232 0A2AEEAE3FF4AB77
1F08260D1AC2465E 6B056E18759F5CCA EF1BF03E5DFA575A
584023641ABA6176 004BD6EF09176062 88BF0DB6D70DEE56
025816164629B007 480D39006EE762F2 A1F9915541020B56
49793EBC79B3258F 437540C8698F3CFA 6FBF1CAFCFFD0556
4FB05E1515AB73A7 072D43A077075292 2F22E49BAB7CA1AC
49E95D6D4CA229BF 02FE55778117F12A 5A6B612CC26CCE4A
018310DC409B26D6 1D9D5C5018F728C2 5F4C038ED12B2E41
1C587F1C13924FEF 305532286D6F295A 63FAC0D034D9F793

View File

@ -1 +0,0 @@
30818702818100DA9A18547FF03B385CC16508C173A7EF4EB61CB40EF8FEF3B31F145051676166BCDC3FE6B799FC394D08C26385F9413F896E09117E46209D6923602683CEA100924A6EE695281775C619DAA94EA8CB3691B4275B0183F1D39639EBC92995FE645D6C1BC28D409E585549BBD2C5DCDD6C208B04EADD8B7A6D997F72CBAD88390F020102

View File

@ -1 +0,0 @@
308201080282010100EB60DBD494AAFBCD2EAC6A36DB8E7DD4A2A64512A5BBB15B9BFB581C7C1CAFB647D4612973C3770C2166D75EEA695F67EA8261557591DB78BCF5A886AA5294F3AEE4D25B57C8EE8C7FE8DBF70C132CD7FFCB6F89426F807F552C5DAE2FB1F329E340094E4B30D8EF6265AB4D350E9837B151C86AC524DE4E1FC04746C668BE318275E420D51AEDDFBDF887D435CDEEF6AC81293DB45287132F8236A43AD8F4D6642D7CA6732DA06A1DE008259008C9D74403B68ADAC788CF8AB5BEFFC310DCCCD32901D1F290E5B7A993D2CF6A652AF81B6DA0FD2E70678D1AE086150E41444522F20621195AD2A1F0975652B4AF7DE5261A9FD46B9EA8B443641F3BBA695B9B020103

View File

@ -1 +0,0 @@
308201370201003082011706072A8648CE3804013082010A02818100D4EC6B7A18416519C76766726B3D2D5F054D107B30E97691B15EB0DCDF452B77F10E12C14450AB107BE349C2DF3A2DBD9D844A24ABA21B328D568E8EC6B959E70BADE5C49879AE4447F643360523469B55AFDC459B45634F657AA79918772F2BA9508ACD43C95C16650A1251B8173EBA1B9B59FE8C57F6240EA49A4FE8855CEF0281806A7635BD0C20B28CE3B3B339359E96AF82A6883D9874BB48D8AF586E6FA295BBF8870960A22855883DF1A4E16F9D16DECEC2251255D10D9946AB4747635CACF385D6F2E24C3CD72223FB219B0291A34DAAD7EE22CDA2B1A7B2BD53CC8C3B9795D4A84566A1E4AE0B32850928DC0B9F5D0DCDACFF462BFB1207524D27F442AE77020102041702150C9C14EEFA749DCE9A2A4B7065768767BA48BBB62F

View File

@ -1 +0,0 @@
308202410201003082021906072A8648CE3804013082020C0282010100A8E87254E7F56CB5857786364ACC39F2A0F79FFF8ED6C62C64EE45FC1C775CDDBFD9CBCEF8262DBD2CECE4E5AFECA239B9B4B7D3CBA228366500F5B2203CA6C0CB0AB6698F73921B4831BA598DFA8268A07368A64774C77808AB7CB7978F839304B10567F8C9C34F8DBDB66BB928EDE6327773AA6C20A8F4E9C2AE0C66A0516E057BBC87760CF39270726F1863260CD5ADDAF366318E7029851A6F85B2349DF29629319A3662354DBCAD0789D02AC6BD804C06523900166501041963BD7EFFE0069694A54F4542172A29B1F09D26E3F052AE5274A898058BE549650BC2066DDFDB84D582E6503AF42BCB2B674F2A2A77C54678FD622FFCA2D9718BF8B0525AEF028201005474392A73FAB65AC2BBC31B25661CF9507BCFFFC76B6316327722FE0E3BAE6EDFECE5E77C1316DE96767272D7F6511CDCDA5BE9E5D1141B32807AD9101E536065855B34C7B9C90DA418DD2CC6FD41345039B45323BA63BC0455BE5BCBC7C1C9825882B3FC64E1A7C6DEDB35DC9476F3193BB9D53610547A74E15706335028B702BDDE43BB0679C93839378C3193066AD6ED79B318C73814C28D37C2D91A4EF94B1498CD1B311AA6DE5683C4E815635EC02603291C800B3280820CB1DEBF7FF0034B4A52A7A2A10B9514D8F84E9371F82957293A544C02C5F2A4B285E10336EFEDC26AC173281D7A15E595B3A795153BE2A33C7EB117FE516CB8C5FC58292D77020102041F021D031D7EC405D3E11D031B7B66DF9EFFCC5173B9B1639E4EC920731484EE

View File

@ -1 +0,0 @@
3082014A0201003082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0416021426EBA66E846E755169F84A1DA981D86502405DDF

View File

@ -1 +0,0 @@
308201B73082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0381850002818100D30312B7179661DA4691EDE39A71CB961199CD792C50AED6EA7E1A24C53590B6BCD92F26509D3372B2849A17C99C0962FBE4A2606CA37E6DF10244805363450FFAA24A7C274DF0B5D24AE7F31A8319FD2AA6E98AC6E7E3364E7AEDE575A9993609B0DFA387084141EA0B5B2D59B6DE718C0DAB4F86BC59F0DBE8602AED933494

View File

@ -1 +0,0 @@
3081C60201003081A806072A8648CE38040130819C0241008DF2A494492276AA3D25759BB06869CBEAC0D83AFB8D0CF7CBB8324F0D7882E5D0762FC5B7210EAFC2E9ADAC32AB7AAC49693DFBF83724C2EC0736EE31C80291021500C773218C737EC8EE993B4F2DED30F48EDACE915F0240626D027839EA0A13413163A55B4CB500299D5522956CEFCB3BFF10F399CE2C2E71CB9DE5FA24BABF58E5B79521925C9CC42E9F6F464B088CC572AF53E6D78802041602142070B3223DBA372FDE1C0FFC7B2E3B498B260614

View File

@ -1 +0,0 @@
3082018E028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BCABCBA4E458812DB601FCD04609D435317181236B9702010202818038FBC56751763146BC107ECC59E9BAD3852EBC38799B41B40EF5745810BCF9DCC6D569B7E61063EA358B0DF2A194910029B72A9CFD11AD240681D3F976EDCB18D79C0530AB2944DC1E314C2B520BE23066C802754C19BF2EC15DE0439E2663383CEA5163DC857B6A5F91079F54FB47C9B33F23A9EB6B3FCBA8581524B3EC5C75028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BC7F3EC6725F2FC0A6155ADCA43CEE7319E623824852

View File

@ -1 +0,0 @@
3081E00281807040653BA4FCD5C66E3318B31E82654C5A62957F68D2EE6AE10BD6678D7A14EEF8EBF0C85F28FE22056C12B2A2DD4E9C897EB2FF06D57DB03B872C049ED2806DC3E4D86F2947D134065AC642F233F95FBCB55C533274FA91FFDC0CEB9E71B8795B71A977C7956001FC19E28DE18A80B20E4AE8F775B952CEEA0DEFEAE8E93D7F020120022B1EC74E9FC5EEA090E8DDF4BDB64861C7DC3F8EC7E64286EC2FE39DA55B4763C582DB48146521BDEF0146D5022B1E559EB15755298408E4E4C6F4791BF075C7A8C9B3C7F5B7FA3E8C322BA0A160C09A9DB6BBC4974BE0F877

Some files were not shown because too many files have changed in this diff Show More