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