mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
ctRedact change format
This commit is contained in:
@ -1227,6 +1227,7 @@ CRedact::CRedact() : IAdvancedCommand(AdvancedCommandType::Redact) {}
|
||||
CRedact::~CRedact() {}
|
||||
int CRedact::GetFlag() const { return m_nFlag; }
|
||||
const std::vector<double>& CRedact::GetQuadPoints() { return m_arrQuadPoints; }
|
||||
const std::vector<std::wstring>& CRedact::GetID() { return m_arrID; }
|
||||
BYTE* CRedact::GetRender(LONG& nLen)
|
||||
{
|
||||
nLen = m_nRenderLen;
|
||||
@ -1235,12 +1236,15 @@ BYTE* CRedact::GetRender(LONG& nLen)
|
||||
bool CRedact::Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector)
|
||||
{
|
||||
int n = pReader->ReadInt();
|
||||
m_arrQuadPoints.reserve(n);
|
||||
m_arrQuadPoints.reserve(n * 4);
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
for (int j = 0; j < 4; ++j)
|
||||
m_arrQuadPoints.push_back(pReader->ReadDouble());
|
||||
}
|
||||
m_arrID.reserve(n);
|
||||
for (int i = 0; i < n; ++i)
|
||||
m_arrID.push_back(pReader->ReadString());
|
||||
|
||||
m_nFlag = pReader->ReadInt();
|
||||
if (m_nFlag & (1 << 0))
|
||||
|
||||
@ -634,20 +634,27 @@ private:
|
||||
class GRAPHICS_DECL CRedact : public IAdvancedCommand
|
||||
{
|
||||
public:
|
||||
struct SRedact
|
||||
{
|
||||
std::wstring sID;
|
||||
std::vector<double> arrQuadPoints;
|
||||
int nFlag;
|
||||
LONG nRenderLen;
|
||||
BYTE* pRender;
|
||||
};
|
||||
|
||||
CRedact();
|
||||
virtual ~CRedact();
|
||||
|
||||
int GetFlag() const;
|
||||
const std::vector<double>& GetQuadPoints();
|
||||
const std::vector<std::wstring>& GetID();
|
||||
BYTE* GetRender(LONG& nLen);
|
||||
|
||||
bool Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector);
|
||||
|
||||
private:
|
||||
int m_nFlag;
|
||||
LONG m_nRenderLen;
|
||||
BYTE* m_pRender;
|
||||
std::vector<double> m_arrQuadPoints;
|
||||
std::vector<SRedact*> m_arrRedact;
|
||||
};
|
||||
|
||||
#endif // _BUILD_ANNOTFIELD_H_
|
||||
|
||||
Reference in New Issue
Block a user