summaryrefslogtreecommitdiffstats
path: root/src/extension/extension.cpp
diff options
context:
space:
mode:
authorVinícius dos Santos Oliveira <vini.ipsmaker@gmail.com>2013-06-05 19:03:06 +0000
committerVinícius dos Santos Oliveira <vini.ipsmaker@gmail.com>2013-06-05 19:03:06 +0000
commit4cec6d0c7d401ed0616e91a923a7ec4caf806f3d (patch)
tree4737bd0075f714385a55b0f3d9339211baaecbf9 /src/extension/extension.cpp
parentCorrect to compile against recent gtkmm, including updated macports versions.... (diff)
downloadinkscape-4cec6d0c7d401ed0616e91a923a7ec4caf806f3d.tar.gz
inkscape-4cec6d0c7d401ed0616e91a923a7ec4caf806f3d.zip
Add command line option to specify PDF export version. Patch from schwieni.
From the patch's author: Additional command line option added to export to different PDF-versions supported by cairo (currently only "PDF 1.4" and "PDF 1.5"). The user must provide the exact string found in the PDF-export dialog of Inkscape. This feature was previously only accessible via the GUI of Inkscape. This option is useful for people opting for PDF-a conformance in their PDFs. Moreover, the Extension and Parameter classes are extended by setters for enum parameters (used in combo boxes). (bzr r12348)
Diffstat (limited to 'src/extension/extension.cpp')
-rw-r--r--src/extension/extension.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index 0d91c7491..2f78b5397 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -429,6 +429,21 @@ Extension::get_param_enum (const gchar * name, const SPDocument * doc, const Ink
return param->get_enum(doc, node);
}
+/**
+ * This is useful to find out, if a given string \c value is selectable in a ComboBox named \cname.
+ *
+ * @param name The name of the enum parameter to get.
+ * @param doc The document to look in for document specific parameters.
+ * @param node The node to look in for a specific parameter.
+ * @return true if value exists, false if not
+ */
+bool
+Extension::get_param_enum_contains(gchar const * name, gchar const * value, SPDocument * doc, Inkscape::XML::Node * node)
+{
+ Parameter * param = get_param(name);
+ return param->get_enum_contains(value, doc, node);
+}
+
gchar const *
Extension::get_param_optiongroup( gchar const * name, SPDocument const * doc, Inkscape::XML::Node const * node)
{
@@ -599,6 +614,13 @@ Extension::set_param_optiongroup(gchar const * name, gchar const * value, SPDocu
return param->set_optiongroup(value, doc, node);
}
+gchar const *
+Extension::set_param_enum(gchar const * name, gchar const * value, SPDocument * doc, Inkscape::XML::Node * node)
+{
+ Parameter * param = get_param(name);
+ return param->set_enum(value, doc, node);
+}
+
/**
\return The passed in value