From 3ecfc82667a5e4d02879dc0fd0735d569a29a730 Mon Sep 17 00:00:00 2001 From: Svetlana Kulikova Date: Wed, 13 Sep 2023 16:58:36 +0300 Subject: [PATCH] Fix IOfficeDrawingFile for CPdfReader --- PdfFile/PdfFile.cpp | 4 ++-- PdfFile/PdfReader.cpp | 3 +-- PdfFile/PdfReader.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/PdfFile/PdfFile.cpp b/PdfFile/PdfFile.cpp index 3501d500d0..d15539c32e 100644 --- a/PdfFile/PdfFile.cpp +++ b/PdfFile/PdfFile.cpp @@ -709,7 +709,7 @@ void CPdfFile::ToXml(const std::wstring& sFile, bool bSaveStreams) bool CPdfFile::LoadFromFile(const std::wstring& file, const std::wstring& options, const std::wstring& owner_password, const std::wstring& user_password) { - m_pInternal->pReader = new CPdfReader(m_pInternal->pAppFonts, this); + m_pInternal->pReader = new CPdfReader(m_pInternal->pAppFonts); if (!m_pInternal->pReader) return false; m_pInternal->wsSrcFile = file; @@ -720,7 +720,7 @@ bool CPdfFile::LoadFromFile(const std::wstring& file, const std::wstring& option } bool CPdfFile::LoadFromMemory(BYTE* data, DWORD length, const std::wstring& options, const std::wstring& owner_password, const std::wstring& user_password) { - m_pInternal->pReader = new CPdfReader(m_pInternal->pAppFonts, this); + m_pInternal->pReader = new CPdfReader(m_pInternal->pAppFonts); if (!m_pInternal->pReader) return false; m_pInternal->wsSrcFile = L""; diff --git a/PdfFile/PdfReader.cpp b/PdfFile/PdfReader.cpp index 8450634aa0..8c89f2a0ab 100644 --- a/PdfFile/PdfReader.cpp +++ b/PdfFile/PdfReader.cpp @@ -58,9 +58,8 @@ #include -CPdfReader::CPdfReader(NSFonts::IApplicationFonts* pAppFonts, IOfficeDrawingFile* pRenderer) +CPdfReader::CPdfReader(NSFonts::IApplicationFonts* pAppFonts) { - m_pRenderer = pRenderer; m_wsTempFolder = L""; m_pPDFDocument = NULL; m_nFileLength = 0; diff --git a/PdfFile/PdfReader.h b/PdfFile/PdfReader.h index ecb02355b4..c634b371ba 100644 --- a/PdfFile/PdfReader.h +++ b/PdfFile/PdfReader.h @@ -33,7 +33,6 @@ #define _PDF_READER_H #include "../../DesktopEditor/graphics/pro/Fonts.h" -#include "../../DesktopEditor/graphics/IRenderer.h" #include "../../DesktopEditor/graphics/pro/officedrawingfile.h" #include "../../DesktopEditor/xmlsec/src/include/Certificate.h" #include "SrcReader/RendererOutputDev.h" @@ -43,7 +42,7 @@ class CPdfReader { public: - CPdfReader(NSFonts::IApplicationFonts* pAppFonts, IOfficeDrawingFile* pRenderer); + CPdfReader(NSFonts::IApplicationFonts* pAppFonts); ~CPdfReader(); bool LoadFromFile (NSFonts::IApplicationFonts* pAppFonts, const std::wstring& file, const std::wstring& owner_password = L"", const std::wstring& user_password = L"");