mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Merge remote-tracking branch 'origin/release/v9.3.0' into develop
This commit is contained in:
@ -60,6 +60,7 @@ namespace NSSystemUtils
|
|||||||
static const wchar_t* gc_EnvModified = L"MODIFIED";
|
static const wchar_t* gc_EnvModified = L"MODIFIED";
|
||||||
static const wchar_t* gc_EnvMemoryLimit = L"X2T_MEMORY_LIMIT";
|
static const wchar_t* gc_EnvMemoryLimit = L"X2T_MEMORY_LIMIT";
|
||||||
static const wchar_t* gc_EnvMemoryLimitDefault = L"4GiB";
|
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::string GetEnvVariableA(const std::wstring& strName);
|
||||||
KERNEL_DECL std::wstring GetEnvVariable(const std::wstring& strName);
|
KERNEL_DECL std::wstring GetEnvVariable(const std::wstring& strName);
|
||||||
|
|||||||
@ -737,11 +737,13 @@ CBooleanOperations::CBooleanOperations(const CGraphicsPath& path1,
|
|||||||
const CGraphicsPath& path2,
|
const CGraphicsPath& path2,
|
||||||
BooleanOpType op,
|
BooleanOpType op,
|
||||||
long fillType,
|
long fillType,
|
||||||
bool isLuminosity) :
|
bool isLuminosity,
|
||||||
|
bool isSelf) :
|
||||||
Op(op),
|
Op(op),
|
||||||
Close1(path1.Is_poly_closed()),
|
Close1(path1.Is_poly_closed()),
|
||||||
Close2(path2.Is_poly_closed()),
|
Close2(path2.Is_poly_closed()),
|
||||||
IsLuminosity(isLuminosity),
|
IsLuminosity(isLuminosity),
|
||||||
|
IsSelf(isSelf),
|
||||||
FillType(fillType),
|
FillType(fillType),
|
||||||
Path1(path1),
|
Path1(path1),
|
||||||
Path2(path2)
|
Path2(path2)
|
||||||
@ -784,10 +786,9 @@ bool CBooleanOperations::IsSelfInters(const CGraphicsPath& p)
|
|||||||
void CBooleanOperations::TraceBoolean()
|
void CBooleanOperations::TraceBoolean()
|
||||||
{
|
{
|
||||||
bool reverse = false;
|
bool reverse = false;
|
||||||
bool self = Path1 == Path2;
|
|
||||||
if (((Op == Subtraction || Op == Exclusion) ^
|
if (((Op == Subtraction || Op == Exclusion) ^
|
||||||
Path1.IsClockwise() ^
|
Path1.IsClockwise() ^
|
||||||
Path2.IsClockwise()) && !self)
|
Path2.IsClockwise()) && !IsSelf)
|
||||||
reverse = true;
|
reverse = true;
|
||||||
|
|
||||||
PreparePath(Path1, 1, Segments1, Curves1);
|
PreparePath(Path1, 1, Segments1, Curves1);
|
||||||
@ -798,7 +799,7 @@ void CBooleanOperations::TraceBoolean()
|
|||||||
|
|
||||||
GetIntersection();
|
GetIntersection();
|
||||||
|
|
||||||
if (self)
|
if (IsSelf)
|
||||||
{
|
{
|
||||||
if (Op == Subtraction)
|
if (Op == Subtraction)
|
||||||
return;
|
return;
|
||||||
@ -823,6 +824,11 @@ void CBooleanOperations::TraceBoolean()
|
|||||||
CreateNewPath(adj_matr);
|
CreateNewPath(adj_matr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (Path1 == Path2)
|
||||||
|
{
|
||||||
|
Result = std::move(Path1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Locations.empty())
|
if (!Locations.empty())
|
||||||
{
|
{
|
||||||
@ -2355,7 +2361,7 @@ CGraphicsPath CalcBooleanOperation(const CGraphicsPath& path1,
|
|||||||
CBooleanOperations o;
|
CBooleanOperations o;
|
||||||
if (i > skip_end2 && o.IsSelfInters(paths2[i]))
|
if (i > skip_end2 && o.IsSelfInters(paths2[i]))
|
||||||
{
|
{
|
||||||
CBooleanOperations operation(paths2[i], paths2[i], Intersection, fillType, isLuminosity);
|
CBooleanOperations operation(paths2[i], paths2[i], Intersection, fillType, isLuminosity, true);
|
||||||
CGraphicsPath p = std::move(operation.GetResult());
|
CGraphicsPath p = std::move(operation.GetResult());
|
||||||
|
|
||||||
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
|
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
|
||||||
@ -2370,7 +2376,7 @@ CGraphicsPath CalcBooleanOperation(const CGraphicsPath& path1,
|
|||||||
CBooleanOperations o2;
|
CBooleanOperations o2;
|
||||||
if (j > skip_end1 && o2.IsSelfInters(paths1[j]))
|
if (j > skip_end1 && o2.IsSelfInters(paths1[j]))
|
||||||
{
|
{
|
||||||
CBooleanOperations operation(paths1[j], paths1[j], Intersection, fillType, isLuminosity);
|
CBooleanOperations operation(paths1[j], paths1[j], Intersection, fillType, isLuminosity, true);
|
||||||
CGraphicsPath p = std::move(operation.GetResult());
|
CGraphicsPath p = std::move(operation.GetResult());
|
||||||
|
|
||||||
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
|
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
|
||||||
@ -2380,7 +2386,7 @@ CGraphicsPath CalcBooleanOperation(const CGraphicsPath& path1,
|
|||||||
paths1.insert(paths1.begin() + i + k, tmp_paths[k]);
|
paths1.insert(paths1.begin() + i + k, tmp_paths[k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBooleanOperations operation(paths1[j], paths2[i], op, fillType, isLuminosity);
|
CBooleanOperations operation(paths1[j], paths2[i], op, fillType, isLuminosity, false);
|
||||||
paths.push_back(operation.GetResult());
|
paths.push_back(operation.GetResult());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ namespace Aggplus
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CBooleanOperations() {};
|
CBooleanOperations() {};
|
||||||
CBooleanOperations(const CGraphicsPath& path1, const CGraphicsPath& path2, BooleanOpType op, long fillType, bool isLuminosity);
|
CBooleanOperations(const CGraphicsPath& path1, const CGraphicsPath& path2, BooleanOpType op, long fillType, bool isLuminosity, bool isSelf);
|
||||||
~CBooleanOperations();
|
~CBooleanOperations();
|
||||||
CGraphicsPath&& GetResult();
|
CGraphicsPath&& GetResult();
|
||||||
bool IsSelfInters(const CGraphicsPath& p);
|
bool IsSelfInters(const CGraphicsPath& p);
|
||||||
@ -166,6 +166,7 @@ namespace Aggplus
|
|||||||
bool Close1 = true;
|
bool Close1 = true;
|
||||||
bool Close2 = true;
|
bool Close2 = true;
|
||||||
bool IsLuminosity = false;
|
bool IsLuminosity = false;
|
||||||
|
bool IsSelf = false;
|
||||||
|
|
||||||
// c_nStroke, c_nWindingFillMode, c_nEvenOddFillMode
|
// c_nStroke, c_nWindingFillMode, c_nEvenOddFillMode
|
||||||
long FillType = c_nWindingFillMode;
|
long FillType = c_nWindingFillMode;
|
||||||
|
|||||||
@ -1038,7 +1038,13 @@ std::wstring RtfShading::RenderToOOX(RenderParameter oRenderParameter)
|
|||||||
{
|
{
|
||||||
switch (m_eType)
|
switch (m_eType)
|
||||||
{
|
{
|
||||||
case st_clshdrawnil: sShading += L" w:val=\"nil\""; break;
|
case st_clshdrawnil:
|
||||||
|
{
|
||||||
|
if (PROP_DEF != m_nBackColor)
|
||||||
|
sShading += L" w:val=\"clear\"";
|
||||||
|
else
|
||||||
|
sShading += L" w:val=\"nil\"";
|
||||||
|
}break;
|
||||||
case st_chbghoriz: sShading += L" w:val=\"thinHorzStripehorzStripe\""; break;
|
case st_chbghoriz: sShading += L" w:val=\"thinHorzStripehorzStripe\""; break;
|
||||||
case st_chbgvert: sShading += L" w:val=\"thinVertStripe\""; break;
|
case st_chbgvert: sShading += L" w:val=\"thinVertStripe\""; break;
|
||||||
case st_chbgfdiag: sShading += L" w:val=\"thinReverseDiagStripe\""; break;
|
case st_chbgfdiag: sShading += L" w:val=\"thinReverseDiagStripe\""; break;
|
||||||
|
|||||||
@ -525,6 +525,7 @@ namespace NExtractTools
|
|||||||
boost::unordered_map<int, std::vector<InputLimit>> m_mapInputLimits;
|
boost::unordered_map<int, std::vector<InputLimit>> m_mapInputLimits;
|
||||||
bool* m_bIsPDFA;
|
bool* m_bIsPDFA;
|
||||||
std::wstring* m_sConvertToOrigin;
|
std::wstring* m_sConvertToOrigin;
|
||||||
|
std::wstring* m_sSigningKeyStorePath;
|
||||||
// output params
|
// output params
|
||||||
mutable bool m_bOutputConvertCorrupted;
|
mutable bool m_bOutputConvertCorrupted;
|
||||||
mutable bool m_bMacro;
|
mutable bool m_bMacro;
|
||||||
@ -561,6 +562,7 @@ namespace NExtractTools
|
|||||||
m_bIsNoBase64 = NULL;
|
m_bIsNoBase64 = NULL;
|
||||||
m_bIsPDFA = NULL;
|
m_bIsPDFA = NULL;
|
||||||
m_sConvertToOrigin = NULL;
|
m_sConvertToOrigin = NULL;
|
||||||
|
m_sSigningKeyStorePath = NULL;
|
||||||
|
|
||||||
m_bOutputConvertCorrupted = false;
|
m_bOutputConvertCorrupted = false;
|
||||||
m_bMacro = false;
|
m_bMacro = false;
|
||||||
@ -596,6 +598,7 @@ namespace NExtractTools
|
|||||||
RELEASEOBJECT(m_bIsNoBase64);
|
RELEASEOBJECT(m_bIsNoBase64);
|
||||||
RELEASEOBJECT(m_bIsPDFA);
|
RELEASEOBJECT(m_bIsPDFA);
|
||||||
RELEASEOBJECT(m_sConvertToOrigin);
|
RELEASEOBJECT(m_sConvertToOrigin);
|
||||||
|
RELEASEOBJECT(m_sSigningKeyStorePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FromXmlFile(const std::wstring& sFilename)
|
bool FromXmlFile(const std::wstring& sFilename)
|
||||||
@ -794,6 +797,11 @@ namespace NExtractTools
|
|||||||
RELEASEOBJECT(m_sConvertToOrigin);
|
RELEASEOBJECT(m_sConvertToOrigin);
|
||||||
m_sConvertToOrigin = new std::wstring(sValue);
|
m_sConvertToOrigin = new std::wstring(sValue);
|
||||||
}
|
}
|
||||||
|
else if (_T("m_sSigningKeyStorePath") == sName)
|
||||||
|
{
|
||||||
|
RELEASEOBJECT(m_sSigningKeyStorePath);
|
||||||
|
m_sSigningKeyStorePath = new std::wstring(sValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (_T("m_nCsvDelimiterChar") == sName)
|
else if (_T("m_nCsvDelimiterChar") == sName)
|
||||||
{
|
{
|
||||||
@ -882,6 +890,10 @@ namespace NExtractTools
|
|||||||
{
|
{
|
||||||
return (NULL != m_sConvertToOrigin) ? (*m_sConvertToOrigin) : L"";
|
return (NULL != m_sConvertToOrigin) ? (*m_sConvertToOrigin) : L"";
|
||||||
}
|
}
|
||||||
|
std::wstring getSigningKeyStorePath() const
|
||||||
|
{
|
||||||
|
return (NULL != m_sSigningKeyStorePath) ? (*m_sSigningKeyStorePath) : L"";
|
||||||
|
}
|
||||||
bool needConvertToOrigin(long nFormatFrom) const
|
bool needConvertToOrigin(long nFormatFrom) const
|
||||||
{
|
{
|
||||||
COfficeFileFormatChecker FileFormatChecker;
|
COfficeFileFormatChecker FileFormatChecker;
|
||||||
|
|||||||
Reference in New Issue
Block a user