diff options
author | Albert Astals Cid <aacid@kde.org> | 2022-04-07 13:49:33 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2022-04-07 13:53:35 +0200 |
commit | 5973e32c9366f000c48d4a4f939abf2699faf145 (patch) | |
tree | e488895b6dafad84fef0b9a9cc98b1100d0a7c4b | |
parent | fae5ec7071c928a6163924ecdc6719806710b975 (diff) |
PSOutputFunc -> FoFiOutputFunc
-rw-r--r-- | poppler/PSOutputDev.cc | 8 | ||||
-rw-r--r-- | poppler/PSOutputDev.h | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index 9db62299..b836ddc3 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -1181,8 +1181,8 @@ PSOutputDev::PSOutputDev(int fdA, PDFDoc *docA, char *psTitleA, const std::vecto init(outputToFile, f, fileTypeA, psTitleA, docA, pagesA, modeA, imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA, paperWidthA, paperHeightA, noCropA, duplexA, levelA); } -PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pagesA, PSOutMode modeA, int paperWidthA, int paperHeightA, bool noCropA, bool duplexA, int imgLLXA, int imgLLYA, - int imgURXA, int imgURYA, PSForceRasterize forceRasterizeA, bool manualCtrlA, PSOutCustomCodeCbk customCodeCbkA, void *customCodeCbkDataA, PSLevel levelA) +PSOutputDev::PSOutputDev(FoFiOutputFunc outputFuncA, void *outputStreamA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pagesA, PSOutMode modeA, int paperWidthA, int paperHeightA, bool noCropA, bool duplexA, int imgLLXA, + int imgLLYA, int imgURXA, int imgURYA, PSForceRasterize forceRasterizeA, bool manualCtrlA, PSOutCustomCodeCbk customCodeCbkA, void *customCodeCbkDataA, PSLevel levelA) { underlayCbk = nullptr; underlayCbkData = nullptr; @@ -1233,8 +1233,8 @@ static bool pageDimensionEqual(int a, int b) // Store the values but do not process them so the function that // created the PSOutputDev can use the various setters to change defaults. -void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA, PSFileType fileTypeA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pagesA, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, bool manualCtrlA, - int paperWidthA, int paperHeightA, bool noCropA, bool duplexA, PSLevel levelA) +void PSOutputDev::init(FoFiOutputFunc outputFuncA, void *outputStreamA, PSFileType fileTypeA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pagesA, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, + bool manualCtrlA, int paperWidthA, int paperHeightA, bool noCropA, bool duplexA, PSLevel levelA) { if (pagesA.empty()) { diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h index 2e6b1d63..76d72396 100644 --- a/poppler/PSOutputDev.h +++ b/poppler/PSOutputDev.h @@ -46,6 +46,7 @@ #include "GfxState.h" #include "GlobalParams.h" #include "OutputDev.h" +#include "fofi/FoFiBase.h" #include <set> #include <map> #include <vector> @@ -112,8 +113,6 @@ enum PSForceRasterize psNeverRasterize // never rasterize, may produce incorrect output }; -typedef void (*PSOutputFunc)(void *stream, const char *data, int len); - typedef GooString *(*PSOutCustomCodeCbk)(PSOutputDev *psOut, PSOutCustomCodeLocation loc, int n, void *data); class POPPLER_PRIVATE_EXPORT PSOutputDev : public OutputDev @@ -131,7 +130,7 @@ public: // Open a PSOutputDev that will write to a generic stream. // pages has to be sorted in increasing order - PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pages, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, bool noCrop = false, bool duplexA = true, + PSOutputDev(FoFiOutputFunc outputFuncA, void *outputStreamA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pages, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, bool noCrop = false, bool duplexA = true, int imgLLXA = 0, int imgLLYA = 0, int imgURXA = 0, int imgURYA = 0, PSForceRasterize forceRasterizeA = psRasterizeWhenNeeded, bool manualCtrlA = false, PSOutCustomCodeCbk customCodeCbkA = nullptr, void *customCodeCbkDataA = nullptr, PSLevel levelA = psLevel2); @@ -361,7 +360,7 @@ public: } private: - void init(PSOutputFunc outputFuncA, void *outputStreamA, PSFileType fileTypeA, char *psTitleA, PDFDoc *doc, const std::vector<int> &pages, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, bool manualCtrlA, + void init(FoFiOutputFunc outputFuncA, void *outputStreamA, PSFileType fileTypeA, char *psTitleA, PDFDoc *doc, const std::vector<int> &pages, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, bool manualCtrlA, int paperWidthA, int paperHeightA, bool noCropA, bool duplexA, PSLevel levelA); void postInit(); void setupResources(Dict *resDict); @@ -433,7 +432,7 @@ private: char *psTitle; bool postInitDone; // true if postInit() was called - PSOutputFunc outputFunc; + FoFiOutputFunc outputFunc; void *outputStream; PSFileType fileType; // file / pipe / stdout bool manualCtrl; |