Commit 44cbd3d4b477f855d46259f7fbc743c0b96c7678
1 parent
3444a5a5
do DLL_EXPORT only in header files and only at the class or top-level function level
git-svn-id: svn+q:///qpdf/trunk@796 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
52 changed files
with
24 additions
and
463 deletions
include/qpdf/Buffer.hh
| @@ -10,24 +10,17 @@ | @@ -10,24 +10,17 @@ | ||
| 10 | 10 | ||
| 11 | #include <qpdf/DLL.hh> | 11 | #include <qpdf/DLL.hh> |
| 12 | 12 | ||
| 13 | +DLL_EXPORT | ||
| 13 | class Buffer | 14 | class Buffer |
| 14 | { | 15 | { |
| 15 | public: | 16 | public: |
| 16 | - DLL_EXPORT | ||
| 17 | Buffer(); | 17 | Buffer(); |
| 18 | - DLL_EXPORT | ||
| 19 | Buffer(unsigned long size); | 18 | Buffer(unsigned long size); |
| 20 | - DLL_EXPORT | ||
| 21 | Buffer(Buffer const&); | 19 | Buffer(Buffer const&); |
| 22 | - DLL_EXPORT | ||
| 23 | Buffer& operator=(Buffer const&); | 20 | Buffer& operator=(Buffer const&); |
| 24 | - DLL_EXPORT | ||
| 25 | ~Buffer(); | 21 | ~Buffer(); |
| 26 | - DLL_EXPORT | ||
| 27 | unsigned long getSize() const; | 22 | unsigned long getSize() const; |
| 28 | - DLL_EXPORT | ||
| 29 | unsigned char const* getBuffer() const; | 23 | unsigned char const* getBuffer() const; |
| 30 | - DLL_EXPORT | ||
| 31 | unsigned char* getBuffer(); | 24 | unsigned char* getBuffer(); |
| 32 | 25 | ||
| 33 | private: | 26 | private: |
include/qpdf/Pipeline.hh
| @@ -33,21 +33,18 @@ | @@ -33,21 +33,18 @@ | ||
| 33 | #include <qpdf/DLL.hh> | 33 | #include <qpdf/DLL.hh> |
| 34 | #include <string> | 34 | #include <string> |
| 35 | 35 | ||
| 36 | +DLL_EXPORT | ||
| 36 | class Pipeline | 37 | class Pipeline |
| 37 | { | 38 | { |
| 38 | public: | 39 | public: |
| 39 | - DLL_EXPORT | ||
| 40 | Pipeline(char const* identifier, Pipeline* next); | 40 | Pipeline(char const* identifier, Pipeline* next); |
| 41 | 41 | ||
| 42 | - DLL_EXPORT | ||
| 43 | virtual ~Pipeline(); | 42 | virtual ~Pipeline(); |
| 44 | 43 | ||
| 45 | // Subclasses should implement write and finish to do their jobs | 44 | // Subclasses should implement write and finish to do their jobs |
| 46 | // and then, if they are not end-of-line pipelines, call | 45 | // and then, if they are not end-of-line pipelines, call |
| 47 | // getNext()->write or getNext()->finish. | 46 | // getNext()->write or getNext()->finish. |
| 48 | - DLL_EXPORT | ||
| 49 | virtual void write(unsigned char* data, int len) = 0; | 47 | virtual void write(unsigned char* data, int len) = 0; |
| 50 | - DLL_EXPORT | ||
| 51 | virtual void finish() = 0; | 48 | virtual void finish() = 0; |
| 52 | 49 | ||
| 53 | protected: | 50 | protected: |
include/qpdf/Pl_Buffer.hh
| @@ -24,22 +24,18 @@ | @@ -24,22 +24,18 @@ | ||
| 24 | #include <qpdf/Buffer.hh> | 24 | #include <qpdf/Buffer.hh> |
| 25 | #include <list> | 25 | #include <list> |
| 26 | 26 | ||
| 27 | +DLL_EXPORT | ||
| 27 | class Pl_Buffer: public Pipeline | 28 | class Pl_Buffer: public Pipeline |
| 28 | { | 29 | { |
| 29 | public: | 30 | public: |
| 30 | - DLL_EXPORT | ||
| 31 | Pl_Buffer(char const* identifier, Pipeline* next = 0); | 31 | Pl_Buffer(char const* identifier, Pipeline* next = 0); |
| 32 | - DLL_EXPORT | ||
| 33 | virtual ~Pl_Buffer(); | 32 | virtual ~Pl_Buffer(); |
| 34 | - DLL_EXPORT | ||
| 35 | virtual void write(unsigned char*, int); | 33 | virtual void write(unsigned char*, int); |
| 36 | - DLL_EXPORT | ||
| 37 | virtual void finish(); | 34 | virtual void finish(); |
| 38 | 35 | ||
| 39 | // Each call to getBuffer() resets this object -- see notes above. | 36 | // Each call to getBuffer() resets this object -- see notes above. |
| 40 | // The caller is responsible for deleting the returned Buffer | 37 | // The caller is responsible for deleting the returned Buffer |
| 41 | // object. | 38 | // object. |
| 42 | - DLL_EXPORT | ||
| 43 | Buffer* getBuffer(); | 39 | Buffer* getBuffer(); |
| 44 | 40 | ||
| 45 | private: | 41 | private: |
include/qpdf/Pl_Count.hh
| @@ -13,23 +13,18 @@ | @@ -13,23 +13,18 @@ | ||
| 13 | 13 | ||
| 14 | #include <qpdf/Pipeline.hh> | 14 | #include <qpdf/Pipeline.hh> |
| 15 | 15 | ||
| 16 | +DLL_EXPORT | ||
| 16 | class Pl_Count: public Pipeline | 17 | class Pl_Count: public Pipeline |
| 17 | { | 18 | { |
| 18 | public: | 19 | public: |
| 19 | - DLL_EXPORT | ||
| 20 | Pl_Count(char const* identifier, Pipeline* next); | 20 | Pl_Count(char const* identifier, Pipeline* next); |
| 21 | - DLL_EXPORT | ||
| 22 | virtual ~Pl_Count(); | 21 | virtual ~Pl_Count(); |
| 23 | - DLL_EXPORT | ||
| 24 | virtual void write(unsigned char*, int); | 22 | virtual void write(unsigned char*, int); |
| 25 | - DLL_EXPORT | ||
| 26 | virtual void finish(); | 23 | virtual void finish(); |
| 27 | // Returns the number of bytes written | 24 | // Returns the number of bytes written |
| 28 | - DLL_EXPORT | ||
| 29 | int getCount() const; | 25 | int getCount() const; |
| 30 | // Returns the last character written, or '\0' if no characters | 26 | // Returns the last character written, or '\0' if no characters |
| 31 | // have been written (in which case getCount() returns 0) | 27 | // have been written (in which case getCount() returns 0) |
| 32 | - DLL_EXPORT | ||
| 33 | unsigned char getLastChar() const; | 28 | unsigned char getLastChar() const; |
| 34 | 29 | ||
| 35 | private: | 30 | private: |
include/qpdf/Pl_Discard.hh
| @@ -16,16 +16,13 @@ | @@ -16,16 +16,13 @@ | ||
| 16 | 16 | ||
| 17 | #include <qpdf/Pipeline.hh> | 17 | #include <qpdf/Pipeline.hh> |
| 18 | 18 | ||
| 19 | +DLL_EXPORT | ||
| 19 | class Pl_Discard: public Pipeline | 20 | class Pl_Discard: public Pipeline |
| 20 | { | 21 | { |
| 21 | public: | 22 | public: |
| 22 | - DLL_EXPORT | ||
| 23 | Pl_Discard(); | 23 | Pl_Discard(); |
| 24 | - DLL_EXPORT | ||
| 25 | virtual ~Pl_Discard(); | 24 | virtual ~Pl_Discard(); |
| 26 | - DLL_EXPORT | ||
| 27 | virtual void write(unsigned char*, int); | 25 | virtual void write(unsigned char*, int); |
| 28 | - DLL_EXPORT | ||
| 29 | virtual void finish(); | 26 | virtual void finish(); |
| 30 | }; | 27 | }; |
| 31 | 28 |
include/qpdf/Pl_Flate.hh
| @@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
| 12 | 12 | ||
| 13 | #include <zlib.h> | 13 | #include <zlib.h> |
| 14 | 14 | ||
| 15 | +DLL_EXPORT | ||
| 15 | class Pl_Flate: public Pipeline | 16 | class Pl_Flate: public Pipeline |
| 16 | { | 17 | { |
| 17 | public: | 18 | public: |
| @@ -19,15 +20,11 @@ class Pl_Flate: public Pipeline | @@ -19,15 +20,11 @@ class Pl_Flate: public Pipeline | ||
| 19 | 20 | ||
| 20 | enum action_e { a_inflate, a_deflate }; | 21 | enum action_e { a_inflate, a_deflate }; |
| 21 | 22 | ||
| 22 | - DLL_EXPORT | ||
| 23 | Pl_Flate(char const* identifier, Pipeline* next, | 23 | Pl_Flate(char const* identifier, Pipeline* next, |
| 24 | action_e action, int out_bufsize = def_bufsize); | 24 | action_e action, int out_bufsize = def_bufsize); |
| 25 | - DLL_EXPORT | ||
| 26 | virtual ~Pl_Flate(); | 25 | virtual ~Pl_Flate(); |
| 27 | 26 | ||
| 28 | - DLL_EXPORT | ||
| 29 | virtual void write(unsigned char* data, int len); | 27 | virtual void write(unsigned char* data, int len); |
| 30 | - DLL_EXPORT | ||
| 31 | virtual void finish(); | 28 | virtual void finish(); |
| 32 | 29 | ||
| 33 | private: | 30 | private: |
include/qpdf/Pl_StdioFile.hh
| @@ -18,19 +18,16 @@ | @@ -18,19 +18,16 @@ | ||
| 18 | // This pipeline is reusable. | 18 | // This pipeline is reusable. |
| 19 | // | 19 | // |
| 20 | 20 | ||
| 21 | +DLL_EXPORT | ||
| 21 | class Pl_StdioFile: public Pipeline | 22 | class Pl_StdioFile: public Pipeline |
| 22 | { | 23 | { |
| 23 | public: | 24 | public: |
| 24 | // f is externally maintained; this class just writes to and | 25 | // f is externally maintained; this class just writes to and |
| 25 | // flushes it. It does not close it. | 26 | // flushes it. It does not close it. |
| 26 | - DLL_EXPORT | ||
| 27 | Pl_StdioFile(char const* identifier, FILE* f); | 27 | Pl_StdioFile(char const* identifier, FILE* f); |
| 28 | - DLL_EXPORT | ||
| 29 | virtual ~Pl_StdioFile(); | 28 | virtual ~Pl_StdioFile(); |
| 30 | 29 | ||
| 31 | - DLL_EXPORT | ||
| 32 | virtual void write(unsigned char* buf, int len); | 30 | virtual void write(unsigned char* buf, int len); |
| 33 | - DLL_EXPORT | ||
| 34 | virtual void finish(); | 31 | virtual void finish(); |
| 35 | 32 | ||
| 36 | private: | 33 | private: |
include/qpdf/QPDF.hh
| @@ -25,12 +25,11 @@ class BitStream; | @@ -25,12 +25,11 @@ class BitStream; | ||
| 25 | class BitWriter; | 25 | class BitWriter; |
| 26 | class QPDFExc; | 26 | class QPDFExc; |
| 27 | 27 | ||
| 28 | +DLL_EXPORT | ||
| 28 | class QPDF | 29 | class QPDF |
| 29 | { | 30 | { |
| 30 | public: | 31 | public: |
| 31 | - DLL_EXPORT | ||
| 32 | QPDF(); | 32 | QPDF(); |
| 33 | - DLL_EXPORT | ||
| 34 | ~QPDF(); | 33 | ~QPDF(); |
| 35 | 34 | ||
| 36 | // Associate a file with a QPDF object and do initial parsing of | 35 | // Associate a file with a QPDF object and do initial parsing of |
| @@ -43,7 +42,6 @@ class QPDF | @@ -43,7 +42,6 @@ class QPDF | ||
| 43 | // encrypted,either a null password or an empty password can be | 42 | // encrypted,either a null password or an empty password can be |
| 44 | // used. If the file is encrypted, either the user password or | 43 | // used. If the file is encrypted, either the user password or |
| 45 | // the owner password may be supplied. | 44 | // the owner password may be supplied. |
| 46 | - DLL_EXPORT | ||
| 47 | void processFile(char const* filename, char const* password = 0); | 45 | void processFile(char const* filename, char const* password = 0); |
| 48 | 46 | ||
| 49 | // Parameter settings | 47 | // Parameter settings |
| @@ -52,21 +50,18 @@ class QPDF | @@ -52,21 +50,18 @@ class QPDF | ||
| 52 | // (one that contains both cross-reference streams and | 50 | // (one that contains both cross-reference streams and |
| 53 | // cross-reference tables). This can be useful for testing to | 51 | // cross-reference tables). This can be useful for testing to |
| 54 | // ensure that a hybrid file would work with an older reader. | 52 | // ensure that a hybrid file would work with an older reader. |
| 55 | - DLL_EXPORT | ||
| 56 | void setIgnoreXRefStreams(bool); | 53 | void setIgnoreXRefStreams(bool); |
| 57 | 54 | ||
| 58 | // By default, any warnings are issued to stderr as they are | 55 | // By default, any warnings are issued to stderr as they are |
| 59 | // encountered. If this is called with a true value, reporting of | 56 | // encountered. If this is called with a true value, reporting of |
| 60 | // warnings is suppressed. You may still retrieve warnings by | 57 | // warnings is suppressed. You may still retrieve warnings by |
| 61 | // calling getWarnings. | 58 | // calling getWarnings. |
| 62 | - DLL_EXPORT | ||
| 63 | void setSuppressWarnings(bool); | 59 | void setSuppressWarnings(bool); |
| 64 | 60 | ||
| 65 | // By default, QPDF will try to recover if it finds certain types | 61 | // By default, QPDF will try to recover if it finds certain types |
| 66 | // of errors in PDF files. If turned off, it will throw an | 62 | // of errors in PDF files. If turned off, it will throw an |
| 67 | // exception on the first such problem it finds without attempting | 63 | // exception on the first such problem it finds without attempting |
| 68 | // recovery. | 64 | // recovery. |
| 69 | - DLL_EXPORT | ||
| 70 | void setAttemptRecovery(bool); | 65 | void setAttemptRecovery(bool); |
| 71 | 66 | ||
| 72 | // Other public methods | 67 | // Other public methods |
| @@ -76,26 +71,19 @@ class QPDF | @@ -76,26 +71,19 @@ class QPDF | ||
| 76 | // throws an exception. Note that if setSuppressWarnings was not | 71 | // throws an exception. Note that if setSuppressWarnings was not |
| 77 | // called or was called with a false value, any warnings retrieved | 72 | // called or was called with a false value, any warnings retrieved |
| 78 | // here will have already been issued to stderr. | 73 | // here will have already been issued to stderr. |
| 79 | - DLL_EXPORT | ||
| 80 | std::vector<std::string> getWarnings(); | 74 | std::vector<std::string> getWarnings(); |
| 81 | 75 | ||
| 82 | - DLL_EXPORT | ||
| 83 | std::string getFilename() const; | 76 | std::string getFilename() const; |
| 84 | - DLL_EXPORT | ||
| 85 | std::string getPDFVersion() const; | 77 | std::string getPDFVersion() const; |
| 86 | - DLL_EXPORT | ||
| 87 | QPDFObjectHandle getTrailer(); | 78 | QPDFObjectHandle getTrailer(); |
| 88 | - DLL_EXPORT | ||
| 89 | QPDFObjectHandle getRoot(); | 79 | QPDFObjectHandle getRoot(); |
| 90 | 80 | ||
| 91 | // Install this object handle as an indirect object and return an | 81 | // Install this object handle as an indirect object and return an |
| 92 | // indirect reference to it. | 82 | // indirect reference to it. |
| 93 | - DLL_EXPORT | ||
| 94 | QPDFObjectHandle makeIndirectObject(QPDFObjectHandle); | 83 | QPDFObjectHandle makeIndirectObject(QPDFObjectHandle); |
| 95 | 84 | ||
| 96 | // Retrieve an object by object ID and generation. Returns an | 85 | // Retrieve an object by object ID and generation. Returns an |
| 97 | // indirect reference to it. | 86 | // indirect reference to it. |
| 98 | - DLL_EXPORT | ||
| 99 | QPDFObjectHandle getObjectByID(int objid, int generation); | 87 | QPDFObjectHandle getObjectByID(int objid, int generation); |
| 100 | 88 | ||
| 101 | // Encryption support | 89 | // Encryption support |
| @@ -125,45 +113,30 @@ class QPDF | @@ -125,45 +113,30 @@ class QPDF | ||
| 125 | std::string id1; | 113 | std::string id1; |
| 126 | }; | 114 | }; |
| 127 | 115 | ||
| 128 | - DLL_EXPORT | ||
| 129 | bool isEncrypted() const; | 116 | bool isEncrypted() const; |
| 130 | 117 | ||
| 131 | - DLL_EXPORT | ||
| 132 | bool isEncrypted(int& R, int& P); | 118 | bool isEncrypted(int& R, int& P); |
| 133 | 119 | ||
| 134 | // Encryption permissions -- not enforced by QPDF | 120 | // Encryption permissions -- not enforced by QPDF |
| 135 | - DLL_EXPORT | ||
| 136 | bool allowAccessibility(); | 121 | bool allowAccessibility(); |
| 137 | - DLL_EXPORT | ||
| 138 | bool allowExtractAll(); | 122 | bool allowExtractAll(); |
| 139 | - DLL_EXPORT | ||
| 140 | bool allowPrintLowRes(); | 123 | bool allowPrintLowRes(); |
| 141 | - DLL_EXPORT | ||
| 142 | bool allowPrintHighRes(); | 124 | bool allowPrintHighRes(); |
| 143 | - DLL_EXPORT | ||
| 144 | bool allowModifyAssembly(); | 125 | bool allowModifyAssembly(); |
| 145 | - DLL_EXPORT | ||
| 146 | bool allowModifyForm(); | 126 | bool allowModifyForm(); |
| 147 | - DLL_EXPORT | ||
| 148 | bool allowModifyAnnotation(); | 127 | bool allowModifyAnnotation(); |
| 149 | - DLL_EXPORT | ||
| 150 | bool allowModifyOther(); | 128 | bool allowModifyOther(); |
| 151 | - DLL_EXPORT | ||
| 152 | bool allowModifyAll(); | 129 | bool allowModifyAll(); |
| 153 | 130 | ||
| 154 | // Helper function to trim padding from user password. Calling | 131 | // Helper function to trim padding from user password. Calling |
| 155 | // trim_user_password on the result of getPaddedUserPassword gives | 132 | // trim_user_password on the result of getPaddedUserPassword gives |
| 156 | // getTrimmedUserPassword's result. | 133 | // getTrimmedUserPassword's result. |
| 157 | - DLL_EXPORT | ||
| 158 | static void trim_user_password(std::string& user_password); | 134 | static void trim_user_password(std::string& user_password); |
| 159 | - DLL_EXPORT | ||
| 160 | static std::string compute_data_key( | 135 | static std::string compute_data_key( |
| 161 | std::string const& encryption_key, int objid, int generation); | 136 | std::string const& encryption_key, int objid, int generation); |
| 162 | - DLL_EXPORT | ||
| 163 | static std::string compute_encryption_key( | 137 | static std::string compute_encryption_key( |
| 164 | std::string const& password, EncryptionData const& data); | 138 | std::string const& password, EncryptionData const& data); |
| 165 | 139 | ||
| 166 | - DLL_EXPORT | ||
| 167 | static void compute_encryption_O_U( | 140 | static void compute_encryption_O_U( |
| 168 | char const* user_password, char const* owner_password, | 141 | char const* user_password, char const* owner_password, |
| 169 | int V, int R, int key_len, int P, | 142 | int V, int R, int key_len, int P, |
| @@ -172,23 +145,19 @@ class QPDF | @@ -172,23 +145,19 @@ class QPDF | ||
| 172 | // Return the full user password as stored in the PDF file. If | 145 | // Return the full user password as stored in the PDF file. If |
| 173 | // you are attempting to recover the user password in a | 146 | // you are attempting to recover the user password in a |
| 174 | // user-presentable form, call getTrimmedUserPassword() instead. | 147 | // user-presentable form, call getTrimmedUserPassword() instead. |
| 175 | - DLL_EXPORT | ||
| 176 | std::string const& getPaddedUserPassword() const; | 148 | std::string const& getPaddedUserPassword() const; |
| 177 | // Return human-readable form of user password. | 149 | // Return human-readable form of user password. |
| 178 | - DLL_EXPORT | ||
| 179 | std::string getTrimmedUserPassword() const; | 150 | std::string getTrimmedUserPassword() const; |
| 180 | 151 | ||
| 181 | // Linearization support | 152 | // Linearization support |
| 182 | 153 | ||
| 183 | // Returns true iff the file starts with a linearization parameter | 154 | // Returns true iff the file starts with a linearization parameter |
| 184 | // dictionary. Does no additional validation. | 155 | // dictionary. Does no additional validation. |
| 185 | - DLL_EXPORT | ||
| 186 | bool isLinearized(); | 156 | bool isLinearized(); |
| 187 | 157 | ||
| 188 | // Performs various sanity checks on a linearized file. Return | 158 | // Performs various sanity checks on a linearized file. Return |
| 189 | // true if no errors or warnings. Otherwise, return false and | 159 | // true if no errors or warnings. Otherwise, return false and |
| 190 | // output errors and warnings to stdout. | 160 | // output errors and warnings to stdout. |
| 191 | - DLL_EXPORT | ||
| 192 | bool checkLinearization(); | 161 | bool checkLinearization(); |
| 193 | 162 | ||
| 194 | // Calls checkLinearization() and, if possible, prints normalized | 163 | // Calls checkLinearization() and, if possible, prints normalized |
| @@ -196,11 +165,9 @@ class QPDF | @@ -196,11 +165,9 @@ class QPDF | ||
| 196 | // includes adding min values to delta values and adjusting | 165 | // includes adding min values to delta values and adjusting |
| 197 | // offsets based on the location and size of the primary hint | 166 | // offsets based on the location and size of the primary hint |
| 198 | // stream. | 167 | // stream. |
| 199 | - DLL_EXPORT | ||
| 200 | void showLinearizationData(); | 168 | void showLinearizationData(); |
| 201 | 169 | ||
| 202 | // Shows the contents of the cross-reference table | 170 | // Shows the contents of the cross-reference table |
| 203 | - DLL_EXPORT | ||
| 204 | void showXRefTable(); | 171 | void showXRefTable(); |
| 205 | 172 | ||
| 206 | // Optimization support -- see doc/optimization. Implemented in | 173 | // Optimization support -- see doc/optimization. Implemented in |
| @@ -214,31 +181,26 @@ class QPDF | @@ -214,31 +181,26 @@ class QPDF | ||
| 214 | // This is available so that the test suite can make sure that a | 181 | // This is available so that the test suite can make sure that a |
| 215 | // linearized file is already optimized. When called in this way, | 182 | // linearized file is already optimized. When called in this way, |
| 216 | // optimize() still populates the object <-> user maps | 183 | // optimize() still populates the object <-> user maps |
| 217 | - DLL_EXPORT | ||
| 218 | void optimize(std::map<int, int> const& object_stream_data, | 184 | void optimize(std::map<int, int> const& object_stream_data, |
| 219 | bool allow_changes = true); | 185 | bool allow_changes = true); |
| 220 | 186 | ||
| 221 | // Replace all references to indirect objects that are "scalars" | 187 | // Replace all references to indirect objects that are "scalars" |
| 222 | // (i.e., things that don't have children: not arrays, streams, or | 188 | // (i.e., things that don't have children: not arrays, streams, or |
| 223 | // dictionaries) with direct objects. | 189 | // dictionaries) with direct objects. |
| 224 | - DLL_EXPORT | ||
| 225 | void flattenScalarReferences(); | 190 | void flattenScalarReferences(); |
| 226 | 191 | ||
| 227 | // Decode all streams, discarding the output. Used to check | 192 | // Decode all streams, discarding the output. Used to check |
| 228 | // correctness of stream encoding. | 193 | // correctness of stream encoding. |
| 229 | - DLL_EXPORT | ||
| 230 | void decodeStreams(); | 194 | void decodeStreams(); |
| 231 | 195 | ||
| 232 | // For QPDFWriter: | 196 | // For QPDFWriter: |
| 233 | 197 | ||
| 234 | // Remove /ID, /Encrypt, and /Prev keys from the trailer | 198 | // Remove /ID, /Encrypt, and /Prev keys from the trailer |
| 235 | // dictionary since these are regenerated during write. | 199 | // dictionary since these are regenerated during write. |
| 236 | - DLL_EXPORT | ||
| 237 | void trimTrailerForWrite(); | 200 | void trimTrailerForWrite(); |
| 238 | 201 | ||
| 239 | // Get lists of all objects in order according to the part of a | 202 | // Get lists of all objects in order according to the part of a |
| 240 | // linearized file that they belong to. | 203 | // linearized file that they belong to. |
| 241 | - DLL_EXPORT | ||
| 242 | void getLinearizedParts( | 204 | void getLinearizedParts( |
| 243 | std::map<int, int> const& object_stream_data, | 205 | std::map<int, int> const& object_stream_data, |
| 244 | std::vector<QPDFObjectHandle>& part4, | 206 | std::vector<QPDFObjectHandle>& part4, |
| @@ -247,7 +209,6 @@ class QPDF | @@ -247,7 +209,6 @@ class QPDF | ||
| 247 | std::vector<QPDFObjectHandle>& part8, | 209 | std::vector<QPDFObjectHandle>& part8, |
| 248 | std::vector<QPDFObjectHandle>& part9); | 210 | std::vector<QPDFObjectHandle>& part9); |
| 249 | 211 | ||
| 250 | - DLL_EXPORT | ||
| 251 | void generateHintStream(std::map<int, QPDFXRefEntry> const& xref, | 212 | void generateHintStream(std::map<int, QPDFXRefEntry> const& xref, |
| 252 | std::map<int, size_t> const& lengths, | 213 | std::map<int, size_t> const& lengths, |
| 253 | std::map<int, int> const& obj_renumber, | 214 | std::map<int, int> const& obj_renumber, |
| @@ -255,18 +216,15 @@ class QPDF | @@ -255,18 +216,15 @@ class QPDF | ||
| 255 | int& S, int& O); | 216 | int& S, int& O); |
| 256 | 217 | ||
| 257 | // Map object to object stream that contains it | 218 | // Map object to object stream that contains it |
| 258 | - DLL_EXPORT | ||
| 259 | void getObjectStreamData(std::map<int, int>&); | 219 | void getObjectStreamData(std::map<int, int>&); |
| 260 | // Get a list of objects that would be permitted in an object | 220 | // Get a list of objects that would be permitted in an object |
| 261 | // stream | 221 | // stream |
| 262 | - DLL_EXPORT | ||
| 263 | std::vector<int> getCompressibleObjects(); | 222 | std::vector<int> getCompressibleObjects(); |
| 264 | 223 | ||
| 265 | // Convenience routines for common functions. See also | 224 | // Convenience routines for common functions. See also |
| 266 | // QPDFObjectHandle.hh for additional convenience routines. | 225 | // QPDFObjectHandle.hh for additional convenience routines. |
| 267 | 226 | ||
| 268 | // Traverse page tree return all /Page objects. | 227 | // Traverse page tree return all /Page objects. |
| 269 | - DLL_EXPORT | ||
| 270 | std::vector<QPDFObjectHandle> const& getAllPages(); | 228 | std::vector<QPDFObjectHandle> const& getAllPages(); |
| 271 | 229 | ||
| 272 | // Resolver class is restricted to QPDFObjectHandle so that only | 230 | // Resolver class is restricted to QPDFObjectHandle so that only |
include/qpdf/QPDFExc.hh
| @@ -11,15 +11,13 @@ | @@ -11,15 +11,13 @@ | ||
| 11 | #include <qpdf/DLL.hh> | 11 | #include <qpdf/DLL.hh> |
| 12 | #include <stdexcept> | 12 | #include <stdexcept> |
| 13 | 13 | ||
| 14 | +DLL_EXPORT | ||
| 14 | class QPDFExc: public std::runtime_error | 15 | class QPDFExc: public std::runtime_error |
| 15 | { | 16 | { |
| 16 | public: | 17 | public: |
| 17 | - DLL_EXPORT | ||
| 18 | QPDFExc(std::string const& message); | 18 | QPDFExc(std::string const& message); |
| 19 | - DLL_EXPORT | ||
| 20 | QPDFExc(std::string const& filename, int offset, | 19 | QPDFExc(std::string const& filename, int offset, |
| 21 | std::string const& message); | 20 | std::string const& message); |
| 22 | - DLL_EXPORT | ||
| 23 | virtual ~QPDFExc() throw (); | 21 | virtual ~QPDFExc() throw (); |
| 24 | }; | 22 | }; |
| 25 | 23 |
include/qpdf/QPDFObject.hh
| @@ -12,11 +12,11 @@ | @@ -12,11 +12,11 @@ | ||
| 12 | 12 | ||
| 13 | #include <string> | 13 | #include <string> |
| 14 | 14 | ||
| 15 | +DLL_EXPORT | ||
| 15 | class QPDFObject | 16 | class QPDFObject |
| 16 | { | 17 | { |
| 17 | public: | 18 | public: |
| 18 | virtual ~QPDFObject() {} | 19 | virtual ~QPDFObject() {} |
| 19 | - DLL_EXPORT | ||
| 20 | virtual std::string unparse() = 0; | 20 | virtual std::string unparse() = 0; |
| 21 | }; | 21 | }; |
| 22 | 22 |
include/qpdf/QPDFObjectHandle.hh
| @@ -23,61 +23,41 @@ | @@ -23,61 +23,41 @@ | ||
| 23 | class Pipeline; | 23 | class Pipeline; |
| 24 | class QPDF; | 24 | class QPDF; |
| 25 | 25 | ||
| 26 | +DLL_EXPORT | ||
| 26 | class QPDFObjectHandle | 27 | class QPDFObjectHandle |
| 27 | { | 28 | { |
| 28 | public: | 29 | public: |
| 29 | - DLL_EXPORT | ||
| 30 | QPDFObjectHandle(); | 30 | QPDFObjectHandle(); |
| 31 | - DLL_EXPORT | ||
| 32 | bool isInitialized() const; | 31 | bool isInitialized() const; |
| 33 | 32 | ||
| 34 | // Exactly one of these will return true for any object. | 33 | // Exactly one of these will return true for any object. |
| 35 | - DLL_EXPORT | ||
| 36 | bool isBool(); | 34 | bool isBool(); |
| 37 | - DLL_EXPORT | ||
| 38 | bool isNull(); | 35 | bool isNull(); |
| 39 | - DLL_EXPORT | ||
| 40 | bool isInteger(); | 36 | bool isInteger(); |
| 41 | - DLL_EXPORT | ||
| 42 | bool isReal(); | 37 | bool isReal(); |
| 43 | - DLL_EXPORT | ||
| 44 | bool isName(); | 38 | bool isName(); |
| 45 | - DLL_EXPORT | ||
| 46 | bool isString(); | 39 | bool isString(); |
| 47 | - DLL_EXPORT | ||
| 48 | bool isArray(); | 40 | bool isArray(); |
| 49 | - DLL_EXPORT | ||
| 50 | bool isDictionary(); | 41 | bool isDictionary(); |
| 51 | - DLL_EXPORT | ||
| 52 | bool isStream(); | 42 | bool isStream(); |
| 53 | 43 | ||
| 54 | // This returns true in addition to the query for the specific | 44 | // This returns true in addition to the query for the specific |
| 55 | // type for indirect objects. | 45 | // type for indirect objects. |
| 56 | - DLL_EXPORT | ||
| 57 | bool isIndirect(); | 46 | bool isIndirect(); |
| 58 | 47 | ||
| 59 | // True for everything except array, dictionary, and stream | 48 | // True for everything except array, dictionary, and stream |
| 60 | - DLL_EXPORT | ||
| 61 | bool isScalar(); | 49 | bool isScalar(); |
| 62 | 50 | ||
| 63 | // Public factory methods | 51 | // Public factory methods |
| 64 | 52 | ||
| 65 | - DLL_EXPORT | ||
| 66 | static QPDFObjectHandle newNull(); | 53 | static QPDFObjectHandle newNull(); |
| 67 | - DLL_EXPORT | ||
| 68 | static QPDFObjectHandle newBool(bool value); | 54 | static QPDFObjectHandle newBool(bool value); |
| 69 | - DLL_EXPORT | ||
| 70 | static QPDFObjectHandle newInteger(int value); | 55 | static QPDFObjectHandle newInteger(int value); |
| 71 | - DLL_EXPORT | ||
| 72 | static QPDFObjectHandle newReal(std::string const& value); | 56 | static QPDFObjectHandle newReal(std::string const& value); |
| 73 | - DLL_EXPORT | ||
| 74 | static QPDFObjectHandle newName(std::string const& name); | 57 | static QPDFObjectHandle newName(std::string const& name); |
| 75 | - DLL_EXPORT | ||
| 76 | static QPDFObjectHandle newString(std::string const& str); | 58 | static QPDFObjectHandle newString(std::string const& str); |
| 77 | - DLL_EXPORT | ||
| 78 | static QPDFObjectHandle newArray( | 59 | static QPDFObjectHandle newArray( |
| 79 | std::vector<QPDFObjectHandle> const& items); | 60 | std::vector<QPDFObjectHandle> const& items); |
| 80 | - DLL_EXPORT | ||
| 81 | static QPDFObjectHandle newDictionary( | 61 | static QPDFObjectHandle newDictionary( |
| 82 | std::map<std::string, QPDFObjectHandle> const& items); | 62 | std::map<std::string, QPDFObjectHandle> const& items); |
| 83 | 63 | ||
| @@ -86,74 +66,55 @@ class QPDFObjectHandle | @@ -86,74 +66,55 @@ class QPDFObjectHandle | ||
| 86 | // type, an exception is thrown. | 66 | // type, an exception is thrown. |
| 87 | 67 | ||
| 88 | // Methods for bool objects | 68 | // Methods for bool objects |
| 89 | - DLL_EXPORT | ||
| 90 | bool getBoolValue(); | 69 | bool getBoolValue(); |
| 91 | 70 | ||
| 92 | // Methods for integer objects | 71 | // Methods for integer objects |
| 93 | - DLL_EXPORT | ||
| 94 | int getIntValue(); | 72 | int getIntValue(); |
| 95 | 73 | ||
| 96 | // Methods for real objects | 74 | // Methods for real objects |
| 97 | - DLL_EXPORT | ||
| 98 | std::string getRealValue(); | 75 | std::string getRealValue(); |
| 99 | 76 | ||
| 100 | // Methods that work for both integer and real objects | 77 | // Methods that work for both integer and real objects |
| 101 | - DLL_EXPORT | ||
| 102 | bool isNumber(); | 78 | bool isNumber(); |
| 103 | - DLL_EXPORT | ||
| 104 | double getNumericValue(); | 79 | double getNumericValue(); |
| 105 | 80 | ||
| 106 | // Methods for name objects | 81 | // Methods for name objects |
| 107 | - DLL_EXPORT | ||
| 108 | std::string getName(); | 82 | std::string getName(); |
| 109 | 83 | ||
| 110 | // Methods for string objects | 84 | // Methods for string objects |
| 111 | - DLL_EXPORT | ||
| 112 | std::string getStringValue(); | 85 | std::string getStringValue(); |
| 113 | - DLL_EXPORT | ||
| 114 | std::string getUTF8Value(); | 86 | std::string getUTF8Value(); |
| 115 | 87 | ||
| 116 | // Methods for array objects | 88 | // Methods for array objects |
| 117 | - DLL_EXPORT | ||
| 118 | int getArrayNItems(); | 89 | int getArrayNItems(); |
| 119 | - DLL_EXPORT | ||
| 120 | QPDFObjectHandle getArrayItem(int n); | 90 | QPDFObjectHandle getArrayItem(int n); |
| 121 | 91 | ||
| 122 | // Methods for dictionary objects | 92 | // Methods for dictionary objects |
| 123 | - DLL_EXPORT | ||
| 124 | bool hasKey(std::string const&); | 93 | bool hasKey(std::string const&); |
| 125 | - DLL_EXPORT | ||
| 126 | QPDFObjectHandle getKey(std::string const&); | 94 | QPDFObjectHandle getKey(std::string const&); |
| 127 | - DLL_EXPORT | ||
| 128 | std::set<std::string> getKeys(); | 95 | std::set<std::string> getKeys(); |
| 129 | 96 | ||
| 130 | // Mutator methods. Use with caution. | 97 | // Mutator methods. Use with caution. |
| 131 | 98 | ||
| 132 | // Recursively copy this object, making it direct. Throws an | 99 | // Recursively copy this object, making it direct. Throws an |
| 133 | // exception if a loop is detected or any sub-object is a stream. | 100 | // exception if a loop is detected or any sub-object is a stream. |
| 134 | - DLL_EXPORT | ||
| 135 | void makeDirect(); | 101 | void makeDirect(); |
| 136 | 102 | ||
| 137 | // Mutator methods for array objects | 103 | // Mutator methods for array objects |
| 138 | - DLL_EXPORT | ||
| 139 | void setArrayItem(int, QPDFObjectHandle const&); | 104 | void setArrayItem(int, QPDFObjectHandle const&); |
| 140 | 105 | ||
| 141 | // Mutator methods for dictionary objects | 106 | // Mutator methods for dictionary objects |
| 142 | 107 | ||
| 143 | // Replace value of key, adding it if it does not exist | 108 | // Replace value of key, adding it if it does not exist |
| 144 | - DLL_EXPORT | ||
| 145 | void replaceKey(std::string const& key, QPDFObjectHandle const&); | 109 | void replaceKey(std::string const& key, QPDFObjectHandle const&); |
| 146 | // Remove key, doing nothing if key does not exist | 110 | // Remove key, doing nothing if key does not exist |
| 147 | - DLL_EXPORT | ||
| 148 | void removeKey(std::string const& key); | 111 | void removeKey(std::string const& key); |
| 149 | 112 | ||
| 150 | // Methods for stream objects | 113 | // Methods for stream objects |
| 151 | - DLL_EXPORT | ||
| 152 | QPDFObjectHandle getDict(); | 114 | QPDFObjectHandle getDict(); |
| 153 | 115 | ||
| 154 | // Returns filtered (uncompressed) stream data. Throws an | 116 | // Returns filtered (uncompressed) stream data. Throws an |
| 155 | // exception if the stream is filtered and we can't decode it. | 117 | // exception if the stream is filtered and we can't decode it. |
| 156 | - DLL_EXPORT | ||
| 157 | PointerHolder<Buffer> getStreamData(); | 118 | PointerHolder<Buffer> getStreamData(); |
| 158 | 119 | ||
| 159 | // Write stream data through the given pipeline. A null pipeline | 120 | // Write stream data through the given pipeline. A null pipeline |
| @@ -173,19 +134,14 @@ class QPDFObjectHandle | @@ -173,19 +134,14 @@ class QPDFObjectHandle | ||
| 173 | // value of this function to determine whether or not the /Filter | 134 | // value of this function to determine whether or not the /Filter |
| 174 | // and /DecodeParms keys in the stream dictionary should be | 135 | // and /DecodeParms keys in the stream dictionary should be |
| 175 | // replaced if writing a new stream object. | 136 | // replaced if writing a new stream object. |
| 176 | - DLL_EXPORT | ||
| 177 | bool pipeStreamData(Pipeline*, bool filter, | 137 | bool pipeStreamData(Pipeline*, bool filter, |
| 178 | bool normalize, bool compress); | 138 | bool normalize, bool compress); |
| 179 | 139 | ||
| 180 | // return 0 for direct objects | 140 | // return 0 for direct objects |
| 181 | - DLL_EXPORT | ||
| 182 | int getObjectID() const; | 141 | int getObjectID() const; |
| 183 | - DLL_EXPORT | ||
| 184 | int getGeneration() const; | 142 | int getGeneration() const; |
| 185 | 143 | ||
| 186 | - DLL_EXPORT | ||
| 187 | std::string unparse(); | 144 | std::string unparse(); |
| 188 | - DLL_EXPORT | ||
| 189 | std::string unparseResolved(); | 145 | std::string unparseResolved(); |
| 190 | 146 | ||
| 191 | // Convenience routines for commonly performed functions | 147 | // Convenience routines for commonly performed functions |
| @@ -195,7 +151,6 @@ class QPDFObjectHandle | @@ -195,7 +151,6 @@ class QPDFObjectHandle | ||
| 195 | // function does not presently support inherited resources. See | 151 | // function does not presently support inherited resources. See |
| 196 | // comment in the source for details. Return value is a map from | 152 | // comment in the source for details. Return value is a map from |
| 197 | // XObject name to the image object, which is always a stream. | 153 | // XObject name to the image object, which is always a stream. |
| 198 | - DLL_EXPORT | ||
| 199 | std::map<std::string, QPDFObjectHandle> getPageImages(); | 154 | std::map<std::string, QPDFObjectHandle> getPageImages(); |
| 200 | 155 | ||
| 201 | // Throws an exception if this is not a Page object. Returns a | 156 | // Throws an exception if this is not a Page object. Returns a |
| @@ -203,7 +158,6 @@ class QPDFObjectHandle | @@ -203,7 +158,6 @@ class QPDFObjectHandle | ||
| 203 | // the given page. This routine allows the caller to not care | 158 | // the given page. This routine allows the caller to not care |
| 204 | // whether there are one or more than one content streams for a | 159 | // whether there are one or more than one content streams for a |
| 205 | // page. | 160 | // page. |
| 206 | - DLL_EXPORT | ||
| 207 | std::vector<QPDFObjectHandle> getPageContents(); | 161 | std::vector<QPDFObjectHandle> getPageContents(); |
| 208 | 162 | ||
| 209 | // Initializers for objects. This Factory class gives the QPDF | 163 | // Initializers for objects. This Factory class gives the QPDF |
include/qpdf/QPDFTokenizer.hh
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | #include <string> | 13 | #include <string> |
| 14 | #include <stdio.h> | 14 | #include <stdio.h> |
| 15 | 15 | ||
| 16 | +DLL_EXPORT | ||
| 16 | class QPDFTokenizer | 17 | class QPDFTokenizer |
| 17 | { | 18 | { |
| 18 | public: | 19 | public: |
| @@ -84,7 +85,6 @@ class QPDFTokenizer | @@ -84,7 +85,6 @@ class QPDFTokenizer | ||
| 84 | std::string error_message; | 85 | std::string error_message; |
| 85 | }; | 86 | }; |
| 86 | 87 | ||
| 87 | - DLL_EXPORT | ||
| 88 | QPDFTokenizer(); | 88 | QPDFTokenizer(); |
| 89 | 89 | ||
| 90 | // PDF files with version < 1.2 allowed the pound character | 90 | // PDF files with version < 1.2 allowed the pound character |
| @@ -92,7 +92,6 @@ class QPDFTokenizer | @@ -92,7 +92,6 @@ class QPDFTokenizer | ||
| 92 | // character was allowed only when followed by two hexadecimal | 92 | // character was allowed only when followed by two hexadecimal |
| 93 | // digits. This method should be called when parsing a PDF file | 93 | // digits. This method should be called when parsing a PDF file |
| 94 | // whose version is older than 1.2. | 94 | // whose version is older than 1.2. |
| 95 | - DLL_EXPORT | ||
| 96 | void allowPoundAnywhereInName(); | 95 | void allowPoundAnywhereInName(); |
| 97 | 96 | ||
| 98 | // Mode of operation: | 97 | // Mode of operation: |
| @@ -103,23 +102,19 @@ class QPDFTokenizer | @@ -103,23 +102,19 @@ class QPDFTokenizer | ||
| 103 | 102 | ||
| 104 | // It these are called when a token is available, an exception | 103 | // It these are called when a token is available, an exception |
| 105 | // will be thrown. | 104 | // will be thrown. |
| 106 | - DLL_EXPORT | ||
| 107 | void presentCharacter(char ch); | 105 | void presentCharacter(char ch); |
| 108 | - DLL_EXPORT | ||
| 109 | void presentEOF(); | 106 | void presentEOF(); |
| 110 | 107 | ||
| 111 | // If a token is available, return true and initialize token with | 108 | // If a token is available, return true and initialize token with |
| 112 | // the token, unread_char with whether or not we have to unread | 109 | // the token, unread_char with whether or not we have to unread |
| 113 | // the last character, and if unread_char, ch with the character | 110 | // the last character, and if unread_char, ch with the character |
| 114 | // to unread. | 111 | // to unread. |
| 115 | - DLL_EXPORT | ||
| 116 | bool getToken(Token& token, bool& unread_char, char& ch); | 112 | bool getToken(Token& token, bool& unread_char, char& ch); |
| 117 | 113 | ||
| 118 | // This function returns true of the current character is between | 114 | // This function returns true of the current character is between |
| 119 | // tokens (i.e., white space that is not part of a string) or is | 115 | // tokens (i.e., white space that is not part of a string) or is |
| 120 | // part of a comment. A tokenizing filter can call this to | 116 | // part of a comment. A tokenizing filter can call this to |
| 121 | // determine whether to output the character. | 117 | // determine whether to output the character. |
| 122 | - DLL_EXPORT | ||
| 123 | bool betweenTokens(); | 118 | bool betweenTokens(); |
| 124 | 119 | ||
| 125 | private: | 120 | private: |
include/qpdf/QPDFWriter.hh
| @@ -31,6 +31,7 @@ class QPDF; | @@ -31,6 +31,7 @@ class QPDF; | ||
| 31 | class QPDFObjectHandle; | 31 | class QPDFObjectHandle; |
| 32 | class Pl_Count; | 32 | class Pl_Count; |
| 33 | 33 | ||
| 34 | +DLL_EXPORT | ||
| 34 | class QPDFWriter | 35 | class QPDFWriter |
| 35 | { | 36 | { |
| 36 | public: | 37 | public: |
| @@ -41,9 +42,7 @@ class QPDFWriter | @@ -41,9 +42,7 @@ class QPDFWriter | ||
| 41 | // useful for tracking down problems. If your application doesn't | 42 | // useful for tracking down problems. If your application doesn't |
| 42 | // want the partially written file to be left behind, you should | 43 | // want the partially written file to be left behind, you should |
| 43 | // delete it the eventual call to write fails. | 44 | // delete it the eventual call to write fails. |
| 44 | - DLL_EXPORT | ||
| 45 | QPDFWriter(QPDF& pdf, char const* filename); | 45 | QPDFWriter(QPDF& pdf, char const* filename); |
| 46 | - DLL_EXPORT | ||
| 47 | ~QPDFWriter(); | 46 | ~QPDFWriter(); |
| 48 | 47 | ||
| 49 | // Set the value of object stream mode. In disable mode, we never | 48 | // Set the value of object stream mode. In disable mode, we never |
| @@ -54,7 +53,6 @@ class QPDFWriter | @@ -54,7 +53,6 @@ class QPDFWriter | ||
| 54 | // object streams and a cross-reference stream if there are object | 53 | // object streams and a cross-reference stream if there are object |
| 55 | // streams. The default is o_preserve. | 54 | // streams. The default is o_preserve. |
| 56 | enum object_stream_e { o_disable, o_preserve, o_generate }; | 55 | enum object_stream_e { o_disable, o_preserve, o_generate }; |
| 57 | - DLL_EXPORT | ||
| 58 | void setObjectStreamMode(object_stream_e); | 56 | void setObjectStreamMode(object_stream_e); |
| 59 | 57 | ||
| 60 | // Set value of stream data mode. In uncompress mode, we attempt | 58 | // Set value of stream data mode. In uncompress mode, we attempt |
| @@ -63,7 +61,6 @@ class QPDFWriter | @@ -63,7 +61,6 @@ class QPDFWriter | ||
| 63 | // if we can apply all filters and the stream is not already | 61 | // if we can apply all filters and the stream is not already |
| 64 | // optimally compressed, recompress the stream. | 62 | // optimally compressed, recompress the stream. |
| 65 | enum stream_data_e { s_uncompress, s_preserve, s_compress }; | 63 | enum stream_data_e { s_uncompress, s_preserve, s_compress }; |
| 66 | - DLL_EXPORT | ||
| 67 | void setStreamDataMode(stream_data_e); | 64 | void setStreamDataMode(stream_data_e); |
| 68 | 65 | ||
| 69 | // Set value of content stream normalization. The default is | 66 | // Set value of content stream normalization. The default is |
| @@ -73,7 +70,6 @@ class QPDFWriter | @@ -73,7 +70,6 @@ class QPDFWriter | ||
| 73 | // damage the content stream. This flag should be used only for | 70 | // damage the content stream. This flag should be used only for |
| 74 | // debugging and experimenting with PDF content streams. Never | 71 | // debugging and experimenting with PDF content streams. Never |
| 75 | // use it for production files. | 72 | // use it for production files. |
| 76 | - DLL_EXPORT | ||
| 77 | void setContentNormalization(bool); | 73 | void setContentNormalization(bool); |
| 78 | 74 | ||
| 79 | // Set QDF mode. QDF mode causes special "pretty printing" of | 75 | // Set QDF mode. QDF mode causes special "pretty printing" of |
| @@ -81,7 +77,6 @@ class QPDFWriter | @@ -81,7 +77,6 @@ class QPDFWriter | ||
| 81 | // Resulting PDF files can be edited in a text editor and then run | 77 | // Resulting PDF files can be edited in a text editor and then run |
| 82 | // through fix-qdf to update cross reference tables and stream | 78 | // through fix-qdf to update cross reference tables and stream |
| 83 | // lengths. | 79 | // lengths. |
| 84 | - DLL_EXPORT | ||
| 85 | void setQDFMode(bool); | 80 | void setQDFMode(bool); |
| 86 | 81 | ||
| 87 | // Set the minimum PDF version. If the PDF version of the input | 82 | // Set the minimum PDF version. If the PDF version of the input |
| @@ -93,7 +88,6 @@ class QPDFWriter | @@ -93,7 +88,6 @@ class QPDFWriter | ||
| 93 | // QPDFWriter automatically sets the minimum version to 1.4 when | 88 | // QPDFWriter automatically sets the minimum version to 1.4 when |
| 94 | // R3 encryption parameters are used, and to 1.5 when object | 89 | // R3 encryption parameters are used, and to 1.5 when object |
| 95 | // streams are used. | 90 | // streams are used. |
| 96 | - DLL_EXPORT | ||
| 97 | void setMinimumPDFVersion(std::string const&); | 91 | void setMinimumPDFVersion(std::string const&); |
| 98 | 92 | ||
| 99 | // Force the PDF version of the output file to be a given version. | 93 | // Force the PDF version of the output file to be a given version. |
| @@ -105,26 +99,22 @@ class QPDFWriter | @@ -105,26 +99,22 @@ class QPDFWriter | ||
| 105 | // you are sure the PDF file in question has no features of newer | 99 | // you are sure the PDF file in question has no features of newer |
| 106 | // versions of PDF or if you are willing to create files that old | 100 | // versions of PDF or if you are willing to create files that old |
| 107 | // viewers may try to open but not be able to properly interpret. | 101 | // viewers may try to open but not be able to properly interpret. |
| 108 | - DLL_EXPORT | ||
| 109 | void forcePDFVersion(std::string const&); | 102 | void forcePDFVersion(std::string const&); |
| 110 | 103 | ||
| 111 | // Cause a static /ID value to be generated. Use only in test | 104 | // Cause a static /ID value to be generated. Use only in test |
| 112 | // suites. | 105 | // suites. |
| 113 | - DLL_EXPORT | ||
| 114 | void setStaticID(bool); | 106 | void setStaticID(bool); |
| 115 | 107 | ||
| 116 | // Suppress inclusion of comments indicating original object IDs | 108 | // Suppress inclusion of comments indicating original object IDs |
| 117 | // when writing QDF files. This can also be useful for testing, | 109 | // when writing QDF files. This can also be useful for testing, |
| 118 | // particularly when using comparison of two qdf files to | 110 | // particularly when using comparison of two qdf files to |
| 119 | // determine whether two PDF files have identical content. | 111 | // determine whether two PDF files have identical content. |
| 120 | - DLL_EXPORT | ||
| 121 | void setSuppressOriginalObjectIDs(bool); | 112 | void setSuppressOriginalObjectIDs(bool); |
| 122 | 113 | ||
| 123 | // Preserve encryption. The default is true unless prefilering, | 114 | // Preserve encryption. The default is true unless prefilering, |
| 124 | // content normalization, or qdf mode has been selected in which | 115 | // content normalization, or qdf mode has been selected in which |
| 125 | // case encryption is never preserved. Encryption is also not | 116 | // case encryption is never preserved. Encryption is also not |
| 126 | // preserved if we explicitly set encryption parameters. | 117 | // preserved if we explicitly set encryption parameters. |
| 127 | - DLL_EXPORT | ||
| 128 | void setPreserveEncryption(bool); | 118 | void setPreserveEncryption(bool); |
| 129 | 119 | ||
| 130 | // Set up for encrypted output. Disables stream prefiltering and | 120 | // Set up for encrypted output. Disables stream prefiltering and |
| @@ -132,7 +122,6 @@ class QPDFWriter | @@ -132,7 +122,6 @@ class QPDFWriter | ||
| 132 | // parameters sets the PDF version to at least 1.3, and setting R3 | 122 | // parameters sets the PDF version to at least 1.3, and setting R3 |
| 133 | // encryption parameters pushes the PDF version number to at least | 123 | // encryption parameters pushes the PDF version number to at least |
| 134 | // 1.4. | 124 | // 1.4. |
| 135 | - DLL_EXPORT | ||
| 136 | void setR2EncryptionParameters( | 125 | void setR2EncryptionParameters( |
| 137 | char const* user_password, char const* owner_password, | 126 | char const* user_password, char const* owner_password, |
| 138 | bool allow_print, bool allow_modify, | 127 | bool allow_print, bool allow_modify, |
| @@ -151,7 +140,6 @@ class QPDFWriter | @@ -151,7 +140,6 @@ class QPDFWriter | ||
| 151 | r3m_assembly, // allow only document assembly | 140 | r3m_assembly, // allow only document assembly |
| 152 | r3m_none // allow no modification | 141 | r3m_none // allow no modification |
| 153 | }; | 142 | }; |
| 154 | - DLL_EXPORT | ||
| 155 | void setR3EncryptionParameters( | 143 | void setR3EncryptionParameters( |
| 156 | char const* user_password, char const* owner_password, | 144 | char const* user_password, char const* owner_password, |
| 157 | bool allow_accessibility, bool allow_extract, | 145 | bool allow_accessibility, bool allow_extract, |
| @@ -159,10 +147,8 @@ class QPDFWriter | @@ -159,10 +147,8 @@ class QPDFWriter | ||
| 159 | 147 | ||
| 160 | // Create linearized output. Disables qdf mode, content | 148 | // Create linearized output. Disables qdf mode, content |
| 161 | // normalization, and stream prefiltering. | 149 | // normalization, and stream prefiltering. |
| 162 | - DLL_EXPORT | ||
| 163 | void setLinearization(bool); | 150 | void setLinearization(bool); |
| 164 | 151 | ||
| 165 | - DLL_EXPORT | ||
| 166 | void write(); | 152 | void write(); |
| 167 | 153 | ||
| 168 | private: | 154 | private: |
include/qpdf/QPDFXRefEntry.hh
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | 10 | ||
| 11 | #include <qpdf/DLL.hh> | 11 | #include <qpdf/DLL.hh> |
| 12 | 12 | ||
| 13 | +DLL_EXPORT | ||
| 13 | class QPDFXRefEntry | 14 | class QPDFXRefEntry |
| 14 | { | 15 | { |
| 15 | public: | 16 | public: |
| @@ -19,18 +20,12 @@ class QPDFXRefEntry | @@ -19,18 +20,12 @@ class QPDFXRefEntry | ||
| 19 | // 1 = "uncompressed"; field 1 = offset | 20 | // 1 = "uncompressed"; field 1 = offset |
| 20 | // 2 = "compressed"; field 1 = object stream number, field 2 = index | 21 | // 2 = "compressed"; field 1 = object stream number, field 2 = index |
| 21 | 22 | ||
| 22 | - DLL_EXPORT | ||
| 23 | QPDFXRefEntry(); | 23 | QPDFXRefEntry(); |
| 24 | - DLL_EXPORT | ||
| 25 | QPDFXRefEntry(int type, int field1, int field2); | 24 | QPDFXRefEntry(int type, int field1, int field2); |
| 26 | 25 | ||
| 27 | - DLL_EXPORT | ||
| 28 | int getType() const; | 26 | int getType() const; |
| 29 | - DLL_EXPORT | ||
| 30 | int getOffset() const; // only for type 1 | 27 | int getOffset() const; // only for type 1 |
| 31 | - DLL_EXPORT | ||
| 32 | int getObjStreamNumber() const; // only for type 2 | 28 | int getObjStreamNumber() const; // only for type 2 |
| 33 | - DLL_EXPORT | ||
| 34 | int getObjStreamIndex() const; // only for type 2 | 29 | int getObjStreamIndex() const; // only for type 2 |
| 35 | 30 | ||
| 36 | private: | 31 | private: |
libqpdf/BitStream.cc
| @@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
| 4 | #define BITS_READ 1 | 4 | #define BITS_READ 1 |
| 5 | #include "bits.icc" | 5 | #include "bits.icc" |
| 6 | 6 | ||
| 7 | -DLL_EXPORT | ||
| 8 | BitStream::BitStream(unsigned char const* p, int nbytes) : | 7 | BitStream::BitStream(unsigned char const* p, int nbytes) : |
| 9 | start(p), | 8 | start(p), |
| 10 | nbytes(nbytes) | 9 | nbytes(nbytes) |
| @@ -12,7 +11,6 @@ BitStream::BitStream(unsigned char const* p, int nbytes) : | @@ -12,7 +11,6 @@ BitStream::BitStream(unsigned char const* p, int nbytes) : | ||
| 12 | reset(); | 11 | reset(); |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | -DLL_EXPORT | ||
| 16 | void | 14 | void |
| 17 | BitStream::reset() | 15 | BitStream::reset() |
| 18 | { | 16 | { |
| @@ -21,7 +19,6 @@ BitStream::reset() | @@ -21,7 +19,6 @@ BitStream::reset() | ||
| 21 | bits_available = 8 * nbytes; | 19 | bits_available = 8 * nbytes; |
| 22 | } | 20 | } |
| 23 | 21 | ||
| 24 | -DLL_EXPORT | ||
| 25 | unsigned long | 22 | unsigned long |
| 26 | BitStream::getBits(int nbits) | 23 | BitStream::getBits(int nbits) |
| 27 | { | 24 | { |
| @@ -29,7 +26,6 @@ BitStream::getBits(int nbits) | @@ -29,7 +26,6 @@ BitStream::getBits(int nbits) | ||
| 29 | this->bits_available, nbits); | 26 | this->bits_available, nbits); |
| 30 | } | 27 | } |
| 31 | 28 | ||
| 32 | -DLL_EXPORT | ||
| 33 | void | 29 | void |
| 34 | BitStream::skipToNextByte() | 30 | BitStream::skipToNextByte() |
| 35 | { | 31 | { |
libqpdf/BitWriter.cc
| @@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
| 4 | #define BITS_WRITE 1 | 4 | #define BITS_WRITE 1 |
| 5 | #include "bits.icc" | 5 | #include "bits.icc" |
| 6 | 6 | ||
| 7 | -DLL_EXPORT | ||
| 8 | BitWriter::BitWriter(Pipeline* pl) : | 7 | BitWriter::BitWriter(Pipeline* pl) : |
| 9 | pl(pl), | 8 | pl(pl), |
| 10 | ch(0), | 9 | ch(0), |
| @@ -12,14 +11,12 @@ BitWriter::BitWriter(Pipeline* pl) : | @@ -12,14 +11,12 @@ BitWriter::BitWriter(Pipeline* pl) : | ||
| 12 | { | 11 | { |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | -DLL_EXPORT | ||
| 16 | void | 14 | void |
| 17 | BitWriter::writeBits(unsigned long val, int bits) | 15 | BitWriter::writeBits(unsigned long val, int bits) |
| 18 | { | 16 | { |
| 19 | write_bits(this->ch, this->bit_offset, val, bits, this->pl); | 17 | write_bits(this->ch, this->bit_offset, val, bits, this->pl); |
| 20 | } | 18 | } |
| 21 | 19 | ||
| 22 | -DLL_EXPORT | ||
| 23 | void | 20 | void |
| 24 | BitWriter::flush() | 21 | BitWriter::flush() |
| 25 | { | 22 | { |
libqpdf/Buffer.cc
| @@ -2,26 +2,22 @@ | @@ -2,26 +2,22 @@ | ||
| 2 | 2 | ||
| 3 | #include <string.h> | 3 | #include <string.h> |
| 4 | 4 | ||
| 5 | -DLL_EXPORT | ||
| 6 | Buffer::Buffer() | 5 | Buffer::Buffer() |
| 7 | { | 6 | { |
| 8 | init(0); | 7 | init(0); |
| 9 | } | 8 | } |
| 10 | 9 | ||
| 11 | -DLL_EXPORT | ||
| 12 | Buffer::Buffer(unsigned long size) | 10 | Buffer::Buffer(unsigned long size) |
| 13 | { | 11 | { |
| 14 | init(size); | 12 | init(size); |
| 15 | } | 13 | } |
| 16 | 14 | ||
| 17 | -DLL_EXPORT | ||
| 18 | Buffer::Buffer(Buffer const& rhs) | 15 | Buffer::Buffer(Buffer const& rhs) |
| 19 | { | 16 | { |
| 20 | init(0); | 17 | init(0); |
| 21 | copy(rhs); | 18 | copy(rhs); |
| 22 | } | 19 | } |
| 23 | 20 | ||
| 24 | -DLL_EXPORT | ||
| 25 | Buffer& | 21 | Buffer& |
| 26 | Buffer::operator=(Buffer const& rhs) | 22 | Buffer::operator=(Buffer const& rhs) |
| 27 | { | 23 | { |
| @@ -29,7 +25,6 @@ Buffer::operator=(Buffer const& rhs) | @@ -29,7 +25,6 @@ Buffer::operator=(Buffer const& rhs) | ||
| 29 | return *this; | 25 | return *this; |
| 30 | } | 26 | } |
| 31 | 27 | ||
| 32 | -DLL_EXPORT | ||
| 33 | Buffer::~Buffer() | 28 | Buffer::~Buffer() |
| 34 | { | 29 | { |
| 35 | destroy(); | 30 | destroy(); |
| @@ -64,21 +59,18 @@ Buffer::destroy() | @@ -64,21 +59,18 @@ Buffer::destroy() | ||
| 64 | this->buf = 0; | 59 | this->buf = 0; |
| 65 | } | 60 | } |
| 66 | 61 | ||
| 67 | -DLL_EXPORT | ||
| 68 | unsigned long | 62 | unsigned long |
| 69 | Buffer::getSize() const | 63 | Buffer::getSize() const |
| 70 | { | 64 | { |
| 71 | return this->size; | 65 | return this->size; |
| 72 | } | 66 | } |
| 73 | 67 | ||
| 74 | -DLL_EXPORT | ||
| 75 | unsigned char const* | 68 | unsigned char const* |
| 76 | Buffer::getBuffer() const | 69 | Buffer::getBuffer() const |
| 77 | { | 70 | { |
| 78 | return this->buf; | 71 | return this->buf; |
| 79 | } | 72 | } |
| 80 | 73 | ||
| 81 | -DLL_EXPORT | ||
| 82 | unsigned char* | 74 | unsigned char* |
| 83 | Buffer::getBuffer() | 75 | Buffer::getBuffer() |
| 84 | { | 76 | { |
libqpdf/MD5.cc
| @@ -296,19 +296,16 @@ void MD5::decode(UINT4 *output, unsigned char *input, unsigned int len) | @@ -296,19 +296,16 @@ void MD5::decode(UINT4 *output, unsigned char *input, unsigned int len) | ||
| 296 | 296 | ||
| 297 | // Public functions | 297 | // Public functions |
| 298 | 298 | ||
| 299 | -DLL_EXPORT | ||
| 300 | MD5::MD5() | 299 | MD5::MD5() |
| 301 | { | 300 | { |
| 302 | init(); | 301 | init(); |
| 303 | } | 302 | } |
| 304 | 303 | ||
| 305 | -DLL_EXPORT | ||
| 306 | void MD5::reset() | 304 | void MD5::reset() |
| 307 | { | 305 | { |
| 308 | init(); | 306 | init(); |
| 309 | } | 307 | } |
| 310 | 308 | ||
| 311 | -DLL_EXPORT | ||
| 312 | void MD5::encodeString(char const* str) | 309 | void MD5::encodeString(char const* str) |
| 313 | { | 310 | { |
| 314 | unsigned int len = strlen(str); | 311 | unsigned int len = strlen(str); |
| @@ -317,19 +314,16 @@ void MD5::encodeString(char const* str) | @@ -317,19 +314,16 @@ void MD5::encodeString(char const* str) | ||
| 317 | final(); | 314 | final(); |
| 318 | } | 315 | } |
| 319 | 316 | ||
| 320 | -DLL_EXPORT | ||
| 321 | void MD5::appendString(char const* input_string) | 317 | void MD5::appendString(char const* input_string) |
| 322 | { | 318 | { |
| 323 | update((unsigned char *)input_string, strlen(input_string)); | 319 | update((unsigned char *)input_string, strlen(input_string)); |
| 324 | } | 320 | } |
| 325 | 321 | ||
| 326 | -DLL_EXPORT | ||
| 327 | void MD5::encodeDataIncrementally(char const* data, int len) | 322 | void MD5::encodeDataIncrementally(char const* data, int len) |
| 328 | { | 323 | { |
| 329 | update((unsigned char *)data, len); | 324 | update((unsigned char *)data, len); |
| 330 | } | 325 | } |
| 331 | 326 | ||
| 332 | -DLL_EXPORT | ||
| 333 | void MD5::encodeFile(char const *filename, int up_to_size) | 327 | void MD5::encodeFile(char const *filename, int up_to_size) |
| 334 | { | 328 | { |
| 335 | unsigned char buffer[1024]; | 329 | unsigned char buffer[1024]; |
| @@ -371,14 +365,12 @@ void MD5::encodeFile(char const *filename, int up_to_size) | @@ -371,14 +365,12 @@ void MD5::encodeFile(char const *filename, int up_to_size) | ||
| 371 | final(); | 365 | final(); |
| 372 | } | 366 | } |
| 373 | 367 | ||
| 374 | -DLL_EXPORT | ||
| 375 | void MD5::digest(Digest result) | 368 | void MD5::digest(Digest result) |
| 376 | { | 369 | { |
| 377 | final(); | 370 | final(); |
| 378 | memcpy(result, digest_val, sizeof(digest_val)); | 371 | memcpy(result, digest_val, sizeof(digest_val)); |
| 379 | } | 372 | } |
| 380 | 373 | ||
| 381 | -DLL_EXPORT | ||
| 382 | void MD5::print() | 374 | void MD5::print() |
| 383 | { | 375 | { |
| 384 | final(); | 376 | final(); |
| @@ -391,7 +383,6 @@ void MD5::print() | @@ -391,7 +383,6 @@ void MD5::print() | ||
| 391 | printf("\n"); | 383 | printf("\n"); |
| 392 | } | 384 | } |
| 393 | 385 | ||
| 394 | -DLL_EXPORT | ||
| 395 | std::string MD5::unparse() | 386 | std::string MD5::unparse() |
| 396 | { | 387 | { |
| 397 | final(); | 388 | final(); |
| @@ -407,7 +398,6 @@ std::string MD5::unparse() | @@ -407,7 +398,6 @@ std::string MD5::unparse() | ||
| 407 | return result; | 398 | return result; |
| 408 | } | 399 | } |
| 409 | 400 | ||
| 410 | -DLL_EXPORT | ||
| 411 | std::string | 401 | std::string |
| 412 | MD5::getDataChecksum(char const* buf, int len) | 402 | MD5::getDataChecksum(char const* buf, int len) |
| 413 | { | 403 | { |
| @@ -416,7 +406,6 @@ MD5::getDataChecksum(char const* buf, int len) | @@ -416,7 +406,6 @@ MD5::getDataChecksum(char const* buf, int len) | ||
| 416 | return m.unparse(); | 406 | return m.unparse(); |
| 417 | } | 407 | } |
| 418 | 408 | ||
| 419 | -DLL_EXPORT | ||
| 420 | std::string | 409 | std::string |
| 421 | MD5::getFileChecksum(char const* filename, int up_to_size) | 410 | MD5::getFileChecksum(char const* filename, int up_to_size) |
| 422 | { | 411 | { |
| @@ -425,7 +414,6 @@ MD5::getFileChecksum(char const* filename, int up_to_size) | @@ -425,7 +414,6 @@ MD5::getFileChecksum(char const* filename, int up_to_size) | ||
| 425 | return m.unparse(); | 414 | return m.unparse(); |
| 426 | } | 415 | } |
| 427 | 416 | ||
| 428 | -DLL_EXPORT | ||
| 429 | bool | 417 | bool |
| 430 | MD5::checkDataChecksum(char const* const checksum, | 418 | MD5::checkDataChecksum(char const* const checksum, |
| 431 | char const* buf, int len) | 419 | char const* buf, int len) |
| @@ -434,7 +422,6 @@ MD5::checkDataChecksum(char const* const checksum, | @@ -434,7 +422,6 @@ MD5::checkDataChecksum(char const* const checksum, | ||
| 434 | return (checksum == actual_checksum); | 422 | return (checksum == actual_checksum); |
| 435 | } | 423 | } |
| 436 | 424 | ||
| 437 | -DLL_EXPORT | ||
| 438 | bool | 425 | bool |
| 439 | MD5::checkFileChecksum(char const* const checksum, | 426 | MD5::checkFileChecksum(char const* const checksum, |
| 440 | char const* filename, int up_to_size) | 427 | char const* filename, int up_to_size) |
libqpdf/PCRE.cc
| @@ -5,31 +5,26 @@ | @@ -5,31 +5,26 @@ | ||
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | #include <string.h> | 6 | #include <string.h> |
| 7 | 7 | ||
| 8 | -DLL_EXPORT | ||
| 9 | PCRE::NoBackref::NoBackref() : | 8 | PCRE::NoBackref::NoBackref() : |
| 10 | std::logic_error("PCRE error: no match") | 9 | std::logic_error("PCRE error: no match") |
| 11 | { | 10 | { |
| 12 | } | 11 | } |
| 13 | 12 | ||
| 14 | -DLL_EXPORT | ||
| 15 | PCRE::Match::Match(int nbackrefs, char const* subject) | 13 | PCRE::Match::Match(int nbackrefs, char const* subject) |
| 16 | { | 14 | { |
| 17 | this->init(-1, nbackrefs, subject); | 15 | this->init(-1, nbackrefs, subject); |
| 18 | } | 16 | } |
| 19 | 17 | ||
| 20 | -DLL_EXPORT | ||
| 21 | PCRE::Match::~Match() | 18 | PCRE::Match::~Match() |
| 22 | { | 19 | { |
| 23 | this->destroy(); | 20 | this->destroy(); |
| 24 | } | 21 | } |
| 25 | 22 | ||
| 26 | -DLL_EXPORT | ||
| 27 | PCRE::Match::Match(Match const& rhs) | 23 | PCRE::Match::Match(Match const& rhs) |
| 28 | { | 24 | { |
| 29 | this->copy(rhs); | 25 | this->copy(rhs); |
| 30 | } | 26 | } |
| 31 | 27 | ||
| 32 | -DLL_EXPORT | ||
| 33 | PCRE::Match& | 28 | PCRE::Match& |
| 34 | PCRE::Match::operator=(Match const& rhs) | 29 | PCRE::Match::operator=(Match const& rhs) |
| 35 | { | 30 | { |
| @@ -72,13 +67,11 @@ PCRE::Match::destroy() | @@ -72,13 +67,11 @@ PCRE::Match::destroy() | ||
| 72 | delete [] this->ovector; | 67 | delete [] this->ovector; |
| 73 | } | 68 | } |
| 74 | 69 | ||
| 75 | -DLL_EXPORT | ||
| 76 | PCRE::Match::operator bool() | 70 | PCRE::Match::operator bool() |
| 77 | { | 71 | { |
| 78 | return (this->nmatches >= 0); | 72 | return (this->nmatches >= 0); |
| 79 | } | 73 | } |
| 80 | 74 | ||
| 81 | -DLL_EXPORT | ||
| 82 | std::string | 75 | std::string |
| 83 | PCRE::Match::getMatch(int n, int flags) | 76 | PCRE::Match::getMatch(int n, int flags) |
| 84 | { | 77 | { |
| @@ -107,7 +100,6 @@ PCRE::Match::getMatch(int n, int flags) | @@ -107,7 +100,6 @@ PCRE::Match::getMatch(int n, int flags) | ||
| 107 | return std::string(this->subject).substr(offset, length); | 100 | return std::string(this->subject).substr(offset, length); |
| 108 | } | 101 | } |
| 109 | 102 | ||
| 110 | -DLL_EXPORT | ||
| 111 | void | 103 | void |
| 112 | PCRE::Match::getOffsetLength(int n, int& offset, int& length) | 104 | PCRE::Match::getOffsetLength(int n, int& offset, int& length) |
| 113 | { | 105 | { |
| @@ -121,7 +113,6 @@ PCRE::Match::getOffsetLength(int n, int& offset, int& length) | @@ -121,7 +113,6 @@ PCRE::Match::getOffsetLength(int n, int& offset, int& length) | ||
| 121 | length = this->ovector[n * 2 + 1] - offset; | 113 | length = this->ovector[n * 2 + 1] - offset; |
| 122 | } | 114 | } |
| 123 | 115 | ||
| 124 | -DLL_EXPORT | ||
| 125 | int | 116 | int |
| 126 | PCRE::Match::getOffset(int n) | 117 | PCRE::Match::getOffset(int n) |
| 127 | { | 118 | { |
| @@ -131,7 +122,6 @@ PCRE::Match::getOffset(int n) | @@ -131,7 +122,6 @@ PCRE::Match::getOffset(int n) | ||
| 131 | return offset; | 122 | return offset; |
| 132 | } | 123 | } |
| 133 | 124 | ||
| 134 | -DLL_EXPORT | ||
| 135 | int | 125 | int |
| 136 | PCRE::Match::getLength(int n) | 126 | PCRE::Match::getLength(int n) |
| 137 | { | 127 | { |
| @@ -141,14 +131,12 @@ PCRE::Match::getLength(int n) | @@ -141,14 +131,12 @@ PCRE::Match::getLength(int n) | ||
| 141 | return length; | 131 | return length; |
| 142 | } | 132 | } |
| 143 | 133 | ||
| 144 | -DLL_EXPORT | ||
| 145 | int | 134 | int |
| 146 | PCRE::Match::nMatches() const | 135 | PCRE::Match::nMatches() const |
| 147 | { | 136 | { |
| 148 | return this->nmatches; | 137 | return this->nmatches; |
| 149 | } | 138 | } |
| 150 | 139 | ||
| 151 | -DLL_EXPORT | ||
| 152 | PCRE::PCRE(char const* pattern, int options) | 140 | PCRE::PCRE(char const* pattern, int options) |
| 153 | { | 141 | { |
| 154 | char const *errptr; | 142 | char const *errptr; |
| @@ -168,13 +156,11 @@ PCRE::PCRE(char const* pattern, int options) | @@ -168,13 +156,11 @@ PCRE::PCRE(char const* pattern, int options) | ||
| 168 | } | 156 | } |
| 169 | } | 157 | } |
| 170 | 158 | ||
| 171 | -DLL_EXPORT | ||
| 172 | PCRE::~PCRE() | 159 | PCRE::~PCRE() |
| 173 | { | 160 | { |
| 174 | pcre_free(this->code); | 161 | pcre_free(this->code); |
| 175 | } | 162 | } |
| 176 | 163 | ||
| 177 | -DLL_EXPORT | ||
| 178 | PCRE::Match | 164 | PCRE::Match |
| 179 | PCRE::match(char const* subject, int options, int startoffset, int size) | 165 | PCRE::match(char const* subject, int options, int startoffset, int size) |
| 180 | { | 166 | { |
| @@ -222,7 +208,6 @@ PCRE::match(char const* subject, int options, int startoffset, int size) | @@ -222,7 +208,6 @@ PCRE::match(char const* subject, int options, int startoffset, int size) | ||
| 222 | return result; | 208 | return result; |
| 223 | } | 209 | } |
| 224 | 210 | ||
| 225 | -DLL_EXPORT | ||
| 226 | void | 211 | void |
| 227 | PCRE::test(int n) | 212 | PCRE::test(int n) |
| 228 | { | 213 | { |
libqpdf/Pipeline.cc
| 1 | #include <qpdf/Pipeline.hh> | 1 | #include <qpdf/Pipeline.hh> |
| 2 | #include <stdexcept> | 2 | #include <stdexcept> |
| 3 | 3 | ||
| 4 | -DLL_EXPORT | ||
| 5 | Pipeline::Pipeline(char const* identifier, Pipeline* next) : | 4 | Pipeline::Pipeline(char const* identifier, Pipeline* next) : |
| 6 | identifier(identifier), | 5 | identifier(identifier), |
| 7 | next(next) | 6 | next(next) |
| 8 | { | 7 | { |
| 9 | } | 8 | } |
| 10 | 9 | ||
| 11 | -DLL_EXPORT | ||
| 12 | Pipeline::~Pipeline() | 10 | Pipeline::~Pipeline() |
| 13 | { | 11 | { |
| 14 | } | 12 | } |
libqpdf/Pl_ASCII85Decoder.cc
| @@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
| 3 | #include <stdexcept> | 3 | #include <stdexcept> |
| 4 | #include <string.h> | 4 | #include <string.h> |
| 5 | 5 | ||
| 6 | -DLL_EXPORT | ||
| 7 | Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) : | 6 | Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) : |
| 8 | Pipeline(identifier, next), | 7 | Pipeline(identifier, next), |
| 9 | pos(0), | 8 | pos(0), |
| @@ -12,12 +11,10 @@ Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) : | @@ -12,12 +11,10 @@ Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) : | ||
| 12 | memset(this->inbuf, 117, 5); | 11 | memset(this->inbuf, 117, 5); |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | -DLL_EXPORT | ||
| 16 | Pl_ASCII85Decoder::~Pl_ASCII85Decoder() | 14 | Pl_ASCII85Decoder::~Pl_ASCII85Decoder() |
| 17 | { | 15 | { |
| 18 | } | 16 | } |
| 19 | 17 | ||
| 20 | -DLL_EXPORT | ||
| 21 | void | 18 | void |
| 22 | Pl_ASCII85Decoder::write(unsigned char* buf, int len) | 19 | Pl_ASCII85Decoder::write(unsigned char* buf, int len) |
| 23 | { | 20 | { |
| @@ -126,7 +123,6 @@ Pl_ASCII85Decoder::flush() | @@ -126,7 +123,6 @@ Pl_ASCII85Decoder::flush() | ||
| 126 | memset(this->inbuf, 117, 5); | 123 | memset(this->inbuf, 117, 5); |
| 127 | } | 124 | } |
| 128 | 125 | ||
| 129 | -DLL_EXPORT | ||
| 130 | void | 126 | void |
| 131 | Pl_ASCII85Decoder::finish() | 127 | Pl_ASCII85Decoder::finish() |
| 132 | { | 128 | { |
libqpdf/Pl_ASCIIHexDecoder.cc
| @@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
| 4 | #include <string.h> | 4 | #include <string.h> |
| 5 | #include <ctype.h> | 5 | #include <ctype.h> |
| 6 | 6 | ||
| 7 | -DLL_EXPORT | ||
| 8 | Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : | 7 | Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : |
| 9 | Pipeline(identifier, next), | 8 | Pipeline(identifier, next), |
| 10 | pos(0), | 9 | pos(0), |
| @@ -13,12 +12,10 @@ Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : | @@ -13,12 +12,10 @@ Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : | ||
| 13 | strcpy(this->inbuf, "00"); | 12 | strcpy(this->inbuf, "00"); |
| 14 | } | 13 | } |
| 15 | 14 | ||
| 16 | -DLL_EXPORT | ||
| 17 | Pl_ASCIIHexDecoder::~Pl_ASCIIHexDecoder() | 15 | Pl_ASCIIHexDecoder::~Pl_ASCIIHexDecoder() |
| 18 | { | 16 | { |
| 19 | } | 17 | } |
| 20 | 18 | ||
| 21 | -DLL_EXPORT | ||
| 22 | void | 19 | void |
| 23 | Pl_ASCIIHexDecoder::write(unsigned char* buf, int len) | 20 | Pl_ASCIIHexDecoder::write(unsigned char* buf, int len) |
| 24 | { | 21 | { |
| @@ -104,7 +101,6 @@ Pl_ASCIIHexDecoder::flush() | @@ -104,7 +101,6 @@ Pl_ASCIIHexDecoder::flush() | ||
| 104 | strcpy(this->inbuf, "00"); | 101 | strcpy(this->inbuf, "00"); |
| 105 | } | 102 | } |
| 106 | 103 | ||
| 107 | -DLL_EXPORT | ||
| 108 | void | 104 | void |
| 109 | Pl_ASCIIHexDecoder::finish() | 105 | Pl_ASCIIHexDecoder::finish() |
| 110 | { | 106 | { |
libqpdf/Pl_Buffer.cc
| @@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
| 3 | #include <assert.h> | 3 | #include <assert.h> |
| 4 | #include <string.h> | 4 | #include <string.h> |
| 5 | 5 | ||
| 6 | -DLL_EXPORT | ||
| 7 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : | 6 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : |
| 8 | Pipeline(identifier, next), | 7 | Pipeline(identifier, next), |
| 9 | ready(false), | 8 | ready(false), |
| @@ -11,12 +10,10 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : | @@ -11,12 +10,10 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : | ||
| 11 | { | 10 | { |
| 12 | } | 11 | } |
| 13 | 12 | ||
| 14 | -DLL_EXPORT | ||
| 15 | Pl_Buffer::~Pl_Buffer() | 13 | Pl_Buffer::~Pl_Buffer() |
| 16 | { | 14 | { |
| 17 | } | 15 | } |
| 18 | 16 | ||
| 19 | -DLL_EXPORT | ||
| 20 | void | 17 | void |
| 21 | Pl_Buffer::write(unsigned char* buf, int len) | 18 | Pl_Buffer::write(unsigned char* buf, int len) |
| 22 | { | 19 | { |
| @@ -32,7 +29,6 @@ Pl_Buffer::write(unsigned char* buf, int len) | @@ -32,7 +29,6 @@ Pl_Buffer::write(unsigned char* buf, int len) | ||
| 32 | } | 29 | } |
| 33 | } | 30 | } |
| 34 | 31 | ||
| 35 | -DLL_EXPORT | ||
| 36 | void | 32 | void |
| 37 | Pl_Buffer::finish() | 33 | Pl_Buffer::finish() |
| 38 | { | 34 | { |
| @@ -43,7 +39,6 @@ Pl_Buffer::finish() | @@ -43,7 +39,6 @@ Pl_Buffer::finish() | ||
| 43 | } | 39 | } |
| 44 | } | 40 | } |
| 45 | 41 | ||
| 46 | -DLL_EXPORT | ||
| 47 | Buffer* | 42 | Buffer* |
| 48 | Pl_Buffer::getBuffer() | 43 | Pl_Buffer::getBuffer() |
| 49 | { | 44 | { |
libqpdf/Pl_Count.cc
| 1 | #include <qpdf/Pl_Count.hh> | 1 | #include <qpdf/Pl_Count.hh> |
| 2 | 2 | ||
| 3 | -DLL_EXPORT | ||
| 4 | Pl_Count::Pl_Count(char const* identifier, Pipeline* next) : | 3 | Pl_Count::Pl_Count(char const* identifier, Pipeline* next) : |
| 5 | Pipeline(identifier, next), | 4 | Pipeline(identifier, next), |
| 6 | count(0), | 5 | count(0), |
| @@ -8,12 +7,10 @@ Pl_Count::Pl_Count(char const* identifier, Pipeline* next) : | @@ -8,12 +7,10 @@ Pl_Count::Pl_Count(char const* identifier, Pipeline* next) : | ||
| 8 | { | 7 | { |
| 9 | } | 8 | } |
| 10 | 9 | ||
| 11 | -DLL_EXPORT | ||
| 12 | Pl_Count::~Pl_Count() | 10 | Pl_Count::~Pl_Count() |
| 13 | { | 11 | { |
| 14 | } | 12 | } |
| 15 | 13 | ||
| 16 | -DLL_EXPORT | ||
| 17 | void | 14 | void |
| 18 | Pl_Count::write(unsigned char* buf, int len) | 15 | Pl_Count::write(unsigned char* buf, int len) |
| 19 | { | 16 | { |
| @@ -25,21 +22,18 @@ Pl_Count::write(unsigned char* buf, int len) | @@ -25,21 +22,18 @@ Pl_Count::write(unsigned char* buf, int len) | ||
| 25 | } | 22 | } |
| 26 | } | 23 | } |
| 27 | 24 | ||
| 28 | -DLL_EXPORT | ||
| 29 | void | 25 | void |
| 30 | Pl_Count::finish() | 26 | Pl_Count::finish() |
| 31 | { | 27 | { |
| 32 | getNext()->finish(); | 28 | getNext()->finish(); |
| 33 | } | 29 | } |
| 34 | 30 | ||
| 35 | -DLL_EXPORT | ||
| 36 | int | 31 | int |
| 37 | Pl_Count::getCount() const | 32 | Pl_Count::getCount() const |
| 38 | { | 33 | { |
| 39 | return this->count; | 34 | return this->count; |
| 40 | } | 35 | } |
| 41 | 36 | ||
| 42 | -DLL_EXPORT | ||
| 43 | unsigned char | 37 | unsigned char |
| 44 | Pl_Count::getLastChar() const | 38 | Pl_Count::getLastChar() const |
| 45 | { | 39 | { |
libqpdf/Pl_Discard.cc
| @@ -2,24 +2,20 @@ | @@ -2,24 +2,20 @@ | ||
| 2 | 2 | ||
| 3 | // Exercised in md5 test suite | 3 | // Exercised in md5 test suite |
| 4 | 4 | ||
| 5 | -DLL_EXPORT | ||
| 6 | Pl_Discard::Pl_Discard() : | 5 | Pl_Discard::Pl_Discard() : |
| 7 | Pipeline("discard", 0) | 6 | Pipeline("discard", 0) |
| 8 | { | 7 | { |
| 9 | } | 8 | } |
| 10 | 9 | ||
| 11 | -DLL_EXPORT | ||
| 12 | Pl_Discard::~Pl_Discard() | 10 | Pl_Discard::~Pl_Discard() |
| 13 | { | 11 | { |
| 14 | } | 12 | } |
| 15 | 13 | ||
| 16 | -DLL_EXPORT | ||
| 17 | void | 14 | void |
| 18 | Pl_Discard::write(unsigned char* buf, int len) | 15 | Pl_Discard::write(unsigned char* buf, int len) |
| 19 | { | 16 | { |
| 20 | } | 17 | } |
| 21 | 18 | ||
| 22 | -DLL_EXPORT | ||
| 23 | void | 19 | void |
| 24 | Pl_Discard::finish() | 20 | Pl_Discard::finish() |
| 25 | { | 21 | { |
libqpdf/Pl_Flate.cc
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | 2 | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | 4 | ||
| 5 | -DLL_EXPORT | ||
| 6 | Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next, | 5 | Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next, |
| 7 | action_e action, int out_bufsize) : | 6 | action_e action, int out_bufsize) : |
| 8 | Pipeline(identifier, next), | 7 | Pipeline(identifier, next), |
| @@ -21,7 +20,6 @@ Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next, | @@ -21,7 +20,6 @@ Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next, | ||
| 21 | zstream.avail_out = out_bufsize; | 20 | zstream.avail_out = out_bufsize; |
| 22 | } | 21 | } |
| 23 | 22 | ||
| 24 | -DLL_EXPORT | ||
| 25 | Pl_Flate::~Pl_Flate() | 23 | Pl_Flate::~Pl_Flate() |
| 26 | { | 24 | { |
| 27 | if (this->outbuf) | 25 | if (this->outbuf) |
| @@ -31,7 +29,6 @@ Pl_Flate::~Pl_Flate() | @@ -31,7 +29,6 @@ Pl_Flate::~Pl_Flate() | ||
| 31 | } | 29 | } |
| 32 | } | 30 | } |
| 33 | 31 | ||
| 34 | -DLL_EXPORT | ||
| 35 | void | 32 | void |
| 36 | Pl_Flate::write(unsigned char* data, int len) | 33 | Pl_Flate::write(unsigned char* data, int len) |
| 37 | { | 34 | { |
| @@ -119,7 +116,6 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush) | @@ -119,7 +116,6 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush) | ||
| 119 | } | 116 | } |
| 120 | } | 117 | } |
| 121 | 118 | ||
| 122 | -DLL_EXPORT | ||
| 123 | void | 119 | void |
| 124 | Pl_Flate::finish() | 120 | Pl_Flate::finish() |
| 125 | { | 121 | { |
libqpdf/Pl_LZWDecoder.cc
| @@ -5,7 +5,6 @@ | @@ -5,7 +5,6 @@ | ||
| 5 | #include <string.h> | 5 | #include <string.h> |
| 6 | #include <assert.h> | 6 | #include <assert.h> |
| 7 | 7 | ||
| 8 | -DLL_EXPORT | ||
| 9 | Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, | 8 | Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, |
| 10 | bool early_code_change) : | 9 | bool early_code_change) : |
| 11 | Pipeline(identifier, next), | 10 | Pipeline(identifier, next), |
| @@ -21,12 +20,10 @@ Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, | @@ -21,12 +20,10 @@ Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, | ||
| 21 | memset(buf, 0, 3); | 20 | memset(buf, 0, 3); |
| 22 | } | 21 | } |
| 23 | 22 | ||
| 24 | -DLL_EXPORT | ||
| 25 | Pl_LZWDecoder::~Pl_LZWDecoder() | 23 | Pl_LZWDecoder::~Pl_LZWDecoder() |
| 26 | { | 24 | { |
| 27 | } | 25 | } |
| 28 | 26 | ||
| 29 | -DLL_EXPORT | ||
| 30 | void | 27 | void |
| 31 | Pl_LZWDecoder::write(unsigned char* bytes, int len) | 28 | Pl_LZWDecoder::write(unsigned char* bytes, int len) |
| 32 | { | 29 | { |
| @@ -45,7 +42,6 @@ Pl_LZWDecoder::write(unsigned char* bytes, int len) | @@ -45,7 +42,6 @@ Pl_LZWDecoder::write(unsigned char* bytes, int len) | ||
| 45 | } | 42 | } |
| 46 | } | 43 | } |
| 47 | 44 | ||
| 48 | -DLL_EXPORT | ||
| 49 | void | 45 | void |
| 50 | Pl_LZWDecoder::finish() | 46 | Pl_LZWDecoder::finish() |
| 51 | { | 47 | { |
libqpdf/Pl_MD5.cc
| 1 | #include <qpdf/Pl_MD5.hh> | 1 | #include <qpdf/Pl_MD5.hh> |
| 2 | #include <stdexcept> | 2 | #include <stdexcept> |
| 3 | 3 | ||
| 4 | -DLL_EXPORT | ||
| 5 | Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) : | 4 | Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) : |
| 6 | Pipeline(identifier, next), | 5 | Pipeline(identifier, next), |
| 7 | in_progress(false) | 6 | in_progress(false) |
| 8 | { | 7 | { |
| 9 | } | 8 | } |
| 10 | 9 | ||
| 11 | -DLL_EXPORT | ||
| 12 | Pl_MD5::~Pl_MD5() | 10 | Pl_MD5::~Pl_MD5() |
| 13 | { | 11 | { |
| 14 | } | 12 | } |
| 15 | 13 | ||
| 16 | -DLL_EXPORT | ||
| 17 | void | 14 | void |
| 18 | Pl_MD5::write(unsigned char* buf, int len) | 15 | Pl_MD5::write(unsigned char* buf, int len) |
| 19 | { | 16 | { |
| @@ -26,7 +23,6 @@ Pl_MD5::write(unsigned char* buf, int len) | @@ -26,7 +23,6 @@ Pl_MD5::write(unsigned char* buf, int len) | ||
| 26 | this->getNext()->write(buf, len); | 23 | this->getNext()->write(buf, len); |
| 27 | } | 24 | } |
| 28 | 25 | ||
| 29 | -DLL_EXPORT | ||
| 30 | void | 26 | void |
| 31 | Pl_MD5::finish() | 27 | Pl_MD5::finish() |
| 32 | { | 28 | { |
| @@ -34,7 +30,6 @@ Pl_MD5::finish() | @@ -34,7 +30,6 @@ Pl_MD5::finish() | ||
| 34 | this->in_progress = false; | 30 | this->in_progress = false; |
| 35 | } | 31 | } |
| 36 | 32 | ||
| 37 | -DLL_EXPORT | ||
| 38 | std::string | 33 | std::string |
| 39 | Pl_MD5::getHexDigest() | 34 | Pl_MD5::getHexDigest() |
| 40 | { | 35 | { |
libqpdf/Pl_PNGFilter.cc
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | #include <stdexcept> | 2 | #include <stdexcept> |
| 3 | #include <string.h> | 3 | #include <string.h> |
| 4 | 4 | ||
| 5 | -DLL_EXPORT | ||
| 6 | Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, | 5 | Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, |
| 7 | action_e action, unsigned int columns, | 6 | action_e action, unsigned int columns, |
| 8 | unsigned int bytes_per_pixel) : | 7 | unsigned int bytes_per_pixel) : |
| @@ -23,14 +22,12 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, | @@ -23,14 +22,12 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, | ||
| 23 | this->incoming = (action == a_encode ? columns : columns + 1); | 22 | this->incoming = (action == a_encode ? columns : columns + 1); |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | -DLL_EXPORT | ||
| 27 | Pl_PNGFilter::~Pl_PNGFilter() | 25 | Pl_PNGFilter::~Pl_PNGFilter() |
| 28 | { | 26 | { |
| 29 | delete [] buf1; | 27 | delete [] buf1; |
| 30 | delete [] buf2; | 28 | delete [] buf2; |
| 31 | } | 29 | } |
| 32 | 30 | ||
| 33 | -DLL_EXPORT | ||
| 34 | void | 31 | void |
| 35 | Pl_PNGFilter::write(unsigned char* data, int len) | 32 | Pl_PNGFilter::write(unsigned char* data, int len) |
| 36 | { | 33 | { |
| @@ -132,7 +129,6 @@ Pl_PNGFilter::encodeRow() | @@ -132,7 +129,6 @@ Pl_PNGFilter::encodeRow() | ||
| 132 | } | 129 | } |
| 133 | } | 130 | } |
| 134 | 131 | ||
| 135 | -DLL_EXPORT | ||
| 136 | void | 132 | void |
| 137 | Pl_PNGFilter::finish() | 133 | Pl_PNGFilter::finish() |
| 138 | { | 134 | { |
libqpdf/Pl_RC4.cc
| 1 | #include <qpdf/Pl_RC4.hh> | 1 | #include <qpdf/Pl_RC4.hh> |
| 2 | #include <qpdf/QUtil.hh> | 2 | #include <qpdf/QUtil.hh> |
| 3 | 3 | ||
| 4 | -DLL_EXPORT | ||
| 5 | Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, | 4 | Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, |
| 6 | unsigned char const* key_data, int key_len, | 5 | unsigned char const* key_data, int key_len, |
| 7 | int out_bufsize) : | 6 | int out_bufsize) : |
| @@ -12,7 +11,6 @@ Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, | @@ -12,7 +11,6 @@ Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, | ||
| 12 | this->outbuf = new unsigned char[out_bufsize]; | 11 | this->outbuf = new unsigned char[out_bufsize]; |
| 13 | } | 12 | } |
| 14 | 13 | ||
| 15 | -DLL_EXPORT | ||
| 16 | Pl_RC4::~Pl_RC4() | 14 | Pl_RC4::~Pl_RC4() |
| 17 | { | 15 | { |
| 18 | if (this->outbuf) | 16 | if (this->outbuf) |
| @@ -22,7 +20,6 @@ Pl_RC4::~Pl_RC4() | @@ -22,7 +20,6 @@ Pl_RC4::~Pl_RC4() | ||
| 22 | } | 20 | } |
| 23 | } | 21 | } |
| 24 | 22 | ||
| 25 | -DLL_EXPORT | ||
| 26 | void | 23 | void |
| 27 | Pl_RC4::write(unsigned char* data, int len) | 24 | Pl_RC4::write(unsigned char* data, int len) |
| 28 | { | 25 | { |
| @@ -46,7 +43,6 @@ Pl_RC4::write(unsigned char* data, int len) | @@ -46,7 +43,6 @@ Pl_RC4::write(unsigned char* data, int len) | ||
| 46 | } | 43 | } |
| 47 | } | 44 | } |
| 48 | 45 | ||
| 49 | -DLL_EXPORT | ||
| 50 | void | 46 | void |
| 51 | Pl_RC4::finish() | 47 | Pl_RC4::finish() |
| 52 | { | 48 | { |
libqpdf/Pl_StdioFile.cc
| @@ -3,19 +3,16 @@ | @@ -3,19 +3,16 @@ | ||
| 3 | #include <stdexcept> | 3 | #include <stdexcept> |
| 4 | #include <errno.h> | 4 | #include <errno.h> |
| 5 | 5 | ||
| 6 | -DLL_EXPORT | ||
| 7 | Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) : | 6 | Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) : |
| 8 | Pipeline(identifier, 0), | 7 | Pipeline(identifier, 0), |
| 9 | file(f) | 8 | file(f) |
| 10 | { | 9 | { |
| 11 | } | 10 | } |
| 12 | 11 | ||
| 13 | -DLL_EXPORT | ||
| 14 | Pl_StdioFile::~Pl_StdioFile() | 12 | Pl_StdioFile::~Pl_StdioFile() |
| 15 | { | 13 | { |
| 16 | } | 14 | } |
| 17 | 15 | ||
| 18 | -DLL_EXPORT | ||
| 19 | void | 16 | void |
| 20 | Pl_StdioFile::write(unsigned char* buf, int len) | 17 | Pl_StdioFile::write(unsigned char* buf, int len) |
| 21 | { | 18 | { |
| @@ -36,7 +33,6 @@ Pl_StdioFile::write(unsigned char* buf, int len) | @@ -36,7 +33,6 @@ Pl_StdioFile::write(unsigned char* buf, int len) | ||
| 36 | } | 33 | } |
| 37 | } | 34 | } |
| 38 | 35 | ||
| 39 | -DLL_EXPORT | ||
| 40 | void | 36 | void |
| 41 | Pl_StdioFile::finish() | 37 | Pl_StdioFile::finish() |
| 42 | { | 38 | { |
libqpdf/QPDF.cc
| @@ -247,7 +247,6 @@ QPDF::ObjGen::operator<(ObjGen const& rhs) const | @@ -247,7 +247,6 @@ QPDF::ObjGen::operator<(ObjGen const& rhs) const | ||
| 247 | ((this->obj == rhs.obj) && (this->gen < rhs.gen))); | 247 | ((this->obj == rhs.obj) && (this->gen < rhs.gen))); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | -DLL_EXPORT | ||
| 251 | QPDF::QPDF() : | 250 | QPDF::QPDF() : |
| 252 | encrypted(false), | 251 | encrypted(false), |
| 253 | encryption_initialized(false), | 252 | encryption_initialized(false), |
| @@ -261,12 +260,10 @@ QPDF::QPDF() : | @@ -261,12 +260,10 @@ QPDF::QPDF() : | ||
| 261 | { | 260 | { |
| 262 | } | 261 | } |
| 263 | 262 | ||
| 264 | -DLL_EXPORT | ||
| 265 | QPDF::~QPDF() | 263 | QPDF::~QPDF() |
| 266 | { | 264 | { |
| 267 | } | 265 | } |
| 268 | 266 | ||
| 269 | -DLL_EXPORT | ||
| 270 | void | 267 | void |
| 271 | QPDF::processFile(char const* filename, char const* password) | 268 | QPDF::processFile(char const* filename, char const* password) |
| 272 | { | 269 | { |
| @@ -278,28 +275,24 @@ QPDF::processFile(char const* filename, char const* password) | @@ -278,28 +275,24 @@ QPDF::processFile(char const* filename, char const* password) | ||
| 278 | parse(); | 275 | parse(); |
| 279 | } | 276 | } |
| 280 | 277 | ||
| 281 | -DLL_EXPORT | ||
| 282 | void | 278 | void |
| 283 | QPDF::setIgnoreXRefStreams(bool val) | 279 | QPDF::setIgnoreXRefStreams(bool val) |
| 284 | { | 280 | { |
| 285 | this->ignore_xref_streams = val; | 281 | this->ignore_xref_streams = val; |
| 286 | } | 282 | } |
| 287 | 283 | ||
| 288 | -DLL_EXPORT | ||
| 289 | void | 284 | void |
| 290 | QPDF::setSuppressWarnings(bool val) | 285 | QPDF::setSuppressWarnings(bool val) |
| 291 | { | 286 | { |
| 292 | this->suppress_warnings = val; | 287 | this->suppress_warnings = val; |
| 293 | } | 288 | } |
| 294 | 289 | ||
| 295 | -DLL_EXPORT | ||
| 296 | void | 290 | void |
| 297 | QPDF::setAttemptRecovery(bool val) | 291 | QPDF::setAttemptRecovery(bool val) |
| 298 | { | 292 | { |
| 299 | this->attempt_recovery = val; | 293 | this->attempt_recovery = val; |
| 300 | } | 294 | } |
| 301 | 295 | ||
| 302 | -DLL_EXPORT | ||
| 303 | std::vector<std::string> | 296 | std::vector<std::string> |
| 304 | QPDF::getWarnings() | 297 | QPDF::getWarnings() |
| 305 | { | 298 | { |
| @@ -944,7 +937,6 @@ QPDF::insertXrefEntry(int obj, int f0, int f1, int f2, bool overwrite) | @@ -944,7 +937,6 @@ QPDF::insertXrefEntry(int obj, int f0, int f1, int f2, bool overwrite) | ||
| 944 | } | 937 | } |
| 945 | } | 938 | } |
| 946 | 939 | ||
| 947 | -DLL_EXPORT | ||
| 948 | void | 940 | void |
| 949 | QPDF::showXRefTable() | 941 | QPDF::showXRefTable() |
| 950 | { | 942 | { |
| @@ -1631,7 +1623,6 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | @@ -1631,7 +1623,6 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | ||
| 1631 | } | 1623 | } |
| 1632 | } | 1624 | } |
| 1633 | 1625 | ||
| 1634 | -DLL_EXPORT | ||
| 1635 | QPDFObjectHandle | 1626 | QPDFObjectHandle |
| 1636 | QPDF::makeIndirectObject(QPDFObjectHandle oh) | 1627 | QPDF::makeIndirectObject(QPDFObjectHandle oh) |
| 1637 | { | 1628 | { |
| @@ -1646,14 +1637,12 @@ QPDF::makeIndirectObject(QPDFObjectHandle oh) | @@ -1646,14 +1637,12 @@ QPDF::makeIndirectObject(QPDFObjectHandle oh) | ||
| 1646 | return QPDFObjectHandle::Factory::newIndirect(this, next.obj, next.gen); | 1637 | return QPDFObjectHandle::Factory::newIndirect(this, next.obj, next.gen); |
| 1647 | } | 1638 | } |
| 1648 | 1639 | ||
| 1649 | -DLL_EXPORT | ||
| 1650 | QPDFObjectHandle | 1640 | QPDFObjectHandle |
| 1651 | QPDF::getObjectByID(int objid, int generation) | 1641 | QPDF::getObjectByID(int objid, int generation) |
| 1652 | { | 1642 | { |
| 1653 | return QPDFObjectHandle::Factory::newIndirect(this, objid, generation); | 1643 | return QPDFObjectHandle::Factory::newIndirect(this, objid, generation); |
| 1654 | } | 1644 | } |
| 1655 | 1645 | ||
| 1656 | -DLL_EXPORT | ||
| 1657 | void | 1646 | void |
| 1658 | QPDF::trimTrailerForWrite() | 1647 | QPDF::trimTrailerForWrite() |
| 1659 | { | 1648 | { |
| @@ -1676,35 +1665,30 @@ QPDF::trimTrailerForWrite() | @@ -1676,35 +1665,30 @@ QPDF::trimTrailerForWrite() | ||
| 1676 | this->trailer.removeKey("/XRefStm"); | 1665 | this->trailer.removeKey("/XRefStm"); |
| 1677 | } | 1666 | } |
| 1678 | 1667 | ||
| 1679 | -DLL_EXPORT | ||
| 1680 | std::string | 1668 | std::string |
| 1681 | QPDF::getFilename() const | 1669 | QPDF::getFilename() const |
| 1682 | { | 1670 | { |
| 1683 | return this->file.getName(); | 1671 | return this->file.getName(); |
| 1684 | } | 1672 | } |
| 1685 | 1673 | ||
| 1686 | -DLL_EXPORT | ||
| 1687 | std::string | 1674 | std::string |
| 1688 | QPDF::getPDFVersion() const | 1675 | QPDF::getPDFVersion() const |
| 1689 | { | 1676 | { |
| 1690 | return this->pdf_version; | 1677 | return this->pdf_version; |
| 1691 | } | 1678 | } |
| 1692 | 1679 | ||
| 1693 | -DLL_EXPORT | ||
| 1694 | QPDFObjectHandle | 1680 | QPDFObjectHandle |
| 1695 | QPDF::getTrailer() | 1681 | QPDF::getTrailer() |
| 1696 | { | 1682 | { |
| 1697 | return this->trailer; | 1683 | return this->trailer; |
| 1698 | } | 1684 | } |
| 1699 | 1685 | ||
| 1700 | -DLL_EXPORT | ||
| 1701 | QPDFObjectHandle | 1686 | QPDFObjectHandle |
| 1702 | QPDF::getRoot() | 1687 | QPDF::getRoot() |
| 1703 | { | 1688 | { |
| 1704 | return this->trailer.getKey("/Root"); | 1689 | return this->trailer.getKey("/Root"); |
| 1705 | } | 1690 | } |
| 1706 | 1691 | ||
| 1707 | -DLL_EXPORT | ||
| 1708 | void | 1692 | void |
| 1709 | QPDF::getObjectStreamData(std::map<int, int>& omap) | 1693 | QPDF::getObjectStreamData(std::map<int, int>& omap) |
| 1710 | { | 1694 | { |
| @@ -1721,7 +1705,6 @@ QPDF::getObjectStreamData(std::map<int, int>& omap) | @@ -1721,7 +1705,6 @@ QPDF::getObjectStreamData(std::map<int, int>& omap) | ||
| 1721 | } | 1705 | } |
| 1722 | } | 1706 | } |
| 1723 | 1707 | ||
| 1724 | -DLL_EXPORT | ||
| 1725 | std::vector<int> | 1708 | std::vector<int> |
| 1726 | QPDF::getCompressibleObjects() | 1709 | QPDF::getCompressibleObjects() |
| 1727 | { | 1710 | { |
| @@ -1870,7 +1853,6 @@ QPDF::pipeStreamData(int objid, int generation, | @@ -1870,7 +1853,6 @@ QPDF::pipeStreamData(int objid, int generation, | ||
| 1870 | pipeline->finish(); | 1853 | pipeline->finish(); |
| 1871 | } | 1854 | } |
| 1872 | 1855 | ||
| 1873 | -DLL_EXPORT | ||
| 1874 | void | 1856 | void |
| 1875 | QPDF::decodeStreams() | 1857 | QPDF::decodeStreams() |
| 1876 | { | 1858 | { |
| @@ -1888,7 +1870,6 @@ QPDF::decodeStreams() | @@ -1888,7 +1870,6 @@ QPDF::decodeStreams() | ||
| 1888 | } | 1870 | } |
| 1889 | } | 1871 | } |
| 1890 | 1872 | ||
| 1891 | -DLL_EXPORT | ||
| 1892 | std::vector<QPDFObjectHandle> const& | 1873 | std::vector<QPDFObjectHandle> const& |
| 1893 | QPDF::getAllPages() | 1874 | QPDF::getAllPages() |
| 1894 | { | 1875 | { |
libqpdf/QPDFExc.cc
| 1 | #include <qpdf/QPDFExc.hh> | 1 | #include <qpdf/QPDFExc.hh> |
| 2 | #include <qpdf/QUtil.hh> | 2 | #include <qpdf/QUtil.hh> |
| 3 | 3 | ||
| 4 | -DLL_EXPORT | ||
| 5 | QPDFExc::QPDFExc(std::string const& message) : | 4 | QPDFExc::QPDFExc(std::string const& message) : |
| 6 | std::runtime_error(message) | 5 | std::runtime_error(message) |
| 7 | { | 6 | { |
| 8 | } | 7 | } |
| 9 | 8 | ||
| 10 | -DLL_EXPORT | ||
| 11 | QPDFExc::QPDFExc(std::string const& filename, int offset, | 9 | QPDFExc::QPDFExc(std::string const& filename, int offset, |
| 12 | std::string const& message) : | 10 | std::string const& message) : |
| 13 | std::runtime_error(filename + ": offset " + QUtil::int_to_string(offset) + | 11 | std::runtime_error(filename + ": offset " + QUtil::int_to_string(offset) + |
| @@ -15,7 +13,6 @@ QPDFExc::QPDFExc(std::string const& filename, int offset, | @@ -15,7 +13,6 @@ QPDFExc::QPDFExc(std::string const& filename, int offset, | ||
| 15 | { | 13 | { |
| 16 | } | 14 | } |
| 17 | 15 | ||
| 18 | -DLL_EXPORT | ||
| 19 | QPDFExc::~QPDFExc() throw () | 16 | QPDFExc::~QPDFExc() throw () |
| 20 | { | 17 | { |
| 21 | } | 18 | } |
libqpdf/QPDFObjectHandle.cc
| @@ -17,7 +17,6 @@ | @@ -17,7 +17,6 @@ | ||
| 17 | #include <stdexcept> | 17 | #include <stdexcept> |
| 18 | #include <stdlib.h> | 18 | #include <stdlib.h> |
| 19 | 19 | ||
| 20 | -DLL_EXPORT | ||
| 21 | QPDFObjectHandle::QPDFObjectHandle() : | 20 | QPDFObjectHandle::QPDFObjectHandle() : |
| 22 | initialized(false), | 21 | initialized(false), |
| 23 | objid(0), | 22 | objid(0), |
| @@ -42,7 +41,6 @@ QPDFObjectHandle::QPDFObjectHandle(QPDFObject* data) : | @@ -42,7 +41,6 @@ QPDFObjectHandle::QPDFObjectHandle(QPDFObject* data) : | ||
| 42 | { | 41 | { |
| 43 | } | 42 | } |
| 44 | 43 | ||
| 45 | -DLL_EXPORT | ||
| 46 | bool | 44 | bool |
| 47 | QPDFObjectHandle::isInitialized() const | 45 | QPDFObjectHandle::isInitialized() const |
| 48 | { | 46 | { |
| @@ -59,7 +57,6 @@ class QPDFObjectTypeAccessor | @@ -59,7 +57,6 @@ class QPDFObjectTypeAccessor | ||
| 59 | } | 57 | } |
| 60 | }; | 58 | }; |
| 61 | 59 | ||
| 62 | -DLL_EXPORT | ||
| 63 | bool | 60 | bool |
| 64 | QPDFObjectHandle::isBool() | 61 | QPDFObjectHandle::isBool() |
| 65 | { | 62 | { |
| @@ -67,7 +64,6 @@ QPDFObjectHandle::isBool() | @@ -67,7 +64,6 @@ QPDFObjectHandle::isBool() | ||
| 67 | return QPDFObjectTypeAccessor<QPDF_Bool>::check(obj.getPointer()); | 64 | return QPDFObjectTypeAccessor<QPDF_Bool>::check(obj.getPointer()); |
| 68 | } | 65 | } |
| 69 | 66 | ||
| 70 | -DLL_EXPORT | ||
| 71 | bool | 67 | bool |
| 72 | QPDFObjectHandle::isNull() | 68 | QPDFObjectHandle::isNull() |
| 73 | { | 69 | { |
| @@ -75,7 +71,6 @@ QPDFObjectHandle::isNull() | @@ -75,7 +71,6 @@ QPDFObjectHandle::isNull() | ||
| 75 | return QPDFObjectTypeAccessor<QPDF_Null>::check(obj.getPointer()); | 71 | return QPDFObjectTypeAccessor<QPDF_Null>::check(obj.getPointer()); |
| 76 | } | 72 | } |
| 77 | 73 | ||
| 78 | -DLL_EXPORT | ||
| 79 | bool | 74 | bool |
| 80 | QPDFObjectHandle::isInteger() | 75 | QPDFObjectHandle::isInteger() |
| 81 | { | 76 | { |
| @@ -83,7 +78,6 @@ QPDFObjectHandle::isInteger() | @@ -83,7 +78,6 @@ QPDFObjectHandle::isInteger() | ||
| 83 | return QPDFObjectTypeAccessor<QPDF_Integer>::check(obj.getPointer()); | 78 | return QPDFObjectTypeAccessor<QPDF_Integer>::check(obj.getPointer()); |
| 84 | } | 79 | } |
| 85 | 80 | ||
| 86 | -DLL_EXPORT | ||
| 87 | bool | 81 | bool |
| 88 | QPDFObjectHandle::isReal() | 82 | QPDFObjectHandle::isReal() |
| 89 | { | 83 | { |
| @@ -91,14 +85,12 @@ QPDFObjectHandle::isReal() | @@ -91,14 +85,12 @@ QPDFObjectHandle::isReal() | ||
| 91 | return QPDFObjectTypeAccessor<QPDF_Real>::check(obj.getPointer()); | 85 | return QPDFObjectTypeAccessor<QPDF_Real>::check(obj.getPointer()); |
| 92 | } | 86 | } |
| 93 | 87 | ||
| 94 | -DLL_EXPORT | ||
| 95 | bool | 88 | bool |
| 96 | QPDFObjectHandle::isNumber() | 89 | QPDFObjectHandle::isNumber() |
| 97 | { | 90 | { |
| 98 | return (isInteger() || isReal()); | 91 | return (isInteger() || isReal()); |
| 99 | } | 92 | } |
| 100 | 93 | ||
| 101 | -DLL_EXPORT | ||
| 102 | double | 94 | double |
| 103 | QPDFObjectHandle::getNumericValue() | 95 | QPDFObjectHandle::getNumericValue() |
| 104 | { | 96 | { |
| @@ -118,7 +110,6 @@ QPDFObjectHandle::getNumericValue() | @@ -118,7 +110,6 @@ QPDFObjectHandle::getNumericValue() | ||
| 118 | return result; | 110 | return result; |
| 119 | } | 111 | } |
| 120 | 112 | ||
| 121 | -DLL_EXPORT | ||
| 122 | bool | 113 | bool |
| 123 | QPDFObjectHandle::isName() | 114 | QPDFObjectHandle::isName() |
| 124 | { | 115 | { |
| @@ -126,7 +117,6 @@ QPDFObjectHandle::isName() | @@ -126,7 +117,6 @@ QPDFObjectHandle::isName() | ||
| 126 | return QPDFObjectTypeAccessor<QPDF_Name>::check(obj.getPointer()); | 117 | return QPDFObjectTypeAccessor<QPDF_Name>::check(obj.getPointer()); |
| 127 | } | 118 | } |
| 128 | 119 | ||
| 129 | -DLL_EXPORT | ||
| 130 | bool | 120 | bool |
| 131 | QPDFObjectHandle::isString() | 121 | QPDFObjectHandle::isString() |
| 132 | { | 122 | { |
| @@ -134,7 +124,6 @@ QPDFObjectHandle::isString() | @@ -134,7 +124,6 @@ QPDFObjectHandle::isString() | ||
| 134 | return QPDFObjectTypeAccessor<QPDF_String>::check(obj.getPointer()); | 124 | return QPDFObjectTypeAccessor<QPDF_String>::check(obj.getPointer()); |
| 135 | } | 125 | } |
| 136 | 126 | ||
| 137 | -DLL_EXPORT | ||
| 138 | bool | 127 | bool |
| 139 | QPDFObjectHandle::isArray() | 128 | QPDFObjectHandle::isArray() |
| 140 | { | 129 | { |
| @@ -142,7 +131,6 @@ QPDFObjectHandle::isArray() | @@ -142,7 +131,6 @@ QPDFObjectHandle::isArray() | ||
| 142 | return QPDFObjectTypeAccessor<QPDF_Array>::check(obj.getPointer()); | 131 | return QPDFObjectTypeAccessor<QPDF_Array>::check(obj.getPointer()); |
| 143 | } | 132 | } |
| 144 | 133 | ||
| 145 | -DLL_EXPORT | ||
| 146 | bool | 134 | bool |
| 147 | QPDFObjectHandle::isDictionary() | 135 | QPDFObjectHandle::isDictionary() |
| 148 | { | 136 | { |
| @@ -150,7 +138,6 @@ QPDFObjectHandle::isDictionary() | @@ -150,7 +138,6 @@ QPDFObjectHandle::isDictionary() | ||
| 150 | return QPDFObjectTypeAccessor<QPDF_Dictionary>::check(obj.getPointer()); | 138 | return QPDFObjectTypeAccessor<QPDF_Dictionary>::check(obj.getPointer()); |
| 151 | } | 139 | } |
| 152 | 140 | ||
| 153 | -DLL_EXPORT | ||
| 154 | bool | 141 | bool |
| 155 | QPDFObjectHandle::isStream() | 142 | QPDFObjectHandle::isStream() |
| 156 | { | 143 | { |
| @@ -158,7 +145,6 @@ QPDFObjectHandle::isStream() | @@ -158,7 +145,6 @@ QPDFObjectHandle::isStream() | ||
| 158 | return QPDFObjectTypeAccessor<QPDF_Stream>::check(obj.getPointer()); | 145 | return QPDFObjectTypeAccessor<QPDF_Stream>::check(obj.getPointer()); |
| 159 | } | 146 | } |
| 160 | 147 | ||
| 161 | -DLL_EXPORT | ||
| 162 | bool | 148 | bool |
| 163 | QPDFObjectHandle::isIndirect() | 149 | QPDFObjectHandle::isIndirect() |
| 164 | { | 150 | { |
| @@ -166,7 +152,6 @@ QPDFObjectHandle::isIndirect() | @@ -166,7 +152,6 @@ QPDFObjectHandle::isIndirect() | ||
| 166 | return (this->objid != 0); | 152 | return (this->objid != 0); |
| 167 | } | 153 | } |
| 168 | 154 | ||
| 169 | -DLL_EXPORT | ||
| 170 | bool | 155 | bool |
| 171 | QPDFObjectHandle::isScalar() | 156 | QPDFObjectHandle::isScalar() |
| 172 | { | 157 | { |
| @@ -175,7 +160,6 @@ QPDFObjectHandle::isScalar() | @@ -175,7 +160,6 @@ QPDFObjectHandle::isScalar() | ||
| 175 | 160 | ||
| 176 | // Bool accessors | 161 | // Bool accessors |
| 177 | 162 | ||
| 178 | -DLL_EXPORT | ||
| 179 | bool | 163 | bool |
| 180 | QPDFObjectHandle::getBoolValue() | 164 | QPDFObjectHandle::getBoolValue() |
| 181 | { | 165 | { |
| @@ -185,7 +169,6 @@ QPDFObjectHandle::getBoolValue() | @@ -185,7 +169,6 @@ QPDFObjectHandle::getBoolValue() | ||
| 185 | 169 | ||
| 186 | // Integer accessors | 170 | // Integer accessors |
| 187 | 171 | ||
| 188 | -DLL_EXPORT | ||
| 189 | int | 172 | int |
| 190 | QPDFObjectHandle::getIntValue() | 173 | QPDFObjectHandle::getIntValue() |
| 191 | { | 174 | { |
| @@ -195,7 +178,6 @@ QPDFObjectHandle::getIntValue() | @@ -195,7 +178,6 @@ QPDFObjectHandle::getIntValue() | ||
| 195 | 178 | ||
| 196 | // Real accessors | 179 | // Real accessors |
| 197 | 180 | ||
| 198 | -DLL_EXPORT | ||
| 199 | std::string | 181 | std::string |
| 200 | QPDFObjectHandle::getRealValue() | 182 | QPDFObjectHandle::getRealValue() |
| 201 | { | 183 | { |
| @@ -205,7 +187,6 @@ QPDFObjectHandle::getRealValue() | @@ -205,7 +187,6 @@ QPDFObjectHandle::getRealValue() | ||
| 205 | 187 | ||
| 206 | // Name accessors | 188 | // Name accessors |
| 207 | 189 | ||
| 208 | -DLL_EXPORT | ||
| 209 | std::string | 190 | std::string |
| 210 | QPDFObjectHandle::getName() | 191 | QPDFObjectHandle::getName() |
| 211 | { | 192 | { |
| @@ -215,7 +196,6 @@ QPDFObjectHandle::getName() | @@ -215,7 +196,6 @@ QPDFObjectHandle::getName() | ||
| 215 | 196 | ||
| 216 | // String accessors | 197 | // String accessors |
| 217 | 198 | ||
| 218 | -DLL_EXPORT | ||
| 219 | std::string | 199 | std::string |
| 220 | QPDFObjectHandle::getStringValue() | 200 | QPDFObjectHandle::getStringValue() |
| 221 | { | 201 | { |
| @@ -223,7 +203,6 @@ QPDFObjectHandle::getStringValue() | @@ -223,7 +203,6 @@ QPDFObjectHandle::getStringValue() | ||
| 223 | return dynamic_cast<QPDF_String*>(obj.getPointer())->getVal(); | 203 | return dynamic_cast<QPDF_String*>(obj.getPointer())->getVal(); |
| 224 | } | 204 | } |
| 225 | 205 | ||
| 226 | -DLL_EXPORT | ||
| 227 | std::string | 206 | std::string |
| 228 | QPDFObjectHandle::getUTF8Value() | 207 | QPDFObjectHandle::getUTF8Value() |
| 229 | { | 208 | { |
| @@ -233,7 +212,6 @@ QPDFObjectHandle::getUTF8Value() | @@ -233,7 +212,6 @@ QPDFObjectHandle::getUTF8Value() | ||
| 233 | 212 | ||
| 234 | // Array accessors | 213 | // Array accessors |
| 235 | 214 | ||
| 236 | -DLL_EXPORT | ||
| 237 | int | 215 | int |
| 238 | QPDFObjectHandle::getArrayNItems() | 216 | QPDFObjectHandle::getArrayNItems() |
| 239 | { | 217 | { |
| @@ -241,7 +219,6 @@ QPDFObjectHandle::getArrayNItems() | @@ -241,7 +219,6 @@ QPDFObjectHandle::getArrayNItems() | ||
| 241 | return dynamic_cast<QPDF_Array*>(obj.getPointer())->getNItems(); | 219 | return dynamic_cast<QPDF_Array*>(obj.getPointer())->getNItems(); |
| 242 | } | 220 | } |
| 243 | 221 | ||
| 244 | -DLL_EXPORT | ||
| 245 | QPDFObjectHandle | 222 | QPDFObjectHandle |
| 246 | QPDFObjectHandle::getArrayItem(int n) | 223 | QPDFObjectHandle::getArrayItem(int n) |
| 247 | { | 224 | { |
| @@ -251,7 +228,6 @@ QPDFObjectHandle::getArrayItem(int n) | @@ -251,7 +228,6 @@ QPDFObjectHandle::getArrayItem(int n) | ||
| 251 | 228 | ||
| 252 | // Array mutators | 229 | // Array mutators |
| 253 | 230 | ||
| 254 | -DLL_EXPORT | ||
| 255 | void | 231 | void |
| 256 | QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item) | 232 | QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item) |
| 257 | { | 233 | { |
| @@ -261,7 +237,6 @@ QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item) | @@ -261,7 +237,6 @@ QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item) | ||
| 261 | 237 | ||
| 262 | // Dictionary accessors | 238 | // Dictionary accessors |
| 263 | 239 | ||
| 264 | -DLL_EXPORT | ||
| 265 | bool | 240 | bool |
| 266 | QPDFObjectHandle::hasKey(std::string const& key) | 241 | QPDFObjectHandle::hasKey(std::string const& key) |
| 267 | { | 242 | { |
| @@ -269,7 +244,6 @@ QPDFObjectHandle::hasKey(std::string const& key) | @@ -269,7 +244,6 @@ QPDFObjectHandle::hasKey(std::string const& key) | ||
| 269 | return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->hasKey(key); | 244 | return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->hasKey(key); |
| 270 | } | 245 | } |
| 271 | 246 | ||
| 272 | -DLL_EXPORT | ||
| 273 | QPDFObjectHandle | 247 | QPDFObjectHandle |
| 274 | QPDFObjectHandle::getKey(std::string const& key) | 248 | QPDFObjectHandle::getKey(std::string const& key) |
| 275 | { | 249 | { |
| @@ -277,7 +251,6 @@ QPDFObjectHandle::getKey(std::string const& key) | @@ -277,7 +251,6 @@ QPDFObjectHandle::getKey(std::string const& key) | ||
| 277 | return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->getKey(key); | 251 | return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->getKey(key); |
| 278 | } | 252 | } |
| 279 | 253 | ||
| 280 | -DLL_EXPORT | ||
| 281 | std::set<std::string> | 254 | std::set<std::string> |
| 282 | QPDFObjectHandle::getKeys() | 255 | QPDFObjectHandle::getKeys() |
| 283 | { | 256 | { |
| @@ -287,7 +260,6 @@ QPDFObjectHandle::getKeys() | @@ -287,7 +260,6 @@ QPDFObjectHandle::getKeys() | ||
| 287 | 260 | ||
| 288 | // Dictionary mutators | 261 | // Dictionary mutators |
| 289 | 262 | ||
| 290 | -DLL_EXPORT | ||
| 291 | void | 263 | void |
| 292 | QPDFObjectHandle::replaceKey(std::string const& key, | 264 | QPDFObjectHandle::replaceKey(std::string const& key, |
| 293 | QPDFObjectHandle const& value) | 265 | QPDFObjectHandle const& value) |
| @@ -297,7 +269,6 @@ QPDFObjectHandle::replaceKey(std::string const& key, | @@ -297,7 +269,6 @@ QPDFObjectHandle::replaceKey(std::string const& key, | ||
| 297 | obj.getPointer())->replaceKey(key, value); | 269 | obj.getPointer())->replaceKey(key, value); |
| 298 | } | 270 | } |
| 299 | 271 | ||
| 300 | -DLL_EXPORT | ||
| 301 | void | 272 | void |
| 302 | QPDFObjectHandle::removeKey(std::string const& key) | 273 | QPDFObjectHandle::removeKey(std::string const& key) |
| 303 | { | 274 | { |
| @@ -306,7 +277,6 @@ QPDFObjectHandle::removeKey(std::string const& key) | @@ -306,7 +277,6 @@ QPDFObjectHandle::removeKey(std::string const& key) | ||
| 306 | } | 277 | } |
| 307 | 278 | ||
| 308 | // Stream accessors | 279 | // Stream accessors |
| 309 | -DLL_EXPORT | ||
| 310 | QPDFObjectHandle | 280 | QPDFObjectHandle |
| 311 | QPDFObjectHandle::getDict() | 281 | QPDFObjectHandle::getDict() |
| 312 | { | 282 | { |
| @@ -314,7 +284,6 @@ QPDFObjectHandle::getDict() | @@ -314,7 +284,6 @@ QPDFObjectHandle::getDict() | ||
| 314 | return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getDict(); | 284 | return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getDict(); |
| 315 | } | 285 | } |
| 316 | 286 | ||
| 317 | -DLL_EXPORT | ||
| 318 | PointerHolder<Buffer> | 287 | PointerHolder<Buffer> |
| 319 | QPDFObjectHandle::getStreamData() | 288 | QPDFObjectHandle::getStreamData() |
| 320 | { | 289 | { |
| @@ -322,7 +291,6 @@ QPDFObjectHandle::getStreamData() | @@ -322,7 +291,6 @@ QPDFObjectHandle::getStreamData() | ||
| 322 | return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getStreamData(); | 291 | return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getStreamData(); |
| 323 | } | 292 | } |
| 324 | 293 | ||
| 325 | -DLL_EXPORT | ||
| 326 | bool | 294 | bool |
| 327 | QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter, | 295 | QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter, |
| 328 | bool normalize, bool compress) | 296 | bool normalize, bool compress) |
| @@ -332,21 +300,18 @@ QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter, | @@ -332,21 +300,18 @@ QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter, | ||
| 332 | p, filter, normalize, compress); | 300 | p, filter, normalize, compress); |
| 333 | } | 301 | } |
| 334 | 302 | ||
| 335 | -DLL_EXPORT | ||
| 336 | int | 303 | int |
| 337 | QPDFObjectHandle::getObjectID() const | 304 | QPDFObjectHandle::getObjectID() const |
| 338 | { | 305 | { |
| 339 | return this->objid; | 306 | return this->objid; |
| 340 | } | 307 | } |
| 341 | 308 | ||
| 342 | -DLL_EXPORT | ||
| 343 | int | 309 | int |
| 344 | QPDFObjectHandle::getGeneration() const | 310 | QPDFObjectHandle::getGeneration() const |
| 345 | { | 311 | { |
| 346 | return this->generation; | 312 | return this->generation; |
| 347 | } | 313 | } |
| 348 | 314 | ||
| 349 | -DLL_EXPORT | ||
| 350 | std::map<std::string, QPDFObjectHandle> | 315 | std::map<std::string, QPDFObjectHandle> |
| 351 | QPDFObjectHandle::getPageImages() | 316 | QPDFObjectHandle::getPageImages() |
| 352 | { | 317 | { |
| @@ -395,7 +360,6 @@ QPDFObjectHandle::getPageImages() | @@ -395,7 +360,6 @@ QPDFObjectHandle::getPageImages() | ||
| 395 | return result; | 360 | return result; |
| 396 | } | 361 | } |
| 397 | 362 | ||
| 398 | -DLL_EXPORT | ||
| 399 | std::vector<QPDFObjectHandle> | 363 | std::vector<QPDFObjectHandle> |
| 400 | QPDFObjectHandle::getPageContents() | 364 | QPDFObjectHandle::getPageContents() |
| 401 | { | 365 | { |
| @@ -435,7 +399,6 @@ QPDFObjectHandle::getPageContents() | @@ -435,7 +399,6 @@ QPDFObjectHandle::getPageContents() | ||
| 435 | return result; | 399 | return result; |
| 436 | } | 400 | } |
| 437 | 401 | ||
| 438 | -DLL_EXPORT | ||
| 439 | std::string | 402 | std::string |
| 440 | QPDFObjectHandle::unparse() | 403 | QPDFObjectHandle::unparse() |
| 441 | { | 404 | { |
| @@ -452,7 +415,6 @@ QPDFObjectHandle::unparse() | @@ -452,7 +415,6 @@ QPDFObjectHandle::unparse() | ||
| 452 | return result; | 415 | return result; |
| 453 | } | 416 | } |
| 454 | 417 | ||
| 455 | -DLL_EXPORT | ||
| 456 | std::string | 418 | std::string |
| 457 | QPDFObjectHandle::unparseResolved() | 419 | QPDFObjectHandle::unparseResolved() |
| 458 | { | 420 | { |
| @@ -466,56 +428,48 @@ QPDFObjectHandle::newIndirect(QPDF* qpdf, int objid, int generation) | @@ -466,56 +428,48 @@ QPDFObjectHandle::newIndirect(QPDF* qpdf, int objid, int generation) | ||
| 466 | return QPDFObjectHandle(qpdf, objid, generation); | 428 | return QPDFObjectHandle(qpdf, objid, generation); |
| 467 | } | 429 | } |
| 468 | 430 | ||
| 469 | -DLL_EXPORT | ||
| 470 | QPDFObjectHandle | 431 | QPDFObjectHandle |
| 471 | QPDFObjectHandle::newBool(bool value) | 432 | QPDFObjectHandle::newBool(bool value) |
| 472 | { | 433 | { |
| 473 | return QPDFObjectHandle(new QPDF_Bool(value)); | 434 | return QPDFObjectHandle(new QPDF_Bool(value)); |
| 474 | } | 435 | } |
| 475 | 436 | ||
| 476 | -DLL_EXPORT | ||
| 477 | QPDFObjectHandle | 437 | QPDFObjectHandle |
| 478 | QPDFObjectHandle::newNull() | 438 | QPDFObjectHandle::newNull() |
| 479 | { | 439 | { |
| 480 | return QPDFObjectHandle(new QPDF_Null()); | 440 | return QPDFObjectHandle(new QPDF_Null()); |
| 481 | } | 441 | } |
| 482 | 442 | ||
| 483 | -DLL_EXPORT | ||
| 484 | QPDFObjectHandle | 443 | QPDFObjectHandle |
| 485 | QPDFObjectHandle::newInteger(int value) | 444 | QPDFObjectHandle::newInteger(int value) |
| 486 | { | 445 | { |
| 487 | return QPDFObjectHandle(new QPDF_Integer(value)); | 446 | return QPDFObjectHandle(new QPDF_Integer(value)); |
| 488 | } | 447 | } |
| 489 | 448 | ||
| 490 | -DLL_EXPORT | ||
| 491 | QPDFObjectHandle | 449 | QPDFObjectHandle |
| 492 | QPDFObjectHandle::newReal(std::string const& value) | 450 | QPDFObjectHandle::newReal(std::string const& value) |
| 493 | { | 451 | { |
| 494 | return QPDFObjectHandle(new QPDF_Real(value)); | 452 | return QPDFObjectHandle(new QPDF_Real(value)); |
| 495 | } | 453 | } |
| 496 | 454 | ||
| 497 | -DLL_EXPORT | ||
| 498 | QPDFObjectHandle | 455 | QPDFObjectHandle |
| 499 | QPDFObjectHandle::newName(std::string const& name) | 456 | QPDFObjectHandle::newName(std::string const& name) |
| 500 | { | 457 | { |
| 501 | return QPDFObjectHandle(new QPDF_Name(name)); | 458 | return QPDFObjectHandle(new QPDF_Name(name)); |
| 502 | } | 459 | } |
| 503 | 460 | ||
| 504 | -DLL_EXPORT | ||
| 505 | QPDFObjectHandle | 461 | QPDFObjectHandle |
| 506 | QPDFObjectHandle::newString(std::string const& str) | 462 | QPDFObjectHandle::newString(std::string const& str) |
| 507 | { | 463 | { |
| 508 | return QPDFObjectHandle(new QPDF_String(str)); | 464 | return QPDFObjectHandle(new QPDF_String(str)); |
| 509 | } | 465 | } |
| 510 | 466 | ||
| 511 | -DLL_EXPORT | ||
| 512 | QPDFObjectHandle | 467 | QPDFObjectHandle |
| 513 | QPDFObjectHandle::newArray(std::vector<QPDFObjectHandle> const& items) | 468 | QPDFObjectHandle::newArray(std::vector<QPDFObjectHandle> const& items) |
| 514 | { | 469 | { |
| 515 | return QPDFObjectHandle(new QPDF_Array(items)); | 470 | return QPDFObjectHandle(new QPDF_Array(items)); |
| 516 | } | 471 | } |
| 517 | 472 | ||
| 518 | -DLL_EXPORT | ||
| 519 | QPDFObjectHandle | 473 | QPDFObjectHandle |
| 520 | QPDFObjectHandle::newDictionary( | 474 | QPDFObjectHandle::newDictionary( |
| 521 | std::map<std::string, QPDFObjectHandle> const& items) | 475 | std::map<std::string, QPDFObjectHandle> const& items) |
libqpdf/QPDFTokenizer.cc
| @@ -16,14 +16,12 @@ static bool is_hex_digit(char ch) | @@ -16,14 +16,12 @@ static bool is_hex_digit(char ch) | ||
| 16 | return (strchr("0123456789abcdefABCDEF", ch) != 0); | 16 | return (strchr("0123456789abcdefABCDEF", ch) != 0); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | -DLL_EXPORT | ||
| 20 | QPDFTokenizer::QPDFTokenizer() : | 19 | QPDFTokenizer::QPDFTokenizer() : |
| 21 | pound_special_in_name(true) | 20 | pound_special_in_name(true) |
| 22 | { | 21 | { |
| 23 | reset(); | 22 | reset(); |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | -DLL_EXPORT | ||
| 27 | void | 25 | void |
| 28 | QPDFTokenizer::allowPoundAnywhereInName() | 26 | QPDFTokenizer::allowPoundAnywhereInName() |
| 29 | { | 27 | { |
| @@ -46,7 +44,6 @@ QPDFTokenizer::reset() | @@ -46,7 +44,6 @@ QPDFTokenizer::reset() | ||
| 46 | last_char_was_bs = false; | 44 | last_char_was_bs = false; |
| 47 | } | 45 | } |
| 48 | 46 | ||
| 49 | -DLL_EXPORT | ||
| 50 | void | 47 | void |
| 51 | QPDFTokenizer::presentCharacter(char ch) | 48 | QPDFTokenizer::presentCharacter(char ch) |
| 52 | { | 49 | { |
| @@ -423,7 +420,6 @@ QPDFTokenizer::presentCharacter(char ch) | @@ -423,7 +420,6 @@ QPDFTokenizer::presentCharacter(char ch) | ||
| 423 | } | 420 | } |
| 424 | } | 421 | } |
| 425 | 422 | ||
| 426 | -DLL_EXPORT | ||
| 427 | void | 423 | void |
| 428 | QPDFTokenizer::presentEOF() | 424 | QPDFTokenizer::presentEOF() |
| 429 | { | 425 | { |
| @@ -445,7 +441,6 @@ QPDFTokenizer::presentEOF() | @@ -445,7 +441,6 @@ QPDFTokenizer::presentEOF() | ||
| 445 | } | 441 | } |
| 446 | } | 442 | } |
| 447 | 443 | ||
| 448 | -DLL_EXPORT | ||
| 449 | bool | 444 | bool |
| 450 | QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch) | 445 | QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch) |
| 451 | { | 446 | { |
| @@ -460,7 +455,6 @@ QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch) | @@ -460,7 +455,6 @@ QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch) | ||
| 460 | return ready; | 455 | return ready; |
| 461 | } | 456 | } |
| 462 | 457 | ||
| 463 | -DLL_EXPORT | ||
| 464 | bool | 458 | bool |
| 465 | QPDFTokenizer::betweenTokens() | 459 | QPDFTokenizer::betweenTokens() |
| 466 | { | 460 | { |
libqpdf/QPDFXRefEntry.cc
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | #include <qpdf/QPDFExc.hh> | 2 | #include <qpdf/QPDFExc.hh> |
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | 4 | ||
| 5 | -DLL_EXPORT | ||
| 6 | QPDFXRefEntry::QPDFXRefEntry() : | 5 | QPDFXRefEntry::QPDFXRefEntry() : |
| 7 | type(0), | 6 | type(0), |
| 8 | field1(0), | 7 | field1(0), |
| @@ -10,7 +9,6 @@ QPDFXRefEntry::QPDFXRefEntry() : | @@ -10,7 +9,6 @@ QPDFXRefEntry::QPDFXRefEntry() : | ||
| 10 | { | 9 | { |
| 11 | } | 10 | } |
| 12 | 11 | ||
| 13 | -DLL_EXPORT | ||
| 14 | QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) : | 12 | QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) : |
| 15 | type(type), | 13 | type(type), |
| 16 | field1(field1), | 14 | field1(field1), |
| @@ -22,14 +20,12 @@ QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) : | @@ -22,14 +20,12 @@ QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) : | ||
| 22 | } | 20 | } |
| 23 | } | 21 | } |
| 24 | 22 | ||
| 25 | -DLL_EXPORT | ||
| 26 | int | 23 | int |
| 27 | QPDFXRefEntry::getType() const | 24 | QPDFXRefEntry::getType() const |
| 28 | { | 25 | { |
| 29 | return this->type; | 26 | return this->type; |
| 30 | } | 27 | } |
| 31 | 28 | ||
| 32 | -DLL_EXPORT | ||
| 33 | int | 29 | int |
| 34 | QPDFXRefEntry::getOffset() const | 30 | QPDFXRefEntry::getOffset() const |
| 35 | { | 31 | { |
| @@ -41,7 +37,6 @@ QPDFXRefEntry::getOffset() const | @@ -41,7 +37,6 @@ QPDFXRefEntry::getOffset() const | ||
| 41 | return this->field1; | 37 | return this->field1; |
| 42 | } | 38 | } |
| 43 | 39 | ||
| 44 | -DLL_EXPORT | ||
| 45 | int | 40 | int |
| 46 | QPDFXRefEntry::getObjStreamNumber() const | 41 | QPDFXRefEntry::getObjStreamNumber() const |
| 47 | { | 42 | { |
| @@ -53,7 +48,6 @@ QPDFXRefEntry::getObjStreamNumber() const | @@ -53,7 +48,6 @@ QPDFXRefEntry::getObjStreamNumber() const | ||
| 53 | return this->field1; | 48 | return this->field1; |
| 54 | } | 49 | } |
| 55 | 50 | ||
| 56 | -DLL_EXPORT | ||
| 57 | int | 51 | int |
| 58 | QPDFXRefEntry::getObjStreamIndex() const | 52 | QPDFXRefEntry::getObjStreamIndex() const |
| 59 | { | 53 | { |
libqpdf/QPDF_encryption.cc
| @@ -32,7 +32,6 @@ pad_or_truncate_password(std::string const& password, char k1[key_bytes]) | @@ -32,7 +32,6 @@ pad_or_truncate_password(std::string const& password, char k1[key_bytes]) | ||
| 32 | memcpy(k1 + password_bytes, padding_string, pad_bytes); | 32 | memcpy(k1 + password_bytes, padding_string, pad_bytes); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | -DLL_EXPORT | ||
| 36 | void | 35 | void |
| 37 | QPDF::trim_user_password(std::string& user_password) | 36 | QPDF::trim_user_password(std::string& user_password) |
| 38 | { | 37 | { |
| @@ -98,7 +97,6 @@ iterate_rc4(unsigned char* data, int data_len, | @@ -98,7 +97,6 @@ iterate_rc4(unsigned char* data, int data_len, | ||
| 98 | delete [] key; | 97 | delete [] key; |
| 99 | } | 98 | } |
| 100 | 99 | ||
| 101 | -DLL_EXPORT | ||
| 102 | std::string | 100 | std::string |
| 103 | QPDF::compute_data_key(std::string const& encryption_key, | 101 | QPDF::compute_data_key(std::string const& encryption_key, |
| 104 | int objid, int generation) | 102 | int objid, int generation) |
| @@ -122,7 +120,6 @@ QPDF::compute_data_key(std::string const& encryption_key, | @@ -122,7 +120,6 @@ QPDF::compute_data_key(std::string const& encryption_key, | ||
| 122 | std::min(result.length(), (size_t) 16)); | 120 | std::min(result.length(), (size_t) 16)); |
| 123 | } | 121 | } |
| 124 | 122 | ||
| 125 | -DLL_EXPORT | ||
| 126 | std::string | 123 | std::string |
| 127 | QPDF::compute_encryption_key( | 124 | QPDF::compute_encryption_key( |
| 128 | std::string const& password, EncryptionData const& data) | 125 | std::string const& password, EncryptionData const& data) |
| @@ -432,7 +429,6 @@ QPDF::decryptStream(Pipeline*& pipeline, int objid, int generation, | @@ -432,7 +429,6 @@ QPDF::decryptStream(Pipeline*& pipeline, int objid, int generation, | ||
| 432 | heap.push_back(pipeline); | 429 | heap.push_back(pipeline); |
| 433 | } | 430 | } |
| 434 | 431 | ||
| 435 | -DLL_EXPORT | ||
| 436 | void | 432 | void |
| 437 | QPDF::compute_encryption_O_U( | 433 | QPDF::compute_encryption_O_U( |
| 438 | char const* user_password, char const* owner_password, | 434 | char const* user_password, char const* owner_password, |
| @@ -445,14 +441,12 @@ QPDF::compute_encryption_O_U( | @@ -445,14 +441,12 @@ QPDF::compute_encryption_O_U( | ||
| 445 | U = compute_U_value(user_password, data); | 441 | U = compute_U_value(user_password, data); |
| 446 | } | 442 | } |
| 447 | 443 | ||
| 448 | -DLL_EXPORT | ||
| 449 | std::string const& | 444 | std::string const& |
| 450 | QPDF::getPaddedUserPassword() const | 445 | QPDF::getPaddedUserPassword() const |
| 451 | { | 446 | { |
| 452 | return this->user_password; | 447 | return this->user_password; |
| 453 | } | 448 | } |
| 454 | 449 | ||
| 455 | -DLL_EXPORT | ||
| 456 | std::string | 450 | std::string |
| 457 | QPDF::getTrimmedUserPassword() const | 451 | QPDF::getTrimmedUserPassword() const |
| 458 | { | 452 | { |
| @@ -461,14 +455,12 @@ QPDF::getTrimmedUserPassword() const | @@ -461,14 +455,12 @@ QPDF::getTrimmedUserPassword() const | ||
| 461 | return result; | 455 | return result; |
| 462 | } | 456 | } |
| 463 | 457 | ||
| 464 | -DLL_EXPORT | ||
| 465 | bool | 458 | bool |
| 466 | QPDF::isEncrypted() const | 459 | QPDF::isEncrypted() const |
| 467 | { | 460 | { |
| 468 | return this->encrypted; | 461 | return this->encrypted; |
| 469 | } | 462 | } |
| 470 | 463 | ||
| 471 | -DLL_EXPORT | ||
| 472 | bool | 464 | bool |
| 473 | QPDF::isEncrypted(int& R, int& P) | 465 | QPDF::isEncrypted(int& R, int& P) |
| 474 | { | 466 | { |
| @@ -495,7 +487,6 @@ is_bit_set(int P, int bit) | @@ -495,7 +487,6 @@ is_bit_set(int P, int bit) | ||
| 495 | return (P & (1 << (bit - 1))); | 487 | return (P & (1 << (bit - 1))); |
| 496 | } | 488 | } |
| 497 | 489 | ||
| 498 | -DLL_EXPORT | ||
| 499 | bool | 490 | bool |
| 500 | QPDF::allowAccessibility() | 491 | QPDF::allowAccessibility() |
| 501 | { | 492 | { |
| @@ -516,7 +507,6 @@ QPDF::allowAccessibility() | @@ -516,7 +507,6 @@ QPDF::allowAccessibility() | ||
| 516 | return status; | 507 | return status; |
| 517 | } | 508 | } |
| 518 | 509 | ||
| 519 | -DLL_EXPORT | ||
| 520 | bool | 510 | bool |
| 521 | QPDF::allowExtractAll() | 511 | QPDF::allowExtractAll() |
| 522 | { | 512 | { |
| @@ -530,7 +520,6 @@ QPDF::allowExtractAll() | @@ -530,7 +520,6 @@ QPDF::allowExtractAll() | ||
| 530 | return status; | 520 | return status; |
| 531 | } | 521 | } |
| 532 | 522 | ||
| 533 | -DLL_EXPORT | ||
| 534 | bool | 523 | bool |
| 535 | QPDF::allowPrintLowRes() | 524 | QPDF::allowPrintLowRes() |
| 536 | { | 525 | { |
| @@ -544,7 +533,6 @@ QPDF::allowPrintLowRes() | @@ -544,7 +533,6 @@ QPDF::allowPrintLowRes() | ||
| 544 | return status; | 533 | return status; |
| 545 | } | 534 | } |
| 546 | 535 | ||
| 547 | -DLL_EXPORT | ||
| 548 | bool | 536 | bool |
| 549 | QPDF::allowPrintHighRes() | 537 | QPDF::allowPrintHighRes() |
| 550 | { | 538 | { |
| @@ -562,7 +550,6 @@ QPDF::allowPrintHighRes() | @@ -562,7 +550,6 @@ QPDF::allowPrintHighRes() | ||
| 562 | return status; | 550 | return status; |
| 563 | } | 551 | } |
| 564 | 552 | ||
| 565 | -DLL_EXPORT | ||
| 566 | bool | 553 | bool |
| 567 | QPDF::allowModifyAssembly() | 554 | QPDF::allowModifyAssembly() |
| 568 | { | 555 | { |
| @@ -583,7 +570,6 @@ QPDF::allowModifyAssembly() | @@ -583,7 +570,6 @@ QPDF::allowModifyAssembly() | ||
| 583 | return status; | 570 | return status; |
| 584 | } | 571 | } |
| 585 | 572 | ||
| 586 | -DLL_EXPORT | ||
| 587 | bool | 573 | bool |
| 588 | QPDF::allowModifyForm() | 574 | QPDF::allowModifyForm() |
| 589 | { | 575 | { |
| @@ -604,7 +590,6 @@ QPDF::allowModifyForm() | @@ -604,7 +590,6 @@ QPDF::allowModifyForm() | ||
| 604 | return status; | 590 | return status; |
| 605 | } | 591 | } |
| 606 | 592 | ||
| 607 | -DLL_EXPORT | ||
| 608 | bool | 593 | bool |
| 609 | QPDF::allowModifyAnnotation() | 594 | QPDF::allowModifyAnnotation() |
| 610 | { | 595 | { |
| @@ -618,7 +603,6 @@ QPDF::allowModifyAnnotation() | @@ -618,7 +603,6 @@ QPDF::allowModifyAnnotation() | ||
| 618 | return status; | 603 | return status; |
| 619 | } | 604 | } |
| 620 | 605 | ||
| 621 | -DLL_EXPORT | ||
| 622 | bool | 606 | bool |
| 623 | QPDF::allowModifyOther() | 607 | QPDF::allowModifyOther() |
| 624 | { | 608 | { |
| @@ -632,7 +616,6 @@ QPDF::allowModifyOther() | @@ -632,7 +616,6 @@ QPDF::allowModifyOther() | ||
| 632 | return status; | 616 | return status; |
| 633 | } | 617 | } |
| 634 | 618 | ||
| 635 | -DLL_EXPORT | ||
| 636 | bool | 619 | bool |
| 637 | QPDF::allowModifyAll() | 620 | QPDF::allowModifyAll() |
| 638 | { | 621 | { |
libqpdf/QPDF_linearization.cc
| @@ -53,7 +53,6 @@ load_vector_vector(BitStream& bit_stream, | @@ -53,7 +53,6 @@ load_vector_vector(BitStream& bit_stream, | ||
| 53 | bit_stream.skipToNextByte(); | 53 | bit_stream.skipToNextByte(); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | -DLL_EXPORT | ||
| 57 | bool | 56 | bool |
| 58 | QPDF::checkLinearization() | 57 | QPDF::checkLinearization() |
| 59 | { | 58 | { |
| @@ -70,7 +69,6 @@ QPDF::checkLinearization() | @@ -70,7 +69,6 @@ QPDF::checkLinearization() | ||
| 70 | return result; | 69 | return result; |
| 71 | } | 70 | } |
| 72 | 71 | ||
| 73 | -DLL_EXPORT | ||
| 74 | bool | 72 | bool |
| 75 | QPDF::isLinearized() | 73 | QPDF::isLinearized() |
| 76 | { | 74 | { |
| @@ -982,7 +980,6 @@ QPDF::checkHOutlines(std::list<std::string>& warnings) | @@ -982,7 +980,6 @@ QPDF::checkHOutlines(std::list<std::string>& warnings) | ||
| 982 | } | 980 | } |
| 983 | } | 981 | } |
| 984 | 982 | ||
| 985 | -DLL_EXPORT | ||
| 986 | void | 983 | void |
| 987 | QPDF::showLinearizationData() | 984 | QPDF::showLinearizationData() |
| 988 | { | 985 | { |
| @@ -1747,7 +1744,6 @@ QPDF::pushOutlinesToPart( | @@ -1747,7 +1744,6 @@ QPDF::pushOutlinesToPart( | ||
| 1747 | } | 1744 | } |
| 1748 | } | 1745 | } |
| 1749 | 1746 | ||
| 1750 | -DLL_EXPORT | ||
| 1751 | void | 1747 | void |
| 1752 | QPDF::getLinearizedParts( | 1748 | QPDF::getLinearizedParts( |
| 1753 | std::map<int, int> const& object_stream_data, | 1749 | std::map<int, int> const& object_stream_data, |
| @@ -2079,7 +2075,6 @@ QPDF::writeHGeneric(BitWriter& w, HGeneric& t) | @@ -2079,7 +2075,6 @@ QPDF::writeHGeneric(BitWriter& w, HGeneric& t) | ||
| 2079 | w.writeBits(t.group_length, 32); // 4 | 2075 | w.writeBits(t.group_length, 32); // 4 |
| 2080 | } | 2076 | } |
| 2081 | 2077 | ||
| 2082 | -DLL_EXPORT | ||
| 2083 | void | 2078 | void |
| 2084 | QPDF::generateHintStream(std::map<int, QPDFXRefEntry> const& xref, | 2079 | QPDF::generateHintStream(std::map<int, QPDFXRefEntry> const& xref, |
| 2085 | std::map<int, size_t> const& lengths, | 2080 | std::map<int, size_t> const& lengths, |
libqpdf/QPDF_optimization.cc
| @@ -58,7 +58,6 @@ QPDF::ObjUser::operator<(ObjUser const& rhs) const | @@ -58,7 +58,6 @@ QPDF::ObjUser::operator<(ObjUser const& rhs) const | ||
| 58 | return false; | 58 | return false; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | -DLL_EXPORT | ||
| 62 | void | 61 | void |
| 63 | QPDF::flattenScalarReferences() | 62 | QPDF::flattenScalarReferences() |
| 64 | { | 63 | { |
| @@ -143,7 +142,6 @@ QPDF::flattenScalarReferences() | @@ -143,7 +142,6 @@ QPDF::flattenScalarReferences() | ||
| 143 | } | 142 | } |
| 144 | } | 143 | } |
| 145 | 144 | ||
| 146 | -DLL_EXPORT | ||
| 147 | void | 145 | void |
| 148 | QPDF::optimize(std::map<int, int> const& object_stream_data, | 146 | QPDF::optimize(std::map<int, int> const& object_stream_data, |
| 149 | bool allow_changes) | 147 | bool allow_changes) |
libqpdf/QTC.cc
| @@ -10,7 +10,6 @@ static bool tc_active(char const* const scope) | @@ -10,7 +10,6 @@ static bool tc_active(char const* const scope) | ||
| 10 | return (QUtil::get_env("TC_SCOPE", &value) && (value == scope)); | 10 | return (QUtil::get_env("TC_SCOPE", &value) && (value == scope)); |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | -DLL_EXPORT | ||
| 14 | void QTC::TC(char const* const scope, char const* const ccase, int n) | 13 | void QTC::TC(char const* const scope, char const* const ccase, int n) |
| 15 | { | 14 | { |
| 16 | static std::set<std::pair<std::string, int> > cache; | 15 | static std::set<std::pair<std::string, int> > cache; |
libqpdf/QUtil.cc
| @@ -14,7 +14,6 @@ | @@ -14,7 +14,6 @@ | ||
| 14 | #include <unistd.h> | 14 | #include <unistd.h> |
| 15 | #endif | 15 | #endif |
| 16 | 16 | ||
| 17 | -DLL_EXPORT | ||
| 18 | std::string | 17 | std::string |
| 19 | QUtil::int_to_string(int num, int fullpad) | 18 | QUtil::int_to_string(int num, int fullpad) |
| 20 | { | 19 | { |
| @@ -42,7 +41,6 @@ QUtil::int_to_string(int num, int fullpad) | @@ -42,7 +41,6 @@ QUtil::int_to_string(int num, int fullpad) | ||
| 42 | return std::string(t); | 41 | return std::string(t); |
| 43 | } | 42 | } |
| 44 | 43 | ||
| 45 | -DLL_EXPORT | ||
| 46 | std::string | 44 | std::string |
| 47 | QUtil::double_to_string(double num, int decimal_places) | 45 | QUtil::double_to_string(double num, int decimal_places) |
| 48 | { | 46 | { |
| @@ -78,14 +76,12 @@ QUtil::double_to_string(double num, int decimal_places) | @@ -78,14 +76,12 @@ QUtil::double_to_string(double num, int decimal_places) | ||
| 78 | return std::string(t); | 76 | return std::string(t); |
| 79 | } | 77 | } |
| 80 | 78 | ||
| 81 | -DLL_EXPORT | ||
| 82 | void | 79 | void |
| 83 | QUtil::throw_system_error(std::string const& description) | 80 | QUtil::throw_system_error(std::string const& description) |
| 84 | { | 81 | { |
| 85 | throw std::runtime_error(description + ": " + strerror(errno)); | 82 | throw std::runtime_error(description + ": " + strerror(errno)); |
| 86 | } | 83 | } |
| 87 | 84 | ||
| 88 | -DLL_EXPORT | ||
| 89 | int | 85 | int |
| 90 | QUtil::os_wrapper(std::string const& description, int status) | 86 | QUtil::os_wrapper(std::string const& description, int status) |
| 91 | { | 87 | { |
| @@ -96,7 +92,6 @@ QUtil::os_wrapper(std::string const& description, int status) | @@ -96,7 +92,6 @@ QUtil::os_wrapper(std::string const& description, int status) | ||
| 96 | return status; | 92 | return status; |
| 97 | } | 93 | } |
| 98 | 94 | ||
| 99 | -DLL_EXPORT | ||
| 100 | FILE* | 95 | FILE* |
| 101 | QUtil::fopen_wrapper(std::string const& description, FILE* f) | 96 | QUtil::fopen_wrapper(std::string const& description, FILE* f) |
| 102 | { | 97 | { |
| @@ -107,7 +102,6 @@ QUtil::fopen_wrapper(std::string const& description, FILE* f) | @@ -107,7 +102,6 @@ QUtil::fopen_wrapper(std::string const& description, FILE* f) | ||
| 107 | return f; | 102 | return f; |
| 108 | } | 103 | } |
| 109 | 104 | ||
| 110 | -DLL_EXPORT | ||
| 111 | char* | 105 | char* |
| 112 | QUtil::copy_string(std::string const& str) | 106 | QUtil::copy_string(std::string const& str) |
| 113 | { | 107 | { |
| @@ -118,7 +112,6 @@ QUtil::copy_string(std::string const& str) | @@ -118,7 +112,6 @@ QUtil::copy_string(std::string const& str) | ||
| 118 | return result; | 112 | return result; |
| 119 | } | 113 | } |
| 120 | 114 | ||
| 121 | -DLL_EXPORT | ||
| 122 | void | 115 | void |
| 123 | QUtil::binary_stdout() | 116 | QUtil::binary_stdout() |
| 124 | { | 117 | { |
| @@ -127,7 +120,6 @@ QUtil::binary_stdout() | @@ -127,7 +120,6 @@ QUtil::binary_stdout() | ||
| 127 | #endif | 120 | #endif |
| 128 | } | 121 | } |
| 129 | 122 | ||
| 130 | -DLL_EXPORT | ||
| 131 | void | 123 | void |
| 132 | QUtil::binary_stdin() | 124 | QUtil::binary_stdin() |
| 133 | { | 125 | { |
| @@ -136,7 +128,6 @@ QUtil::binary_stdin() | @@ -136,7 +128,6 @@ QUtil::binary_stdin() | ||
| 136 | #endif | 128 | #endif |
| 137 | } | 129 | } |
| 138 | 130 | ||
| 139 | -DLL_EXPORT | ||
| 140 | char* | 131 | char* |
| 141 | QUtil::getWhoami(char* argv0) | 132 | QUtil::getWhoami(char* argv0) |
| 142 | { | 133 | { |
| @@ -164,7 +155,6 @@ QUtil::getWhoami(char* argv0) | @@ -164,7 +155,6 @@ QUtil::getWhoami(char* argv0) | ||
| 164 | return whoami; | 155 | return whoami; |
| 165 | } | 156 | } |
| 166 | 157 | ||
| 167 | -DLL_EXPORT | ||
| 168 | bool | 158 | bool |
| 169 | QUtil::get_env(std::string const& var, std::string* value) | 159 | QUtil::get_env(std::string const& var, std::string* value) |
| 170 | { | 160 | { |
| @@ -202,7 +192,6 @@ QUtil::get_env(std::string const& var, std::string* value) | @@ -202,7 +192,6 @@ QUtil::get_env(std::string const& var, std::string* value) | ||
| 202 | #endif | 192 | #endif |
| 203 | } | 193 | } |
| 204 | 194 | ||
| 205 | -DLL_EXPORT | ||
| 206 | time_t | 195 | time_t |
| 207 | QUtil::get_current_time() | 196 | QUtil::get_current_time() |
| 208 | { | 197 | { |
| @@ -229,7 +218,6 @@ QUtil::get_current_time() | @@ -229,7 +218,6 @@ QUtil::get_current_time() | ||
| 229 | #endif | 218 | #endif |
| 230 | } | 219 | } |
| 231 | 220 | ||
| 232 | -DLL_EXPORT | ||
| 233 | std::string | 221 | std::string |
| 234 | QUtil::toUTF8(unsigned long uval) | 222 | QUtil::toUTF8(unsigned long uval) |
| 235 | { | 223 | { |
libqpdf/qpdf-c.cc
| @@ -33,7 +33,6 @@ _qpdf_data::~_qpdf_data() | @@ -33,7 +33,6 @@ _qpdf_data::~_qpdf_data() | ||
| 33 | delete qpdf; | 33 | delete qpdf; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | -DLL_EXPORT | ||
| 37 | qpdf_data qpdf_init() | 36 | qpdf_data qpdf_init() |
| 38 | { | 37 | { |
| 39 | QTC::TC("qpdf", "qpdf-c called qpdf_init"); | 38 | QTC::TC("qpdf", "qpdf-c called qpdf_init"); |
| @@ -42,7 +41,6 @@ qpdf_data qpdf_init() | @@ -42,7 +41,6 @@ qpdf_data qpdf_init() | ||
| 42 | return qpdf; | 41 | return qpdf; |
| 43 | } | 42 | } |
| 44 | 43 | ||
| 45 | -DLL_EXPORT | ||
| 46 | void qpdf_cleanup(qpdf_data* qpdf) | 44 | void qpdf_cleanup(qpdf_data* qpdf) |
| 47 | { | 45 | { |
| 48 | QTC::TC("qpdf", "qpdf-c called qpdf_cleanup"); | 46 | QTC::TC("qpdf", "qpdf-c called qpdf_cleanup"); |
| @@ -50,14 +48,12 @@ void qpdf_cleanup(qpdf_data* qpdf) | @@ -50,14 +48,12 @@ void qpdf_cleanup(qpdf_data* qpdf) | ||
| 50 | *qpdf = 0; | 48 | *qpdf = 0; |
| 51 | } | 49 | } |
| 52 | 50 | ||
| 53 | -DLL_EXPORT | ||
| 54 | QPDF_BOOL qpdf_more_errors(qpdf_data qpdf) | 51 | QPDF_BOOL qpdf_more_errors(qpdf_data qpdf) |
| 55 | { | 52 | { |
| 56 | QTC::TC("qpdf", "qpdf-c called qpdf_more_errors"); | 53 | QTC::TC("qpdf", "qpdf-c called qpdf_more_errors"); |
| 57 | return (qpdf->error.empty() ? QPDF_FALSE : QPDF_TRUE); | 54 | return (qpdf->error.empty() ? QPDF_FALSE : QPDF_TRUE); |
| 58 | } | 55 | } |
| 59 | 56 | ||
| 60 | -DLL_EXPORT | ||
| 61 | QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf) | 57 | QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf) |
| 62 | { | 58 | { |
| 63 | QTC::TC("qpdf", "qpdf-c called qpdf_more_warnings"); | 59 | QTC::TC("qpdf", "qpdf-c called qpdf_more_warnings"); |
| @@ -80,7 +76,6 @@ QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf) | @@ -80,7 +76,6 @@ QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf) | ||
| 80 | } | 76 | } |
| 81 | } | 77 | } |
| 82 | 78 | ||
| 83 | -DLL_EXPORT | ||
| 84 | char const* qpdf_next_error(qpdf_data qpdf) | 79 | char const* qpdf_next_error(qpdf_data qpdf) |
| 85 | { | 80 | { |
| 86 | if (qpdf_more_errors(qpdf)) | 81 | if (qpdf_more_errors(qpdf)) |
| @@ -96,7 +91,6 @@ char const* qpdf_next_error(qpdf_data qpdf) | @@ -96,7 +91,6 @@ char const* qpdf_next_error(qpdf_data qpdf) | ||
| 96 | } | 91 | } |
| 97 | } | 92 | } |
| 98 | 93 | ||
| 99 | -DLL_EXPORT | ||
| 100 | char const* qpdf_next_warning(qpdf_data qpdf) | 94 | char const* qpdf_next_warning(qpdf_data qpdf) |
| 101 | { | 95 | { |
| 102 | if (qpdf_more_warnings(qpdf)) | 96 | if (qpdf_more_warnings(qpdf)) |
| @@ -112,28 +106,24 @@ char const* qpdf_next_warning(qpdf_data qpdf) | @@ -112,28 +106,24 @@ char const* qpdf_next_warning(qpdf_data qpdf) | ||
| 112 | } | 106 | } |
| 113 | } | 107 | } |
| 114 | 108 | ||
| 115 | -DLL_EXPORT | ||
| 116 | void qpdf_set_suppress_warnings(qpdf_data qpdf, QPDF_BOOL value) | 109 | void qpdf_set_suppress_warnings(qpdf_data qpdf, QPDF_BOOL value) |
| 117 | { | 110 | { |
| 118 | QTC::TC("qpdf", "qpdf-c called qpdf_set_suppress_warnings"); | 111 | QTC::TC("qpdf", "qpdf-c called qpdf_set_suppress_warnings"); |
| 119 | qpdf->qpdf->setSuppressWarnings(value); | 112 | qpdf->qpdf->setSuppressWarnings(value); |
| 120 | } | 113 | } |
| 121 | 114 | ||
| 122 | -DLL_EXPORT | ||
| 123 | void qpdf_set_ignore_xref_streams(qpdf_data qpdf, QPDF_BOOL value) | 115 | void qpdf_set_ignore_xref_streams(qpdf_data qpdf, QPDF_BOOL value) |
| 124 | { | 116 | { |
| 125 | QTC::TC("qpdf", "qpdf-c called qpdf_set_ignore_xref_streams"); | 117 | QTC::TC("qpdf", "qpdf-c called qpdf_set_ignore_xref_streams"); |
| 126 | qpdf->qpdf->setIgnoreXRefStreams(value); | 118 | qpdf->qpdf->setIgnoreXRefStreams(value); |
| 127 | } | 119 | } |
| 128 | 120 | ||
| 129 | -DLL_EXPORT | ||
| 130 | void qpdf_set_attempt_recovery(qpdf_data qpdf, QPDF_BOOL value) | 121 | void qpdf_set_attempt_recovery(qpdf_data qpdf, QPDF_BOOL value) |
| 131 | { | 122 | { |
| 132 | QTC::TC("qpdf", "qpdf-c called qpdf_set_attempt_recovery"); | 123 | QTC::TC("qpdf", "qpdf-c called qpdf_set_attempt_recovery"); |
| 133 | qpdf->qpdf->setAttemptRecovery(value); | 124 | qpdf->qpdf->setAttemptRecovery(value); |
| 134 | } | 125 | } |
| 135 | 126 | ||
| 136 | -DLL_EXPORT | ||
| 137 | QPDF_ERROR_CODE qpdf_read(qpdf_data qpdf, char const* filename, | 127 | QPDF_ERROR_CODE qpdf_read(qpdf_data qpdf, char const* filename, |
| 138 | char const* password) | 128 | char const* password) |
| 139 | { | 129 | { |
| @@ -155,7 +145,6 @@ QPDF_ERROR_CODE qpdf_read(qpdf_data qpdf, char const* filename, | @@ -155,7 +145,6 @@ QPDF_ERROR_CODE qpdf_read(qpdf_data qpdf, char const* filename, | ||
| 155 | return status; | 145 | return status; |
| 156 | } | 146 | } |
| 157 | 147 | ||
| 158 | -DLL_EXPORT | ||
| 159 | char const* qpdf_get_pdf_version(qpdf_data qpdf) | 148 | char const* qpdf_get_pdf_version(qpdf_data qpdf) |
| 160 | { | 149 | { |
| 161 | QTC::TC("qpdf", "qpdf-c called qpdf_get_pdf_version"); | 150 | QTC::TC("qpdf", "qpdf-c called qpdf_get_pdf_version"); |
| @@ -163,7 +152,6 @@ char const* qpdf_get_pdf_version(qpdf_data qpdf) | @@ -163,7 +152,6 @@ char const* qpdf_get_pdf_version(qpdf_data qpdf) | ||
| 163 | return qpdf->tmp_string.c_str(); | 152 | return qpdf->tmp_string.c_str(); |
| 164 | } | 153 | } |
| 165 | 154 | ||
| 166 | -DLL_EXPORT | ||
| 167 | char const* qpdf_get_user_password(qpdf_data qpdf) | 155 | char const* qpdf_get_user_password(qpdf_data qpdf) |
| 168 | { | 156 | { |
| 169 | QTC::TC("qpdf", "qpdf-c called qpdf_get_user_password"); | 157 | QTC::TC("qpdf", "qpdf-c called qpdf_get_user_password"); |
| @@ -171,84 +159,72 @@ char const* qpdf_get_user_password(qpdf_data qpdf) | @@ -171,84 +159,72 @@ char const* qpdf_get_user_password(qpdf_data qpdf) | ||
| 171 | return qpdf->tmp_string.c_str(); | 159 | return qpdf->tmp_string.c_str(); |
| 172 | } | 160 | } |
| 173 | 161 | ||
| 174 | -DLL_EXPORT | ||
| 175 | QPDF_BOOL qpdf_is_linearized(qpdf_data qpdf) | 162 | QPDF_BOOL qpdf_is_linearized(qpdf_data qpdf) |
| 176 | { | 163 | { |
| 177 | QTC::TC("qpdf", "qpdf-c called qpdf_is_linearized"); | 164 | QTC::TC("qpdf", "qpdf-c called qpdf_is_linearized"); |
| 178 | return (qpdf->qpdf->isLinearized() ? QPDF_TRUE : QPDF_FALSE); | 165 | return (qpdf->qpdf->isLinearized() ? QPDF_TRUE : QPDF_FALSE); |
| 179 | } | 166 | } |
| 180 | 167 | ||
| 181 | -DLL_EXPORT | ||
| 182 | QPDF_BOOL qpdf_is_encrypted(qpdf_data qpdf) | 168 | QPDF_BOOL qpdf_is_encrypted(qpdf_data qpdf) |
| 183 | { | 169 | { |
| 184 | QTC::TC("qpdf", "qpdf-c called qpdf_is_encrypted"); | 170 | QTC::TC("qpdf", "qpdf-c called qpdf_is_encrypted"); |
| 185 | return (qpdf->qpdf->isEncrypted() ? QPDF_TRUE : QPDF_FALSE); | 171 | return (qpdf->qpdf->isEncrypted() ? QPDF_TRUE : QPDF_FALSE); |
| 186 | } | 172 | } |
| 187 | 173 | ||
| 188 | -DLL_EXPORT | ||
| 189 | QPDF_BOOL qpdf_allow_accessibility(qpdf_data qpdf) | 174 | QPDF_BOOL qpdf_allow_accessibility(qpdf_data qpdf) |
| 190 | { | 175 | { |
| 191 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_accessibility"); | 176 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_accessibility"); |
| 192 | return qpdf->qpdf->allowAccessibility(); | 177 | return qpdf->qpdf->allowAccessibility(); |
| 193 | } | 178 | } |
| 194 | 179 | ||
| 195 | -DLL_EXPORT | ||
| 196 | QPDF_BOOL qpdf_allow_extract_all(qpdf_data qpdf) | 180 | QPDF_BOOL qpdf_allow_extract_all(qpdf_data qpdf) |
| 197 | { | 181 | { |
| 198 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_extract_all"); | 182 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_extract_all"); |
| 199 | return qpdf->qpdf->allowExtractAll(); | 183 | return qpdf->qpdf->allowExtractAll(); |
| 200 | } | 184 | } |
| 201 | 185 | ||
| 202 | -DLL_EXPORT | ||
| 203 | QPDF_BOOL qpdf_allow_print_low_res(qpdf_data qpdf) | 186 | QPDF_BOOL qpdf_allow_print_low_res(qpdf_data qpdf) |
| 204 | { | 187 | { |
| 205 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_print_low_res"); | 188 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_print_low_res"); |
| 206 | return qpdf->qpdf->allowPrintLowRes(); | 189 | return qpdf->qpdf->allowPrintLowRes(); |
| 207 | } | 190 | } |
| 208 | 191 | ||
| 209 | -DLL_EXPORT | ||
| 210 | QPDF_BOOL qpdf_allow_print_high_res(qpdf_data qpdf) | 192 | QPDF_BOOL qpdf_allow_print_high_res(qpdf_data qpdf) |
| 211 | { | 193 | { |
| 212 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_print_high_res"); | 194 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_print_high_res"); |
| 213 | return qpdf->qpdf->allowPrintHighRes(); | 195 | return qpdf->qpdf->allowPrintHighRes(); |
| 214 | } | 196 | } |
| 215 | 197 | ||
| 216 | -DLL_EXPORT | ||
| 217 | QPDF_BOOL qpdf_allow_modify_assembly(qpdf_data qpdf) | 198 | QPDF_BOOL qpdf_allow_modify_assembly(qpdf_data qpdf) |
| 218 | { | 199 | { |
| 219 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_assembly"); | 200 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_assembly"); |
| 220 | return qpdf->qpdf->allowModifyAssembly(); | 201 | return qpdf->qpdf->allowModifyAssembly(); |
| 221 | } | 202 | } |
| 222 | 203 | ||
| 223 | -DLL_EXPORT | ||
| 224 | QPDF_BOOL qpdf_allow_modify_form(qpdf_data qpdf) | 204 | QPDF_BOOL qpdf_allow_modify_form(qpdf_data qpdf) |
| 225 | { | 205 | { |
| 226 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_form"); | 206 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_form"); |
| 227 | return qpdf->qpdf->allowModifyForm(); | 207 | return qpdf->qpdf->allowModifyForm(); |
| 228 | } | 208 | } |
| 229 | 209 | ||
| 230 | -DLL_EXPORT | ||
| 231 | QPDF_BOOL qpdf_allow_modify_annotation(qpdf_data qpdf) | 210 | QPDF_BOOL qpdf_allow_modify_annotation(qpdf_data qpdf) |
| 232 | { | 211 | { |
| 233 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_annotation"); | 212 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_annotation"); |
| 234 | return qpdf->qpdf->allowModifyAnnotation(); | 213 | return qpdf->qpdf->allowModifyAnnotation(); |
| 235 | } | 214 | } |
| 236 | 215 | ||
| 237 | -DLL_EXPORT | ||
| 238 | QPDF_BOOL qpdf_allow_modify_other(qpdf_data qpdf) | 216 | QPDF_BOOL qpdf_allow_modify_other(qpdf_data qpdf) |
| 239 | { | 217 | { |
| 240 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_other"); | 218 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_other"); |
| 241 | return qpdf->qpdf->allowModifyOther(); | 219 | return qpdf->qpdf->allowModifyOther(); |
| 242 | } | 220 | } |
| 243 | 221 | ||
| 244 | -DLL_EXPORT | ||
| 245 | QPDF_BOOL qpdf_allow_modify_all(qpdf_data qpdf) | 222 | QPDF_BOOL qpdf_allow_modify_all(qpdf_data qpdf) |
| 246 | { | 223 | { |
| 247 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_all"); | 224 | QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_all"); |
| 248 | return qpdf->qpdf->allowModifyAll(); | 225 | return qpdf->qpdf->allowModifyAll(); |
| 249 | } | 226 | } |
| 250 | 227 | ||
| 251 | -DLL_EXPORT | ||
| 252 | QPDF_ERROR_CODE qpdf_init_write(qpdf_data qpdf, char const* filename) | 228 | QPDF_ERROR_CODE qpdf_init_write(qpdf_data qpdf, char const* filename) |
| 253 | { | 229 | { |
| 254 | QPDF_ERROR_CODE status = QPDF_SUCCESS; | 230 | QPDF_ERROR_CODE status = QPDF_SUCCESS; |
| @@ -275,7 +251,6 @@ QPDF_ERROR_CODE qpdf_init_write(qpdf_data qpdf, char const* filename) | @@ -275,7 +251,6 @@ QPDF_ERROR_CODE qpdf_init_write(qpdf_data qpdf, char const* filename) | ||
| 275 | return status; | 251 | return status; |
| 276 | } | 252 | } |
| 277 | 253 | ||
| 278 | -DLL_EXPORT | ||
| 279 | void qpdf_set_object_stream_mode(qpdf_data qpdf, int mode) | 254 | void qpdf_set_object_stream_mode(qpdf_data qpdf, int mode) |
| 280 | { | 255 | { |
| 281 | QTC::TC("qpdf", "qpdf-c called qpdf_set_object_stream_mode"); | 256 | QTC::TC("qpdf", "qpdf-c called qpdf_set_object_stream_mode"); |
| @@ -299,7 +274,6 @@ void qpdf_set_object_stream_mode(qpdf_data qpdf, int mode) | @@ -299,7 +274,6 @@ void qpdf_set_object_stream_mode(qpdf_data qpdf, int mode) | ||
| 299 | qpdf->qpdf_writer->setObjectStreamMode(omode); | 274 | qpdf->qpdf_writer->setObjectStreamMode(omode); |
| 300 | } | 275 | } |
| 301 | 276 | ||
| 302 | -DLL_EXPORT | ||
| 303 | void qpdf_set_stream_data_mode(qpdf_data qpdf, int mode) | 277 | void qpdf_set_stream_data_mode(qpdf_data qpdf, int mode) |
| 304 | { | 278 | { |
| 305 | QTC::TC("qpdf", "qpdf-c called qpdf_set_stream_data_mode"); | 279 | QTC::TC("qpdf", "qpdf-c called qpdf_set_stream_data_mode"); |
| @@ -321,28 +295,24 @@ void qpdf_set_stream_data_mode(qpdf_data qpdf, int mode) | @@ -321,28 +295,24 @@ void qpdf_set_stream_data_mode(qpdf_data qpdf, int mode) | ||
| 321 | qpdf->qpdf_writer->setStreamDataMode(smode); | 295 | qpdf->qpdf_writer->setStreamDataMode(smode); |
| 322 | } | 296 | } |
| 323 | 297 | ||
| 324 | -DLL_EXPORT | ||
| 325 | void qpdf_set_content_normalization(qpdf_data qpdf, QPDF_BOOL value) | 298 | void qpdf_set_content_normalization(qpdf_data qpdf, QPDF_BOOL value) |
| 326 | { | 299 | { |
| 327 | QTC::TC("qpdf", "qpdf-c called qpdf_set_content_normalization"); | 300 | QTC::TC("qpdf", "qpdf-c called qpdf_set_content_normalization"); |
| 328 | qpdf->qpdf_writer->setContentNormalization(value); | 301 | qpdf->qpdf_writer->setContentNormalization(value); |
| 329 | } | 302 | } |
| 330 | 303 | ||
| 331 | -DLL_EXPORT | ||
| 332 | void qpdf_set_qdf_mode(qpdf_data qpdf, QPDF_BOOL value) | 304 | void qpdf_set_qdf_mode(qpdf_data qpdf, QPDF_BOOL value) |
| 333 | { | 305 | { |
| 334 | QTC::TC("qpdf", "qpdf-c called qpdf_set_qdf_mode"); | 306 | QTC::TC("qpdf", "qpdf-c called qpdf_set_qdf_mode"); |
| 335 | qpdf->qpdf_writer->setQDFMode(value); | 307 | qpdf->qpdf_writer->setQDFMode(value); |
| 336 | } | 308 | } |
| 337 | 309 | ||
| 338 | -DLL_EXPORT | ||
| 339 | void qpdf_set_static_ID(qpdf_data qpdf, QPDF_BOOL value) | 310 | void qpdf_set_static_ID(qpdf_data qpdf, QPDF_BOOL value) |
| 340 | { | 311 | { |
| 341 | QTC::TC("qpdf", "qpdf-c called qpdf_set_static_ID"); | 312 | QTC::TC("qpdf", "qpdf-c called qpdf_set_static_ID"); |
| 342 | qpdf->qpdf_writer->setStaticID(value); | 313 | qpdf->qpdf_writer->setStaticID(value); |
| 343 | } | 314 | } |
| 344 | 315 | ||
| 345 | -DLL_EXPORT | ||
| 346 | void qpdf_set_suppress_original_object_IDs( | 316 | void qpdf_set_suppress_original_object_IDs( |
| 347 | qpdf_data qpdf, QPDF_BOOL value) | 317 | qpdf_data qpdf, QPDF_BOOL value) |
| 348 | { | 318 | { |
| @@ -350,14 +320,12 @@ void qpdf_set_suppress_original_object_IDs( | @@ -350,14 +320,12 @@ void qpdf_set_suppress_original_object_IDs( | ||
| 350 | qpdf->qpdf_writer->setSuppressOriginalObjectIDs(value); | 320 | qpdf->qpdf_writer->setSuppressOriginalObjectIDs(value); |
| 351 | } | 321 | } |
| 352 | 322 | ||
| 353 | -DLL_EXPORT | ||
| 354 | void qpdf_set_preserve_encryption(qpdf_data qpdf, QPDF_BOOL value) | 323 | void qpdf_set_preserve_encryption(qpdf_data qpdf, QPDF_BOOL value) |
| 355 | { | 324 | { |
| 356 | QTC::TC("qpdf", "qpdf-c called qpdf_set_preserve_encryption"); | 325 | QTC::TC("qpdf", "qpdf-c called qpdf_set_preserve_encryption"); |
| 357 | qpdf->qpdf_writer->setPreserveEncryption(value); | 326 | qpdf->qpdf_writer->setPreserveEncryption(value); |
| 358 | } | 327 | } |
| 359 | 328 | ||
| 360 | -DLL_EXPORT | ||
| 361 | void qpdf_set_r2_encryption_parameters( | 329 | void qpdf_set_r2_encryption_parameters( |
| 362 | qpdf_data qpdf, char const* user_password, char const* owner_password, | 330 | qpdf_data qpdf, char const* user_password, char const* owner_password, |
| 363 | QPDF_BOOL allow_print, QPDF_BOOL allow_modify, | 331 | QPDF_BOOL allow_print, QPDF_BOOL allow_modify, |
| @@ -369,7 +337,6 @@ void qpdf_set_r2_encryption_parameters( | @@ -369,7 +337,6 @@ void qpdf_set_r2_encryption_parameters( | ||
| 369 | allow_print, allow_modify, allow_extract, allow_annotate); | 337 | allow_print, allow_modify, allow_extract, allow_annotate); |
| 370 | } | 338 | } |
| 371 | 339 | ||
| 372 | -DLL_EXPORT | ||
| 373 | void qpdf_set_r3_encryption_parameters( | 340 | void qpdf_set_r3_encryption_parameters( |
| 374 | qpdf_data qpdf, char const* user_password, char const* owner_password, | 341 | qpdf_data qpdf, char const* user_password, char const* owner_password, |
| 375 | QPDF_BOOL allow_accessibility, QPDF_BOOL allow_extract, | 342 | QPDF_BOOL allow_accessibility, QPDF_BOOL allow_extract, |
| @@ -389,28 +356,24 @@ void qpdf_set_r3_encryption_parameters( | @@ -389,28 +356,24 @@ void qpdf_set_r3_encryption_parameters( | ||
| 389 | QPDFWriter::r3m_all)); | 356 | QPDFWriter::r3m_all)); |
| 390 | } | 357 | } |
| 391 | 358 | ||
| 392 | -DLL_EXPORT | ||
| 393 | void qpdf_set_linearization(qpdf_data qpdf, QPDF_BOOL value) | 359 | void qpdf_set_linearization(qpdf_data qpdf, QPDF_BOOL value) |
| 394 | { | 360 | { |
| 395 | QTC::TC("qpdf", "qpdf-c called qpdf_set_linearization"); | 361 | QTC::TC("qpdf", "qpdf-c called qpdf_set_linearization"); |
| 396 | qpdf->qpdf_writer->setLinearization(value); | 362 | qpdf->qpdf_writer->setLinearization(value); |
| 397 | } | 363 | } |
| 398 | 364 | ||
| 399 | -DLL_EXPORT | ||
| 400 | void qpdf_set_minimum_pdf_version(qpdf_data qpdf, char const* version) | 365 | void qpdf_set_minimum_pdf_version(qpdf_data qpdf, char const* version) |
| 401 | { | 366 | { |
| 402 | QTC::TC("qpdf", "qpdf-c called qpdf_set_minimum_pdf_version"); | 367 | QTC::TC("qpdf", "qpdf-c called qpdf_set_minimum_pdf_version"); |
| 403 | qpdf->qpdf_writer->setMinimumPDFVersion(version); | 368 | qpdf->qpdf_writer->setMinimumPDFVersion(version); |
| 404 | } | 369 | } |
| 405 | 370 | ||
| 406 | -DLL_EXPORT | ||
| 407 | void qpdf_force_pdf_version(qpdf_data qpdf, char const* version) | 371 | void qpdf_force_pdf_version(qpdf_data qpdf, char const* version) |
| 408 | { | 372 | { |
| 409 | QTC::TC("qpdf", "qpdf-c called qpdf_force_pdf_version"); | 373 | QTC::TC("qpdf", "qpdf-c called qpdf_force_pdf_version"); |
| 410 | qpdf->qpdf_writer->forcePDFVersion(version); | 374 | qpdf->qpdf_writer->forcePDFVersion(version); |
| 411 | } | 375 | } |
| 412 | 376 | ||
| 413 | -DLL_EXPORT | ||
| 414 | QPDF_ERROR_CODE qpdf_write(qpdf_data qpdf) | 377 | QPDF_ERROR_CODE qpdf_write(qpdf_data qpdf) |
| 415 | { | 378 | { |
| 416 | QPDF_ERROR_CODE status = QPDF_SUCCESS; | 379 | QPDF_ERROR_CODE status = QPDF_SUCCESS; |
libqpdf/qpdf/BitStream.hh
| @@ -5,16 +5,13 @@ | @@ -5,16 +5,13 @@ | ||
| 5 | 5 | ||
| 6 | #include <qpdf/DLL.hh> | 6 | #include <qpdf/DLL.hh> |
| 7 | 7 | ||
| 8 | +DLL_EXPORT | ||
| 8 | class BitStream | 9 | class BitStream |
| 9 | { | 10 | { |
| 10 | public: | 11 | public: |
| 11 | - DLL_EXPORT | ||
| 12 | BitStream(unsigned char const* p, int nbytes); | 12 | BitStream(unsigned char const* p, int nbytes); |
| 13 | - DLL_EXPORT | ||
| 14 | void reset(); | 13 | void reset(); |
| 15 | - DLL_EXPORT | ||
| 16 | unsigned long getBits(int nbits); | 14 | unsigned long getBits(int nbits); |
| 17 | - DLL_EXPORT | ||
| 18 | void skipToNextByte(); | 15 | void skipToNextByte(); |
| 19 | 16 | ||
| 20 | private: | 17 | private: |
libqpdf/qpdf/BitWriter.hh
| @@ -7,17 +7,15 @@ | @@ -7,17 +7,15 @@ | ||
| 7 | 7 | ||
| 8 | class Pipeline; | 8 | class Pipeline; |
| 9 | 9 | ||
| 10 | +DLL_EXPORT | ||
| 10 | class BitWriter | 11 | class BitWriter |
| 11 | { | 12 | { |
| 12 | public: | 13 | public: |
| 13 | // Write bits to the pipeline. It is the caller's responsibility | 14 | // Write bits to the pipeline. It is the caller's responsibility |
| 14 | // to eventually call finish on the pipeline. | 15 | // to eventually call finish on the pipeline. |
| 15 | - DLL_EXPORT | ||
| 16 | BitWriter(Pipeline* pl); | 16 | BitWriter(Pipeline* pl); |
| 17 | - DLL_EXPORT | ||
| 18 | void writeBits(unsigned long val, int bits); | 17 | void writeBits(unsigned long val, int bits); |
| 19 | // Force any partial byte to be written to the pipeline. | 18 | // Force any partial byte to be written to the pipeline. |
| 20 | - DLL_EXPORT | ||
| 21 | void flush(); | 19 | void flush(); |
| 22 | 20 | ||
| 23 | private: | 21 | private: |
libqpdf/qpdf/MD5.hh
| @@ -8,54 +8,42 @@ | @@ -8,54 +8,42 @@ | ||
| 8 | # include <inttypes.h> | 8 | # include <inttypes.h> |
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | +DLL_EXPORT | ||
| 11 | class MD5 | 12 | class MD5 |
| 12 | { | 13 | { |
| 13 | public: | 14 | public: |
| 14 | typedef unsigned char Digest[16]; | 15 | typedef unsigned char Digest[16]; |
| 15 | 16 | ||
| 16 | - DLL_EXPORT | ||
| 17 | MD5(); | 17 | MD5(); |
| 18 | - DLL_EXPORT | ||
| 19 | void reset(); | 18 | void reset(); |
| 20 | 19 | ||
| 21 | // encodes string and finalizes | 20 | // encodes string and finalizes |
| 22 | - DLL_EXPORT | ||
| 23 | void encodeString(char const* input_string); | 21 | void encodeString(char const* input_string); |
| 24 | 22 | ||
| 25 | // encodes file and finalizes | 23 | // encodes file and finalizes |
| 26 | - DLL_EXPORT | ||
| 27 | void encodeFile(char const* filename, int up_to_size = -1); | 24 | void encodeFile(char const* filename, int up_to_size = -1); |
| 28 | 25 | ||
| 29 | // appends string to current md5 object | 26 | // appends string to current md5 object |
| 30 | - DLL_EXPORT | ||
| 31 | void appendString(char const* input_string); | 27 | void appendString(char const* input_string); |
| 32 | 28 | ||
| 33 | // appends arbitrary data to current md5 object | 29 | // appends arbitrary data to current md5 object |
| 34 | - DLL_EXPORT | ||
| 35 | void encodeDataIncrementally(char const* input_data, int len); | 30 | void encodeDataIncrementally(char const* input_data, int len); |
| 36 | 31 | ||
| 37 | // computes a raw digest | 32 | // computes a raw digest |
| 38 | - DLL_EXPORT | ||
| 39 | void digest(Digest); | 33 | void digest(Digest); |
| 40 | 34 | ||
| 41 | // prints the digest to stdout terminated with \r\n (primarily for | 35 | // prints the digest to stdout terminated with \r\n (primarily for |
| 42 | // testing) | 36 | // testing) |
| 43 | - DLL_EXPORT | ||
| 44 | void print(); | 37 | void print(); |
| 45 | 38 | ||
| 46 | // returns the digest as a hexadecimal string | 39 | // returns the digest as a hexadecimal string |
| 47 | - DLL_EXPORT | ||
| 48 | std::string unparse(); | 40 | std::string unparse(); |
| 49 | 41 | ||
| 50 | // Convenience functions | 42 | // Convenience functions |
| 51 | - DLL_EXPORT | ||
| 52 | static std::string getDataChecksum(char const* buf, int len); | 43 | static std::string getDataChecksum(char const* buf, int len); |
| 53 | - DLL_EXPORT | ||
| 54 | static std::string getFileChecksum(char const* filename, int up_to_size = -1); | 44 | static std::string getFileChecksum(char const* filename, int up_to_size = -1); |
| 55 | - DLL_EXPORT | ||
| 56 | static bool checkDataChecksum(char const* const checksum, | 45 | static bool checkDataChecksum(char const* const checksum, |
| 57 | char const* buf, int len); | 46 | char const* buf, int len); |
| 58 | - DLL_EXPORT | ||
| 59 | static bool checkFileChecksum(char const* const checksum, | 47 | static bool checkFileChecksum(char const* const checksum, |
| 60 | char const* filename, int up_to_size = -1); | 48 | char const* filename, int up_to_size = -1); |
| 61 | 49 |
libqpdf/qpdf/PCRE.hh
| @@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
| 17 | // Note: this class does not encapsulate all features of the PCRE | 17 | // Note: this class does not encapsulate all features of the PCRE |
| 18 | // package -- only those that I actually need right now are here. | 18 | // package -- only those that I actually need right now are here. |
| 19 | 19 | ||
| 20 | +DLL_EXPORT | ||
| 20 | class PCRE | 21 | class PCRE |
| 21 | { | 22 | { |
| 22 | public: | 23 | public: |
| @@ -25,7 +26,6 @@ class PCRE | @@ -25,7 +26,6 @@ class PCRE | ||
| 25 | class NoBackref: public std::logic_error | 26 | class NoBackref: public std::logic_error |
| 26 | { | 27 | { |
| 27 | public: | 28 | public: |
| 28 | - DLL_EXPORT | ||
| 29 | NoBackref(); | 29 | NoBackref(); |
| 30 | virtual ~NoBackref() throw() {} | 30 | virtual ~NoBackref() throw() {} |
| 31 | }; | 31 | }; |
| @@ -34,15 +34,10 @@ class PCRE | @@ -34,15 +34,10 @@ class PCRE | ||
| 34 | { | 34 | { |
| 35 | friend class PCRE; | 35 | friend class PCRE; |
| 36 | public: | 36 | public: |
| 37 | - DLL_EXPORT | ||
| 38 | Match(int nbackrefs, char const* subject); | 37 | Match(int nbackrefs, char const* subject); |
| 39 | - DLL_EXPORT | ||
| 40 | Match(Match const&); | 38 | Match(Match const&); |
| 41 | - DLL_EXPORT | ||
| 42 | Match& operator=(Match const&); | 39 | Match& operator=(Match const&); |
| 43 | - DLL_EXPORT | ||
| 44 | ~Match(); | 40 | ~Match(); |
| 45 | - DLL_EXPORT | ||
| 46 | operator bool(); | 41 | operator bool(); |
| 47 | 42 | ||
| 48 | // All the back reference accessing routines may throw the | 43 | // All the back reference accessing routines may throw the |
| @@ -54,13 +49,9 @@ class PCRE | @@ -54,13 +49,9 @@ class PCRE | ||
| 54 | // and not matching at all. | 49 | // and not matching at all. |
| 55 | 50 | ||
| 56 | // see getMatch flags below | 51 | // see getMatch flags below |
| 57 | - DLL_EXPORT | ||
| 58 | std::string getMatch(int n, int flags = 0); | 52 | std::string getMatch(int n, int flags = 0); |
| 59 | - DLL_EXPORT | ||
| 60 | void getOffsetLength(int n, int& offset, int& length); | 53 | void getOffsetLength(int n, int& offset, int& length); |
| 61 | - DLL_EXPORT | ||
| 62 | int getOffset(int n); | 54 | int getOffset(int n); |
| 63 | - DLL_EXPORT | ||
| 64 | int getLength(int n); | 55 | int getLength(int n); |
| 65 | 56 | ||
| 66 | // nMatches returns the number of available matches including | 57 | // nMatches returns the number of available matches including |
| @@ -70,7 +61,6 @@ class PCRE | @@ -70,7 +61,6 @@ class PCRE | ||
| 70 | // will return the whole string, getMatch(1) will return the | 61 | // will return the whole string, getMatch(1) will return the |
| 71 | // text that matched the backreference, and getMatch(2) will | 62 | // text that matched the backreference, and getMatch(2) will |
| 72 | // throw an exception because it is out of range. | 63 | // throw an exception because it is out of range. |
| 73 | - DLL_EXPORT | ||
| 74 | int nMatches() const; | 64 | int nMatches() const; |
| 75 | 65 | ||
| 76 | // Flags for getMatch | 66 | // Flags for getMatch |
| @@ -93,16 +83,12 @@ class PCRE | @@ -93,16 +83,12 @@ class PCRE | ||
| 93 | 83 | ||
| 94 | // The value passed in as options is passed to pcre_exec. See man | 84 | // The value passed in as options is passed to pcre_exec. See man |
| 95 | // pcreapi for details. | 85 | // pcreapi for details. |
| 96 | - DLL_EXPORT | ||
| 97 | PCRE(char const* pattern, int options = 0); | 86 | PCRE(char const* pattern, int options = 0); |
| 98 | - DLL_EXPORT | ||
| 99 | ~PCRE(); | 87 | ~PCRE(); |
| 100 | 88 | ||
| 101 | - DLL_EXPORT | ||
| 102 | Match match(char const* subject, int options = 0, int startoffset = 0, | 89 | Match match(char const* subject, int options = 0, int startoffset = 0, |
| 103 | int size = -1); | 90 | int size = -1); |
| 104 | 91 | ||
| 105 | - DLL_EXPORT | ||
| 106 | static void test(int n = 0); | 92 | static void test(int n = 0); |
| 107 | 93 | ||
| 108 | private: | 94 | private: |
libqpdf/qpdf/Pl_ASCII85Decoder.hh
| @@ -3,16 +3,13 @@ | @@ -3,16 +3,13 @@ | ||
| 3 | 3 | ||
| 4 | #include <qpdf/Pipeline.hh> | 4 | #include <qpdf/Pipeline.hh> |
| 5 | 5 | ||
| 6 | +DLL_EXPORT | ||
| 6 | class Pl_ASCII85Decoder: public Pipeline | 7 | class Pl_ASCII85Decoder: public Pipeline |
| 7 | { | 8 | { |
| 8 | public: | 9 | public: |
| 9 | - DLL_EXPORT | ||
| 10 | Pl_ASCII85Decoder(char const* identifier, Pipeline* next); | 10 | Pl_ASCII85Decoder(char const* identifier, Pipeline* next); |
| 11 | - DLL_EXPORT | ||
| 12 | virtual ~Pl_ASCII85Decoder(); | 11 | virtual ~Pl_ASCII85Decoder(); |
| 13 | - DLL_EXPORT | ||
| 14 | virtual void write(unsigned char* buf, int len); | 12 | virtual void write(unsigned char* buf, int len); |
| 15 | - DLL_EXPORT | ||
| 16 | virtual void finish(); | 13 | virtual void finish(); |
| 17 | 14 | ||
| 18 | private: | 15 | private: |
libqpdf/qpdf/Pl_ASCIIHexDecoder.hh
| @@ -3,16 +3,13 @@ | @@ -3,16 +3,13 @@ | ||
| 3 | 3 | ||
| 4 | #include <qpdf/Pipeline.hh> | 4 | #include <qpdf/Pipeline.hh> |
| 5 | 5 | ||
| 6 | +DLL_EXPORT | ||
| 6 | class Pl_ASCIIHexDecoder: public Pipeline | 7 | class Pl_ASCIIHexDecoder: public Pipeline |
| 7 | { | 8 | { |
| 8 | public: | 9 | public: |
| 9 | - DLL_EXPORT | ||
| 10 | Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); | 10 | Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); |
| 11 | - DLL_EXPORT | ||
| 12 | virtual ~Pl_ASCIIHexDecoder(); | 11 | virtual ~Pl_ASCIIHexDecoder(); |
| 13 | - DLL_EXPORT | ||
| 14 | virtual void write(unsigned char* buf, int len); | 12 | virtual void write(unsigned char* buf, int len); |
| 15 | - DLL_EXPORT | ||
| 16 | virtual void finish(); | 13 | virtual void finish(); |
| 17 | 14 | ||
| 18 | private: | 15 | private: |
libqpdf/qpdf/Pl_LZWDecoder.hh
| @@ -6,17 +6,14 @@ | @@ -6,17 +6,14 @@ | ||
| 6 | #include <qpdf/Buffer.hh> | 6 | #include <qpdf/Buffer.hh> |
| 7 | #include <vector> | 7 | #include <vector> |
| 8 | 8 | ||
| 9 | +DLL_EXPORT | ||
| 9 | class Pl_LZWDecoder: public Pipeline | 10 | class Pl_LZWDecoder: public Pipeline |
| 10 | { | 11 | { |
| 11 | public: | 12 | public: |
| 12 | - DLL_EXPORT | ||
| 13 | Pl_LZWDecoder(char const* identifier, Pipeline* next, | 13 | Pl_LZWDecoder(char const* identifier, Pipeline* next, |
| 14 | bool early_code_change); | 14 | bool early_code_change); |
| 15 | - DLL_EXPORT | ||
| 16 | virtual ~Pl_LZWDecoder(); | 15 | virtual ~Pl_LZWDecoder(); |
| 17 | - DLL_EXPORT | ||
| 18 | virtual void write(unsigned char* buf, int len); | 16 | virtual void write(unsigned char* buf, int len); |
| 19 | - DLL_EXPORT | ||
| 20 | virtual void finish(); | 17 | virtual void finish(); |
| 21 | 18 | ||
| 22 | private: | 19 | private: |
libqpdf/qpdf/Pl_MD5.hh
| @@ -12,18 +12,14 @@ | @@ -12,18 +12,14 @@ | ||
| 12 | #include <qpdf/Pipeline.hh> | 12 | #include <qpdf/Pipeline.hh> |
| 13 | #include <qpdf/MD5.hh> | 13 | #include <qpdf/MD5.hh> |
| 14 | 14 | ||
| 15 | +DLL_EXPORT | ||
| 15 | class Pl_MD5: public Pipeline | 16 | class Pl_MD5: public Pipeline |
| 16 | { | 17 | { |
| 17 | public: | 18 | public: |
| 18 | - DLL_EXPORT | ||
| 19 | Pl_MD5(char const* identifier, Pipeline* next); | 19 | Pl_MD5(char const* identifier, Pipeline* next); |
| 20 | - DLL_EXPORT | ||
| 21 | virtual ~Pl_MD5(); | 20 | virtual ~Pl_MD5(); |
| 22 | - DLL_EXPORT | ||
| 23 | virtual void write(unsigned char*, int); | 21 | virtual void write(unsigned char*, int); |
| 24 | - DLL_EXPORT | ||
| 25 | virtual void finish(); | 22 | virtual void finish(); |
| 26 | - DLL_EXPORT | ||
| 27 | std::string getHexDigest(); | 23 | std::string getHexDigest(); |
| 28 | 24 | ||
| 29 | private: | 25 | private: |
libqpdf/qpdf/Pl_PNGFilter.hh
| @@ -16,22 +16,19 @@ | @@ -16,22 +16,19 @@ | ||
| 16 | 16 | ||
| 17 | #include <qpdf/Pipeline.hh> | 17 | #include <qpdf/Pipeline.hh> |
| 18 | 18 | ||
| 19 | +DLL_EXPORT | ||
| 19 | class Pl_PNGFilter: public Pipeline | 20 | class Pl_PNGFilter: public Pipeline |
| 20 | { | 21 | { |
| 21 | public: | 22 | public: |
| 22 | // Encoding is not presently supported | 23 | // Encoding is not presently supported |
| 23 | enum action_e { a_encode, a_decode }; | 24 | enum action_e { a_encode, a_decode }; |
| 24 | 25 | ||
| 25 | - DLL_EXPORT | ||
| 26 | Pl_PNGFilter(char const* identifier, Pipeline* next, | 26 | Pl_PNGFilter(char const* identifier, Pipeline* next, |
| 27 | action_e action, unsigned int columns, | 27 | action_e action, unsigned int columns, |
| 28 | unsigned int bytes_per_pixel); | 28 | unsigned int bytes_per_pixel); |
| 29 | - DLL_EXPORT | ||
| 30 | virtual ~Pl_PNGFilter(); | 29 | virtual ~Pl_PNGFilter(); |
| 31 | 30 | ||
| 32 | - DLL_EXPORT | ||
| 33 | virtual void write(unsigned char* data, int len); | 31 | virtual void write(unsigned char* data, int len); |
| 34 | - DLL_EXPORT | ||
| 35 | virtual void finish(); | 32 | virtual void finish(); |
| 36 | 33 | ||
| 37 | private: | 34 | private: |
libqpdf/qpdf/Pl_RC4.hh
| @@ -5,22 +5,19 @@ | @@ -5,22 +5,19 @@ | ||
| 5 | 5 | ||
| 6 | #include <qpdf/RC4.hh> | 6 | #include <qpdf/RC4.hh> |
| 7 | 7 | ||
| 8 | +DLL_EXPORT | ||
| 8 | class Pl_RC4: public Pipeline | 9 | class Pl_RC4: public Pipeline |
| 9 | { | 10 | { |
| 10 | public: | 11 | public: |
| 11 | static int const def_bufsize = 65536; | 12 | static int const def_bufsize = 65536; |
| 12 | 13 | ||
| 13 | // key_len of -1 means treat key_data as a null-terminated string | 14 | // key_len of -1 means treat key_data as a null-terminated string |
| 14 | - DLL_EXPORT | ||
| 15 | Pl_RC4(char const* identifier, Pipeline* next, | 15 | Pl_RC4(char const* identifier, Pipeline* next, |
| 16 | unsigned char const* key_data, int key_len = -1, | 16 | unsigned char const* key_data, int key_len = -1, |
| 17 | int out_bufsize = def_bufsize); | 17 | int out_bufsize = def_bufsize); |
| 18 | - DLL_EXPORT | ||
| 19 | virtual ~Pl_RC4(); | 18 | virtual ~Pl_RC4(); |
| 20 | 19 | ||
| 21 | - DLL_EXPORT | ||
| 22 | virtual void write(unsigned char* data, int len); | 20 | virtual void write(unsigned char* data, int len); |
| 23 | - DLL_EXPORT | ||
| 24 | virtual void finish(); | 21 | virtual void finish(); |
| 25 | 22 | ||
| 26 | private: | 23 | private: |