| 1 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the libepubgen project. |
| 4 |
* |
| 5 |
* This Source Code Form is subject to the terms of the Mozilla Public |
| 6 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 8 |
*/ |
| 9 |
|
| 10 |
#include <libepubgen/EPUBDrawingGenerator.h> |
| 11 |
|
| 12 |
#include "EPUBPagedGenerator.h" |
| 13 |
|
| 14 |
namespace libepubgen |
| 15 |
{ |
| 16 |
|
| 17 |
using librevenge::RVNGPropertyList; |
| 18 |
using librevenge::RVNGString; |
| 19 |
|
| 20 |
class EPUBEmbeddingContact; |
| 21 |
class EPUBPackage; |
| 22 |
|
| 23 |
class EPUBDrawingGenerator::Impl : public EPUBPagedGenerator |
| 24 |
{ |
| 25 |
public: |
| 26 |
Impl(EPUBPackage *const package, int version); |
| 27 |
}; |
| 28 |
|
| 29 |
EPUBDrawingGenerator::Impl::Impl(EPUBPackage *const package, int version) |
| 30 |
: EPUBPagedGenerator(package, version) |
| 31 |
{ |
| 32 |
} |
| 33 |
|
| 34 |
EPUBDrawingGenerator::EPUBDrawingGenerator(EPUBPackage *const package, int version) |
| 35 |
: m_impl(new Impl(package, version)) |
| 36 |
{ |
| 37 |
} |
| 38 |
|
| 39 |
EPUBDrawingGenerator::EPUBDrawingGenerator(EPUBEmbeddingContact &contact, EPUBPackage *const package) |
| 40 |
: m_impl(nullptr) |
| 41 |
{ |
| 42 |
// TODO: implement me |
| 43 |
(void) contact; |
| 44 |
(void) package; |
| 45 |
} |
| 46 |
|
| 47 |
EPUBDrawingGenerator::~EPUBDrawingGenerator() |
| 48 |
{ |
| 49 |
delete m_impl; |
| 50 |
} |
| 51 |
|
| 52 |
void EPUBDrawingGenerator::setSplitHeadingLevel(const unsigned level) |
| 53 |
{ |
| 54 |
m_impl->setSplitHeadingLevel(level); |
| 55 |
} |
| 56 |
|
| 57 |
void EPUBDrawingGenerator::setOption(int key, int value) |
| 58 |
{ |
| 59 |
switch (key) |
| 60 |
{ |
| 61 |
case EPUB_GENERATOR_OPTION_SPLIT: |
| 62 |
m_impl->setSplitMethod(static_cast<EPUBSplitMethod>(value)); |
| 63 |
break; |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
void EPUBDrawingGenerator::setSplitSize(const unsigned size) |
| 68 |
{ |
| 69 |
m_impl->setSplitSize(size); |
| 70 |
} |
| 71 |
|
| 72 |
void EPUBDrawingGenerator::registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, EPUBEmbeddedImage imageHandler) |
| 73 |
{ |
| 74 |
// TODO: implement me |
| 75 |
(void) mimeType; |
| 76 |
(void) imageHandler; |
| 77 |
} |
| 78 |
|
| 79 |
void EPUBDrawingGenerator::registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, EPUBEmbeddedObject objectHandler) |
| 80 |
{ |
| 81 |
// TODO: implement me |
| 82 |
(void) mimeType; |
| 83 |
(void) objectHandler; |
| 84 |
} |
| 85 |
|
| 86 |
void EPUBDrawingGenerator::startDocument(const RVNGPropertyList &propList) |
| 87 |
{ |
| 88 |
m_impl->startDocument(propList); |
| 89 |
} |
| 90 |
|
| 91 |
void EPUBDrawingGenerator::endDocument() |
| 92 |
{ |
| 93 |
m_impl->endDocument(); |
| 94 |
} |
| 95 |
|
| 96 |
void EPUBDrawingGenerator::setDocumentMetaData(const RVNGPropertyList &propList) |
| 97 |
{ |
| 98 |
m_impl->setDocumentMetaData(propList); |
| 99 |
} |
| 100 |
|
| 101 |
void EPUBDrawingGenerator::defineEmbeddedFont(const RVNGPropertyList &propList) |
| 102 |
{ |
| 103 |
m_impl->defineEmbeddedFont(propList); |
| 104 |
} |
| 105 |
|
| 106 |
void EPUBDrawingGenerator::startPage(const RVNGPropertyList &propList) |
| 107 |
{ |
| 108 |
m_impl->startSlide(propList); |
| 109 |
} |
| 110 |
|
| 111 |
void EPUBDrawingGenerator::endPage() |
| 112 |
{ |
| 113 |
m_impl->endSlide(); |
| 114 |
} |
| 115 |
|
| 116 |
void EPUBDrawingGenerator::startMasterPage(const RVNGPropertyList &propList) |
| 117 |
{ |
| 118 |
m_impl->startMasterSlide(propList); |
| 119 |
} |
| 120 |
|
| 121 |
void EPUBDrawingGenerator::endMasterPage() |
| 122 |
{ |
| 123 |
m_impl->endMasterSlide(); |
| 124 |
} |
| 125 |
|
| 126 |
void EPUBDrawingGenerator::setStyle(const RVNGPropertyList &propList) |
| 127 |
{ |
| 128 |
m_impl->setStyle(propList); |
| 129 |
} |
| 130 |
|
| 131 |
void EPUBDrawingGenerator::startLayer(const RVNGPropertyList &propList) |
| 132 |
{ |
| 133 |
m_impl->startLayer(propList); |
| 134 |
} |
| 135 |
|
| 136 |
void EPUBDrawingGenerator::endLayer() |
| 137 |
{ |
| 138 |
m_impl->endLayer(); |
| 139 |
} |
| 140 |
|
| 141 |
void EPUBDrawingGenerator::startEmbeddedGraphics(const RVNGPropertyList &propList) |
| 142 |
{ |
| 143 |
m_impl->startEmbeddedGraphics(propList); |
| 144 |
} |
| 145 |
|
| 146 |
void EPUBDrawingGenerator::endEmbeddedGraphics() |
| 147 |
{ |
| 148 |
m_impl->endEmbeddedGraphics(); |
| 149 |
} |
| 150 |
|
| 151 |
void EPUBDrawingGenerator::openGroup(const RVNGPropertyList &propList) |
| 152 |
{ |
| 153 |
m_impl->openGroup(propList); |
| 154 |
} |
| 155 |
|
| 156 |
void EPUBDrawingGenerator::closeGroup() |
| 157 |
{ |
| 158 |
m_impl->closeGroup(); |
| 159 |
} |
| 160 |
|
| 161 |
void EPUBDrawingGenerator::drawRectangle(const RVNGPropertyList &propList) |
| 162 |
{ |
| 163 |
m_impl->drawRectangle(propList); |
| 164 |
} |
| 165 |
|
| 166 |
void EPUBDrawingGenerator::drawEllipse(const RVNGPropertyList &propList) |
| 167 |
{ |
| 168 |
m_impl->drawEllipse(propList); |
| 169 |
} |
| 170 |
|
| 171 |
void EPUBDrawingGenerator::drawPolygon(const RVNGPropertyList &propList) |
| 172 |
{ |
| 173 |
m_impl->drawPolygon(propList); |
| 174 |
} |
| 175 |
|
| 176 |
void EPUBDrawingGenerator::drawPolyline(const RVNGPropertyList &propList) |
| 177 |
{ |
| 178 |
m_impl->drawPolyline(propList); |
| 179 |
} |
| 180 |
|
| 181 |
void EPUBDrawingGenerator::drawPath(const RVNGPropertyList &propList) |
| 182 |
{ |
| 183 |
m_impl->drawPath(propList); |
| 184 |
} |
| 185 |
|
| 186 |
void EPUBDrawingGenerator::drawGraphicObject(const RVNGPropertyList &propList) |
| 187 |
{ |
| 188 |
m_impl->drawGraphicObject(propList); |
| 189 |
} |
| 190 |
|
| 191 |
void EPUBDrawingGenerator::drawConnector(const RVNGPropertyList &propList) |
| 192 |
{ |
| 193 |
m_impl->drawConnector(propList); |
| 194 |
} |
| 195 |
|
| 196 |
void EPUBDrawingGenerator::startTextObject(const RVNGPropertyList &propList) |
| 197 |
{ |
| 198 |
m_impl->startTextObject(propList); |
| 199 |
} |
| 200 |
|
| 201 |
void EPUBDrawingGenerator::endTextObject() |
| 202 |
{ |
| 203 |
m_impl->endTextObject(); |
| 204 |
} |
| 205 |
|
| 206 |
void EPUBDrawingGenerator::startTableObject(const RVNGPropertyList &propList) |
| 207 |
{ |
| 208 |
m_impl->startTableObject(propList); |
| 209 |
} |
| 210 |
|
| 211 |
void EPUBDrawingGenerator::openTableRow(const RVNGPropertyList &propList) |
| 212 |
{ |
| 213 |
m_impl->openTableRow(propList); |
| 214 |
} |
| 215 |
|
| 216 |
void EPUBDrawingGenerator::closeTableRow() |
| 217 |
{ |
| 218 |
m_impl->closeTableRow(); |
| 219 |
} |
| 220 |
|
| 221 |
void EPUBDrawingGenerator::openTableCell(const RVNGPropertyList &propList) |
| 222 |
{ |
| 223 |
m_impl->openTableCell(propList); |
| 224 |
} |
| 225 |
|
| 226 |
void EPUBDrawingGenerator::closeTableCell() |
| 227 |
{ |
| 228 |
m_impl->closeTableCell(); |
| 229 |
} |
| 230 |
|
| 231 |
void EPUBDrawingGenerator::insertCoveredTableCell(const RVNGPropertyList &propList) |
| 232 |
{ |
| 233 |
m_impl->insertCoveredTableCell(propList); |
| 234 |
} |
| 235 |
|
| 236 |
void EPUBDrawingGenerator::endTableObject() |
| 237 |
{ |
| 238 |
m_impl->endTableObject(); |
| 239 |
} |
| 240 |
|
| 241 |
void EPUBDrawingGenerator::insertTab() |
| 242 |
{ |
| 243 |
m_impl->insertTab(); |
| 244 |
} |
| 245 |
|
| 246 |
void EPUBDrawingGenerator::insertSpace() |
| 247 |
{ |
| 248 |
m_impl->insertSpace(); |
| 249 |
} |
| 250 |
|
| 251 |
void EPUBDrawingGenerator::insertText(const RVNGString &text) |
| 252 |
{ |
| 253 |
m_impl->insertText(text); |
| 254 |
} |
| 255 |
|
| 256 |
void EPUBDrawingGenerator::insertLineBreak() |
| 257 |
{ |
| 258 |
m_impl->insertLineBreak(); |
| 259 |
} |
| 260 |
|
| 261 |
void EPUBDrawingGenerator::insertField(const RVNGPropertyList &propList) |
| 262 |
{ |
| 263 |
m_impl->insertField(propList); |
| 264 |
} |
| 265 |
|
| 266 |
void EPUBDrawingGenerator::openOrderedListLevel(const RVNGPropertyList &propList) |
| 267 |
{ |
| 268 |
m_impl->openOrderedListLevel(propList); |
| 269 |
} |
| 270 |
|
| 271 |
void EPUBDrawingGenerator::openUnorderedListLevel(const RVNGPropertyList &propList) |
| 272 |
{ |
| 273 |
m_impl->openUnorderedListLevel(propList); |
| 274 |
} |
| 275 |
|
| 276 |
void EPUBDrawingGenerator::closeOrderedListLevel() |
| 277 |
{ |
| 278 |
m_impl->closeOrderedListLevel(); |
| 279 |
} |
| 280 |
|
| 281 |
void EPUBDrawingGenerator::closeUnorderedListLevel() |
| 282 |
{ |
| 283 |
m_impl->closeUnorderedListLevel(); |
| 284 |
} |
| 285 |
|
| 286 |
void EPUBDrawingGenerator::openListElement(const RVNGPropertyList &propList) |
| 287 |
{ |
| 288 |
m_impl->openListElement(propList); |
| 289 |
} |
| 290 |
|
| 291 |
void EPUBDrawingGenerator::closeListElement() |
| 292 |
{ |
| 293 |
m_impl->closeListElement(); |
| 294 |
} |
| 295 |
|
| 296 |
void EPUBDrawingGenerator::defineParagraphStyle(const RVNGPropertyList &propList) |
| 297 |
{ |
| 298 |
m_impl->defineParagraphStyle(propList); |
| 299 |
} |
| 300 |
|
| 301 |
void EPUBDrawingGenerator::openParagraph(const RVNGPropertyList &propList) |
| 302 |
{ |
| 303 |
m_impl->openParagraph(propList); |
| 304 |
} |
| 305 |
|
| 306 |
void EPUBDrawingGenerator::closeParagraph() |
| 307 |
{ |
| 308 |
m_impl->closeParagraph(); |
| 309 |
} |
| 310 |
|
| 311 |
void EPUBDrawingGenerator::defineCharacterStyle(const RVNGPropertyList &propList) |
| 312 |
{ |
| 313 |
m_impl->defineCharacterStyle(propList); |
| 314 |
} |
| 315 |
|
| 316 |
void EPUBDrawingGenerator::openSpan(const RVNGPropertyList &propList) |
| 317 |
{ |
| 318 |
m_impl->openSpan(propList); |
| 319 |
} |
| 320 |
|
| 321 |
void EPUBDrawingGenerator::closeSpan() |
| 322 |
{ |
| 323 |
m_impl->closeSpan(); |
| 324 |
} |
| 325 |
|
| 326 |
void EPUBDrawingGenerator::openLink(const RVNGPropertyList &propList) |
| 327 |
{ |
| 328 |
m_impl->openLink(propList); |
| 329 |
} |
| 330 |
|
| 331 |
void EPUBDrawingGenerator::closeLink() |
| 332 |
{ |
| 333 |
m_impl->closeLink(); |
| 334 |
} |
| 335 |
|
| 336 |
} |
| 337 |
|
| 338 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |