Code

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