summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/display/cairo-utils.cpp10
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp3
-rw-r--r--src/sp-flowregion.cpp39
-rw-r--r--src/sp-metadata.cpp10
-rw-r--r--src/sp-object-group.cpp4
-rw-r--r--src/sp-polyline.cpp11
-rw-r--r--src/sp-symbol.cpp33
-rw-r--r--src/ui/dialog/export.cpp9
-rw-r--r--src/ui/dialog/export.h11
9 files changed, 67 insertions, 63 deletions
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp
index a55b05fe3..fc56c7b26 100644
--- a/src/display/cairo-utils.cpp
+++ b/src/display/cairo-utils.cpp
@@ -655,8 +655,8 @@ int ink_cairo_surface_srgb_to_linear(cairo_surface_t *surface)
cairo_surface_flush(surface);
int width = cairo_image_surface_get_width(surface);
int height = cairo_image_surface_get_height(surface);
- int stride = cairo_image_surface_get_stride(surface);
- unsigned char *data = cairo_image_surface_get_data(surface);
+ // int stride = cairo_image_surface_get_stride(surface);
+ // unsigned char *data = cairo_image_surface_get_data(surface);
ink_cairo_surface_filter( surface, surface, SurfaceSrgbToLinear() );
@@ -698,8 +698,8 @@ int ink_cairo_surface_linear_to_srgb(cairo_surface_t *surface)
cairo_surface_flush(surface);
int width = cairo_image_surface_get_width(surface);
int height = cairo_image_surface_get_height(surface);
- int stride = cairo_image_surface_get_stride(surface);
- unsigned char *data = cairo_image_surface_get_data(surface);
+ // int stride = cairo_image_surface_get_stride(surface);
+ // unsigned char *data = cairo_image_surface_get_data(surface);
ink_cairo_surface_filter( surface, surface, SurfaceLinearToSrgb() );
@@ -888,4 +888,4 @@ guint32 argb32_from_rgba(guint32 in)
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index 452139344..ac571d963 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -91,7 +91,8 @@ LPERecursiveSkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > co
double scaling = (uskeleton.domain().extent() - toffset)/pattBndsX->extent();
// TODO investigate why pattWidth is not being used:
- double pattWidth = pattBndsX->extent() * scaling;
+ // - Doesn't appear to have been used anywhere in bzr history (Alex V: 2013-03-16)
+ // double pattWidth = pattBndsX->extent() * scaling;
if (scaling != 1.0) {
x*=scaling;
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index a8de68f9b..627907cef 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -86,15 +86,13 @@ sp_flowregion_dispose(GObject *object)
group->computed.~vector<Shape*>();
}
-static void sp_flowregion_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
+static void
+sp_flowregion_child_added(SPObject *object,
+ Inkscape::XML::Node *child,
+ Inkscape::XML::Node *ref)
{
- SP_ITEM(object);
-
- if (((SPObjectClass *) (sp_flowregion_parent_class))->child_added) {
- (* ((SPObjectClass *) (sp_flowregion_parent_class))->child_added) (object, child, ref);
- }
-
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ SP_OBJECT_CLASS (sp_flowregion_parent_class)->child_added (object, child, ref);
+ object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
/* fixme: hide (Lauris) */
@@ -164,10 +162,10 @@ void SPFlowregion::UpdateComputed(void)
}
}
-static void sp_flowregion_modified(SPObject *object, guint flags)
+static void
+sp_flowregion_modified(SPObject *object,
+ guint flags)
{
- SP_FLOWREGION(object); // ensure it is the proper type.
-
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
@@ -278,15 +276,14 @@ sp_flowregionexclude_dispose(GObject *object)
}
}
-static void sp_flowregionexclude_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
+static void
+sp_flowregionexclude_child_added(SPObject *object,
+ Inkscape::XML::Node *child,
+ Inkscape::XML::Node *ref)
{
- SP_ITEM(object);
-
- if (((SPObjectClass *) (sp_flowregionexclude_parent_class))->child_added) {
- (* ((SPObjectClass *) (sp_flowregionexclude_parent_class))->child_added) (object, child, ref);
- }
+ SP_OBJECT_CLASS (sp_flowregionexclude_parent_class)->child_added (object, child, ref);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
/* fixme: hide (Lauris) */
@@ -354,10 +351,10 @@ void SPFlowregionExclude::UpdateComputed(void)
}
}
-static void sp_flowregionexclude_modified(SPObject *object, guint flags)
+static void
+sp_flowregionexclude_modified(SPObject *object,
+ guint flags)
{
- SP_FLOWREGIONEXCLUDE(object); // Ensure it is the proper type
-
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp
index 9978d0a3a..79953b708 100644
--- a/src/sp-metadata.cpp
+++ b/src/sp-metadata.cpp
@@ -116,15 +116,17 @@ static void sp_metadata_release(SPObject *object)
/**
* Sets a specific value in the SPMetadata.
*/
-static void sp_metadata_set(SPObject *object, unsigned int key, const gchar *value)
+static void
+sp_metadata_set(SPObject *object,
+ unsigned int key,
+ const gchar *value)
{
debug("0x%08x %s(%u): '%s'",(unsigned int)object,
sp_attribute_name(key),key,value);
- SP_METADATA(object); // ensures the object is of the proper type.
// see if any parents need this value
- if (reinterpret_cast<SPObjectClass *>(sp_metadata_parent_class)->set) {
- reinterpret_cast<SPObjectClass *>(sp_metadata_parent_class)->set(object, key, value);
+ if (SP_OBJECT_CLASS(sp_metadata_parent_class)->set) {
+ SP_OBJECT_CLASS(sp_metadata_parent_class)->set(object, key, value);
}
}
diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp
index 5158ec70a..e2b601ab9 100644
--- a/src/sp-object-group.cpp
+++ b/src/sp-object-group.cpp
@@ -93,8 +93,6 @@ sp_objectgroup_write(SPObject *object,
Inkscape::XML::Node *repr,
guint flags)
{
- SP_OBJECTGROUP(object); // Ensure we have the right type of SPObject
-
if (flags & SP_OBJECT_WRITE_BUILD) {
if (!repr) {
repr = xml_doc->createElement("svg:g");
@@ -118,7 +116,7 @@ sp_objectgroup_write(SPObject *object,
}
if ((SP_OBJECT_CLASS(sp_objectgroup_parent_class))->write) {
- (SP_OBJECT_CLASS(sp_objectgroup_parent_class))->write(object, xml_doc, repr, flags);
+ SP_OBJECT_CLASS(sp_objectgroup_parent_class)->write(object, xml_doc, repr, flags);
}
return repr;
diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp
index e5d89a802..2922b66ed 100644
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
@@ -116,10 +116,11 @@ sp_polyline_set(SPObject *object, unsigned int key, const gchar *value)
}
static Inkscape::XML::Node*
-sp_polyline_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
+sp_polyline_write(SPObject *object,
+ Inkscape::XML::Document *xml_doc,
+ Inkscape::XML::Node *repr,
+ guint flags)
{
- SP_POLYLINE(object);
-
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:polyline");
}
@@ -128,9 +129,7 @@ sp_polyline_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::
repr->mergeFrom(object->getRepr(), "id");
}
- if (((SPObjectClass *) (sp_polyline_parent_class))->write) {
- ((SPObjectClass *) (sp_polyline_parent_class))->write (object, xml_doc, repr, flags);
- }
+ SP_OBJECT_CLASS(sp_polyline_parent_class)->write (object, xml_doc, repr, flags);
return repr;
}
diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp
index d4db403e3..989a5b7f3 100644
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
@@ -307,19 +307,19 @@ static void sp_symbol_update(SPObject *object, SPCtx *ctx, guint flags)
}
}
-static void sp_symbol_modified(SPObject *object, guint flags)
+static void
+sp_symbol_modified(SPObject *object,
+ guint flags)
{
- SP_SYMBOL(object);
-
- if (((SPObjectClass *) (sp_symbol_parent_class))->modified) {
- (* ((SPObjectClass *) (sp_symbol_parent_class))->modified) (object, flags);
- }
+ SP_OBJECT_CLASS(sp_symbol_parent_class)->modified (object, flags);
}
-static Inkscape::XML::Node *sp_symbol_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *
+sp_symbol_write(SPObject *object,
+ Inkscape::XML::Document *xml_doc,
+ Inkscape::XML::Node *repr,
+ guint flags)
{
- SP_SYMBOL(object);
-
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:symbol");
}
@@ -330,9 +330,7 @@ static Inkscape::XML::Node *sp_symbol_write(SPObject *object, Inkscape::XML::Doc
//XML Tree being used directly here while it shouldn't be.
repr->setAttribute("preserveAspectRatio", object->getRepr()->attribute("preserveAspectRatio"));
- if (((SPObjectClass *) (sp_symbol_parent_class))->write) {
- ((SPObjectClass *) (sp_symbol_parent_class))->write (object, xml_doc, repr, flags);
- }
+ SP_OBJECT_CLASS(sp_symbol_parent_class)->write (object, xml_doc, repr, flags);
return repr;
}
@@ -404,3 +402,14 @@ static void sp_symbol_print(SPItem *item, SPPrintContext *ctx)
sp_print_release (ctx);
}
}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 66c9e6ed0..086e52a6c 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -133,6 +133,15 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
+/** A list of strings that is used both in the preferences, and in the
+ data fields to describe the various values of \c selection_type. */
+static const char * selection_names[SELECTION_NUMBER_OF] = {
+ "page", "drawing", "selection", "custom"};
+
+/** The names on the buttons for the various selection types. */
+static const char * selection_labels[SELECTION_NUMBER_OF] = {
+ N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
+
Export::Export (void) :
UI::Widget::Panel ("", "/dialogs/export/", SP_VERB_DIALOG_EXPORT),
current_key(SELECTION_PAGE),
diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h
index 202443a78..b10c98fd2 100644
--- a/src/ui/dialog/export.h
+++ b/src/ui/dialog/export.h
@@ -35,7 +35,6 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
-
/** What type of button is being pressed */
enum selection_type {
SELECTION_PAGE = 0, /**< Export the whole page */
@@ -45,16 +44,6 @@ enum selection_type {
SELECTION_NUMBER_OF /**< A counter for the number of these guys */
};
-/** A list of strings that is used both in the preferences, and in the
- data fields to describe the various values of \c selection_type. */
-static const char * selection_names[SELECTION_NUMBER_OF] = {
- "page", "drawing", "selection", "custom"};
-
-/** The names on the buttons for the various selection types. */
-static const char * selection_labels[SELECTION_NUMBER_OF] = {
- N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
-
-
/**
* A dialog widget to export to various image formats such as bitmap and png.
*