Inkscape
Vector Graphics Editor
Inkscape::Extension::Internal::OdfOutput Class Reference

OpenDocument <drawing> input and output. More...

#include <odf.h>

Inheritance diagram for Inkscape::Extension::Internal::OdfOutput:
Inkscape::Extension::Implementation::Implementation

Public Member Functions

bool check (Inkscape::Extension::Extension *module) override
 Make sure that we are in the database. More...
 
void save (Inkscape::Extension::Output *mod, SPDocument *doc, char const *filename) override
 Descends into the SVG tree, mapping things to ODF when appropriate. More...
 
- Public Member Functions inherited from Inkscape::Extension::Implementation::Implementation
 Implementation ()=default
 
virtual ~Implementation ()=default
 
virtual bool load (Inkscape::Extension::Extension *)
 
virtual void unload (Inkscape::Extension::Extension *)
 
virtual ImplementationDocumentCachenewDocCache (Inkscape::Extension::Extension *, SPDesktop *)
 Create a new document cache object. More...
 
virtual bool check (Inkscape::Extension::Extension *)
 Verify any dependencies. More...
 
virtual bool cancelProcessing ()
 
virtual void commitDocument ()
 
virtual SPDocumentnew_from_template (Inkscape::Extension::Template *)
 
virtual void get_template_presets (const Template *tmod, TemplatePresets &presets) const
 
virtual void resize_to_template (Inkscape::Extension::Template *tmod, SPDocument *doc, SPPage *page)
 
virtual bool match_template_size (Inkscape::Extension::Template *tmod, double width, double height)
 
virtual SPDocumentopen (Inkscape::Extension::Input *, gchar const *)
 
virtual void save (Inkscape::Extension::Output *, SPDocument *, gchar const *)
 Find out information about the file. More...
 
virtual void export_raster (Inkscape::Extension::Output *, const SPDocument *, std::string const &, gchar const *)
 
virtual Gtk::Widget * prefs_effect (Inkscape::Extension::Effect *module, SPDesktop *desktop, sigc::signal< void()> *changeSignal, ImplementationDocumentCache *docCache)
 Find out information about the file. More...
 
virtual void effect (Inkscape::Extension::Effect *, SPDesktop *, ImplementationDocumentCache *)
 
virtual void effect (Inkscape::Extension::Effect *, SPDocument *document)
 
virtual bool apply_filter (Inkscape::Extension::Effect *module, SPItem *item)
 
virtual unsigned setup (Inkscape::Extension::Print *)
 
virtual unsigned set_preview (Inkscape::Extension::Print *)
 
virtual unsigned begin (Inkscape::Extension::Print *, SPDocument *)
 
virtual unsigned finish (Inkscape::Extension::Print *)
 
virtual bool textToPath (Inkscape::Extension::Print *)
 Tell the printing engine whether text should be text or path. More...
 
virtual bool fontEmbedded (Inkscape::Extension::Print *)
 Get "fontEmbedded" param, i.e. More...
 
virtual unsigned bind (Inkscape::Extension::Print *, Geom::Affine const &, float)
 
virtual unsigned release (Inkscape::Extension::Print *)
 
virtual unsigned fill (Inkscape::Extension::Print *, Geom::PathVector const &, Geom::Affine const &, SPStyle const *, Geom::OptRect const &, Geom::OptRect const &, Geom::OptRect const &)
 
virtual unsigned stroke (Inkscape::Extension::Print *, Geom::PathVector const &, Geom::Affine const &, SPStyle const *, Geom::OptRect const &, Geom::OptRect const &, Geom::OptRect const &)
 
virtual unsigned image (Inkscape::Extension::Print *, unsigned char *, unsigned int, unsigned int, unsigned int, Geom::Affine const &, SPStyle const *)
 
virtual unsigned text (Inkscape::Extension::Print *, char const *, Geom::Point const &, SPStyle const *)
 
virtual void processPath (Inkscape::XML::Node *)
 
virtual void setDetachBase (bool detach)
 If detach = true, when saving to a file, don't store URIs relative to the filename. More...
 

Static Public Member Functions

static void init ()
 This is the definition of PovRay output. More...
 

Private Member Functions

void reset ()
 Resets class to its pristine condition, ready to use again. More...
 
void preprocess (ZipFile &zf, SPDocument *doc, Inkscape::XML::Node *node)
 FIRST PASS. More...
 
bool writeManifest (ZipFile &zf)
 Writes the manifest. More...
 
bool writeMeta (ZipFile &zf)
 This writes the document meta information to meta.xml. More...
 
bool writeStyle (ZipFile &zf)
 
bool processStyle (SPItem *item, const Glib::ustring &id, const Glib::ustring &gradientNameFill, const Glib::ustring &gradientNameStroke, Glib::ustring &output)
 
bool processGradient (SPItem *item, const Glib::ustring &id, Geom::Affine &tf, Glib::ustring &gradientName, Glib::ustring &output, bool checkFillGradient=true)
 
bool writeStyleHeader (Writer &outs)
 Write the header for the content.xml file. More...
 
bool writeStyleFooter (Writer &outs)
 Write the footer for the style.xml file. More...
 
bool writeContentHeader (Writer &outs)
 Write the header for the content.xml file. More...
 
bool writeContentFooter (Writer &outs)
 Write the footer for the content.xml file. More...
 
bool writeTree (Writer &couts, Writer &souts, SPDocument *doc, Inkscape::XML::Node *node)
 SECOND PASS. More...
 
bool writeContent (ZipFile &zf, SPDocument *doc)
 Write the content.xml file. More...
 

