diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fsdk_filewriteadapter.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/fsdk_filewriteadapter.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/fpdfsdk/fsdk_filewriteadapter.cpp b/fpdfsdk/fsdk_filewriteadapter.cpp index 98ca3af574..ff527a6f2e 100644 --- a/fpdfsdk/fsdk_filewriteadapter.cpp +++ b/fpdfsdk/fsdk_filewriteadapter.cpp @@ -16,3 +16,7 @@ FSDK_FileWriteAdapter::~FSDK_FileWriteAdapter() {} bool FSDK_FileWriteAdapter::WriteBlock(const void* data, size_t size) { return fileWriteStruct_->WriteBlock(fileWriteStruct_, data, size) != 0; } + +bool FSDK_FileWriteAdapter::WriteString(const CFX_ByteStringC& str) { + return WriteBlock(str.c_str(), str.GetLength()); +} diff --git a/fpdfsdk/fsdk_filewriteadapter.h b/fpdfsdk/fsdk_filewriteadapter.h index 78f34cc679..f2c3a534bf 100644 --- a/fpdfsdk/fsdk_filewriteadapter.h +++ b/fpdfsdk/fsdk_filewriteadapter.h @@ -17,6 +17,7 @@ class FSDK_FileWriteAdapter : public IFX_WriteStream { friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args); bool WriteBlock(const void* data, size_t size) override; + bool WriteString(const CFX_ByteStringC& str) override; private: explicit FSDK_FileWriteAdapter(FPDF_FILEWRITE* fileWriteStruct); |