~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/dom/odf/odfdocument.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2008 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
 */
 
29
 
 
30
#include "odfdocument.h"
 
31
 
 
32
 
 
33
namespace odf
 
34
{
 
35
 
 
36
 
 
37
//########################################################################
 
38
//# I M A G E    D A T A
 
39
//########################################################################
 
40
 
 
41
 
 
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
}
 
51
 
 
52
/**
 
53
 *
 
54
 */
 
55
ImageData::ImageData(const ImageData &other)
 
56
{
 
57
    fileName = other.fileName;
 
58
    data     = other.data;
 
59
}
 
60
 
 
61
/**
 
62
 *
 
63
 */
 
64
ImageData::~ImageData()
 
65
{
 
66
}
 
67
 
 
68
/**
 
69
 *
 
70
 */
 
71
std::string ImageData::getFileName()
 
72
{
 
73
    return fileName;
 
74
}
 
75
 
 
76
/**
 
77
 *
 
78
 */
 
79
void ImageData::setFileName(const std::string &val)
 
80
{
 
81
    fileName = val;
 
82
}
 
83
 
 
84
/**
 
85
 *
 
86
 */
 
87
std::vector<unsigned char> &ImageData::getData()
 
88
{
 
89
    return data;
 
90
}
 
91
 
 
92
/**
 
93
 *
 
94
 */
 
95
void ImageData::setData(const std::vector<unsigned char> &buf)
 
96
{
 
97
    data = buf;
 
98
}
 
99
 
 
100
 
 
101
 
 
102
 
 
103
 
 
104
//########################################################################
 
105
//# O D F    D O C U M E N T
 
106
//########################################################################
 
107
 
 
108
 
 
109
 
 
110
/**
 
111
 *
 
112
 */
 
113
OdfDocument::OdfDocument()
 
114
{
 
115
}
 
116
 
 
117
 
 
118
/**
 
119
 *
 
120
 */
 
121
OdfDocument::OdfDocument(const OdfDocument &other)
 
122
{
 
123
    content = other.content;
 
124
    images  = other.images;
 
125
}
 
126
 
 
127
 
 
128
/**
 
129
 *
 
130
 */
 
131
OdfDocument::~OdfDocument()
 
132
{
 
133
}
 
134
 
 
135
/**
 
136
 *
 
137
 */
 
138
bool OdfDocument::readFile(const std::string &/*fileName*/)
 
139
{
 
140
    return true;
 
141
}
 
142
 
 
143
/**
 
144
 *
 
145
 */
 
146
bool OdfDocument::writeFile(const std::string &/*fileName*/)
 
147
{
 
148
    return true;
 
149
}
 
150
 
 
151
 
 
152
 
 
153
 
 
154
 
 
155
} //namespace odf
 
156
 
 
157
 
 
158
 
 
159
 
 
160
//########################################################################
 
161
//# E N D    O F    F I L E
 
162
//########################################################################
 
163