Private Attributes

std::string docBaseUri
 
std::map< Glib::ustring, Glib::ustring > metadata
 
std::map< Glib::ustring, Glib::ustring > styleLookupTable
 
std::vector< StyleInfostyleTable
 
std::map< Glib::ustring, Glib::ustring > gradientLookupTable
 
std::vector< GradientInfogradientTable
 
std::map< Glib::ustring, Glib::ustring > imageTable
 

Detailed Description

OpenDocument <drawing> input and output.

This is an an entry in the extensions mechanism to begin to enable the inputting and outputting of OpenDocument Format (ODF) files from within Inkscape. Although the initial implementations will be very lossy do to the differences in the models of SVG and ODF, they will hopefully improve greatly with time.

http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html

Definition at line 252 of file odf.h.

Member Function Documentation

◆ check()

bool Inkscape::Extension::Internal::OdfOutput::check ( Inkscape::Extension::Extension module)
overridevirtual

Make sure that we are in the database.

Reimplemented from Inkscape::Extension::Implementation::Implementation.

Definition at line 2105 of file odf.cpp.

◆ init()

void Inkscape::Extension::Internal::OdfOutput::init ( )
static

This is the definition of PovRay output.

This function just calls the extension system with the memory allocated XML that describes the data.

Definition at line 2084 of file odf.cpp.

References Inkscape::Extension::build_from_mem().

Referenced by Inkscape::Extension::init().

◆ preprocess()

void Inkscape::Extension::Internal::OdfOutput::preprocess ( ZipFile zf,
SPDocument doc,
Inkscape::XML::Node node 
)
private

◆ processGradient()

◆ processStyle()

◆ reset()

void Inkscape::Extension::Internal::OdfOutput::reset ( void  )
private

Resets class to its pristine condition, ready to use again.

Definition at line 2031 of file odf.cpp.

References gradientLookupTable, gradientTable, imageTable, metadata, styleLookupTable, and styleTable.

Referenced by save().

◆ save()

void Inkscape::Extension::Internal::OdfOutput::save ( Inkscape::Extension::Output mod,
SPDocument doc,
char const *  filename 
)
override

◆ writeContent()

bool Inkscape::Extension::Internal::OdfOutput::writeContent ( ZipFile zf,
SPDocument doc 
)
private

◆ writeContentFooter()

bool Inkscape::Extension::Internal::OdfOutput::writeContentFooter ( Writer outs)
private

Write the footer for the content.xml file.

Definition at line 1952 of file odf.cpp.

References Inkscape::IO::Writer::writeString().

Referenced by writeContent().

◆ writeContentHeader()

bool Inkscape::Extension::Internal::OdfOutput::writeContentHeader ( Writer outs)
private

Write the header for the content.xml file.

Definition at line 1885 of file odf.cpp.

References Inkscape::IO::Writer::printf(), and Inkscape::IO::Writer::writeString().

Referenced by writeContent().

◆ writeManifest()

bool Inkscape::Extension::Internal::OdfOutput::writeManifest ( ZipFile zf)
private

◆ writeMeta()

◆ writeStyle()

bool Inkscape::Extension::Internal::OdfOutput::writeStyle ( ZipFile zf)
private

◆ writeStyleFooter()

bool Inkscape::Extension::Internal::OdfOutput::writeStyleFooter ( Writer outs)
private

Write the footer for the style.xml file.

TODO: add default document style here

Definition at line 1837 of file odf.cpp.

References Inkscape::IO::Writer::writeString().

Referenced by writeContent().

◆ writeStyleHeader()

bool Inkscape::Extension::Internal::OdfOutput::writeStyleHeader ( Writer outs)
private

Write the header for the content.xml file.

Definition at line 1774 of file odf.cpp.

References Inkscape::IO::Writer::printf(), and Inkscape::IO::Writer::writeString().

Referenced by writeContent().

◆ writeTree()

Member Data Documentation

◆ docBaseUri

std::string Inkscape::Extension::Internal::OdfOutput::docBaseUri
private

Definition at line 267 of file odf.h.

Referenced by preprocess(), and save().

◆ gradientLookupTable

std::map<Glib::ustring, Glib::ustring> Inkscape::Extension::Internal::OdfOutput::gradientLookupTable
private

Definition at line 286 of file odf.h.

Referenced by processGradient(), and reset().

◆ gradientTable

std::vector<GradientInfo> Inkscape::Extension::Internal::OdfOutput::gradientTable
private

Definition at line 288 of file odf.h.

Referenced by processGradient(), and reset().

◆ imageTable

std::map<Glib::ustring, Glib::ustring> Inkscape::Extension::Internal::OdfOutput::imageTable
private

Definition at line 291 of file odf.h.

Referenced by preprocess(), reset(), writeManifest(), and writeTree().

◆ metadata

std::map<Glib::ustring, Glib::ustring> Inkscape::Extension::Internal::OdfOutput::metadata
private

Definition at line 272 of file odf.h.

Referenced by preprocess(), reset(), and writeMeta().

◆ styleLookupTable

std::map<Glib::ustring, Glib::ustring> Inkscape::Extension::Internal::OdfOutput::styleLookupTable
private

Definition at line 281 of file odf.h.

Referenced by processStyle(), reset(), and writeTree().

◆ styleTable

std::vector<StyleInfo> Inkscape::Extension::Internal::OdfOutput::styleTable
private

Definition at line 283 of file odf.h.

Referenced by processStyle(), and reset().


The documentation for this class was generated from the following files: