Create Redact function

This commit is contained in:
Svetlana Kulikova
2025-07-30 15:31:40 +03:00
parent 1027f3cc6b
commit c1bb697725
11 changed files with 278 additions and 1 deletions

View File

@ -156,6 +156,7 @@ public:
PageClear = 9,
PageRotate = 10,
Headings = 11,
Redact = 12,
Undefined = 255
};

View File

@ -921,6 +921,7 @@ namespace NSOnlineOfficeBinToPdf
case ctPageClear:
case ctPageRotate:
case ctHeadings:
case ctRedact:
{
IAdvancedCommand::AdvancedCommandType eAdvancedCommandType = IAdvancedCommand::AdvancedCommandType::Undefined;
switch (eCommand)
@ -934,6 +935,7 @@ namespace NSOnlineOfficeBinToPdf
case ctPageClear: eAdvancedCommandType = IAdvancedCommand::AdvancedCommandType::PageClear; break;
case ctPageRotate: eAdvancedCommandType = IAdvancedCommand::AdvancedCommandType::PageRotate; break;
case ctHeadings: eAdvancedCommandType = IAdvancedCommand::AdvancedCommandType::Headings; break;
case ctRedact: eAdvancedCommandType = IAdvancedCommand::AdvancedCommandType::Redact; break;
default:
break;
}

View File

@ -185,6 +185,7 @@ namespace NSOnlineOfficeBinToPdf
ctShapeStart = 167,
ctShapeEnd = 168,
ctHeadings = 169,
ctRedact = 170,
ctPageWidth = 200,
ctPageHeight = 201,

View File

@ -63,6 +63,7 @@ namespace NSOnlineOfficeBinToPdf
case ctPageClear: return new CEmptyComand(IAdvancedCommand::AdvancedCommandType::PageClear);
case ctPageRotate: return Read_Command<CPageRotate> (this, pCorrector);
case ctHeadings: return Read_Command<CHeadings> (this, pCorrector);
case ctRedact: return Read_Command<CRedact> (this, pCorrector);
default: break;
}

View File

@ -628,4 +628,13 @@ private:
std::vector<CParent*> m_arrParents;
};
class GRAPHICS_DECL CRedact : public IAdvancedCommand
{
public:
CRedact();
virtual ~CRedact();
bool Read(NSOnlineOfficeBinToPdf::CBufferReader* pReader, IMetafileToRenderter* pCorrector);
};
#endif // _BUILD_ANNOTFIELD_H_

View File

@ -640,6 +640,7 @@ SOURCES += \
$$PDF_ROOT_DIR/SrcReader/Adaptors.cpp \
$$PDF_ROOT_DIR/SrcReader/GfxClip.cpp \
$$PDF_ROOT_DIR/SrcReader/PdfAnnot.cpp \
$$PDF_ROOT_DIR/SrcReader/RedactOutputDev.cpp \
$$PDF_ROOT_DIR/Resources/BaseFonts.cpp \
$$PDF_ROOT_DIR/Resources/CMapMemory/cmap_memory.cpp
@ -665,7 +666,8 @@ HEADERS +=\
$$PDF_ROOT_DIR/SrcReader/MemoryUtils.h \
$$PDF_ROOT_DIR/SrcReader/GfxClip.h \
$$PDF_ROOT_DIR/SrcReader/FontsWasm.h \
$$PDF_ROOT_DIR/SrcReader/PdfAnnot.h
$$PDF_ROOT_DIR/SrcReader/PdfAnnot.h \
$$PDF_ROOT_DIR/SrcReader/RedactOutputDev.h
DEFINES += CRYPTOPP_DISABLE_ASM
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lCryptoPPLib