Merge remote-tracking branch 'origin/release/v9.3.0' into develop

This commit is contained in:
Elena Subbotina
2025-12-11 11:20:42 +03:00
5 changed files with 35 additions and 9 deletions

View File

@ -60,6 +60,7 @@ 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);

View File

@ -737,11 +737,13 @@ CBooleanOperations::CBooleanOperations(const CGraphicsPath& path1,
const CGraphicsPath& path2,
BooleanOpType op,
long fillType,
bool isLuminosity) :
bool isLuminosity,
bool isSelf) :
Op(op),
Close1(path1.Is_poly_closed()),
Close2(path2.Is_poly_closed()),
IsLuminosity(isLuminosity),
IsSelf(isSelf),
FillType(fillType),
Path1(path1),
Path2(path2)
@ -784,10 +786,9 @@ 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()) && !self)
Path2.IsClockwise()) && !IsSelf)
reverse = true;
PreparePath(Path1, 1, Segments1, Curves1);
@ -798,7 +799,7 @@ void CBooleanOperations::TraceBoolean()
GetIntersection();
if (self)
if (IsSelf)
{
if (Op == Subtraction)
return;
@ -823,6 +824,11 @@ void CBooleanOperations::TraceBoolean()
CreateNewPath(adj_matr);
return;
}
else if (Path1 == Path2)
{
Result = std::move(Path1);
return;
}
if (!Locations.empty())
{
@ -2355,7 +2361,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);
CBooleanOperations operation(paths2[i], paths2[i], Intersection, fillType, isLuminosity, true);
CGraphicsPath p = std::move(operation.GetResult());
std::vector<CGraphicsPath> tmp_paths = p.GetSubPaths();
@ -2370,7 +2376,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);
CBooleanOperations operation(paths1[j], paths1[j], Intersection, fillType, isLuminosity, true);
CGraphicsPath p = std::move(operation.GetResult());
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]);
}
CBooleanOperations operation(paths1[j], paths2[i], op, fillType, isLuminosity);
CBooleanOperations operation(paths1[j], paths2[i], op, fillType, isLuminosity, false);
paths.push_back(operation.GetResult());
}

View File

@ -108,7 +108,7 @@ namespace Aggplus
{
public:
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();
CGraphicsPath&& GetResult();
bool IsSelfInters(const CGraphicsPath& p);
@ -166,6 +166,7 @@ namespace Aggplus
bool Close1 = true;
bool Close2 = true;
bool IsLuminosity = false;
bool IsSelf = false;
// c_nStroke, c_nWindingFillMode, c_nEvenOddFillMode
long FillType = c_nWindingFillMode;

View File

@ -1038,7 +1038,13 @@ std::wstring RtfShading::RenderToOOX(RenderParameter oRenderParameter)
{
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_chbgvert: sShading += L" w:val=\"thinVertStripe\""; break;
case st_chbgfdiag: sShading += L" w:val=\"thinReverseDiagStripe\""; break;

View File

@ -525,6 +525,7 @@ namespace NExtractTools
boost::unordered_map<int, std::vector<InputLimit>> m_mapInputLimits;
bool* m_bIsPDFA;
std::wstring* m_sConvertToOrigin;
std::wstring* m_sSigningKeyStorePath;
// output params
mutable bool m_bOutputConvertCorrupted;
mutable bool m_bMacro;
@ -561,6 +562,7 @@ namespace NExtractTools
m_bIsNoBase64 = NULL;
m_bIsPDFA = NULL;
m_sConvertToOrigin = NULL;
m_sSigningKeyStorePath = NULL;
m_bOutputConvertCorrupted = false;
m_bMacro = false;
@ -596,6 +598,7 @@ namespace NExtractTools
RELEASEOBJECT(m_bIsNoBase64);
RELEASEOBJECT(m_bIsPDFA);
RELEASEOBJECT(m_sConvertToOrigin);
RELEASEOBJECT(m_sSigningKeyStorePath);
}
bool FromXmlFile(const std::wstring& sFilename)
@ -794,6 +797,11 @@ namespace NExtractTools
RELEASEOBJECT(m_sConvertToOrigin);
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)
{
@ -882,6 +890,10 @@ namespace NExtractTools
{
return (NULL != m_sConvertToOrigin) ? (*m_sConvertToOrigin) : L"";
}
std::wstring getSigningKeyStorePath() const
{
return (NULL != m_sSigningKeyStorePath) ? (*m_sSigningKeyStorePath) : L"";
}
bool needConvertToOrigin(long nFormatFrom) const
{
COfficeFileFormatChecker FileFormatChecker;