1 /**\r
2 *\r
3 * This class contains an ODF Document.\r
4 * Initially, we are just concerned with .odg content.xml + resources\r
5 *\r
6 * ---------------------------------------------------------------------\r
7 *\r
8 * Copyright (C) 2006 Bob Jamison\r
9 *\r
10 * This program is free software; you can redistribute it and/or modify\r
11 * it under the terms of the GNU General Public License as published by\r
12 * the Free Software Foundation; either version 3 of the License, or\r
13 * (at your option) any later version.\r
14 *\r
15 * This program is distributed in the hope that it will be useful,\r
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
18 * GNU General Public License for more details.\r
19 *\r
20 * You should have received a copy of the GNU General Public License\r
21 * along with this program; if not, write to the Free Software Foundation,\r
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r
23 *\r
24 * For more information, please write to rwjj@earthlink.net\r
25 *\r
26 */\r
27 \r
28 #include "odfdocument.h"\r
29 \r
30 \r
31 namespace odf\r
32 {\r
33 \r
34 \r
35 //########################################################################\r
36 //# I M A G E D A T A\r
37 //########################################################################\r
38 \r
39 \r
40 /**\r
41 *\r
42 */\r
43 ImageData::ImageData(const std::string &fname,\r
44 const std::vector<unsigned char> &buf)\r
45 {\r
46 fileName = fname;\r
47 data = buf;\r
48 }\r
49 \r
50 /**\r
51 *\r
52 */\r
53 ImageData::ImageData(const ImageData &other)\r
54 {\r
55 fileName = other.fileName;\r
56 data = other.data;\r
57 }\r
58 \r
59 /**\r
60 *\r
61 */\r
62 ImageData::~ImageData()\r
63 {\r
64 }\r
65 \r
66 /**\r
67 *\r
68 */\r
69 std::string ImageData::getFileName()\r
70 {\r
71 return fileName;\r
72 }\r
73 \r
74 /**\r
75 *\r
76 */\r
77 void ImageData::setFileName(const std::string &val)\r
78 {\r
79 fileName = val;\r
80 }\r
81 \r
82 /**\r
83 *\r
84 */\r
85 std::vector<unsigned char> &ImageData::getData()\r
86 {\r
87 return data;\r
88 }\r
89 \r
90 /**\r
91 *\r
92 */\r
93 void ImageData::setData(const std::vector<unsigned char> &buf)\r
94 {\r
95 data = buf;\r
96 }\r
97 \r
98 \r
99 \r
100 \r
101 \r
102 //########################################################################\r
103 //# O D F D O C U M E N T\r
104 //########################################################################\r
105 \r
106 \r
107 \r
108 /**\r
109 *\r
110 */\r
111 OdfDocument::OdfDocument()\r
112 {\r
113 }\r
114 \r
115 \r
116 /**\r
117 *\r
118 */\r
119 OdfDocument::OdfDocument(const OdfDocument &other)\r
120 {\r
121 content = other.content;\r
122 images = other.images;\r
123 }\r
124 \r
125 \r
126 /**\r
127 *\r
128 */\r
129 OdfDocument::~OdfDocument()\r
130 {\r
131 }\r
132 \r
133 /**\r
134 *\r
135 */\r
136 bool OdfDocument::readFile(const std::string &fileName)\r
137 {\r
138 return true;\r
139 }\r
140 \r
141 /**\r
142 *\r
143 */\r
144 bool OdfDocument::writeFile(const std::string &fileName)\r
145 {\r
146 return true;\r
147 }\r
148 \r
149 \r
150 \r
151 \r
152 \r
153 } //namespace odf\r
154 \r
155 \r
156 \r
157 \r
158 //########################################################################\r
159 //# E N D O F F I L E\r
160 //########################################################################\r
161 \r