mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
1 Commits
v9.3.0.6
...
fix/StarMa
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a4d97c7b4 |
Binary file not shown.
Binary file not shown.
@ -90,7 +90,7 @@ static std::wstring convertUtf16ToWString(const UTF16 * Data, int nLength)
|
||||
return std::wstring();
|
||||
}
|
||||
|
||||
std::wstring wstr ((wchar_t *) pStrUtf32, nLength);
|
||||
std::wstring wstr ((wchar_t *) pStrUtf32);
|
||||
|
||||
delete [] pStrUtf32;
|
||||
return wstr;
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
<<<<<<<
|
||||
if((c >= 'a' && c <= 'z') || (c>= 'A' && c<= 'Z') || (c >= '0' && c<= '9')){
|
||||
=======
|
||||
if((c >= 'a' && c <= 'z') || (c>= 'A' && c<= 'Z') || (c >= '0' && c<= '9') || ('-' == c) || ('_' == c) || ('.' == c) || ('~' == c)){
|
||||
>>>>>>>
|
||||
@ -74,7 +74,6 @@ public:
|
||||
bool isDocFormatFile(const std::wstring& fileName);
|
||||
bool isXlsFormatFile(const std::wstring& fileName);
|
||||
|
||||
bool isCompoundFile (POLE::Storage* storage);
|
||||
bool isOleObjectFile(POLE::Storage* storage);
|
||||
bool isDocFormatFile(POLE::Storage* storage);
|
||||
bool isXlsFormatFile(POLE::Storage* storage);
|
||||
|
||||
@ -552,15 +552,6 @@ bool COfficeFileFormatChecker::isPptFormatFile(POLE::Storage *storage)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool COfficeFileFormatChecker::isCompoundFile(POLE::Storage* storage)
|
||||
{
|
||||
if (storage == NULL) return false;
|
||||
|
||||
if (storage->GetAllStreams(L"/").size() == 1) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::wstring COfficeFileFormatChecker::getDocumentID(const std::wstring &_fileName)
|
||||
{
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
@ -758,11 +749,6 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring &_fileName)
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_OTHER_MS_VBAPROJECT;
|
||||
return true;
|
||||
}
|
||||
else if (isCompoundFile(&storage))
|
||||
{
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_OTHER_COMPOUND;
|
||||
return true;
|
||||
}
|
||||
else if (isHwpFile(&storage))
|
||||
{
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_HWP;
|
||||
|
||||
@ -136,7 +136,6 @@
|
||||
#define AVS_OFFICESTUDIO_FILE_OTHER_MS_MITCRYPTO AVS_OFFICESTUDIO_FILE_OTHER + 0x000b
|
||||
#define AVS_OFFICESTUDIO_FILE_OTHER_MS_VBAPROJECT AVS_OFFICESTUDIO_FILE_OTHER + 0x000c
|
||||
#define AVS_OFFICESTUDIO_FILE_OTHER_PACKAGE_IN_OLE AVS_OFFICESTUDIO_FILE_OTHER + 0x000d
|
||||
#define AVS_OFFICESTUDIO_FILE_OTHER_COMPOUND AVS_OFFICESTUDIO_FILE_OTHER + 0x000e
|
||||
|
||||
#define AVS_OFFICESTUDIO_FILE_TEAMLAB 0x1000
|
||||
#define AVS_OFFICESTUDIO_FILE_TEAMLAB_DOCY AVS_OFFICESTUDIO_FILE_TEAMLAB + 0x0001
|
||||
|
||||
@ -33,7 +33,8 @@ OO_BUILD_BRANDING = $$(OO_BRANDING)
|
||||
OO_DESTDIR_BUILD_OVERRIDE = $$(DESTDIR_BUILD_OVERRIDE)
|
||||
|
||||
win32 {
|
||||
CURRENT_YEAR = $$system(powershell -NoLogo -NoProfile -Command "(Get-Date).Year")
|
||||
CURRENT_YEAR = $$system(wmic PATH Win32_LocalTime GET ^Year /FORMAT:VALUE | find \"=\")
|
||||
CURRENT_YEAR = $$replace(CURRENT_YEAR, "Year=", "")
|
||||
CURRENT_YEAR = $$replace(CURRENT_YEAR, "\r", "")
|
||||
CURRENT_YEAR = $$replace(CURRENT_YEAR, "\n", "")
|
||||
CURRENT_YEAR = $$replace(CURRENT_YEAR, "\t", "")
|
||||
|
||||
@ -246,11 +246,6 @@ namespace NSSystemPath
|
||||
|
||||
wsNewPath.pop_back();
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
if (L'/' == strPath[0] || L'\\' == strPath[0])
|
||||
return L'/' + wsNewPath;
|
||||
#endif
|
||||
|
||||
return wsNewPath;
|
||||
}
|
||||
|
||||
|
||||
@ -60,7 +60,6 @@ namespace NSSystemUtils
|
||||
static const wchar_t* gc_EnvModified = L"MODIFIED";
|
||||
static const wchar_t* gc_EnvMemoryLimit = L"X2T_MEMORY_LIMIT";
|
||||
static const wchar_t* gc_EnvMemoryLimitDefault = L"4GiB";
|
||||
static const wchar_t* gc_EnvSigningKeystorePassphrase = L"SIGNING_KEYSTORE_PASSPHRASE";
|
||||
|
||||
KERNEL_DECL std::string GetEnvVariableA(const std::wstring& strName);
|
||||
KERNEL_DECL std::wstring GetEnvVariable(const std::wstring& strName);
|
||||
|
||||
@ -16,15 +16,7 @@
|
||||
static tsize_t
|
||||
_tiffReadProcEx(thandle_t fd, tdata_t buf, tsize_t size)
|
||||
{
|
||||
tsize_t nReadCount = (tsize_t)((CxFile*)fd)->Read(buf, 1, size);
|
||||
|
||||
if (nReadCount < size)
|
||||
{
|
||||
memset(static_cast<char*>(buf) + nReadCount, 0, size - nReadCount);
|
||||
return size;
|
||||
}
|
||||
|
||||
return nReadCount;
|
||||
return (tsize_t)((CxFile*)fd)->Read(buf, 1, size);
|
||||
}
|
||||
|
||||
static tsize_t
|
||||
|
||||
@ -245,18 +245,7 @@ public:
|
||||
|
||||
return 0;
|
||||
}
|
||||
bool CheckOwnerPassword(const std::wstring& sPassword)
|
||||
{
|
||||
if (m_nType == 0)
|
||||
return ((CPdfFile*)m_pFile)->CheckOwnerPassword(sPassword);
|
||||
return true;
|
||||
}
|
||||
bool CheckPerm(int nPerm)
|
||||
{
|
||||
if (m_nType == 0)
|
||||
return ((CPdfFile*)m_pFile)->CheckPerm(nPerm);
|
||||
return true;
|
||||
}
|
||||
|
||||
BYTE* GetInfo()
|
||||
{
|
||||
NSWasm::CData oRes;
|
||||
|
||||
@ -194,9 +194,6 @@ JSSmart<CJSValue> CNativeControlEmbed::ZipOpenBase64(JSSmart<CJSValue> name)
|
||||
|
||||
JSSmart<CJSValue> CNativeControlEmbed::ZipFileAsString(JSSmart<CJSValue> name)
|
||||
{
|
||||
if (m_pInternal->m_oZipWorker.m_sTmpFolder.empty())
|
||||
return CJSContext::createUndefined();
|
||||
|
||||
BYTE* pData = NULL;
|
||||
DWORD len = 0;
|
||||
m_pInternal->m_oZipWorker.GetFileData(name->toStringW(), pData, len);
|
||||
@ -205,9 +202,6 @@ JSSmart<CJSValue> CNativeControlEmbed::ZipFileAsString(JSSmart<CJSValue> name)
|
||||
|
||||
JSSmart<CJSValue> CNativeControlEmbed::ZipFileAsBinary(JSSmart<CJSValue> name)
|
||||
{
|
||||
if (m_pInternal->m_oZipWorker.m_sTmpFolder.empty())
|
||||
return CJSContext::createUndefined();
|
||||
|
||||
return CJSContext::createUint8Array(m_pInternal->m_oZipWorker.m_sTmpFolder + L"/" + name->toStringW());
|
||||
}
|
||||
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
-(JSValue*) SplitPages : (JSValue*)arrPageIndexes : (JSValue*)data;
|
||||
-(JSValue*) MergePages : (JSValue*)data : (JSValue*)nMaxID : (JSValue*)sPrefixForm;
|
||||
-(JSValue*) UnmergePages;
|
||||
-(JSValue*) RedactPage : (JSValue*)nPageIndex : (JSValue*)arrRedactBox : (JSValue*)dataFiller;
|
||||
-(JSValue*) UndoRedact;
|
||||
@end
|
||||
|
||||
@interface CJSCDrawingFileEmbed : NSObject<IJSCDrawingFileEmbed, JSEmbedObjectProtocol>
|
||||
@ -69,8 +67,6 @@ FUNCTION_WRAPPER_JS_1(FreeWasmData, FreeWasmData)
|
||||
FUNCTION_WRAPPER_JS_2(SplitPages, SplitPages)
|
||||
FUNCTION_WRAPPER_JS_3(MergePages, MergePages)
|
||||
FUNCTION_WRAPPER_JS_0(UnmergePages, UnmergePages)
|
||||
FUNCTION_WRAPPER_JS_3(RedactPage, RedactPage)
|
||||
FUNCTION_WRAPPER_JS_0(UndoRedact, UndoRedact)
|
||||
@end
|
||||
|
||||
class CDrawingFileEmbedAdapter : public CJSEmbedObjectAdapterJSC
|
||||
|
||||
@ -67,7 +67,7 @@ namespace NSDrawingFileEmbed
|
||||
NSV8Objects::Template_Set(result, "SplitPages", _SplitPages);
|
||||
NSV8Objects::Template_Set(result, "MergePages", _MergePages);
|
||||
NSV8Objects::Template_Set(result, "UnmergePages", _UnmergePages);
|
||||
NSV8Objects::Template_Set(result, "RedactPage", _RedactPage);
|
||||
NSV8Objects::Template_Set(result, "RedactPage", _RedactPage);
|
||||
NSV8Objects::Template_Set(result, "UndoRedact", _UndoRedact);
|
||||
|
||||
return handle_scope.Escape(result);
|
||||
|
||||
@ -837,63 +837,53 @@ public:
|
||||
CSymbolSimpleChecker2 oAllChecker(arSymbolsAll, nMaxSymbol);
|
||||
|
||||
std::map<std::wstring, int> mapFontsPriorityStandard;
|
||||
int nCurrentPriority = 1;
|
||||
|
||||
#define SET_FONT_PRIORITY(fontName) mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(fontName, nCurrentPriority++))
|
||||
|
||||
SET_FONT_PRIORITY(L"ASCW3");
|
||||
SET_FONT_PRIORITY(L"Arial");
|
||||
SET_FONT_PRIORITY(L"Times New Roman");
|
||||
SET_FONT_PRIORITY(L"Tahoma");
|
||||
SET_FONT_PRIORITY(L"Cambria");
|
||||
SET_FONT_PRIORITY(L"Calibri");
|
||||
SET_FONT_PRIORITY(L"Verdana");
|
||||
SET_FONT_PRIORITY(L"Georgia");
|
||||
SET_FONT_PRIORITY(L"Open Sans");
|
||||
SET_FONT_PRIORITY(L"Liberation Sans");
|
||||
SET_FONT_PRIORITY(L"Helvetica");
|
||||
SET_FONT_PRIORITY(L"Nimbus Sans L");
|
||||
SET_FONT_PRIORITY(L"DejaVu Sans");
|
||||
SET_FONT_PRIORITY(L"Liberation Serif");
|
||||
SET_FONT_PRIORITY(L"Trebuchet MS");
|
||||
SET_FONT_PRIORITY(L"Courier New");
|
||||
SET_FONT_PRIORITY(L"Carlito");
|
||||
SET_FONT_PRIORITY(L"Segoe UI");
|
||||
SET_FONT_PRIORITY(L"SimSun");
|
||||
SET_FONT_PRIORITY(L"MS Gothic");
|
||||
SET_FONT_PRIORITY(L"Nirmala UI");
|
||||
SET_FONT_PRIORITY(L"Batang");
|
||||
SET_FONT_PRIORITY(L"MS Mincho");
|
||||
SET_FONT_PRIORITY(L"Wingdings");
|
||||
SET_FONT_PRIORITY(L"Microsoft JhengHei");
|
||||
SET_FONT_PRIORITY(L"Microsoft JhengHei UI");
|
||||
SET_FONT_PRIORITY(L"Microsoft YaHei");
|
||||
SET_FONT_PRIORITY(L"PMingLiU");
|
||||
SET_FONT_PRIORITY(L"MingLiU");
|
||||
SET_FONT_PRIORITY(L"DFKai-SB");
|
||||
SET_FONT_PRIORITY(L"FangSong");
|
||||
SET_FONT_PRIORITY(L"KaiTi");
|
||||
SET_FONT_PRIORITY(L"SimKai");
|
||||
SET_FONT_PRIORITY(L"SimHei");
|
||||
SET_FONT_PRIORITY(L"Meiryo");
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"ASCW3", 1));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Arial", 2));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Times New Roman", 3));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Tahoma", 4));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Cambria", 5));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Calibri", 6));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Verdana", 7));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Georgia", 8));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Open Sans", 9));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Liberation Sans", 10));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Helvetica", 11));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Nimbus Sans L", 12));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"DejaVu Sans", 13));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Liberation Serif", 14));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Trebuchet MS", 15));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Courier New", 16));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Carlito", 17));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Segoe UI", 18));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"SimSun", 19));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"MS Gothic", 20));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Nirmala UI", 21));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Batang", 22));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"MS Mincho", 23));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Wingdings", 24));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Microsoft JhengHei", 25));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Microsoft JhengHei UI", 26));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Microsoft YaHei", 27));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PMingLiU", 28));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"MingLiU", 29));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"DFKai-SB", 30));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"FangSong", 31));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"KaiTi", 32));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"SimKai", 33));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"SimHei", 34));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Meiryo", 35));
|
||||
|
||||
#ifdef _MAC
|
||||
SET_FONT_PRIORITY(L"PingFang SC");
|
||||
SET_FONT_PRIORITY(L"PingFang TC");
|
||||
SET_FONT_PRIORITY(L"PingFang HK");
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PingFang SC", 36));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PingFang TC", 37));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"PingFang HK", 38));
|
||||
|
||||
SET_FONT_PRIORITY(L"Heiti SC");
|
||||
SET_FONT_PRIORITY(L"Heiti TC");
|
||||
SET_FONT_PRIORITY(L"Songti SC");
|
||||
SET_FONT_PRIORITY(L"Songti TC");
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Heiti SC", 39));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Heiti TC", 40));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Songti SC", 41));
|
||||
mapFontsPriorityStandard.insert(std::pair<std::wstring, int>(L"Songti TC", 42));
|
||||
#endif
|
||||
|
||||
SET_FONT_PRIORITY(L"Malgun Gothic");
|
||||
SET_FONT_PRIORITY(L"Nanum Gothic");
|
||||
SET_FONT_PRIORITY(L"NanumGothic");
|
||||
SET_FONT_PRIORITY(L"Noto Sans KR");
|
||||
SET_FONT_PRIORITY(L"TakaoGothic");
|
||||
|
||||
NSFonts::CApplicationFontsSymbols oApplicationChecker;
|
||||
|
||||
// приоритеты шрифтов. по имени (все стили)
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include <vector>
|
||||
#include "../graphics/pro/Fonts.h"
|
||||
|
||||
#define ONLYOFFICE_FONTS_VERSION 15
|
||||
#define ONLYOFFICE_FONTS_VERSION 14
|
||||
#define ONLYOFFICE_ALL_FONTS_VERSION 2
|
||||
|
||||
class CApplicationFontsWorkerBreaker
|
||||
|
||||
@ -737,13 +737,11 @@ CBooleanOperations::CBooleanOperations(const CGraphicsPath& path1,
|
||||
const CGraphicsPath& path2,
|
||||
BooleanOpType op,
|
||||
long fillType,
|
||||
bool isLuminosity,
|
||||
bool isSelf) :
|
||||
bool isLuminosity) :
|
||||
Op(op),
|
||||
Close1(path1.Is_poly_closed()),
|
||||
Close2(path2.Is_poly_closed()),
|
||||
IsLuminosity(isLuminosity),
|
||||
IsSelf(isSelf),
|
||||
FillType(fillType),
|
||||
Path1(path1),
|
||||
Path2(path2)
|
||||
@ -786,9 +784,10 @@ bool CBooleanOperations::IsSelfInters(const CGraphicsPath& p)
|
||||
void CBooleanOperations::TraceBoolean()
|
||||
{
|
||||
bool reverse = false;
|
||||
bool self = Path1 == Path2;
|
||||
if (((Op == Subtraction || Op == Exclusion) ^
|
||||
Path1.IsClockwise() ^
|
||||
Path2.IsClockwise()) && !IsSelf)
|
||||
Path2.IsClockwise()) && !self)
|
||||
reverse = true;
|
||||
|
||||
PreparePath(Path1, 1, Segments1, Curves1);
|
||||
@ -799,7 +798,7 @@ void CBooleanOperations::TraceBoolean()
|
||||
|
||||
GetIntersection();
|
||||
|
||||
if (IsSelf)
|
||||
if (self)
|
||||
{
|
||||
if (Op == Subtraction)
|
||||
return;
|
||||
@ -824,11 +823,6 @@ void CBooleanOperations::TraceBoolean()
|
||||
CreateNewPath(adj_matr);
|
||||
return;
|
||||
}
|
||||
else if (Path1 == Path2)
|
||||
{
|
||||
Result = std::move(Path1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Locations.empty())
|
||||
{
|
||||
@ -2361,7 +2355,7 @@ CGraphicsPath CalcBooleanOperation(const CGraphicsPath& path1,
|
||||
CBooleanOperations o;
|
||||
if (i > skip_end2 && o.IsSelfInters(paths2[i]))
|
||||
{
|
||||
CBooleanOperations operation(paths2[i], paths2[i], Intersection, fillType, isLuminosity, true);
|
||||
CBooleanOperations operation(paths2[i], paths2[i], Intersection, fillType, isLuminosity);
|
||||
CGraphicsPath p = std::move(operation.GetResult());
|
||||
|
||||
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
|
||||
@ -2376,7 +2370,7 @@ CGraphicsPath CalcBooleanOperation(const CGraphicsPath& path1,
|
||||
CBooleanOperations o2;
|
||||
if (j > skip_end1 && o2.IsSelfInters(paths1[j]))
|
||||
{
|
||||
CBooleanOperations operation(paths1[j], paths1[j], Intersection, fillType, isLuminosity, true);
|
||||
CBooleanOperations operation(paths1[j], paths1[j], Intersection, fillType, isLuminosity);
|
||||
CGraphicsPath p = std::move(operation.GetResult());
|
||||
|
||||
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
|
||||
@ -2386,7 +2380,7 @@ CGraphicsPath CalcBooleanOperation(const CGraphicsPath& path1,
|
||||
paths1.insert(paths1.begin() + i + k, tmp_paths[k]);
|
||||
}
|
||||
|
||||
CBooleanOperations operation(paths1[j], paths2[i], op, fillType, isLuminosity, false);
|
||||
CBooleanOperations operation(paths1[j], paths2[i], op, fillType, isLuminosity);
|
||||
paths.push_back(operation.GetResult());
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ namespace Aggplus
|
||||
{
|
||||
public:
|
||||
CBooleanOperations() {};
|
||||
CBooleanOperations(const CGraphicsPath& path1, const CGraphicsPath& path2, BooleanOpType op, long fillType, bool isLuminosity, bool isSelf);
|
||||
CBooleanOperations(const CGraphicsPath& path1, const CGraphicsPath& path2, BooleanOpType op, long fillType, bool isLuminosity);
|
||||
~CBooleanOperations();
|
||||
CGraphicsPath&& GetResult();
|
||||
bool IsSelfInters(const CGraphicsPath& p);
|
||||
@ -166,7 +166,6 @@ namespace Aggplus
|
||||
bool Close1 = true;
|
||||
bool Close2 = true;
|
||||
bool IsLuminosity = false;
|
||||
bool IsSelf = false;
|
||||
|
||||
// c_nStroke, c_nWindingFillMode, c_nEvenOddFillMode
|
||||
long FillType = c_nWindingFillMode;
|
||||
|
||||
@ -2142,12 +2142,7 @@ namespace Aggplus
|
||||
agg::trans_affine* full_trans = &m_oFullTransform.m_internal->m_agg_mtx;
|
||||
double dDet = full_trans->determinant();
|
||||
|
||||
double sx = sqrt(full_trans->sx * full_trans->sx + full_trans->shx * full_trans->shx);
|
||||
double sy = sqrt(full_trans->shy * full_trans->shy + full_trans->sy * full_trans->sy);
|
||||
double scale = std::max(sx, sy);
|
||||
double adaptive_threshold = 1.0 / (scale * scale * 10000.0);
|
||||
|
||||
if (fabs(dDet) < std::max(0.0001, adaptive_threshold))
|
||||
if (fabs(dDet) < 0.0001)
|
||||
{
|
||||
path_copy.transform_all_paths(m_oFullTransform.m_internal->m_agg_mtx);
|
||||
dWidth *= sqrt(fabs(dDet));
|
||||
@ -2245,8 +2240,6 @@ namespace Aggplus
|
||||
LONG lCount2 = lCount / 2;
|
||||
|
||||
double dKoef = 1.0;
|
||||
if (bIsUseIdentity)
|
||||
dKoef = sqrt(fabs(m_oFullTransform.m_internal->m_agg_mtx.determinant()));
|
||||
|
||||
for (LONG i = 0; i < lCount2; ++i)
|
||||
{
|
||||
|
||||
@ -886,17 +886,17 @@ namespace Aggplus
|
||||
if (isCurve)
|
||||
{
|
||||
std::vector<PointD> points = GetPoints(idx, 4);
|
||||
area = 3.0 * (points[3].Y - points[0].Y) * (points[1].X + points[2].X)
|
||||
- (points[3].X - points[0].X) * (points[1].Y + points[2].Y)
|
||||
+ points[1].Y * (points[0].X - points[2].X)
|
||||
- points[1].X * (points[0].Y - points[2].Y)
|
||||
+ points[3].Y * (points[2].X + points[0].X / 3.0)
|
||||
- points[3].X * (points[2].Y + points[0].Y / 3.0) / 20.0;
|
||||
area = (points[3].Y - points[0].Y) * (points[1].X + points[2].X)
|
||||
- (points[3].X - points[0].X) * (points[1].Y + points[2].Y)
|
||||
+ points[1].Y * (points[0].X - points[2].X)
|
||||
- points[1].X * (points[0].Y - points[2].Y)
|
||||
+ points[3].Y * (points[2].X + points[0].X / 3.0)
|
||||
- points[3].X * (points[2].Y + points[0].Y / 3.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<PointD> points = GetPoints(idx, 2);
|
||||
area = (points[1].Y * points[0].X - points[1].X * points[0].Y) / 2.0;
|
||||
area = 4.0 * (points[1].Y * points[0].X - points[1].X * points[0].Y) / 3.0;
|
||||
}
|
||||
|
||||
return area;
|
||||
|
||||
@ -46,92 +46,6 @@
|
||||
// void Set(const std::wstring& ws) { m_ws = ws; }
|
||||
// const std::wstring& Get() { return m_ws; }
|
||||
|
||||
CAnnotFieldInfo::CActionFieldPr* ReadAction(NSOnlineOfficeBinToPdf::CBufferReader* pReader)
|
||||
{
|
||||
CAnnotFieldInfo::CActionFieldPr* pRes = new CAnnotFieldInfo::CActionFieldPr();
|
||||
|
||||
pRes->nActionType = pReader->ReadByte();
|
||||
switch (pRes->nActionType)
|
||||
{
|
||||
case 14: // JavaScript
|
||||
{
|
||||
pRes->wsStr1 = pReader->ReadString();
|
||||
break;
|
||||
}
|
||||
case 1: // GoTo
|
||||
{
|
||||
pRes->nInt1 = pReader->ReadInt();
|
||||
pRes->nKind = pReader->ReadByte();
|
||||
switch (pRes->nKind)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 6:
|
||||
case 7:
|
||||
{
|
||||
pRes->nFlags = pReader->ReadByte();
|
||||
if (pRes->nFlags & (1 << 0))
|
||||
pRes->dD[0] = pReader->ReadDouble();
|
||||
if (pRes->nFlags & (1 << 1))
|
||||
pRes->dD[1] = pReader->ReadDouble();
|
||||
if (pRes->nFlags & (1 << 2))
|
||||
pRes->dD[2] = pReader->ReadDouble();
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
pRes->dD[0] = pReader->ReadDouble();
|
||||
pRes->dD[1] = pReader->ReadDouble();
|
||||
pRes->dD[2] = pReader->ReadDouble();
|
||||
pRes->dD[3] = pReader->ReadDouble();
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 5:
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: // Named
|
||||
{
|
||||
pRes->wsStr1 = pReader->ReadString();
|
||||
break;
|
||||
}
|
||||
case 6: // URI
|
||||
{
|
||||
pRes->wsStr1 = pReader->ReadString();
|
||||
break;
|
||||
}
|
||||
case 9: // Hide
|
||||
{
|
||||
pRes->nKind = pReader->ReadByte();
|
||||
int n = pReader->ReadInt();
|
||||
pRes->arrStr.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
pRes->arrStr.push_back(pReader->ReadString());
|
||||
break;
|
||||
}
|
||||
case 12: // ResetForm
|
||||
{
|
||||
pRes->nInt1 = pReader->ReadInt();
|
||||
int n = pReader->ReadInt();
|
||||
pRes->arrStr.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
pRes->arrStr.push_back(pReader->ReadString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pReader->ReadByte())
|
||||
pRes->pNext = ReadAction(pReader);
|
||||
|
||||
return pRes;
|
||||
}
|
||||
|
||||
CAnnotFieldInfo::CAnnotFieldInfo() : IAdvancedCommand(AdvancedCommandType::Annotaion)
|
||||
{
|
||||
m_nType = EAnnotType::Unknown;
|
||||
@ -163,7 +77,6 @@ CAnnotFieldInfo::CAnnotFieldInfo() : IAdvancedCommand(AdvancedCommandType::Annot
|
||||
m_pCaretPr = NULL;
|
||||
m_pStampPr = NULL;
|
||||
m_pRedactPr = NULL;
|
||||
m_pLinkPr = NULL;
|
||||
m_pWidgetPr = NULL;
|
||||
}
|
||||
CAnnotFieldInfo::~CAnnotFieldInfo()
|
||||
@ -180,7 +93,6 @@ CAnnotFieldInfo::~CAnnotFieldInfo()
|
||||
RELEASEOBJECT(m_pCaretPr);
|
||||
RELEASEOBJECT(m_pStampPr);
|
||||
RELEASEOBJECT(m_pRedactPr);
|
||||
RELEASEOBJECT(m_pLinkPr);
|
||||
RELEASEOBJECT(m_pWidgetPr);
|
||||
}
|
||||
|
||||
@ -201,12 +113,6 @@ void CAnnotFieldInfo::SetType(int nType)
|
||||
m_pTextPr = new CAnnotFieldInfo::CTextAnnotPr();
|
||||
break;
|
||||
}
|
||||
case EAnnotType::Link:
|
||||
{
|
||||
RELEASEOBJECT(m_pLinkPr);
|
||||
m_pLinkPr = new CAnnotFieldInfo::CLinkAnnotPr();
|
||||
break;
|
||||
}
|
||||
case EAnnotType::FreeText:
|
||||
{
|
||||
CreateMarkup();
|
||||
@ -399,10 +305,6 @@ bool CAnnotFieldInfo::IsRedact() const
|
||||
{
|
||||
return (m_nType == 25);
|
||||
}
|
||||
bool CAnnotFieldInfo::IsLink() const
|
||||
{
|
||||
return (m_nType == 1);
|
||||
}
|
||||
|
||||
CAnnotFieldInfo::CMarkupAnnotPr* CAnnotFieldInfo::GetMarkupAnnotPr() { return m_pMarkupPr; }
|
||||
CAnnotFieldInfo::CTextAnnotPr* CAnnotFieldInfo::GetTextAnnotPr() { return m_pTextPr; }
|
||||
@ -416,7 +318,6 @@ CAnnotFieldInfo::CFreeTextAnnotPr* CAnnotFieldInfo::GetFreeTextAnnotPr()
|
||||
CAnnotFieldInfo::CCaretAnnotPr* CAnnotFieldInfo::GetCaretAnnotPr() { return m_pCaretPr; }
|
||||
CAnnotFieldInfo::CStampAnnotPr* CAnnotFieldInfo::GetStampAnnotPr() { return m_pStampPr; }
|
||||
CAnnotFieldInfo::CRedactAnnotPr* CAnnotFieldInfo::GetRedactAnnotPr() { return m_pRedactPr; }
|
||||
CAnnotFieldInfo::CLinkAnnotPr* CAnnotFieldInfo::GetLinkAnnotPr() { return m_pLinkPr; }
|
||||
CAnnotFieldInfo::CWidgetAnnotPr* CAnnotFieldInfo::GetWidgetAnnotPr() { return m_pWidgetPr; }
|
||||
|
||||
bool CAnnotFieldInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector)
|
||||
@ -511,8 +412,6 @@ bool CAnnotFieldInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMeta
|
||||
m_pPopupPr->Read(pReader);
|
||||
else if (IsWidget())
|
||||
m_pWidgetPr->Read(pReader, nType);
|
||||
else if (IsLink())
|
||||
m_pLinkPr->Read(pReader);
|
||||
|
||||
return m_nType != -1;
|
||||
}
|
||||
@ -822,45 +721,6 @@ void CAnnotFieldInfo::CRedactAnnotPr::Read(NSOnlineOfficeBinToPdf::CBufferReader
|
||||
}
|
||||
}
|
||||
|
||||
CAnnotFieldInfo::CLinkAnnotPr::CLinkAnnotPr()
|
||||
{
|
||||
m_pAction = NULL;
|
||||
m_pPA = NULL;
|
||||
}
|
||||
CAnnotFieldInfo::CLinkAnnotPr::~CLinkAnnotPr()
|
||||
{
|
||||
RELEASEOBJECT(m_pAction);
|
||||
RELEASEOBJECT(m_pPA);
|
||||
}
|
||||
BYTE CAnnotFieldInfo::CLinkAnnotPr::GetH() const { return m_nH; }
|
||||
int CAnnotFieldInfo::CLinkAnnotPr::GetFlags() const { return m_nFlags; }
|
||||
const std::vector<double>& CAnnotFieldInfo::CLinkAnnotPr::GetQuadPoints() { return m_arrQuadPoints; }
|
||||
CAnnotFieldInfo::CActionFieldPr* CAnnotFieldInfo::CLinkAnnotPr::GetA() { return m_pAction; }
|
||||
CAnnotFieldInfo::CActionFieldPr* CAnnotFieldInfo::CLinkAnnotPr::GetPA() { return m_pPA; }
|
||||
void CAnnotFieldInfo::CLinkAnnotPr::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader)
|
||||
{
|
||||
m_nFlags = pReader->ReadInt();
|
||||
if (m_nFlags & (1 << 0))
|
||||
{
|
||||
pReader->ReadString();
|
||||
m_pAction = ReadAction(pReader);
|
||||
}
|
||||
if (m_nFlags & (1 << 1))
|
||||
{
|
||||
pReader->ReadString();
|
||||
m_pPA = ReadAction(pReader);
|
||||
}
|
||||
if (m_nFlags & (1 << 2))
|
||||
m_nH = pReader->ReadByte();
|
||||
if (m_nFlags & (1 << 3))
|
||||
{
|
||||
int n = pReader->ReadInt();
|
||||
m_arrQuadPoints.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
m_arrQuadPoints.push_back(pReader->ReadDouble());
|
||||
}
|
||||
}
|
||||
|
||||
bool CAnnotFieldInfo::CPopupAnnotPr::IsOpen() const { return m_bOpen; }
|
||||
int CAnnotFieldInfo::CPopupAnnotPr::GetFlag() const { return m_nFlag; }
|
||||
int CAnnotFieldInfo::CPopupAnnotPr::GetParentID() const { return m_nParentID; }
|
||||
@ -892,7 +752,7 @@ const std::wstring& CAnnotFieldInfo::CWidgetAnnotPr::GetFontKey() { return m_w
|
||||
const std::vector<double>& CAnnotFieldInfo::CWidgetAnnotPr::GetTC() { return m_arrTC; }
|
||||
const std::vector<double>& CAnnotFieldInfo::CWidgetAnnotPr::GetBC() { return m_arrBC; }
|
||||
const std::vector<double>& CAnnotFieldInfo::CWidgetAnnotPr::GetBG() { return m_arrBG; }
|
||||
const std::vector<CAnnotFieldInfo::CActionFieldPr*>& CAnnotFieldInfo::CWidgetAnnotPr::GetActions() { return m_arrAction; }
|
||||
const std::vector<CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget*>& CAnnotFieldInfo::CWidgetAnnotPr::GetActions() { return m_arrAction; }
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr* CAnnotFieldInfo::CWidgetAnnotPr::GetButtonWidgetPr() { return m_pButtonPr; }
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CTextWidgetPr* CAnnotFieldInfo::CWidgetAnnotPr::GetTextWidgetPr() { return m_pTextPr; }
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CChoiceWidgetPr* CAnnotFieldInfo::CWidgetAnnotPr::GetChoiceWidgetPr() { return m_pChoicePr; }
|
||||
@ -952,8 +812,93 @@ CAnnotFieldInfo::CWidgetAnnotPr::~CWidgetAnnotPr()
|
||||
RELEASEOBJECT(m_arrAction[i]);
|
||||
}
|
||||
|
||||
CAnnotFieldInfo::CActionFieldPr::CActionFieldPr() : pNext(NULL) {}
|
||||
CAnnotFieldInfo::CActionFieldPr::~CActionFieldPr() { RELEASEOBJECT(pNext); }
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget::CActionWidget() : pNext(NULL) {}
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget::~CActionWidget() { RELEASEOBJECT(pNext); }
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget* ReadAction(NSOnlineOfficeBinToPdf::CBufferReader* pReader)
|
||||
{
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget* pRes = new CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget();
|
||||
|
||||
pRes->nActionType = pReader->ReadByte();
|
||||
switch (pRes->nActionType)
|
||||
{
|
||||
case 14: // JavaScript
|
||||
{
|
||||
pRes->wsStr1 = pReader->ReadString();
|
||||
break;
|
||||
}
|
||||
case 1: // GoTo
|
||||
{
|
||||
pRes->nInt1 = pReader->ReadInt();
|
||||
pRes->nKind = pReader->ReadByte();
|
||||
switch (pRes->nKind)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 6:
|
||||
case 7:
|
||||
{
|
||||
pRes->nFlags = pReader->ReadByte();
|
||||
if (pRes->nFlags & (1 << 0))
|
||||
pRes->dD[0] = pReader->ReadDouble();
|
||||
if (pRes->nFlags & (1 << 1))
|
||||
pRes->dD[1] = pReader->ReadDouble();
|
||||
if (pRes->nFlags & (1 << 2))
|
||||
pRes->dD[2] = pReader->ReadDouble();
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
pRes->dD[0] = pReader->ReadDouble();
|
||||
pRes->dD[1] = pReader->ReadDouble();
|
||||
pRes->dD[2] = pReader->ReadDouble();
|
||||
pRes->dD[3] = pReader->ReadDouble();
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 5:
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: // Named
|
||||
{
|
||||
pRes->wsStr1 = pReader->ReadString();
|
||||
break;
|
||||
}
|
||||
case 6: // URI
|
||||
{
|
||||
pRes->wsStr1 = pReader->ReadString();
|
||||
break;
|
||||
}
|
||||
case 9: // Hide
|
||||
{
|
||||
pRes->nKind = pReader->ReadByte();
|
||||
int n = pReader->ReadInt();
|
||||
pRes->arrStr.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
pRes->arrStr.push_back(pReader->ReadString());
|
||||
break;
|
||||
}
|
||||
case 12: // ResetForm
|
||||
{
|
||||
pRes->nInt1 = pReader->ReadInt();
|
||||
int n = pReader->ReadInt();
|
||||
pRes->arrStr.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
pRes->arrStr.push_back(pReader->ReadString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pReader->ReadByte())
|
||||
pRes->pNext = ReadAction(pReader);
|
||||
|
||||
return pRes;
|
||||
}
|
||||
void CAnnotFieldInfo::CWidgetAnnotPr::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, BYTE nType)
|
||||
{
|
||||
m_wsFN = pReader->ReadString();
|
||||
@ -1012,7 +957,7 @@ void CAnnotFieldInfo::CWidgetAnnotPr::Read(NSOnlineOfficeBinToPdf::CBufferReader
|
||||
for (int i = 0; i < nAction; ++i)
|
||||
{
|
||||
std::wstring wsType = pReader->ReadString();
|
||||
CAnnotFieldInfo::CActionFieldPr* pA = ReadAction(pReader);
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget* pA = ReadAction(pReader);
|
||||
if (pA)
|
||||
{
|
||||
pA->wsType = wsType;
|
||||
@ -1042,7 +987,6 @@ const std::wstring& CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::GetCA() {
|
||||
const std::wstring& CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::GetRC() { return m_wsRC; }
|
||||
const std::wstring& CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::GetAC() { return m_wsAC; }
|
||||
const std::wstring& CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::GetAP_N_Yes() { return m_wsAP_N_Yes; }
|
||||
const std::vector< std::pair<std::wstring, std::wstring> >& CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::GetOpt() { return m_arrOpt; }
|
||||
void CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, BYTE nType, int nFlags)
|
||||
{
|
||||
if (nType == 27)
|
||||
@ -1083,17 +1027,6 @@ void CAnnotFieldInfo::CWidgetAnnotPr::CButtonWidgetPr::Read(NSOnlineOfficeBinToP
|
||||
if (nFlags & (1 << 9))
|
||||
m_wsV = pReader->ReadString();
|
||||
m_nStyle = pReader->ReadByte();
|
||||
if (nFlags & (1 << 10))
|
||||
{
|
||||
int n = pReader->ReadInt();
|
||||
m_arrOpt.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
std::wstring s1 = pReader->ReadString();
|
||||
std::wstring s2 = pReader->ReadString();
|
||||
m_arrOpt.push_back(std::make_pair(s1, s2));
|
||||
}
|
||||
}
|
||||
if (nFlags & (1 << 14))
|
||||
m_wsAP_N_Yes = pReader->ReadString();
|
||||
}
|
||||
@ -1259,7 +1192,7 @@ bool CWidgetsInfo::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafil
|
||||
for (int i = 0; i < nAction; ++i)
|
||||
{
|
||||
std::wstring wsType = pReader->ReadString();
|
||||
CAnnotFieldInfo::CActionFieldPr* pA = ReadAction(pReader);
|
||||
CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget* pA = ReadAction(pReader);
|
||||
if (pA)
|
||||
{
|
||||
pA->wsType = wsType;
|
||||
|
||||
@ -70,23 +70,6 @@ public:
|
||||
WidgetSignature = 33
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CActionFieldPr
|
||||
{
|
||||
public:
|
||||
CActionFieldPr();
|
||||
~CActionFieldPr();
|
||||
|
||||
BYTE nKind;
|
||||
BYTE nFlags;
|
||||
BYTE nActionType;
|
||||
int nInt1;
|
||||
double dD[4]{};
|
||||
std::wstring wsType;
|
||||
std::wstring wsStr1;
|
||||
std::vector<std::wstring> arrStr;
|
||||
CActionFieldPr* pNext;
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CWidgetAnnotPr
|
||||
{
|
||||
public:
|
||||
@ -107,7 +90,6 @@ public:
|
||||
const std::wstring& GetRC();
|
||||
const std::wstring& GetAC();
|
||||
const std::wstring& GetAP_N_Yes();
|
||||
const std::vector< std::pair<std::wstring, std::wstring> >& GetOpt();
|
||||
|
||||
void Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, BYTE nType, int nFlags);
|
||||
|
||||
@ -126,7 +108,6 @@ public:
|
||||
std::wstring m_wsRC;
|
||||
std::wstring m_wsAC;
|
||||
std::wstring m_wsAP_N_Yes;
|
||||
std::vector< std::pair<std::wstring, std::wstring> > m_arrOpt;
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CTextWidgetPr
|
||||
@ -178,6 +159,23 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CActionWidget
|
||||
{
|
||||
public:
|
||||
CActionWidget();
|
||||
~CActionWidget();
|
||||
|
||||
BYTE nKind;
|
||||
BYTE nFlags;
|
||||
BYTE nActionType;
|
||||
int nInt1;
|
||||
double dD[4]{};
|
||||
std::wstring wsType;
|
||||
std::wstring wsStr1;
|
||||
std::vector<std::wstring> arrStr;
|
||||
CActionWidget* pNext;
|
||||
};
|
||||
|
||||
CWidgetAnnotPr(BYTE nType);
|
||||
~CWidgetAnnotPr();
|
||||
|
||||
@ -201,7 +199,7 @@ public:
|
||||
const std::vector<double>& GetTC();
|
||||
const std::vector<double>& GetBC();
|
||||
const std::vector<double>& GetBG();
|
||||
const std::vector<CActionFieldPr*>& GetActions();
|
||||
const std::vector<CActionWidget*>& GetActions();
|
||||
|
||||
CButtonWidgetPr* GetButtonWidgetPr();
|
||||
CTextWidgetPr* GetTextWidgetPr();
|
||||
@ -231,7 +229,7 @@ public:
|
||||
std::vector<double> m_arrTC;
|
||||
std::vector<double> m_arrBC;
|
||||
std::vector<double> m_arrBG;
|
||||
std::vector<CActionFieldPr*> m_arrAction;
|
||||
std::vector<CActionWidget*> m_arrAction;
|
||||
|
||||
CButtonWidgetPr* m_pButtonPr;
|
||||
CTextWidgetPr* m_pTextPr;
|
||||
@ -391,7 +389,7 @@ public:
|
||||
{
|
||||
public:
|
||||
bool IsOpen() const;
|
||||
int GetFlag() const;
|
||||
int GetFlag() const;
|
||||
int GetParentID() const;
|
||||
|
||||
void Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader);
|
||||
@ -480,28 +478,6 @@ public:
|
||||
std::vector<double> m_arrQuadPoints;
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CLinkAnnotPr
|
||||
{
|
||||
public:
|
||||
CLinkAnnotPr();
|
||||
~CLinkAnnotPr();
|
||||
|
||||
BYTE GetH() const;
|
||||
int GetFlags() const;
|
||||
const std::vector<double>& GetQuadPoints();
|
||||
CActionFieldPr* GetA();
|
||||
CActionFieldPr* GetPA();
|
||||
|
||||
void Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader);
|
||||
|
||||
private:
|
||||
BYTE m_nH;
|
||||
int m_nFlags;
|
||||
std::vector<double> m_arrQuadPoints;
|
||||
CActionFieldPr* m_pAction;
|
||||
CActionFieldPr* m_pPA;
|
||||
};
|
||||
|
||||
CAnnotFieldInfo();
|
||||
virtual ~CAnnotFieldInfo();
|
||||
|
||||
@ -542,7 +518,6 @@ public:
|
||||
bool IsCaret() const;
|
||||
bool IsStamp() const;
|
||||
bool IsRedact() const;
|
||||
bool IsLink() const;
|
||||
|
||||
CMarkupAnnotPr* GetMarkupAnnotPr();
|
||||
CTextAnnotPr* GetTextAnnotPr();
|
||||
@ -556,7 +531,6 @@ public:
|
||||
CCaretAnnotPr* GetCaretAnnotPr();
|
||||
CStampAnnotPr* GetStampAnnotPr();
|
||||
CRedactAnnotPr* GetRedactAnnotPr();
|
||||
CLinkAnnotPr* GetLinkAnnotPr();
|
||||
CWidgetAnnotPr* GetWidgetAnnotPr();
|
||||
|
||||
bool Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector);
|
||||
@ -602,7 +576,6 @@ private:
|
||||
CCaretAnnotPr* m_pCaretPr;
|
||||
CStampAnnotPr* m_pStampPr;
|
||||
CRedactAnnotPr* m_pRedactPr;
|
||||
CLinkAnnotPr* m_pLinkPr;
|
||||
CWidgetAnnotPr* m_pWidgetPr;
|
||||
};
|
||||
|
||||
@ -637,7 +610,7 @@ public:
|
||||
std::wstring sTU;
|
||||
std::vector<int> arrI;
|
||||
std::vector<std::wstring> arrV;
|
||||
std::vector<CAnnotFieldInfo::CActionFieldPr*> arrAction;
|
||||
std::vector<CAnnotFieldInfo::CWidgetAnnotPr::CActionWidget*> arrAction;
|
||||
std::vector< std::pair<std::wstring, std::wstring> > arrOpt;
|
||||
};
|
||||
|
||||
|
||||
@ -179,6 +179,7 @@ CHeadings::CHeading::CHeading()
|
||||
nPage = 0;
|
||||
dX = 0.0;
|
||||
dY = 0.0;
|
||||
pParent = NULL;
|
||||
}
|
||||
CHeadings::CHeading::~CHeading()
|
||||
{
|
||||
@ -195,26 +196,35 @@ CHeadings::~CHeadings()
|
||||
const std::vector<CHeadings::CHeading*>& CHeadings::GetHeading() { return m_arrHeading; }
|
||||
bool CHeadings::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector)
|
||||
{
|
||||
std::vector<CHeading*> arrParentStack;
|
||||
int nPredLevel = 0, nHeaderLevel = 0;
|
||||
std::vector<CHeading*>* arrHeading = &m_arrHeading;
|
||||
CHeading* pParent = NULL;
|
||||
int nHeadings = pReader->ReadInt();
|
||||
for (int i = 0; i < nHeadings; ++i)
|
||||
{
|
||||
int nLevel = pReader->ReadInt();
|
||||
if (nLevel > nPredLevel && i > 0)
|
||||
{
|
||||
nHeaderLevel = nPredLevel;
|
||||
pParent = arrHeading->back();
|
||||
arrHeading = &pParent->arrHeading;
|
||||
}
|
||||
else if (nLevel < nPredLevel && nLevel <= nHeaderLevel)
|
||||
{
|
||||
nHeaderLevel = nLevel;
|
||||
pParent = pParent ? pParent->pParent : NULL;
|
||||
arrHeading = pParent ? &pParent->arrHeading : &m_arrHeading;
|
||||
}
|
||||
nPredLevel = nLevel;
|
||||
|
||||
CHeading* pHeading = new CHeading();
|
||||
pHeading->nPage = pReader->ReadInt();
|
||||
pHeading->dX = pReader->ReadDouble();
|
||||
pHeading->dY = pReader->ReadDouble();
|
||||
pHeading->wsTitle = pReader->ReadString();
|
||||
pHeading->pParent = pParent;
|
||||
|
||||
while (arrParentStack.size() > nLevel)
|
||||
arrParentStack.pop_back();
|
||||
|
||||
if (arrParentStack.empty())
|
||||
m_arrHeading.push_back(pHeading);
|
||||
else
|
||||
arrParentStack.back()->arrHeading.push_back(pHeading);
|
||||
|
||||
arrParentStack.push_back(pHeading);
|
||||
arrHeading->push_back(pHeading);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -181,6 +181,7 @@ public:
|
||||
int nPage;
|
||||
double dX;
|
||||
double dY;
|
||||
CHeading* pParent;
|
||||
std::vector<CHeading*> arrHeading;
|
||||
|
||||
CHeading();
|
||||
|
||||
@ -56,8 +56,6 @@
|
||||
"_UnmergePages",
|
||||
"_RedactPage",
|
||||
"_UndoRedact",
|
||||
"_CheckOwnerPassword",
|
||||
"_CheckPerm",
|
||||
"_GetImageBase64",
|
||||
"_GetImageBase64Len",
|
||||
"_GetImageBase64Ptr",
|
||||
|
||||
@ -145,14 +145,6 @@ CFile.prototype["isNeedPassword"] = function()
|
||||
{
|
||||
return this._isNeedPassword;
|
||||
};
|
||||
CFile.prototype["CheckOwnerPassword"] = function(password)
|
||||
{
|
||||
return this._CheckOwnerPassword(password);
|
||||
};
|
||||
CFile.prototype["CheckPerm"] = function(perm)
|
||||
{
|
||||
return this._CheckPerm(perm);
|
||||
};
|
||||
CFile.prototype["SplitPages"] = function(arrOriginIndex, arrayBufferChanges)
|
||||
{
|
||||
let ptr = this._SplitPages(arrOriginIndex, arrayBufferChanges);
|
||||
@ -421,9 +413,9 @@ function readAction(reader, rec, readDoubleFunc, readStringFunc)
|
||||
case 4:
|
||||
{
|
||||
rec["left"] = readDoubleFunc.call(reader);
|
||||
rec["top"] = readDoubleFunc.call(reader);
|
||||
rec["bottom"] = readDoubleFunc.call(reader);
|
||||
rec["right"] = readDoubleFunc.call(reader);
|
||||
rec["bottom"] = readDoubleFunc.call(reader);
|
||||
rec["top"] = readDoubleFunc.call(reader);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
@ -1035,33 +1027,6 @@ function readAnnotType(reader, rec, readDoubleFunc, readDouble2Func, readStringF
|
||||
rec["font"]["style"] = reader.readInt();
|
||||
}
|
||||
}
|
||||
// Link
|
||||
else if (rec["type"] == 1)
|
||||
{
|
||||
flags = reader.readInt();
|
||||
if (flags & (1 << 0))
|
||||
{
|
||||
rec["A"] = {};
|
||||
readAction(reader, rec["A"], readDoubleFunc, readStringFunc);
|
||||
}
|
||||
if (flags & (1 << 1))
|
||||
{
|
||||
rec["PA"] = {};
|
||||
readAction(reader, rec["PA"], readDoubleFunc, readStringFunc);
|
||||
}
|
||||
// Selection mode - H
|
||||
// 0 - none, 1 - invert, 2 - push, 3 - outline
|
||||
if (flags & (1 << 2))
|
||||
rec["highlight"] = reader.readByte();
|
||||
// QuadPoints
|
||||
if (flags & (1 << 3))
|
||||
{
|
||||
let n = reader.readInt();
|
||||
rec["QuadPoints"] = [];
|
||||
for (let i = 0; i < n; ++i)
|
||||
rec["QuadPoints"].push(readDoubleFunc.call(reader));
|
||||
}
|
||||
}
|
||||
}
|
||||
function readWidgetType(reader, rec, readDoubleFunc, readDouble2Func, readStringFunc, isRead = false)
|
||||
{
|
||||
@ -1206,20 +1171,6 @@ function readWidgetType(reader, rec, readDoubleFunc, readDouble2Func, readString
|
||||
rec["value"] = readStringFunc.call(reader);
|
||||
// 0 - check, 1 - cross, 2 - diamond, 3 - circle, 4 - star, 5 - square
|
||||
rec["style"] = reader.readByte();
|
||||
if (flags & (1 << 10))
|
||||
{
|
||||
let n = reader.readInt();
|
||||
rec["opt"] = [];
|
||||
for (let i = 0; i < n; ++i)
|
||||
{
|
||||
let opt1 = readStringFunc.call(reader);
|
||||
let opt2 = readStringFunc.call(reader);
|
||||
if (opt1 == "")
|
||||
rec["opt"].push(opt2);
|
||||
else
|
||||
rec["opt"].push([opt2, opt1]);
|
||||
}
|
||||
}
|
||||
if (flags & (1 << 14))
|
||||
rec["ExportValue"] = readStringFunc.call(reader);
|
||||
// 12.7.4.2.1
|
||||
|
||||
@ -146,16 +146,6 @@ CFile.prototype._UndoRedact = function()
|
||||
return g_native_drawing_file["UndoRedact"]();
|
||||
};
|
||||
|
||||
CFile.prototype._CheckOwnerPassword = function(password)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
CFile.prototype._CheckPerm = function(perm)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// FONTS
|
||||
CFile.prototype._isNeedCMap = function()
|
||||
{
|
||||
|
||||
@ -224,29 +224,6 @@ CFile.prototype._UndoRedact = function()
|
||||
return Module["_UndoRedact"](this.nativeFile) == 1;
|
||||
};
|
||||
|
||||
CFile.prototype._CheckOwnerPassword = function(password)
|
||||
{
|
||||
let passwordPtr = 0;
|
||||
if (password)
|
||||
{
|
||||
let passwordBuf = password.toUtf8();
|
||||
passwordPtr = Module["_malloc"](passwordBuf.length);
|
||||
Module["HEAP8"].set(passwordBuf, passwordPtr);
|
||||
}
|
||||
|
||||
let bRes = Module["_CheckOwnerPassword"](this.nativeFile, passwordPtr);
|
||||
|
||||
if (passwordPtr)
|
||||
Module["_free"](passwordPtr);
|
||||
|
||||
return bRes == 1;
|
||||
}
|
||||
|
||||
CFile.prototype._CheckPerm = function(perm)
|
||||
{
|
||||
return Module["_CheckPerm"](this.nativeFile, perm) == 1;
|
||||
}
|
||||
|
||||
// FONTS
|
||||
CFile.prototype._isNeedCMap = function()
|
||||
{
|
||||
|
||||
@ -191,17 +191,6 @@ WASM_EXPORT int UndoRedact(CDrawingFile* pFile)
|
||||
{
|
||||
return pFile->UndoRedact() ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT int CheckOwnerPassword(CDrawingFile* pFile, const char* password)
|
||||
{
|
||||
std::wstring sPassword = L"";
|
||||
if (NULL != password)
|
||||
sPassword = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)password, strlen(password));
|
||||
return pFile->CheckOwnerPassword(sPassword) ? 1 : 0;
|
||||
}
|
||||
WASM_EXPORT int CheckPerm(CDrawingFile* pFile, int nPermFlag)
|
||||
{
|
||||
return pFile->CheckPerm(nPermFlag) ? 1 : 0;
|
||||
}
|
||||
|
||||
WASM_EXPORT void* GetImageBase64(CDrawingFile* pFile, int rId)
|
||||
{
|
||||
|
||||
@ -704,23 +704,6 @@ void ReadInteractiveForms(BYTE* pWidgets, int& i)
|
||||
i += 1;
|
||||
std::cout << "Style " << arrStyle[nPathLength] << ", ";
|
||||
|
||||
if (nFlags & (1 << 10))
|
||||
{
|
||||
int nOptLength = READ_INT(pWidgets + i);
|
||||
i += 4;
|
||||
for (int j = 0; j < nOptLength; ++j)
|
||||
{
|
||||
nPathLength = READ_INT(pWidgets + i);
|
||||
i += 4;
|
||||
std::cout << std::to_string(j) << " Opt1 " << std::string((char*)(pWidgets + i), nPathLength) << ", ";
|
||||
i += nPathLength;
|
||||
|
||||
nPathLength = READ_INT(pWidgets + i);
|
||||
i += 4;
|
||||
std::cout << std::to_string(j) << " Opt2 " << std::string((char*)(pWidgets + i), nPathLength) << ", ";
|
||||
i += nPathLength;
|
||||
}
|
||||
}
|
||||
if (nFlags & (1 << 14))
|
||||
{
|
||||
nPathLength = READ_INT(pWidgets + i);
|
||||
@ -1142,18 +1125,6 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// OWNER PASSWORD
|
||||
if (false)
|
||||
{
|
||||
std::string sPassword = "gfhjkmgfhjkm";
|
||||
std::cout << "CheckPerm 4 Edit " << CheckPerm(pGrFile, 4) << std::endl;
|
||||
std::cout << "CheckPerm 4 Print " << CheckPerm(pGrFile, 3) << std::endl;
|
||||
|
||||
std::cout << "CheckOwnerPassword " << CheckOwnerPassword(pGrFile, sPassword.c_str()) << std::endl;
|
||||
std::cout << "CheckPerm 4 Edit " << CheckPerm(pGrFile, 4) << std::endl;
|
||||
std::cout << "CheckPerm 4 Print " << CheckPerm(pGrFile, 3) << std::endl;
|
||||
}
|
||||
|
||||
BYTE* pColor = new BYTE[12] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
// REDACT
|
||||
if (false)
|
||||
@ -1193,7 +1164,7 @@ int main(int argc, char* argv[])
|
||||
free(pInfo);
|
||||
|
||||
// LINKS
|
||||
if (false && nPagesCount > 0)
|
||||
if (true && nPagesCount > 0)
|
||||
{
|
||||
BYTE* pLinks = GetLinks(pGrFile, nTestPage);
|
||||
nLength = READ_INT(pLinks);
|
||||
@ -1229,7 +1200,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
// STRUCTURE
|
||||
if (false)
|
||||
if (true)
|
||||
{
|
||||
BYTE* pStructure = GetStructure(pGrFile);
|
||||
nLength = READ_INT(pStructure);
|
||||
@ -2161,44 +2132,6 @@ int main(int argc, char* argv[])
|
||||
std::cout << nPathLength << ", ";
|
||||
}
|
||||
}
|
||||
else if (sType == "Link")
|
||||
{
|
||||
nFlags = READ_INT(pAnnots + i);
|
||||
i += 4;
|
||||
if (nFlags & (1 << 0))
|
||||
{
|
||||
std::cout << std::endl << "A ";
|
||||
ReadAction(pAnnots, i);
|
||||
std::cout << std::endl;
|
||||
}
|
||||
if (nFlags & (1 << 1))
|
||||
{
|
||||
std::cout << std::endl << "PA ";
|
||||
ReadAction(pAnnots, i);
|
||||
std::cout << std::endl;
|
||||
}
|
||||
if (nFlags & (1 << 2))
|
||||
{
|
||||
std::string arrHighlighting[] = {"none", "invert", "push", "outline"};
|
||||
nPathLength = READ_BYTE(pAnnots + i);
|
||||
i += 1;
|
||||
std::cout << "Highlight " << arrHighlighting[nPathLength] << ", ";
|
||||
}
|
||||
if (nFlags & (1 << 3))
|
||||
{
|
||||
std::cout << "QuadPoints";
|
||||
int nQuadPointsLength = READ_INT(pAnnots + i);
|
||||
i += 4;
|
||||
|
||||
for (int j = 0; j < nQuadPointsLength; ++j)
|
||||
{
|
||||
nPathLength = READ_INT(pAnnots + i);
|
||||
i += 4;
|
||||
std::cout << " " << (double)nPathLength / 100.0;
|
||||
}
|
||||
std::cout << ", ";
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << std::endl << "]" << std::endl;
|
||||
}
|
||||
|
||||
@ -202,19 +202,6 @@ bool CImageFileFormatChecker::isWbcFile(BYTE* pBuffer,DWORD dwBytes)
|
||||
|
||||
return false;
|
||||
}
|
||||
//raster graphics file format developed by Google
|
||||
bool CImageFileFormatChecker::isWebPFile(BYTE* pBuffer, DWORD dwBytes)
|
||||
{
|
||||
if (eFileType)return false;
|
||||
|
||||
if ((20 <= dwBytes) && ('R' == pBuffer[0] && 'I' == pBuffer[1] && 'F' == pBuffer[2] && 'F' == pBuffer[3]
|
||||
//4–7 length + 12
|
||||
&& 'W' == pBuffer[8] && 'E' == pBuffer[9] && 'B' == pBuffer[10] && 'P' == pBuffer[11])
|
||||
&& 'V' == pBuffer[12] && 'P' == pBuffer[13] && '8' == pBuffer[14])
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
//webshot(wb ver 1) HEX 57 57 42 42 31 31 31 31
|
||||
//webshot (wb ver 2) HEX 00 00 02 00 02 10 c9 00 02 00 c8 06 4c 00 02 00
|
||||
bool CImageFileFormatChecker::isWbFile(BYTE* pBuffer,DWORD dwBytes)
|
||||
@ -522,10 +509,6 @@ bool CImageFileFormatChecker::isImageFile(const std::wstring& fileName)
|
||||
{
|
||||
eFileType = _CXIMAGE_FORMAT_WB;
|
||||
}
|
||||
else if (isWebPFile(buffer, sizeRead))
|
||||
{
|
||||
eFileType = _CXIMAGE_FORMAT_WEBP;
|
||||
}
|
||||
else if (isPsdFile(buffer,sizeRead))
|
||||
{
|
||||
eFileType = _CXIMAGE_FORMAT_PSD;
|
||||
|
||||
@ -64,7 +64,6 @@ enum __ENUM_CXIMAGE_FORMATS
|
||||
_CXIMAGE_FORMAT_SVG = 24,
|
||||
_CXIMAGE_FORMAT_PIC = 25,
|
||||
_CXIMAGE_FORMAT_HEIF = 26,
|
||||
_CXIMAGE_FORMAT_WEBP = 27
|
||||
};
|
||||
|
||||
class GRAPHICS_DECL CImageFileFormatChecker
|
||||
@ -97,7 +96,6 @@ public:
|
||||
bool isTiffFile(BYTE* pBuffer,DWORD dwBytes);
|
||||
bool isJpgFile(BYTE* pBuffer,DWORD dwBytes);
|
||||
bool isWbFile(BYTE* pBuffer,DWORD dwBytes);
|
||||
bool isWebPFile(BYTE* pBuffer, DWORD dwBytes);
|
||||
|
||||
bool isIcoFile(BYTE* pBuffer,DWORD dwBytes);
|
||||
bool isRasFile(BYTE* pBuffer,DWORD dwBytes);
|
||||
|
||||
@ -4396,42 +4396,41 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sSrcM.empty())
|
||||
{
|
||||
ImageAlternative(oXml, sSelectors, oTS, wsAlt, sSrcM, oImageData);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::wstring sExtention;
|
||||
|
||||
// Предполагаем картинку в Base64
|
||||
if (sSrcM.length() > 4 && sSrcM.substr(0, 4) == L"data" && sSrcM.find(L"/", 4) != std::wstring::npos)
|
||||
bRes = readBase64(sSrcM, sExtention);
|
||||
|
||||
const bool bIsAllowExternalLocalFiles = GetStatusUsingExternalLocalFiles();
|
||||
|
||||
if (!bRes && (sSrcM.length() <= 7 || L"http" != sSrcM.substr(0, 4)))
|
||||
bool bIsBase64 = false;
|
||||
if (sSrcM.length() > 4 && sSrcM.substr(0, 4) == L"data" && sSrcM.find(L"/", 4) != std::wstring::npos)
|
||||
bIsBase64 = true;
|
||||
|
||||
if (!bIsBase64 && (sSrcM.length() <= 7 || L"http" != sSrcM.substr(0, 4)))
|
||||
{
|
||||
sSrcM = NSSystemPath::ShortenPath(sSrcM);
|
||||
|
||||
if (!CanUseThisPath(sSrcM, m_sSrc, m_sCore, bIsAllowExternalLocalFiles))
|
||||
{
|
||||
ImageAlternative(oXml, sSelectors, oTS, wsAlt, sSrcM, oImageData);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
int nImageId = -1;
|
||||
std::wstring sExtention;
|
||||
// Предполагаем картинку в Base64
|
||||
if (bIsBase64)
|
||||
bRes = readBase64(sSrcM, sExtention);
|
||||
|
||||
// Проверка расширения
|
||||
if (!bRes)
|
||||
{
|
||||
sExtention = NSFile::GetFileExtention(sSrcM);
|
||||
std::transform(sExtention.begin(), sExtention.end(), sExtention.begin(), tolower);
|
||||
sExtention = NSFile::GetFileExtention(sSrcM);
|
||||
std::transform(sExtention.begin(), sExtention.end(), sExtention.begin(), tolower);
|
||||
|
||||
std::wstring::const_iterator itFound = std::find_if(sExtention.cbegin(), sExtention.cend(), [](wchar_t wChar){ return !iswalpha(wChar) && L'+' != wChar; });
|
||||
std::wstring::const_iterator itFound = std::find_if(sExtention.cbegin(), sExtention.cend(), [](wchar_t wChar){ return !iswalpha(wChar) && L'+' != wChar; });
|
||||
|
||||
if (sExtention.cend() != itFound)
|
||||
sExtention.erase(itFound, sExtention.cend());
|
||||
}
|
||||
if (sExtention.cend() != itFound)
|
||||
sExtention.erase(itFound, sExtention.cend());
|
||||
|
||||
// Предполагаем картинку в сети
|
||||
if (!bRes &&
|
||||
@ -4468,8 +4467,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
int nImageId = -1;
|
||||
|
||||
if (!bRes)
|
||||
{
|
||||
if (NotValidExtension(sExtention))
|
||||
|
||||
@ -88,8 +88,6 @@ namespace DocFileFormat
|
||||
|
||||
BorderCode( unsigned char* bytes, int size );
|
||||
BorderCode( const BorderCode& bc );
|
||||
unsigned char GetType() const { return brcType; }
|
||||
bool GetNil() {return fNil;}
|
||||
|
||||
bool operator == ( const BorderCode& bc );
|
||||
bool operator != ( const BorderCode& bc );
|
||||
|
||||
@ -606,7 +606,6 @@ namespace DocFileFormat
|
||||
std::wstring PAGE ( L"PAGE" );
|
||||
std::wstring SHAPE ( L"SHAPE" );
|
||||
std::wstring NREF ( L"NREF");
|
||||
std::wstring Tocn (L"Toc");
|
||||
|
||||
if (arField.empty() == false)
|
||||
f = arField[0];
|
||||
@ -630,16 +629,14 @@ namespace DocFileFormat
|
||||
bool bSHAPE = search( f.begin(), f.end(), SHAPE.begin(), SHAPE.end()) != f.end();
|
||||
bool bNREF = search( f.begin(), f.end(), NREF.begin(), NREF.end()) != f.end();
|
||||
|
||||
bool bPAGEREF = false;
|
||||
bool bTocn = false;
|
||||
bool bPAGEREF = false;
|
||||
if (bHYPERLINK && arField.size() > 1)
|
||||
{
|
||||
std::wstring f1 = arField[1];
|
||||
bPAGEREF = search( f1.begin(), f1.end(), PAGEREF.begin(), PAGEREF.end()) != f1.end();
|
||||
bTocn = search( f1.begin(), f1.end(), Tocn.begin(), Tocn.end()) != f1.end();
|
||||
}
|
||||
|
||||
if (bTOC || bTocn)
|
||||
if (bTOC)
|
||||
_bContentWrite = true;
|
||||
|
||||
if ( bFORM )
|
||||
@ -713,13 +710,12 @@ namespace DocFileFormat
|
||||
}
|
||||
else
|
||||
{
|
||||
//for (size_t i = 1; i < arField.size(); i++)
|
||||
if (arField.size() > 1)
|
||||
for (size_t i = 1; i < arField.size(); i++)
|
||||
{
|
||||
std::wstring f1 = arField[1];
|
||||
size_t d = f1.find(PAGEREF);
|
||||
int d = (int)f1.find(PAGEREF);
|
||||
|
||||
if (d != std::wstring::npos)
|
||||
if (d > 0)
|
||||
{
|
||||
_writeWebHidden = true;
|
||||
std::wstring _writeTocLink =f1.substr(d + 9);
|
||||
@ -730,8 +726,10 @@ namespace DocFileFormat
|
||||
_writeAfterRun += XmlUtils::EncodeXmlString(_writeTocLink);
|
||||
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
|
||||
|
||||
//break;
|
||||
break;
|
||||
//cp = cpFieldSep1;
|
||||
}
|
||||
//cpFieldSep1 = cpFieldSep2;
|
||||
}
|
||||
_skipRuns = 5; //with separator
|
||||
}
|
||||
@ -783,7 +781,6 @@ namespace DocFileFormat
|
||||
else
|
||||
{
|
||||
PictureDescriptor pic(chpxObj, m_document->DataStream, 0x7fffffff, m_document->nWordVersion);
|
||||
bPict = false;
|
||||
|
||||
oleWriter.WriteNodeBegin (L"w:object", true);
|
||||
oleWriter.WriteAttribute( L"w:dxaOrig", FormatUtils::IntToWideString( ( pic.dxaGoal + pic.dxaOrigin ) ) );
|
||||
@ -1069,90 +1066,85 @@ namespace DocFileFormat
|
||||
}
|
||||
else if (TextMark::Picture == code && fSpec)
|
||||
{
|
||||
if (bPict)
|
||||
{
|
||||
PictureDescriptor oPicture (chpx, m_document->nWordVersion > 0 ? m_document->WordDocumentStream : m_document->DataStream, 0x7fffffff, m_document->nWordVersion);
|
||||
PictureDescriptor oPicture (chpx, m_document->nWordVersion > 0 ? m_document->WordDocumentStream : m_document->DataStream, 0x7fffffff, m_document->nWordVersion);
|
||||
|
||||
bool isInline = _isTextBoxContent;
|
||||
bool isInline = _isTextBoxContent;
|
||||
|
||||
if (oPicture.embeddedData && oPicture.embeddedDataSize > 0)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin (L"w:pict");
|
||||
if (oPicture.embeddedData && oPicture.embeddedDataSize > 0)
|
||||
{
|
||||
m_pXmlWriter->WriteNodeBegin (L"w:pict");
|
||||
|
||||
VMLPictureMapping oVmlMapper(m_context, m_pXmlWriter, false, _caller, isInline);
|
||||
oPicture.Convert (&oVmlMapper);
|
||||
VMLPictureMapping oVmlMapper(m_context, m_pXmlWriter, false, _caller, isInline);
|
||||
oPicture.Convert (&oVmlMapper);
|
||||
|
||||
m_pXmlWriter->WriteNodeEnd (L"w:pict");
|
||||
}
|
||||
else if ((oPicture.mfp.mm > 98) && (NULL != oPicture.shapeContainer)/* && (false == oPicture.shapeContainer->isLastIdentify())*/)
|
||||
{
|
||||
bool bPicture = true;
|
||||
bool m_bSkip = false;
|
||||
m_pXmlWriter->WriteNodeEnd (L"w:pict");
|
||||
}
|
||||
else if ((oPicture.mfp.mm > 98) && (NULL != oPicture.shapeContainer)/* && (false == oPicture.shapeContainer->isLastIdentify())*/)
|
||||
{
|
||||
bool bPicture = true;
|
||||
bool m_bSkip = false;
|
||||
|
||||
if (oPicture.shapeContainer)
|
||||
{
|
||||
if (oPicture.shapeContainer->m_nShapeType != msosptPictureFrame)
|
||||
bPicture = false;//шаблон 1.doc картинка в колонтитуле
|
||||
if (oPicture.shapeContainer)
|
||||
{
|
||||
if (oPicture.shapeContainer->m_nShapeType != msosptPictureFrame)
|
||||
bPicture = false;//шаблон 1.doc картинка в колонтитуле
|
||||
|
||||
m_bSkip = oPicture.shapeContainer->m_bSkip;
|
||||
}
|
||||
if (!m_bSkip)
|
||||
{
|
||||
bool bFormula = false;
|
||||
XMLTools::CStringXmlWriter pictWriter;
|
||||
pictWriter.WriteNodeBegin (L"w:pict");
|
||||
m_bSkip = oPicture.shapeContainer->m_bSkip;
|
||||
}
|
||||
if (!m_bSkip)
|
||||
{
|
||||
bool bFormula = false;
|
||||
XMLTools::CStringXmlWriter pictWriter;
|
||||
pictWriter.WriteNodeBegin (L"w:pict");
|
||||
|
||||
if (bPicture)
|
||||
{
|
||||
VMLPictureMapping oVmlMapper(m_context, &pictWriter, false, _caller, isInline);
|
||||
oPicture.Convert (&oVmlMapper);
|
||||
if (bPicture)
|
||||
{
|
||||
VMLPictureMapping oVmlMapper(m_context, &pictWriter, false, _caller, isInline);
|
||||
oPicture.Convert (&oVmlMapper);
|
||||
|
||||
if (oVmlMapper.m_isEmbedded)
|
||||
{
|
||||
OleObject ole ( chpx, m_document);
|
||||
OleObjectMapping oleObjectMapping( &pictWriter, m_context, &oPicture, _caller, oVmlMapper.m_shapeId );
|
||||
if (oVmlMapper.m_isEmbedded)
|
||||
{
|
||||
OleObject ole ( chpx, m_document);
|
||||
OleObjectMapping oleObjectMapping( &pictWriter, m_context, &oPicture, _caller, oVmlMapper.m_shapeId );
|
||||
|
||||
ole.isEquation = oVmlMapper.m_isEquation;
|
||||
ole.isEmbedded = oVmlMapper.m_isEmbedded;
|
||||
ole.embeddedData = oVmlMapper.m_embeddedData;
|
||||
ole.isEquation = oVmlMapper.m_isEquation;
|
||||
ole.isEmbedded = oVmlMapper.m_isEmbedded;
|
||||
ole.embeddedData = oVmlMapper.m_embeddedData;
|
||||
|
||||
ole.Convert( &oleObjectMapping );
|
||||
}
|
||||
else if (oVmlMapper.m_isEquation)
|
||||
{
|
||||
//нельзя в Run писать oMath
|
||||
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
|
||||
_writeAfterRun = oVmlMapper.m_equationXml;
|
||||
bFormula = true;
|
||||
}
|
||||
else if (oVmlMapper.m_isBlob)
|
||||
{
|
||||
_writeAfterRun = oVmlMapper.m_blobXml;
|
||||
bFormula = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VMLShapeMapping oVmlMapper(m_context, &pictWriter, NULL, &oPicture, _caller, isInline, false);
|
||||
oPicture.shapeContainer->Convert(&oVmlMapper);
|
||||
}
|
||||
ole.Convert( &oleObjectMapping );
|
||||
}
|
||||
else if (oVmlMapper.m_isEquation)
|
||||
{
|
||||
//нельзя в Run писать oMath
|
||||
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml);
|
||||
_writeAfterRun = oVmlMapper.m_equationXml;
|
||||
bFormula = true;
|
||||
}
|
||||
else if (oVmlMapper.m_isBlob)
|
||||
{
|
||||
_writeAfterRun = oVmlMapper.m_blobXml;
|
||||
bFormula = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VMLShapeMapping oVmlMapper(m_context, &pictWriter, NULL, &oPicture, _caller, isInline, false);
|
||||
oPicture.shapeContainer->Convert(&oVmlMapper);
|
||||
}
|
||||
|
||||
pictWriter.WriteNodeEnd (L"w:pict");
|
||||
pictWriter.WriteNodeEnd (L"w:pict");
|
||||
|
||||
if (!bFormula)
|
||||
{
|
||||
m_pXmlWriter->WriteString(pictWriter.GetXmlString());
|
||||
if (!bFormula)
|
||||
{
|
||||
m_pXmlWriter->WriteString(pictWriter.GetXmlString());
|
||||
|
||||
if ((false == _fieldLevels.empty()) && (_fieldLevels.back().bSeparate && !_fieldLevels.back().bResult)) //ege15.doc
|
||||
{
|
||||
_fieldLevels.back().bResult = true;
|
||||
}//imrtemplate(endnotes).doc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
bPict = true;
|
||||
if ((false == _fieldLevels.empty()) && (_fieldLevels.back().bSeparate && !_fieldLevels.back().bResult)) //ege15.doc
|
||||
{
|
||||
_fieldLevels.back().bResult = true;
|
||||
}//imrtemplate(endnotes).doc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((TextMark::AutoNumberedFootnoteReference == code) && fSpec)
|
||||
{
|
||||
|
||||
@ -84,7 +84,6 @@ namespace DocFileFormat
|
||||
std::wstring m_shapeIdOwner;
|
||||
std::wstring getOLEObject() { return _lastOLEObject; }
|
||||
bool m_bOleInPicture = false;
|
||||
bool bPict = true;
|
||||
protected:
|
||||
|
||||
int getListNumCache (int fc, int fc_end);
|
||||
|
||||
@ -66,19 +66,7 @@ namespace DocFileFormat
|
||||
if (structureLength > 0)
|
||||
{
|
||||
// this PLEX contains CPs and Elements
|
||||
//n = ((int)lcb - CP_LENGTH) / (structureLength + CP_LENGTH);
|
||||
int totalSize = (int)lcb - CP_LENGTH;
|
||||
int elementSize = structureLength + CP_LENGTH;
|
||||
|
||||
if (elementSize > 0)
|
||||
{
|
||||
n = totalSize / elementSize;
|
||||
|
||||
if (totalSize % elementSize != 0)
|
||||
{
|
||||
n += 1;
|
||||
}
|
||||
}
|
||||
n = ((int)lcb - CP_LENGTH) / (structureLength + CP_LENGTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -99,7 +99,6 @@ namespace DocFileFormat
|
||||
XMLTools::XMLElement pgNumType (L"w:pgNumType");
|
||||
|
||||
HeaderAndFooterTable* pTable = _ctx->_doc->headerAndFooterTable;
|
||||
bool bHasEndnoteNumFmt = false;
|
||||
|
||||
if (pTable)
|
||||
{
|
||||
@ -328,11 +327,8 @@ namespace DocFileFormat
|
||||
break;
|
||||
|
||||
case sprmSNfcEdnRef:
|
||||
{
|
||||
appendValueElement( &endnotePr, L"numFmt", NumberingMapping::GetNumberFormatWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
bHasEndnoteNumFmt = true;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case sprmSNFtn:
|
||||
appendValueElement( &footnotePr, L"numStart", FormatUtils::IntToWideString( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ), true );
|
||||
@ -492,10 +488,6 @@ namespace DocFileFormat
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!bHasEndnoteNumFmt)
|
||||
{
|
||||
appendValueElement( &endnotePr, L"numFmt", L"decimal", true );
|
||||
}
|
||||
|
||||
if (bWasSprmSFPgnRestart && false == wsSprmSPgnStart.empty() )
|
||||
appendValueAttribute( &pgNumType, L"w:start", wsSprmSPgnStart );
|
||||
|
||||
@ -190,7 +190,7 @@ namespace DocFileFormat
|
||||
|
||||
}
|
||||
|
||||
if (!IsTableBordersDefined(tapx->grpprl) || ( _tcDef.brcTop->GetType() != 0) || ( _tcDef.brcLeft->GetType() != 0) ||( _tcDef.brcRight->GetType() != 0) ||( _tcDef.brcBottom->GetType() != 0))
|
||||
if (!IsTableBordersDefined(tapx->grpprl))
|
||||
{
|
||||
_brcTop = std::shared_ptr<BorderCode>(new BorderCode(*_tcDef.brcTop));
|
||||
_brcLeft = std::shared_ptr<BorderCode>(new BorderCode(*_tcDef.brcLeft));
|
||||
@ -443,28 +443,28 @@ namespace DocFileFormat
|
||||
}
|
||||
|
||||
//append borders
|
||||
if ((_brcTop && _brcTop->GetType() != 0) || (_brcTop && _brcTop->GetNil()))
|
||||
if (_brcTop)
|
||||
{
|
||||
XMLTools::XMLElement topBorder( L"w:top" );
|
||||
appendBorderAttributes(_brcTop.get(), &topBorder);
|
||||
addOrSetBorder(_tcBorders, &topBorder );
|
||||
}
|
||||
|
||||
if ((_brcLeft && _brcLeft->GetType() != 0) || (_brcLeft && _brcLeft->GetNil()))
|
||||
if (_brcLeft )
|
||||
{
|
||||
XMLTools::XMLElement leftBorder( L"w:left" );
|
||||
appendBorderAttributes(_brcLeft.get(), &leftBorder);
|
||||
addOrSetBorder(_tcBorders, &leftBorder);
|
||||
}
|
||||
|
||||
if ((_brcBottom && _brcBottom->GetType() != 0) || (_brcBottom && _brcBottom->GetNil()))
|
||||
if (_brcBottom)
|
||||
{
|
||||
XMLTools::XMLElement bottomBorder( L"w:bottom" );
|
||||
appendBorderAttributes(_brcBottom.get(), &bottomBorder);
|
||||
addOrSetBorder(_tcBorders, &bottomBorder);
|
||||
}
|
||||
|
||||
if ((_brcRight && _brcRight->GetType() != 0) || (_brcRight && _brcRight->GetNil()))
|
||||
if (_brcRight)
|
||||
{
|
||||
XMLTools::XMLElement rightBorder( L"w:right" );
|
||||
appendBorderAttributes( _brcRight.get(), &rightBorder );
|
||||
|
||||
@ -23,31 +23,6 @@
|
||||
<ClCompile Include="..\..\..\Common\SummaryInformation\PropertyFactory.cpp" />
|
||||
<ClCompile Include="..\..\..\Common\SummaryInformation\PropertySet.cpp" />
|
||||
<ClCompile Include="..\..\..\Common\SummaryInformation\PropertySetStream.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\ConvertXls2Xlsx.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\external_items.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\mediaitems_utils.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\namespaces.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\oox_content_type.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\oox_package.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\oox_rels.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\XlsConverter.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_activeX_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_chart_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_comments.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_comments_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_conversion_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_drawings.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_drawing_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_external_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_hyperlinks.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_output_xml.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_package.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_pivots_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_protection.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_sheet_context.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_tablecontext.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_textcontext.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xls_writer.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Auxiliary\HelpFunc.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Binary\CFRecord.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Binary\CFRecordType.cpp" />
|
||||
@ -440,7 +415,6 @@
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFDatabar.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFExNonCF12.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFExTemplateParams.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFFilter.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFGradient.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFMStateItem.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFMultistate.cpp" />
|
||||
@ -853,33 +827,6 @@
|
||||
<ClInclude Include="..\..\..\Common\SummaryInformation\PropertyFactory.h" />
|
||||
<ClInclude Include="..\..\..\Common\SummaryInformation\PropertySet.h" />
|
||||
<ClInclude Include="..\..\..\Common\SummaryInformation\PropertySetStream.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\ConvertXls2Xlsx.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\external_items.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\mediaitems_utils.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\namespaces.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\oox_content_type.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\oox_package.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\oox_rels.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\progressCallback.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\ShapeType.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\XlsConverter.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_activeX_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_chart_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_comments.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_comments_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_conversion_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_drawings.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_drawing_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_external_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_hyperlinks.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_output_xml.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_package.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_pivots_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_protection.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_sheet_context.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_tablecontext.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_textcontext.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xls_writer.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Auxiliary\HelpFunc.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Binary\BinSmartPointers.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Binary\CFRecord.h" />
|
||||
@ -1283,7 +1230,6 @@
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFDatabar.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFExNonCF12.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFExTemplateParams.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFFilter.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFGradient.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFMStateItem.h" />
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFMultistate.h" />
|
||||
|
||||
@ -2443,84 +2443,6 @@
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\FutureFunctionParser.cpp">
|
||||
<Filter>Logic\Biff_structures</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFFilter.cpp">
|
||||
<Filter>Logic\Biff_structures</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\ConvertXls2Xlsx.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\external_items.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\mediaitems_utils.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\namespaces.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\oox_content_type.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\oox_package.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\oox_rels.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xls_writer.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\XlsConverter.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_activeX_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_chart_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_comments.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_comments_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_conversion_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_drawing_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_drawings.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_external_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_hyperlinks.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_output_xml.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_package.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_pivots_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_protection.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_sheet_context.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_tablecontext.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsFile\Converter\xlsx_textcontext.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logging\Log.h">
|
||||
@ -4977,89 +4899,5 @@
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\FutureFunctionParser.h">
|
||||
<Filter>Logic\Biff_structures</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Format\Logic\Biff_structures\CFFilter.h">
|
||||
<Filter>Logic\Biff_structures</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\ConvertXls2Xlsx.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\external_items.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\mediaitems_utils.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\namespaces.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\oox_content_type.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\oox_package.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\oox_rels.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\progressCallback.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\ShapeType.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xls_writer.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\XlsConverter.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_activeX_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_chart_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_comments.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_comments_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_conversion_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_drawing_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_drawings.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_external_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_hyperlinks.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_output_xml.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_package.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_pivots_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_protection.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_sheet_context.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_tablecontext.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\XlsFile\Converter\xlsx_textcontext.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -34,7 +34,6 @@
|
||||
#include "../Format/Binary/CompoundFile.h"
|
||||
#include "../Format/Binary/CFStreamCacheWriter.h"
|
||||
#include "../Format/Logic/WorkbookStreamObject.h"
|
||||
#include <iomanip>
|
||||
|
||||
bool XlsWriter::Open(const std::wstring &fileName)
|
||||
{
|
||||
@ -46,19 +45,18 @@ bool XlsWriter::Open(const std::wstring &fileName)
|
||||
bool XlsWriter::WriteWorkbook(XLS::BaseObjectPtr streamObject)
|
||||
{
|
||||
auto WokrkbokStreamName = L"Workbook";
|
||||
if(globalInfoPtr == nullptr)
|
||||
globalInfoPtr = boost::shared_ptr<XLS::GlobalWorkbookInfo>(new XLS::GlobalWorkbookInfo(XLS::WorkbookStreamObject::DefaultCodePage, nullptr));
|
||||
auto xls_global_info = boost::shared_ptr<XLS::GlobalWorkbookInfo>(new XLS::GlobalWorkbookInfo(XLS::WorkbookStreamObject::DefaultCodePage, nullptr));
|
||||
auto BookStream = xls_file->createNamedStream(WokrkbokStreamName);
|
||||
if(BookStream == nullptr)
|
||||
return false;
|
||||
XLS::StreamCacheWriterPtr cacheWriter(new XLS::CFStreamCacheWriter(BookStream, globalInfoPtr));
|
||||
XLS::StreamCacheWriterPtr cacheWriter(new XLS::CFStreamCacheWriter(BookStream, xls_global_info));
|
||||
XLS::BinWriterProcessor stream_proc(cacheWriter, nullptr);
|
||||
stream_proc.mandatory(*streamObject);
|
||||
|
||||
//writing fileptrs
|
||||
{
|
||||
auto filePos = BookStream->getStreamPointer();
|
||||
for(auto sheet : globalInfoPtr->sheets_info)
|
||||
for(auto sheet : xls_global_info->sheets_info)
|
||||
{
|
||||
//bof of worksheet
|
||||
BookStream->seekFromBegin(sheet.BoundSheetPos);
|
||||
@ -71,20 +69,10 @@ bool XlsWriter::WriteWorkbook(XLS::BaseObjectPtr streamObject)
|
||||
}
|
||||
bool XlsWriter::WriteStreamObject(std::wstring &streamName, XLS::BaseObjectPtr streamObject)
|
||||
{
|
||||
if(globalInfoPtr == nullptr)
|
||||
globalInfoPtr = boost::shared_ptr<XLS::GlobalWorkbookInfo>(new XLS::GlobalWorkbookInfo(XLS::WorkbookStreamObject::DefaultCodePage, nullptr));
|
||||
XLS::StreamCacheWriterPtr cacheWriter(new XLS::CFStreamCacheWriter(xls_file->createNamedStream(streamName), globalInfoPtr));
|
||||
auto xls_global_info = boost::shared_ptr<XLS::GlobalWorkbookInfo>(new XLS::GlobalWorkbookInfo(XLS::WorkbookStreamObject::DefaultCodePage, nullptr));
|
||||
XLS::StreamCacheWriterPtr cacheWriter(new XLS::CFStreamCacheWriter(xls_file->createNamedStream(streamName), xls_global_info));
|
||||
|
||||
XLS::BinWriterProcessor stream_proc(cacheWriter, nullptr);
|
||||
stream_proc.mandatory(*streamObject);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XlsWriter::WritePivotCache(XLS::BaseObjectPtr streamObject, _UINT32 cacheId)
|
||||
{
|
||||
auto DirectoryName = L"_SX_DB_CUR/";
|
||||
std::wstringstream ss;
|
||||
ss << std::hex << std::setw(4) << std::setfill(L'0') << std::uppercase << cacheId;
|
||||
std::wstring streamName = DirectoryName + ss.str();
|
||||
return WriteStreamObject(streamName, streamObject);
|
||||
}
|
||||
|
||||
@ -44,10 +44,7 @@ class XlsWriter
|
||||
public:
|
||||
bool Open(const std::wstring &fileName);
|
||||
bool WriteWorkbook(XLS::BaseObjectPtr streamObject);
|
||||
bool WritePivotCache(XLS::BaseObjectPtr streamObject, _UINT32 cacheId);
|
||||
bool WriteStreamObject(std::wstring &streamName, XLS::BaseObjectPtr streamObject);
|
||||
|
||||
boost::shared_ptr<XLS::GlobalWorkbookInfo> globalInfoPtr;
|
||||
private:
|
||||
std::wstring fileName_ = L"";
|
||||
|
||||
|
||||
@ -49,17 +49,6 @@ CFRecord::CFRecord(CFStreamPtr stream, GlobalWorkbookInfoPtr global_info)
|
||||
unsigned short size_short;
|
||||
*stream >> size_short;
|
||||
size_ = size_short;
|
||||
const auto maxRecordSize = 8224;
|
||||
if(size_ > maxRecordSize)
|
||||
{
|
||||
type_id_ = -1;
|
||||
}
|
||||
auto streamSize = stream->getStreamSize();
|
||||
if(stream->getStreamPointer() + size_ > streamSize)
|
||||
{
|
||||
size_ = streamSize - stream->getStreamPointer();
|
||||
type_id_ = -1;
|
||||
}
|
||||
data_ = new char[size_];
|
||||
|
||||
unsigned long rec_data_pos = stream->getStreamPointer();
|
||||
|
||||
@ -175,12 +175,12 @@ private:
|
||||
CFStream::ReceiverItems receiver_items;
|
||||
CFStream::SourceItems source_items;
|
||||
|
||||
unsigned int file_ptr = 0;
|
||||
CFRecordType::TypeId type_id_ = 0;
|
||||
size_t size_ = 0;
|
||||
char* data_ = 0;
|
||||
BYTE sizeOfRecordTypeRecordLength = 0; //размер RecordType и RecordLength
|
||||
size_t rdPtr = 0;
|
||||
unsigned int file_ptr;
|
||||
CFRecordType::TypeId type_id_;
|
||||
size_t size_;
|
||||
char* data_;
|
||||
BYTE sizeOfRecordTypeRecordLength; //размер RecordType и RecordLength
|
||||
size_t rdPtr;
|
||||
static char intData[MAX_RECORD_SIZE_XLSB];
|
||||
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
|
||||
Ref ref_;
|
||||
ArrayParsedFormula formula;
|
||||
bool fAlwaysCalc = false;
|
||||
bool fAlwaysCalc;
|
||||
|
||||
RFX rfx; //biff12
|
||||
};
|
||||
|
||||
@ -72,14 +72,7 @@ void AutoFilter::readFields(CFRecord& record)
|
||||
{
|
||||
size_t pos_record = record.getRdPtr();
|
||||
|
||||
|
||||
if (size == 0xffffffff)
|
||||
size = record.getDataSize() - pos_record;
|
||||
else if(record.getDataSize() < pos_record + size)
|
||||
{
|
||||
//size error
|
||||
return;
|
||||
}
|
||||
if (size == 0xffffffff) size = record.getDataSize() - pos_record;
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
|
||||
@ -112,7 +112,6 @@ void AutoFilter12::readFields(CFRecord& record)
|
||||
void AutoFilter12::writeFields(CFRecord& record)
|
||||
{
|
||||
_UINT16 flags = 0;
|
||||
frtRefHeader.rt = 0x087E;
|
||||
record << frtRefHeader << iEntry << fHideArrow << ft << cft << cCriteria << cDateGroupings;
|
||||
bool fWorksheetAutoFilter = false;
|
||||
if(idList == 0xFFFFFFFF)
|
||||
@ -123,8 +122,7 @@ void AutoFilter12::writeFields(CFRecord& record)
|
||||
record << idList;
|
||||
|
||||
_GUID_ guid_num;
|
||||
if(!guidSview.empty())
|
||||
STR::bstr2guid(guidSview, guid_num);
|
||||
STR::bstr2guid(guidSview, guid_num);
|
||||
record << guid_num;
|
||||
if(rgb != nullptr)
|
||||
rgb->save(record);
|
||||
|
||||
@ -36,15 +36,6 @@
|
||||
#include "../Biff_structures/CFMultistate.h"
|
||||
#include "../Biff_structures/CFDatabar.h"
|
||||
#include "../Biff_structures/CFGradient.h"
|
||||
#include "../Biff_structures/CFFilter.h"
|
||||
|
||||
#include "../../../../../OOXML/XlsxFormat/ComplexTypes_Spreadsheet.h"
|
||||
#include "../../../../../OOXML/XlsxFormat/Styles/dxf.h"
|
||||
#include "../../../../../OOXML/XlsxFormat/Styles/Xfs.h"
|
||||
#include "../../../../../OOXML/XlsxFormat/Styles/NumFmts.h"
|
||||
#include "../../../../../OOXML/XlsxFormat/Styles/Fonts.h"
|
||||
#include "../../../../../OOXML/XlsxFormat/Styles/Fills.h"
|
||||
#include "../../../../../OOXML/XlsxFormat/Styles/Borders.h"
|
||||
#include "../../../../../OOXML/Base/Unit.h"
|
||||
|
||||
namespace XLS
|
||||
@ -109,8 +100,9 @@ void CF12::readFields(CFRecord& record)
|
||||
rgbCT->load(record);
|
||||
break;
|
||||
case 0x05:
|
||||
rgbCT = BiffStructurePtr(new CFFilter);
|
||||
rgbCT->load(record);
|
||||
//todooo
|
||||
//rgbCT = BiffStructurePtr(new CFFilter);
|
||||
//rgbCT->load(record);
|
||||
break;
|
||||
case 0x06:
|
||||
rgbCT = BiffStructurePtr(new CFMultistate);
|
||||
@ -125,356 +117,13 @@ void CF12::readFields(CFRecord& record)
|
||||
|
||||
dxfId_ = global_info->RegistrDxfn(strm.str());
|
||||
}
|
||||
void ProcessBorderProp( OOX::Spreadsheet::CBorderProp* prop, unsigned char& DgPtr, unsigned char& icvPtr)
|
||||
{
|
||||
if(prop->m_oStyle.IsInit())
|
||||
{
|
||||
switch(prop->m_oStyle->GetValue())
|
||||
{
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleNone:
|
||||
{
|
||||
DgPtr = 0;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleThin:
|
||||
{
|
||||
DgPtr = 1;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleMedium:
|
||||
{
|
||||
DgPtr = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleDashed:
|
||||
{
|
||||
DgPtr = 3;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleDotted:
|
||||
{
|
||||
DgPtr = 4;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleThick:
|
||||
{
|
||||
DgPtr = 5;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleDouble:
|
||||
{
|
||||
DgPtr = 6;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleHair:
|
||||
{
|
||||
DgPtr = 7;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleMediumDashed:
|
||||
{
|
||||
DgPtr = 8;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleDashDot:
|
||||
{
|
||||
DgPtr = 9;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleMediumDashDot:
|
||||
{
|
||||
DgPtr = 10;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleDashDotDot:
|
||||
{
|
||||
DgPtr = 11;
|
||||
break;
|
||||
}
|
||||
case SimpleTypes::Spreadsheet::EBorderStyle::borderstyleSlantDashDot:
|
||||
{
|
||||
DgPtr = 13;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(prop->m_oColor.IsInit() && prop->m_oColor->m_oIndexed.IsInit())
|
||||
icvPtr = prop->m_oColor->m_oIndexed->GetValue();
|
||||
}
|
||||
|
||||
void CF12::writeFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
frtRefHeader.rt = 0x087A;
|
||||
{ frtRefHeader.rt = 0x087A;
|
||||
record << frtRefHeader;
|
||||
record << ct << cp;
|
||||
|
||||
record.reserveNunBytes(4);
|
||||
auto ccePos = record.getRdPtr();
|
||||
if(dxf.dxfn != nullptr)
|
||||
{
|
||||
//todo dxf conversion from global info
|
||||
if(dxfId_ >= 0 && global_info->arrUserDxfs.size() > dxfId_)
|
||||
{
|
||||
OOX::Spreadsheet::CDxf dxfObj;
|
||||
XmlUtils::CXmlLiteReader oReader;
|
||||
if(oReader.FromString(global_info->arrUserDxfs.at(dxfId_)))
|
||||
{
|
||||
if(oReader.ReadNextNode())
|
||||
{
|
||||
dxfObj.fromXML(oReader);
|
||||
if(dxfObj.m_oFill.IsInit() && dxfObj.m_oFill->m_oPatternFill.IsInit())
|
||||
{
|
||||
dxf.dxfn->flsNinch = false;
|
||||
dxf.dxfn->ibitAtrPat = true;
|
||||
dxf.dxfn->dxfpat.fls = 1;
|
||||
if(dxfObj.m_oFill->m_oPatternFill->m_oFgColor.IsInit() && dxfObj.m_oFill->m_oPatternFill->m_oFgColor->m_oIndexed.IsInit())
|
||||
{
|
||||
dxf.dxfn->icvFNinch = false;
|
||||
dxf.dxfn->dxfpat.icvForeground = dxfObj.m_oFill->m_oPatternFill->m_oFgColor->m_oIndexed->GetValue();
|
||||
}
|
||||
else if(dxfObj.m_oFill->m_oPatternFill->m_oFgColor.IsInit())
|
||||
{
|
||||
dxf.dxfn->icvFNinch= false;
|
||||
ExtProp fgColor;
|
||||
if(dxf.dxfn->xfext == nullptr)
|
||||
{
|
||||
auto Ext = new XFExtNoFRT;
|
||||
dxf.dxfn->xfext = XFExtNoFRTPtr(Ext);
|
||||
}
|
||||
if(dxfObj.m_oFill->m_oPatternFill->m_oFgColor->m_oThemeColor.IsInit())
|
||||
{
|
||||
fgColor.extType = ExtProp::ForeColor;
|
||||
fgColor.extPropData.color.xclrType = 3;
|
||||
fgColor.extPropData.color.xclrValue = dxfObj.m_oFill->m_oPatternFill->m_oFgColor->m_oThemeColor->GetValue();
|
||||
|
||||
}
|
||||
else if(dxfObj.m_oFill->m_oPatternFill->m_oFgColor->m_oRgb.IsInit())
|
||||
{
|
||||
fgColor.extType = ExtProp::ForeColor;
|
||||
fgColor.extPropData.color.xclrType = 2;
|
||||
fgColor.extPropData.color.xclrValue = dxfObj.m_oFill->m_oPatternFill->m_oFgColor->m_oRgb->ToInt();
|
||||
}
|
||||
|
||||
dxf.dxfn->xfext->mapRgExt.emplace(ExtProp::ForeColor, fgColor);
|
||||
}
|
||||
if(dxfObj.m_oFill->m_oPatternFill->m_oBgColor.IsInit() && dxfObj.m_oFill->m_oPatternFill->m_oBgColor->m_oIndexed.IsInit())
|
||||
{
|
||||
dxf.dxfn->icvBNinch = false;
|
||||
dxf.dxfn->dxfpat.icvBackground = dxfObj.m_oFill->m_oPatternFill->m_oBgColor->m_oIndexed->GetValue();
|
||||
}
|
||||
else if(dxfObj.m_oFill->m_oPatternFill->m_oBgColor.IsInit())
|
||||
{
|
||||
ExtProp bgColor;
|
||||
dxf.dxfn->icvBNinch = false;
|
||||
if(dxf.dxfn->xfext == nullptr)
|
||||
{
|
||||
auto Ext = new XFExtNoFRT;
|
||||
dxf.dxfn->xfext = XFExtNoFRTPtr(Ext);
|
||||
}
|
||||
if(dxfObj.m_oFill->m_oPatternFill->m_oBgColor->m_oThemeColor.IsInit())
|
||||
{
|
||||
bgColor.extType = ExtProp::BackColor;
|
||||
bgColor.extPropData.color.xclrType = 3;
|
||||
bgColor.extPropData.color.xclrValue = dxfObj.m_oFill->m_oPatternFill->m_oBgColor->m_oThemeColor->GetValue();
|
||||
|
||||
}
|
||||
else if(dxfObj.m_oFill->m_oPatternFill->m_oBgColor->m_oRgb.IsInit())
|
||||
{
|
||||
bgColor.extType = ExtProp::BackColor;
|
||||
bgColor.extPropData.color.xclrType = 2;
|
||||
bgColor.extPropData.color.xclrValue = dxfObj.m_oFill->m_oPatternFill->m_oBgColor->m_oRgb->ToInt();
|
||||
}
|
||||
|
||||
dxf.dxfn->xfext->mapRgExt.emplace(ExtProp::BackColor, bgColor);
|
||||
}
|
||||
}
|
||||
if(dxfObj.m_oFont.IsInit())
|
||||
{
|
||||
dxf.dxfn->ibitAtrFnt = true;
|
||||
if(dxfObj.m_oFont->m_oBold.IsInit() && dxfObj.m_oFont->m_oBold->m_oVal.GetValue())
|
||||
{ dxf.dxfn->dxffntd.fBlsNinch = false;
|
||||
dxf.dxfn->dxffntd.stxp.bls = 0x02BC;
|
||||
}
|
||||
if(dxfObj.m_oFont->m_oStrike.IsInit() && dxfObj.m_oFont->m_oStrike->m_oVal.GetValue())
|
||||
{
|
||||
dxf.dxfn->dxffntd.stxp.ts.ftsStrikeout = true;
|
||||
dxf.dxfn->dxffntd.tsNinch.ftsStrikeout = false;
|
||||
}
|
||||
if(dxfObj.m_oFont->m_oItalic.IsInit() && dxfObj.m_oFont->m_oItalic->m_oVal.GetValue())
|
||||
{
|
||||
dxf.dxfn->dxffntd.stxp.ts.ftsItalic = true;
|
||||
dxf.dxfn->dxffntd.tsNinch.ftsItalic = false;
|
||||
}
|
||||
if(dxfObj.m_oFont->m_oSz.IsInit())
|
||||
dxf.dxfn->dxffntd.stxp.twpHeight = dxfObj.m_oFont->m_oSz->m_oVal->GetValue() * 20;
|
||||
if(dxfObj.m_oFont->m_oUnderline.IsInit())
|
||||
{
|
||||
dxf.dxfn->dxffntd.fUlsNinch = false;
|
||||
if(dxfObj.m_oFont->m_oUnderline->m_oUnderline->GetValue() == SimpleTypes::Spreadsheet::EUnderline::underlineSingle)
|
||||
dxf.dxfn->dxffntd.stxp.uls = 1;
|
||||
else if(dxfObj.m_oFont->m_oUnderline->m_oUnderline->GetValue() == SimpleTypes::Spreadsheet::EUnderline::underlineDouble)
|
||||
dxf.dxfn->dxffntd.stxp.uls = 2;
|
||||
else if(dxfObj.m_oFont->m_oUnderline->m_oUnderline->GetValue() == SimpleTypes::Spreadsheet::EUnderline::underlineSingleAccounting)
|
||||
dxf.dxfn->dxffntd.stxp.uls = 0x21;
|
||||
else if(dxfObj.m_oFont->m_oUnderline->m_oUnderline->GetValue() == SimpleTypes::Spreadsheet::EUnderline::underlineDoubleAccounting)
|
||||
dxf.dxfn->dxffntd.stxp.uls = 0x22;
|
||||
}
|
||||
if(dxfObj.m_oFont->m_oColor.IsInit() && dxfObj.m_oFont->m_oColor->m_oIndexed.IsInit())
|
||||
dxf.dxfn->dxffntd.icvFore = dxfObj.m_oFont->m_oColor->m_oIndexed->GetValue();
|
||||
}
|
||||
if(dxfObj.m_oBorder.IsInit())
|
||||
{
|
||||
dxf.dxfn->ibitAtrBdr = true;
|
||||
if(dxfObj.m_oBorder->m_oBottom.IsInit())
|
||||
{
|
||||
dxf.dxfn->glBottomNinch = false;
|
||||
ProcessBorderProp(dxfObj.m_oBorder->m_oBottom.GetPointer(), dxf.dxfn->dxfbdr.dgBottom, dxf.dxfn->dxfbdr.icvBottom);
|
||||
}
|
||||
if(dxfObj.m_oBorder->m_oTop.IsInit())
|
||||
{
|
||||
dxf.dxfn->glTopNinch = false;
|
||||
ProcessBorderProp(dxfObj.m_oBorder->m_oTop.GetPointer(), dxf.dxfn->dxfbdr.dgTop, dxf.dxfn->dxfbdr.icvTop);
|
||||
}
|
||||
if(dxfObj.m_oBorder->m_oStart.IsInit())
|
||||
{
|
||||
dxf.dxfn->glLeftNinch = false;
|
||||
ProcessBorderProp(dxfObj.m_oBorder->m_oStart.GetPointer(), dxf.dxfn->dxfbdr.dgLeft, dxf.dxfn->dxfbdr.icvLeft);
|
||||
}
|
||||
if(dxfObj.m_oBorder->m_oEnd.IsInit())
|
||||
{
|
||||
dxf.dxfn->glRightNinch = false;
|
||||
ProcessBorderProp(dxfObj.m_oBorder->m_oEnd.GetPointer(), dxf.dxfn->dxfbdr.dgRight, dxf.dxfn->dxfbdr.icvRight);
|
||||
}
|
||||
if(dxfObj.m_oBorder->m_oDiagonal.IsInit())
|
||||
{
|
||||
dxf.dxfn->glDiagDownNinch = false;
|
||||
dxf.dxfn->glDiagUpNinch = false;
|
||||
if(dxfObj.m_oBorder->m_oDiagonalDown.IsInit() && dxfObj.m_oBorder->m_oDiagonalDown->GetValue())
|
||||
dxf.dxfn->dxfbdr.bitDiagDown = true;
|
||||
if(dxfObj.m_oBorder->m_oDiagonalUp.IsInit() && dxfObj.m_oBorder->m_oDiagonalUp->GetValue())
|
||||
dxf.dxfn->dxfbdr.bitDiagUp = true;
|
||||
ProcessBorderProp(dxfObj.m_oBorder->m_oDiagonal.GetPointer(), dxf.dxfn->dxfbdr.dgDiag, dxf.dxfn->dxfbdr.icvDiag);
|
||||
}
|
||||
}
|
||||
if(dxfObj.m_oNumFmt.IsInit())
|
||||
{
|
||||
dxf.dxfn->ibitAtrNum = true;
|
||||
if(dxfObj.m_oNumFmt->m_oNumFmtId.IsInit())
|
||||
{
|
||||
dxf.dxfn->fIfmtUser = false;
|
||||
dxf.dxfn->ifmtNinch = false;
|
||||
dxf.dxfn->dxfnum.fmt_id.ifmt = dxfObj.m_oNumFmt->m_oNumFmtId->m_eValue;
|
||||
}
|
||||
else if (dxfObj.m_oNumFmt->m_oFormatCode.IsInit())
|
||||
{
|
||||
dxf.dxfn->fIfmtUser = true;
|
||||
dxf.dxfn->dxfnum.user_defined.fmt = dxfObj.m_oNumFmt->m_oFormatCode.get();
|
||||
}
|
||||
}
|
||||
if(dxfObj.m_oProtection.IsInit())
|
||||
{
|
||||
dxf.dxfn->ibitAtrProt = true;
|
||||
dxf.dxfn->lockedNinch = false;
|
||||
dxf.dxfn->hiddenNinch = false;
|
||||
if(dxfObj.m_oProtection->m_oHidden.IsInit() && dxfObj.m_oProtection->m_oHidden->GetValue())
|
||||
dxf.dxfn->dxfprot.fHidden = true;
|
||||
if(dxfObj.m_oProtection->m_oLocked.IsInit() && dxfObj.m_oProtection->m_oLocked->GetValue())
|
||||
dxf.dxfn->dxfprot.fLocked = true;
|
||||
}
|
||||
if(dxfObj.m_oAlignment.IsInit())
|
||||
{
|
||||
dxf.dxfn->ibitAtrAlc = true;
|
||||
if(dxfObj.m_oAlignment->m_oHorizontal.IsInit())
|
||||
{
|
||||
dxf.dxfn->alchNinch = false;
|
||||
if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentGeneral)
|
||||
dxf.dxfn->dxfalc.alc = 0;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentLeft)
|
||||
dxf.dxfn->dxfalc.alc = 1;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentCenter)
|
||||
dxf.dxfn->dxfalc.alc = 2;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentRight)
|
||||
dxf.dxfn->dxfalc.alc = 3;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentFill)
|
||||
dxf.dxfn->dxfalc.alc = 4;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentJustify)
|
||||
dxf.dxfn->dxfalc.alc = 5;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentCenterContinuous)
|
||||
dxf.dxfn->dxfalc.alc = 6;
|
||||
else if(dxfObj.m_oAlignment->m_oHorizontal->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EHorizontalAlignment::horizontalalignmentDistributed)
|
||||
dxf.dxfn->dxfalc.alc = 7;
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oWrapText.IsInit())
|
||||
{
|
||||
dxf.dxfn->wrapNinch = false;
|
||||
dxf.dxfn->dxfalc.fWrap = dxfObj.m_oAlignment->m_oWrapText->GetValue();
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oVertical.IsInit())
|
||||
{
|
||||
dxf.dxfn->alcvNinch = false;
|
||||
if(dxfObj.m_oAlignment->m_oVertical->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EVerticalAlignment::verticalalignmentTop)
|
||||
dxf.dxfn->dxfalc.alcv = 0;
|
||||
else if(dxfObj.m_oAlignment->m_oVertical->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EVerticalAlignment::verticalalignmentCenter)
|
||||
dxf.dxfn->dxfalc.alcv = 1;
|
||||
else if(dxfObj.m_oAlignment->m_oVertical->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EVerticalAlignment::verticalalignmentBottom)
|
||||
dxf.dxfn->dxfalc.alcv = 2;
|
||||
else if(dxfObj.m_oAlignment->m_oVertical->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EVerticalAlignment::verticalalignmentJustify)
|
||||
dxf.dxfn->dxfalc.alcv = 3;
|
||||
else if(dxfObj.m_oAlignment->m_oVertical->GetValue()
|
||||
== SimpleTypes::Spreadsheet::EVerticalAlignment::verticalalignmentDistributed)
|
||||
dxf.dxfn->dxfalc.alcv = 4;
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oJustifyLastLine.IsInit())
|
||||
{
|
||||
dxf.dxfn->kintoNinch = false;
|
||||
dxf.dxfn->dxfalc.fJustLast = dxfObj.m_oAlignment->m_oJustifyLastLine->GetValue();
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oTextRotation.IsInit())
|
||||
{
|
||||
dxf.dxfn->trotNinch = false;
|
||||
dxf.dxfn->dxfalc.trot = dxfObj.m_oAlignment->m_oTextRotation.get();
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oIndent.IsInit())
|
||||
{
|
||||
dxf.dxfn->cIndentNinch = false;
|
||||
dxf.dxfn->dxfalc.cIndent = dxfObj.m_oAlignment->m_oIndent.get();
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oRelativeIndent.IsInit())
|
||||
{
|
||||
dxf.dxfn->cIndentNinch = false;
|
||||
dxf.dxfn->dxfalc.iIndent = dxfObj.m_oAlignment->m_oRelativeIndent.get();
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oShrinkToFit.IsInit())
|
||||
{
|
||||
dxf.dxfn->fShrinkNinch = false;
|
||||
dxf.dxfn->dxfalc.fShrinkToFit = dxfObj.m_oAlignment->m_oShrinkToFit->GetValue();
|
||||
}
|
||||
if(dxfObj.m_oAlignment->m_oReadingOrder.IsInit())
|
||||
{
|
||||
dxf.dxfn->iReadingOrderNinch = false;
|
||||
dxf.dxfn->dxfalc.iReadingOrder = dxfObj.m_oAlignment->m_oReadingOrder.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
record << dxf;
|
||||
auto rgce1pos = record.getRdPtr();
|
||||
auto dxfSize = rgce1pos - ccePos;
|
||||
|
||||
@ -72,7 +72,7 @@ public:
|
||||
|
||||
CFParsedFormula fmlaActive;
|
||||
_UINT16 ipriority = 0;
|
||||
_UINT16 icfTemplate = 1;
|
||||
_UINT16 icfTemplate = 0;
|
||||
CFExTemplateParams rgbTemplateParms;
|
||||
|
||||
BiffStructurePtr rgbCT;
|
||||
@ -80,7 +80,7 @@ public:
|
||||
//-----------------------------
|
||||
bool fStopIfTrue = 0;
|
||||
int ipriority_ = 0;
|
||||
int dxfId_ = -1;
|
||||
int dxfId_ = 0;
|
||||
|
||||
BaseObjectPtr m_CFEx;
|
||||
BaseObjectPtr m_CF12_2;
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
_UINT32 colFirst = 0;
|
||||
_UINT32 colLast = 0;
|
||||
_UINT32 coldx = 0;
|
||||
IXFCell ixfe = 0;
|
||||
IXFCell ixfe = 0xffff;
|
||||
_UINT32 ixfeXLSB = 0xffffffff;
|
||||
|
||||
bool fHidden = false;
|
||||
|
||||
@ -120,19 +120,11 @@ void DConRef::readFields(CFRecord& record)
|
||||
|
||||
void DConRef::writeFields(CFRecord& record)
|
||||
{
|
||||
if(cchFile == 0 && stFile== L"")
|
||||
{
|
||||
stFile = L'\x0002' + sheet_name;
|
||||
cchFile = stFile.size();
|
||||
|
||||
}
|
||||
record << ref << cchFile;
|
||||
if (cchFile > 0 && cchFile < 0xffff)
|
||||
{
|
||||
XLUnicodeStringNoCch file;
|
||||
file = stFile;
|
||||
record << file;
|
||||
//record.reserveNunBytes(2);
|
||||
record << stFile;
|
||||
record.reserveNunBytes(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -55,8 +55,8 @@ public:
|
||||
static const ElementType type = typeDConRef;
|
||||
|
||||
RefU ref;
|
||||
unsigned short cchFile = 0;
|
||||
std::wstring stFile = L"";
|
||||
unsigned short cchFile;
|
||||
std::wstring stFile;
|
||||
|
||||
std::vector<std::wstring> path;
|
||||
std::wstring file_name;
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
bool fWnClosed = 0;
|
||||
_UINT32 xLeft = 0;
|
||||
_UINT32 yTop = 0;
|
||||
_INT32 idObj = -1;
|
||||
_INT32 idObj = 0;
|
||||
_UINT32 idvMac = 0;
|
||||
|
||||
};
|
||||
|
||||
@ -75,10 +75,9 @@ void DXF::writeFields(CFRecord& record)
|
||||
{
|
||||
if (record.getGlobalWorkbookInfo()->Version < 0x0800)
|
||||
{
|
||||
frtRefHeaderU.rt = 2189;
|
||||
record << frtRefHeaderU;
|
||||
_UINT16 flags = 0;
|
||||
SETBIT(flags, 0, 1)
|
||||
|
||||
SETBIT(flags, 1, xfprops.fNewBorder)
|
||||
record << flags << xfprops;
|
||||
}
|
||||
|
||||
@ -55,8 +55,6 @@ void DataFormat::readFields(CFRecord& record)
|
||||
unsigned short flags;
|
||||
record >> xi >> yi >> iss >> flags;
|
||||
fUnknown = GETBIT(flags, 0);
|
||||
if(iss > 1000)
|
||||
iss = 0;
|
||||
}
|
||||
|
||||
void DataFormat::writeFields(CFRecord& record)
|
||||
|
||||
@ -56,9 +56,9 @@ public:
|
||||
std::wstring ref_ = L"";
|
||||
//-----------------------------
|
||||
_UINT32 rwMic = 0;
|
||||
_UINT32 rwMac = 0x00010000;
|
||||
_UINT32 rwMac = 0;
|
||||
_UINT16 colMic = 0;
|
||||
_UINT16 colMac = 0x0100;
|
||||
_UINT16 colMac = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
@ -154,8 +154,8 @@ void Dv::writeFields(CFRecord& record)
|
||||
SETBIT(flags, 18, fShowInputMsg)
|
||||
SETBIT(flags, 19, fShowErrorMsg)
|
||||
SETBITS(flags, 20, 23, typOperator)
|
||||
//SETBIT(flags, 24, fDVMinFmla)
|
||||
//SETBIT(flags, 25, fDVMaxFmla)
|
||||
SETBIT(flags, 24, fDVMinFmla)
|
||||
SETBIT(flags, 25, fDVMaxFmla)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -51,7 +51,7 @@ enum _typOperatorDv
|
||||
operatorDvGreaterThanOrEqual,
|
||||
operatorDvLessThanOrEqual
|
||||
};
|
||||
enum _valTypeDv
|
||||
enum _valTypeDv
|
||||
{
|
||||
typeDvNone = 0,
|
||||
typeDvWhole = 1,
|
||||
@ -81,12 +81,12 @@ public:
|
||||
_valTypeDv valType;
|
||||
unsigned char errStyle;
|
||||
|
||||
bool fStrLookup = false;
|
||||
bool fAllowBlank = false;
|
||||
bool fSuppressCombo = false;
|
||||
unsigned char mdImeMode = 0;
|
||||
bool fShowInputMsg = false;
|
||||
bool fShowErrorMsg = false;
|
||||
bool fStrLookup;
|
||||
bool fAllowBlank;
|
||||
bool fSuppressCombo;
|
||||
unsigned char mdImeMode;
|
||||
bool fShowInputMsg;
|
||||
bool fShowErrorMsg;
|
||||
_typOperatorDv typOperator;
|
||||
|
||||
std::wstring PromptTitle;//XLUnicodeString
|
||||
|
||||
@ -111,7 +111,7 @@ void ExternSheet::writeFields(CFRecord& record)
|
||||
}
|
||||
else if (record.getGlobalWorkbookInfo()->Version < 0x0800)
|
||||
{
|
||||
_UINT16 cXTI_2b = rgXTI.size();
|
||||
_UINT16 cXTI_2b = cXTI;
|
||||
record << cXTI_2b;
|
||||
for (int i = 0; i < cXTI_2b; ++i)
|
||||
{
|
||||
|
||||
@ -67,15 +67,5 @@ void FeatHdr11::readFields(CFRecord& record)
|
||||
record.skipNunBytes(2); // reserved4
|
||||
}
|
||||
|
||||
void FeatHdr11::writeFields(CFRecord& record)
|
||||
{
|
||||
frt.rt = 0x0871;
|
||||
record << frt << isf;
|
||||
unsigned char reserved1 = 1;
|
||||
unsigned int reserved2 = 0xFFFFFFFF;
|
||||
record << reserved1 << reserved2 << reserved2 << idListNext;
|
||||
record.reserveNunBytes(2);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,13 +48,12 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeatHdr11;
|
||||
|
||||
FrtHeader frt;
|
||||
_UINT16 isf = 0x0005;
|
||||
_UINT32 idListNext = 0;
|
||||
_UINT16 isf;
|
||||
_UINT32 idListNext;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -90,33 +90,5 @@ void Feature11::readFields(CFRecord& record)
|
||||
record >> rgbFeat;
|
||||
}
|
||||
|
||||
void Feature11::writeFields(CFRecord& record)
|
||||
{
|
||||
frtRefHeaderU.grbitFrt.fFrtRef = true;
|
||||
if(!bFeature12)
|
||||
{
|
||||
frtRefHeaderU.rt = 0x0872;
|
||||
}
|
||||
else
|
||||
frtRefHeaderU.rt = 0x0878;
|
||||
record << frtRefHeaderU << isf;
|
||||
record.reserveNunBytes(5);
|
||||
cref2 = refs2.size();
|
||||
record << cref2;
|
||||
//auto cbFeatDataPos = record.getRdPtr();
|
||||
record.reserveNunBytes(4); //cbFeatData
|
||||
record.reserveNunBytes(2);
|
||||
for(auto i : refs2)
|
||||
i->save(record);
|
||||
//auto beginRgb = record.getRdPtr();
|
||||
rgbFeat.save(record);
|
||||
//auto endrgb = record.getRdPtr();
|
||||
//cbFeatData = endrgb - beginRgb;
|
||||
//record.RollRdPtrBack(endrgb - cbFeatDataPos);
|
||||
//record << cbFeatData;
|
||||
//record.skipNunBytes(endrgb - record.getRdPtr());
|
||||
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -51,20 +51,19 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeature11;
|
||||
|
||||
FrtRefHeaderU frtRefHeaderU;
|
||||
_UINT16 isf = 0x0005;
|
||||
_UINT16 cref2 = 0;
|
||||
_UINT32 cbFeatData = 0;
|
||||
_UINT16 isf;
|
||||
_UINT16 cref2;
|
||||
_UINT32 cbFeatData;
|
||||
BiffStructurePtrVector refs2;
|
||||
std::wstring sqref;
|
||||
|
||||
TableFeatureType rgbFeat;
|
||||
|
||||
bool bFeature12 = false;
|
||||
bool bFeature12;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -72,7 +72,7 @@ public:
|
||||
bool fCondense = false;
|
||||
bool fExtend = false;
|
||||
|
||||
_UINT16 icv = 0;
|
||||
_UINT16 icv = 8;
|
||||
_UINT16 bls = 400;
|
||||
_UINT16 sss = 0;
|
||||
unsigned char uls = 0;
|
||||
|
||||
@ -61,9 +61,8 @@ void HLink::readFields(CFRecord& record)
|
||||
void HLink::writeFields(CFRecord& record)
|
||||
{
|
||||
record << ref8;
|
||||
_GUID_ guid_num;
|
||||
if(!hlinkClsid.empty())
|
||||
STR::bstr2guid(hlinkClsid, guid_num);
|
||||
_GUID_ guid_num(0, 0, 0, 0);
|
||||
STR::bstr2guid(hlinkClsid, guid_num);
|
||||
record << guid_num << hyperlink;
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ public:
|
||||
|
||||
//-----------------------------
|
||||
Ref8U ref8;
|
||||
std::wstring hlinkClsid = L"{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}";
|
||||
std::wstring hlinkClsid;
|
||||
OSHARED::HyperlinkObject hyperlink;
|
||||
|
||||
|
||||
|
||||
@ -219,8 +219,6 @@ void Lbl::writeFields(CFRecord& record)
|
||||
SETBIT(flags, 14, fWorkbookParam)
|
||||
|
||||
unsigned char cch = Name_bin.getSize();
|
||||
if(!cch)
|
||||
Name_bin = L"";
|
||||
record << flags << chKey << cch;
|
||||
auto ccePos = record.getRdPtr();
|
||||
record.reserveNunBytes(4);
|
||||
@ -228,8 +226,7 @@ void Lbl::writeFields(CFRecord& record)
|
||||
_UINT16 itab_2b = itab;
|
||||
record << itab_2b;
|
||||
record.reserveNunBytes(4);
|
||||
if(cch)
|
||||
record << Name_bin;
|
||||
record << Name_bin;
|
||||
auto rgceStart = record.getRdPtr();
|
||||
rgce.save(record);
|
||||
|
||||
|
||||
@ -74,14 +74,5 @@ void List12::readFields(CFRecord& record)
|
||||
rgbList12->load(record);
|
||||
}
|
||||
|
||||
void List12::writeFields(CFRecord& record)
|
||||
{
|
||||
frtHeader.rt = 0x0877;
|
||||
record << frtHeader << lsd << idList;
|
||||
|
||||
if(rgbList12 != nullptr)
|
||||
rgbList12->save(record);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -49,13 +49,12 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeList12;
|
||||
|
||||
FrtHeader frtHeader;
|
||||
_UINT16 lsd = 0;
|
||||
_UINT32 idList = 1;
|
||||
_UINT16 lsd;
|
||||
_UINT32 idList;
|
||||
|
||||
BiffStructurePtr rgbList12;
|
||||
};
|
||||
|
||||
@ -148,7 +148,7 @@ int MarkerFormat::serialize(std::wostream & _stream, int index, BaseObjectPtr _G
|
||||
{
|
||||
CP_XML_NODE(L"a:srgbClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val", (false == fAuto || index < 0 || index > default_marker_color->size()) ? rgbBack.strRGB : default_marker_color[index]);
|
||||
CP_XML_ATTR(L"val", (false == fAuto || index < 0) ? rgbBack.strRGB : default_marker_color[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -158,7 +158,7 @@ int MarkerFormat::serialize(std::wostream & _stream, int index, BaseObjectPtr _G
|
||||
{
|
||||
CP_XML_NODE(L"a:srgbClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val", (false == fAuto || index < 0 || index > default_marker_color->size()) ? rgbFore.strRGB : default_marker_color[index]);
|
||||
CP_XML_ATTR(L"val", (false == fAuto || index < 0) ? rgbFore.strRGB : default_marker_color[index]);
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"a:prstDash") { CP_XML_ATTR(L"val", L"solid"); }
|
||||
|
||||
@ -65,7 +65,6 @@ void MergeCells::readFields(CFRecord& record)
|
||||
void MergeCells::writeFields(CFRecord& record)
|
||||
{
|
||||
cmcs = rgref.size();
|
||||
record << cmcs;
|
||||
for(auto i : rgref)
|
||||
record << *i;
|
||||
}
|
||||
|
||||
@ -32,11 +32,6 @@
|
||||
|
||||
#include "MsoDrawing.h"
|
||||
#include "../Biff_structures/ODRAW/OfficeArtRecord.h"
|
||||
#include "../Biff_structures/ODRAW/OfficeArtFDG.h"
|
||||
#include "../Biff_structures/ODRAW/OfficeArtFSP.h"
|
||||
#include "../Biff_structures/ODRAW/OfficeArtFSPGR.h"
|
||||
#include "../Biff_structures/ODRAW/SimpleOfficeArtContainers.h"
|
||||
#include "../Biff_structures/ODRAW/OfficeArtFOPT.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -105,12 +100,6 @@ void MsoDrawing::readFields(CFRecord& record)
|
||||
}
|
||||
}
|
||||
|
||||
void MsoDrawing::writeFields(CFRecord& record)
|
||||
{
|
||||
rgChildRec.save(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MsoDrawing::useContinueRecords(CFRecord& record)
|
||||
{
|
||||
@ -134,50 +123,6 @@ const bool MsoDrawing::isEndingRecord(CFRecord& record)
|
||||
return ODRAW::OfficeArtDgContainer::CheckIfContainerSizeOK(record);
|
||||
}
|
||||
|
||||
void MsoDrawing::prepareComment(const unsigned int CommentId)
|
||||
{
|
||||
|
||||
auto spgrContainer = new ODRAW::OfficeArtSpgrContainer(ODRAW::OfficeArtRecord::CA_Sheet);
|
||||
rgChildRec.m_OfficeArtSpgrContainer = ODRAW::OfficeArtRecordPtr(spgrContainer);
|
||||
|
||||
{
|
||||
auto ShapeGroup = new ODRAW::OfficeArtSpContainer(ODRAW::OfficeArtRecord::CA_Sheet);
|
||||
auto groupFsp = new ODRAW::OfficeArtFSP;
|
||||
ShapeGroup->m_OfficeArtFSP = ODRAW::OfficeArtRecordPtr(groupFsp);
|
||||
groupFsp->shape_id = 0;
|
||||
groupFsp->fGroup = true;
|
||||
groupFsp->fPatriarch = true;
|
||||
groupFsp->spid = CommentId;
|
||||
|
||||
auto groupFSPGR = new ODRAW::OfficeArtFSPGR;
|
||||
ShapeGroup->m_OfficeArtFSPGR = ODRAW::OfficeArtRecordPtr(groupFSPGR);
|
||||
|
||||
spgrContainer->m_OfficeArtSpgrContainerFileBlock.push_back(ODRAW::OfficeArtContainerPtr(ShapeGroup));
|
||||
}
|
||||
|
||||
auto TextboxContainer = new ODRAW::OfficeArtSpContainer(ODRAW::OfficeArtRecord::CA_Sheet);
|
||||
|
||||
|
||||
auto fdgPtr = new ODRAW::OfficeArtFDG;
|
||||
fdgPtr->rh_own.recInstance = CommentId;
|
||||
fdgPtr->csp = 2;
|
||||
fdgPtr->spidCur = CommentId+1;
|
||||
rgChildRec.m_OfficeArtFDG = ODRAW::OfficeArtRecordPtr(fdgPtr);
|
||||
spgrContainer->m_OfficeArtSpgrContainerFileBlock.push_back(ODRAW::OfficeArtContainerPtr(TextboxContainer));
|
||||
|
||||
auto fsprPtr = new ODRAW::OfficeArtFSP;
|
||||
TextboxContainer->m_OfficeArtFSP = ODRAW::OfficeArtRecordPtr(fsprPtr);
|
||||
fsprPtr->shape_id = 0xCA;
|
||||
fsprPtr->spid = CommentId+1;
|
||||
fsprPtr->fHaveAnchor = true;
|
||||
fsprPtr->fHaveSpt = true;
|
||||
|
||||
|
||||
{
|
||||
//todo add mandatory optrions writing
|
||||
//auto textboxOpt = new ODRAW::OfficeArtFOPT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -50,7 +50,6 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields (CFRecord& record);
|
||||
void writeFields (CFRecord& record);
|
||||
void readFields ();
|
||||
|
||||
void resetToBegin ();
|
||||
@ -61,8 +60,6 @@ public:
|
||||
virtual const bool isEndingRecord (CFRecord& record);
|
||||
virtual void useContinueRecords (CFRecord& record);
|
||||
|
||||
void prepareComment (const unsigned int CommentId);
|
||||
|
||||
//-----------------------------
|
||||
ODRAW::OfficeArtDgContainer rgChildRec;
|
||||
|
||||
|
||||
@ -332,39 +332,5 @@ void Obj::readFields(CFRecord& record)
|
||||
|
||||
}
|
||||
|
||||
void Obj::writeFields(CFRecord& record)
|
||||
{
|
||||
record << cmo;
|
||||
if(cmo.ot == 0x08)
|
||||
record << pictFormat << pictFlags;
|
||||
else if((cmo.ot >= 0x10 && cmo.ot <= 0x12) || cmo.ot == 0x14)
|
||||
record << sbs;
|
||||
else if(cmo.ot == 0x19)
|
||||
record << nts;
|
||||
record << macro;
|
||||
if(cmo.ot == 0x08)
|
||||
record << pictFmla;
|
||||
if(cmo.ot== 0x0B || cmo.ot == 0x0C || (cmo.ot >= 0x10 && cmo.ot <= 0x12) || cmo.ot == 0x14)
|
||||
{
|
||||
if(cmo.ot== 0x0B || cmo.ot == 0x0C)
|
||||
linkFmla.ft = 0x0B;
|
||||
else
|
||||
linkFmla.ft = 0x0E;
|
||||
record << linkFmla;
|
||||
}
|
||||
if(cmo.ot== 0x0B || cmo.ot == 0x0C)
|
||||
record << checkBox;
|
||||
if(cmo.ot == 0x0C)
|
||||
record << radioButton;
|
||||
else if(cmo.ot == 0x0D)
|
||||
record << edit;
|
||||
else if(cmo.ot == 0x12 || cmo.ot == 0x14)
|
||||
list.save(record, cmo.ot);
|
||||
else if(cmo.ot == 0x13)
|
||||
record << gbo;
|
||||
if(cmo.ot != 0x12 && cmo.ot != 0x14)
|
||||
record.reserveNunBytes(4);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -65,7 +65,6 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeObj;
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ void Palette::writeFields(CFRecord& record)
|
||||
record << ccv;
|
||||
for(auto i: rgColor)
|
||||
if(i != nullptr)
|
||||
i->save(record);
|
||||
record << i;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -55,12 +55,12 @@ public:
|
||||
|
||||
static const ElementType type = typePane;
|
||||
|
||||
_UINT16 x = 0;
|
||||
_UINT16 y = 0;
|
||||
_UINT16 x;
|
||||
_UINT16 y;
|
||||
//_UINT16 rwTop;
|
||||
UncheckedRw rwTop = 0;
|
||||
UncheckedRw rwTop;
|
||||
//_UINT16 colLeft;
|
||||
UncheckedCol colLeft = 0;
|
||||
UncheckedCol colLeft;
|
||||
PaneType pnnAcct; //4 byte in biff12
|
||||
|
||||
std::wstring topLeftCell;
|
||||
@ -68,9 +68,9 @@ public:
|
||||
//biff12
|
||||
Xnum xnumXSplit;
|
||||
Xnum xnumYSplit;
|
||||
bool fFrozen = false;
|
||||
bool fFrozenNoSplit = false;
|
||||
_UINT32 pnnAcct_xlsb = 0;
|
||||
bool fFrozen;
|
||||
bool fFrozenNoSplit;
|
||||
_UINT32 pnnAcct_xlsb;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -54,14 +54,14 @@ public:
|
||||
static const ElementType type = typeQsiSXTag;
|
||||
|
||||
FrtHeaderOld frtHeaderOld;
|
||||
unsigned short fSx = 1;
|
||||
unsigned short fSx = 0;
|
||||
|
||||
bool fEnableRefresh = true;
|
||||
bool fEnableRefresh = false;
|
||||
bool fInvalid = false;
|
||||
bool fTensorEx = false;
|
||||
|
||||
_UINT32 dwQsiFuture = 0;
|
||||
unsigned char verSxLastUpdated = 1;
|
||||
unsigned char verSxLastUpdated = 0;
|
||||
unsigned char verSxUpdatableMin = 0;
|
||||
|
||||
unsigned char obCchName = 0x10;
|
||||
|
||||
@ -151,10 +151,6 @@ void Row::writeFields(CFRecord& record)
|
||||
_UINT16 rel_offset = 0xffff, flags1 = 0, flags2 = 0;
|
||||
record.reserveNunBytes(2);// unused1
|
||||
|
||||
if(ixfe_val != 0)
|
||||
{
|
||||
ixfe_val += global_info_->cellStyleXfs_count;
|
||||
}
|
||||
if (ixfe_val != 0xffff)
|
||||
ixfe_val_2b = ixfe_val;
|
||||
|
||||
|
||||
@ -46,15 +46,6 @@ void XLUnicodeStringSegmentedSXADDL::load(CFRecord& record)
|
||||
|
||||
record >> string;
|
||||
}
|
||||
|
||||
void XLUnicodeStringSegmentedSXADDL::save(CFRecord& record)
|
||||
{
|
||||
cchTotal = string.getSize();
|
||||
record << cchTotal;
|
||||
record.reserveNunBytes(2);
|
||||
record << string;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
SXAddl::SXAddl() : bEndElement(false), bStartElement(false)
|
||||
@ -112,15 +103,6 @@ void SXAddl::readFields(CFRecord& record)
|
||||
}
|
||||
|
||||
}
|
||||
void SXAddl::writeFields(CFRecord& record)
|
||||
{
|
||||
record << frtHeaderOld << sxc << sxd;
|
||||
if(content != nullptr)
|
||||
content->save(record);
|
||||
else if(bEndElement)
|
||||
record.reserveNunBytes(6);
|
||||
}
|
||||
|
||||
BiffStructurePtr SXAddl::createSxcView(CFRecord& record)
|
||||
{
|
||||
BiffStructurePtr result;
|
||||
@ -401,11 +383,6 @@ void SXAddl_SXCView_SXDId::load(CFRecord& record)
|
||||
{
|
||||
record >> stName;
|
||||
}
|
||||
void SXAddl_SXCView_SXDId::save(CFRecord& record)
|
||||
{
|
||||
record << stName;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BiffStructurePtr SXAddl_SXCQsi_SXDId::clone()
|
||||
{
|
||||
@ -439,25 +416,6 @@ void SXAddl_SXCView_SXDVer10Info::load(CFRecord& record)
|
||||
fTensorFillCv = GETBIT(flags, 7);
|
||||
fHideDDData = GETBIT(flags, 8);
|
||||
}
|
||||
|
||||
void SXAddl_SXCView_SXDVer10Info::save(CFRecord& record)
|
||||
{
|
||||
unsigned short flags = 0;
|
||||
|
||||
SETBIT(flags, 0, fDisplayImmediateItems)
|
||||
SETBIT(flags, 1, fEnableDataEd)
|
||||
SETBIT(flags, 2, fDisableFList)
|
||||
SETBIT(flags, 3, fReenterOnLoadOnce)
|
||||
SETBIT(flags, 4, fNotViewCalculatedMembers)
|
||||
SETBIT(flags, 5, fNotVisualTotals)
|
||||
SETBIT(flags, 6, fPageMultipleItemLabel)
|
||||
SETBIT(flags, 7, fTensorFillCv)
|
||||
SETBIT(flags, 8, fHideDDData)
|
||||
|
||||
record << bVerSxMacro << flags;
|
||||
record.reserveNunBytes(3);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BiffStructurePtr SXAddl_SXCView_SXDVer12Info::clone()
|
||||
{
|
||||
@ -580,14 +538,6 @@ void SXAddl_SXCCache_SXDVer10Info::load(CFRecord& record)
|
||||
|
||||
record >> reserved2;
|
||||
}
|
||||
void SXAddl_SXCCache_SXDVer10Info::save(CFRecord& record)
|
||||
{
|
||||
record.reserveNunBytes(6);
|
||||
record << citmGhostMax << bVerCacheLastRefresh << bVerCacheRefreshableMin;
|
||||
for (int i = 0; i < 8; i++)
|
||||
record << numDateCopy[i];
|
||||
record.reserveNunBytes(2);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
BiffStructurePtr SXAddl_SXCCache_SXDVerUpdInv::clone()
|
||||
{
|
||||
@ -684,20 +634,6 @@ void SXAddl_SXCView_SXDTableStyleClient::load(CFRecord& record)
|
||||
fColumnHeaders = GETBIT(flags, 5);
|
||||
fDefaultStyle = GETBIT(flags, 6);
|
||||
}
|
||||
|
||||
void SXAddl_SXCView_SXDTableStyleClient::save(CFRecord& record)
|
||||
{
|
||||
record.reserveNunBytes(6);
|
||||
unsigned short flags = 0;
|
||||
SETBIT(flags, 1, fLastColumn)
|
||||
SETBIT(flags, 2, fRowStrips)
|
||||
SETBIT(flags, 3, fColumnStrips)
|
||||
SETBIT(flags, 4, fRowHeaders)
|
||||
SETBIT(flags, 5, fColumnHeaders)
|
||||
SETBIT(flags, 6, fDefaultStyle)
|
||||
record << flags << stName;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BiffStructurePtr SXAddl_SXCCacheField_SXDSxrmitmCount::clone()
|
||||
{
|
||||
|
||||
@ -49,11 +49,10 @@ public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
virtual void save(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeStringSegmentedSXADDL;
|
||||
|
||||
_UINT32 cchTotal = 0;
|
||||
_UINT32 cchTotal;
|
||||
XLUnicodeString string;
|
||||
};
|
||||
|
||||
@ -67,16 +66,15 @@ public:
|
||||
|
||||
virtual BaseObjectPtr clone();
|
||||
virtual void readFields(CFRecord& record);
|
||||
virtual void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXAddl;
|
||||
|
||||
bool bStartElement = false;
|
||||
bool bEndElement = false;
|
||||
bool bStartElement;
|
||||
bool bEndElement;
|
||||
|
||||
_UINT32 frtHeaderOld = 0x0864;
|
||||
unsigned char sxc = 0;
|
||||
unsigned char sxd = 0;
|
||||
_UINT32 frtHeaderOld;
|
||||
unsigned char sxc;
|
||||
unsigned char sxd;
|
||||
BiffStructurePtr content;
|
||||
private:
|
||||
BiffStructurePtr createSxcView (CFRecord& record);
|
||||
@ -173,7 +171,6 @@ public:
|
||||
static const ElementType type = typeSXAddl;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
virtual void save(CFRecord& record);
|
||||
|
||||
XLUnicodeStringSegmentedSXADDL stName;
|
||||
};
|
||||
@ -202,16 +199,15 @@ public:
|
||||
~SXAddl_SXCView_SXDTableStyleClient(){}
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
virtual void save(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXAddl;
|
||||
|
||||
bool fLastColumn = false;
|
||||
bool fRowStrips = false;
|
||||
bool fColumnStrips = false;
|
||||
bool fRowHeaders = false;
|
||||
bool fColumnHeaders = false;
|
||||
bool fDefaultStyle = false;
|
||||
bool fLastColumn;
|
||||
bool fRowStrips;
|
||||
bool fColumnStrips;
|
||||
bool fRowHeaders;
|
||||
bool fColumnHeaders;
|
||||
bool fDefaultStyle;
|
||||
|
||||
LPWideString stName;
|
||||
};
|
||||
@ -293,13 +289,12 @@ public:
|
||||
~SXAddl_SXCCache_SXDVer10Info(){}
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
virtual void save(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXAddl;
|
||||
|
||||
_INT32 citmGhostMax = 0;
|
||||
unsigned char bVerCacheLastRefresh = 0;
|
||||
unsigned char bVerCacheRefreshableMin = 0;
|
||||
_INT32 citmGhostMax;
|
||||
unsigned char bVerCacheLastRefresh;
|
||||
unsigned char bVerCacheRefreshableMin;
|
||||
|
||||
unsigned char numDateCopy[8];
|
||||
};
|
||||
@ -469,20 +464,19 @@ public:
|
||||
~SXAddl_SXCView_SXDVer10Info(){}
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
virtual void save(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXAddl;
|
||||
|
||||
unsigned char bVerSxMacro = 0;
|
||||
bool fDisplayImmediateItems = false;
|
||||
bool fEnableDataEd = false;
|
||||
bool fDisableFList = false;
|
||||
bool fReenterOnLoadOnce = false;
|
||||
bool fNotViewCalculatedMembers = false;
|
||||
bool fNotVisualTotals = false;
|
||||
bool fPageMultipleItemLabel = false;
|
||||
bool fTensorFillCv = false;
|
||||
bool fHideDDData = false;
|
||||
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
|
||||
{
|
||||
|
||||
@ -67,27 +67,5 @@ void SXDB::readFields(CFRecord& record)
|
||||
fEnableRefresh = GETBIT(flags, 5);
|
||||
}
|
||||
|
||||
void SXDB::writeFields(CFRecord& record)
|
||||
{
|
||||
cchWho = rgb.getSize();
|
||||
if(!cchWho)
|
||||
cchWho = 0xFFFF;
|
||||
unsigned short flags = 0;
|
||||
SETBIT(flags, 0, fSaveData)
|
||||
SETBIT(flags, 1, fInvalid)
|
||||
SETBIT(flags, 2, fRefreshOnLoad)
|
||||
SETBIT(flags, 3, fOptimizeCache)
|
||||
SETBIT(flags, 4, fBackgroundQuery)
|
||||
SETBIT(flags, 5, fEnableRefresh)
|
||||
record << crdbdb << idstm << flags;
|
||||
record.reserveNunBytes(2);
|
||||
record << cfdbdb << cfdbTot << crdbUsed << vsType << cchWho;
|
||||
|
||||
if (cchWho > 0 && cchWho < 0xffff)
|
||||
{
|
||||
record << rgb;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,24 +48,23 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXDB;
|
||||
|
||||
_INT32 crdbdb = 0;
|
||||
unsigned short idstm = 0;
|
||||
bool fSaveData = false;
|
||||
bool fInvalid = false;
|
||||
bool fRefreshOnLoad = false;
|
||||
bool fOptimizeCache = false;
|
||||
bool fBackgroundQuery = false;
|
||||
bool fEnableRefresh = false;
|
||||
_INT32 crdbdb;
|
||||
unsigned short idstm;
|
||||
bool fSaveData;
|
||||
bool fInvalid;
|
||||
bool fRefreshOnLoad;
|
||||
bool fOptimizeCache;
|
||||
bool fBackgroundQuery;
|
||||
bool fEnableRefresh;
|
||||
|
||||
short cfdbdb = 0;
|
||||
short cfdbTot = 0;
|
||||
unsigned short crdbUsed = 0;
|
||||
short vsType = 1;
|
||||
unsigned short cchWho = 0xFFFF;
|
||||
short cfdbdb;
|
||||
short cfdbTot;
|
||||
unsigned short crdbUsed;
|
||||
short vsType;
|
||||
unsigned short cchWho;
|
||||
XLUnicodeStringNoCch rgb;
|
||||
|
||||
};
|
||||
|
||||
@ -61,11 +61,5 @@ void SXDBB::readFields(CFRecord& record)
|
||||
record.skipNunBytes(size);
|
||||
}
|
||||
|
||||
void SXDBB::writeFields(CFRecord& record)
|
||||
{
|
||||
if(size && blob)
|
||||
record.appendRawDataToStatic(blob.get(), size);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -47,12 +47,11 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXDBB;
|
||||
|
||||
boost::shared_array<unsigned char> blob;
|
||||
unsigned int size = 0;
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -54,10 +54,5 @@ void SXDBEx::readFields(CFRecord& record)
|
||||
record >> numDate >> cSxFormula;
|
||||
}
|
||||
|
||||
void SXDBEx::writeFields(CFRecord& record)
|
||||
{
|
||||
record << numDate << cSxFormula;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,12 +48,11 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXDBEx;
|
||||
|
||||
DateAsNum numDate;
|
||||
_UINT32 cSxFormula = 0; //count formulas
|
||||
_UINT32 cSxFormula; //count formulas
|
||||
|
||||
|
||||
};
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "SXDtr.h"
|
||||
#include "../../../../../OOXML/Binary/Sheets/Reader/CellFormatController/DateReader.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -53,11 +52,6 @@ void SXDtr::readFields(CFRecord& record)
|
||||
{
|
||||
record >> yr >> mon >> dom >> hr >> min >> sec;
|
||||
}
|
||||
|
||||
void SXDtr::writeFields(CFRecord& record)
|
||||
{
|
||||
record << yr << mon << dom << hr << min << sec;
|
||||
}
|
||||
|
||||
std::wstring SXDtr::value()
|
||||
{
|
||||
@ -73,20 +67,5 @@ std::wstring SXDtr::value()
|
||||
return s.str();
|
||||
}
|
||||
|
||||
void SXDtr::fromString(const std::wstring &strDate)
|
||||
{
|
||||
DateReader reader;
|
||||
tm dateTime;
|
||||
if(reader.parseIsoDate(strDate, dateTime))
|
||||
{
|
||||
yr = dateTime.tm_year + 1900;
|
||||
mon = dateTime.tm_mon + 1;
|
||||
dom = dateTime.tm_mday + 1;
|
||||
hr = dateTime.tm_hour;
|
||||
min = dateTime.tm_min;
|
||||
sec = dateTime.tm_sec;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -47,19 +47,17 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXDtr;
|
||||
|
||||
unsigned short yr = 0;
|
||||
unsigned short mon = 0;
|
||||
unsigned char dom = 0;
|
||||
unsigned char hr = 0;
|
||||
unsigned char min = 0;
|
||||
unsigned char sec = 0;
|
||||
unsigned short yr;
|
||||
unsigned short mon;
|
||||
unsigned char dom;
|
||||
unsigned char hr;
|
||||
unsigned char min;
|
||||
unsigned char sec;
|
||||
|
||||
std::wstring value();
|
||||
void fromString(const std::wstring &strDate);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -108,12 +108,9 @@ void SXEx::readFields(CFRecord& record)
|
||||
|
||||
void SXEx::writeFields(CFRecord& record)
|
||||
{
|
||||
if(stError.getSize())
|
||||
cchErrorString = stError.getSize();
|
||||
if(stDisplayNull.getSize())
|
||||
cchNullString = stDisplayNull.getSize();
|
||||
if(stTag.getSize())
|
||||
cchTag = stTag.getSize();
|
||||
cchErrorString = stError.getSize();
|
||||
cchNullString = stDisplayNull.getSize();
|
||||
cchTag = stTag.getSize();
|
||||
record << csxformat << cchErrorString << cchNullString << cchTag << csxselect;
|
||||
_UINT32 flags = 0;
|
||||
SETBIT(flags, 0, fAcrossPageLay)
|
||||
@ -127,12 +124,10 @@ void SXEx::writeFields(CFRecord& record)
|
||||
SETBIT(flags, 22, fDisplayNullString)
|
||||
SETBIT(flags, 23, fSubtotalHiddenPageItems)
|
||||
record << crwPage << ccolPage << flags;
|
||||
if(stPageFieldStyle.getSize())
|
||||
cchPageFieldStyle = stPageFieldStyle.getSize();
|
||||
if(stTableStyle.getSize())
|
||||
cchTableStyle = stTableStyle.getSize();
|
||||
if(stVacateStyle.getSize())
|
||||
cchVacateStyle = stVacateStyle.getSize();
|
||||
|
||||
cchPageFieldStyle = stPageFieldStyle.getSize();
|
||||
cchTableStyle = stTableStyle.getSize();
|
||||
cchVacateStyle = stVacateStyle.getSize();
|
||||
record << cchPageFieldStyle << cchTableStyle << cchVacateStyle;
|
||||
if (cchErrorString > 0 && cchErrorString != 0xffff)
|
||||
{
|
||||
|
||||
@ -64,18 +64,18 @@ public:
|
||||
|
||||
bool fAcrossPageLay = false;
|
||||
unsigned char cWrapPage = 0;
|
||||
bool fEnableWizard = true;
|
||||
bool fEnableDrilldown = true;
|
||||
bool fEnableFieldDialog = true;
|
||||
bool fPreserveFormatting = true;
|
||||
bool fMergeLabels = false;
|
||||
bool fDisplayErrorString = false;
|
||||
bool fDisplayNullString = true;
|
||||
bool fSubtotalHiddenPageItems = false;
|
||||
bool fEnableWizard = false;
|
||||
bool fEnableDrilldown = false;
|
||||
bool fEnableFieldDialog = false;
|
||||
bool fPreserveFormatting = false;
|
||||
bool fMergeLabels = false;
|
||||
bool fDisplayErrorString = false;
|
||||
bool fDisplayNullString = false;
|
||||
bool fSubtotalHiddenPageItems = false;
|
||||
|
||||
unsigned short cchPageFieldStyle = 0xFFFF;
|
||||
unsigned short cchTableStyle = 0xFFFF;
|
||||
unsigned short cchVacateStyle = 0xFFFF;
|
||||
unsigned short cchPageFieldStyle = 0;
|
||||
unsigned short cchTableStyle = 0;
|
||||
unsigned short cchVacateStyle = 0;
|
||||
|
||||
XLUnicodeStringNoCch stError;
|
||||
XLUnicodeStringNoCch stDisplayNull;
|
||||
|
||||
@ -76,28 +76,5 @@ void SXFDB::readFields(CFRecord& record)
|
||||
global_info->arPivotCacheFields.push_back(fAllAtoms);
|
||||
}
|
||||
|
||||
void SXFDB::writeFields(CFRecord& record)
|
||||
{
|
||||
unsigned short flags = 0;
|
||||
|
||||
SETBIT(flags, 0, fAllAtoms)
|
||||
SETBIT(flags, 1, fSomeUnhashed)
|
||||
SETBIT(flags, 2, fUsed)
|
||||
SETBIT(flags, 3, fHasParent)
|
||||
SETBIT(flags, 4, fRangeGroup)
|
||||
SETBIT(flags, 5, fNumField)
|
||||
SETBIT(flags, 7, fTextEtcField)
|
||||
SETBIT(flags, 8, fnumMinMaxValid)
|
||||
SETBIT(flags, 9, fShortIitms)
|
||||
SETBIT(flags, 10, fNonDates)
|
||||
SETBIT(flags, 11, fDateInField)
|
||||
SETBIT(flags, 13, fServerBased)
|
||||
SETBIT(flags, 14, fCantGetUniqueItems)
|
||||
SETBIT(flags, 15, fCalculatedField)
|
||||
|
||||
record << flags << ifdbParent << ifdbBase << citmUnq << csxoper << cisxoper << catm;
|
||||
record << stFieldName;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,30 +48,29 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXFDB;
|
||||
|
||||
bool fAllAtoms = false;
|
||||
bool fSomeUnhashed = false;
|
||||
bool fUsed = false;
|
||||
bool fHasParent = false;
|
||||
bool fRangeGroup = false;
|
||||
bool fNumField = false;
|
||||
bool fTextEtcField = false;
|
||||
bool fnumMinMaxValid = false;
|
||||
bool fShortIitms = false;
|
||||
bool fNonDates = false;
|
||||
bool fDateInField = false;
|
||||
bool fServerBased = false;
|
||||
bool fCantGetUniqueItems = false;
|
||||
bool fCalculatedField = false;
|
||||
unsigned short ifdbParent = 0;
|
||||
unsigned short ifdbBase = 0;
|
||||
unsigned short citmUnq = 0;
|
||||
unsigned short csxoper = 0;
|
||||
unsigned short cisxoper = 0;
|
||||
unsigned short catm = 0;
|
||||
bool fAllAtoms;
|
||||
bool fSomeUnhashed;
|
||||
bool fUsed;
|
||||
bool fHasParent;
|
||||
bool fRangeGroup;
|
||||
bool fNumField;
|
||||
bool fTextEtcField;
|
||||
bool fnumMinMaxValid;
|
||||
bool fShortIitms;
|
||||
bool fNonDates;
|
||||
bool fDateInField;
|
||||
bool fServerBased;
|
||||
bool fCantGetUniqueItems;
|
||||
bool fCalculatedField;
|
||||
unsigned short ifdbParent;
|
||||
unsigned short ifdbBase;
|
||||
unsigned short citmUnq;
|
||||
unsigned short csxoper;
|
||||
unsigned short cisxoper;
|
||||
unsigned short catm;
|
||||
XLUnicodeString stFieldName;
|
||||
};
|
||||
|
||||
|
||||
@ -54,10 +54,5 @@ void SXFDBType::readFields(CFRecord& record)
|
||||
record >> wTypeSql;
|
||||
}
|
||||
|
||||
void SXFDBType::writeFields(CFRecord& record)
|
||||
{
|
||||
record << wTypeSql;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -47,11 +47,10 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXFDBType;
|
||||
|
||||
short wTypeSql = 0; //ODBCType enum
|
||||
short wTypeSql; //ODBCType enum
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -56,11 +56,5 @@ void SXFormula::readFields(CFRecord& record)
|
||||
record >> reserved >> ifdb;
|
||||
}
|
||||
|
||||
void SXFormula::writeFields(CFRecord& record)
|
||||
{
|
||||
record.reserveNunBytes(2);
|
||||
record << ifdb;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -47,11 +47,10 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void writeFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSXFormula;
|
||||
|
||||
short ifdb = 0;
|
||||
short ifdb;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -104,6 +104,7 @@ void SXLIItem::save(CFRecord& record)
|
||||
SETBIT(flags, 10, fBlock)
|
||||
SETBIT(flags, 11, fGrand)
|
||||
SETBIT(flags, 12, fMultiDataOnAxis)
|
||||
cSic = rgisxvi.size();
|
||||
if (fGrand)
|
||||
isxviMac = 1;
|
||||
record << cSic << itmType << isxviMac << flags;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user