summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-21 16:37:12 +0000
committerTed Gould <ted@gould.cx>2009-12-21 16:37:12 +0000
commit752a8f90d3442cdaa4689ba6de4b911ca4fda514 (patch)
tree5e0739ec9bd2ac9cbdd2a2343859f89e02dae181 /src/extension
parentMerging in from trunk (diff)
parentUpdating the READMEs to better handle OSX. (diff)
downloadinkscape-752a8f90d3442cdaa4689ba6de4b911ca4fda514.tar.gz
inkscape-752a8f90d3442cdaa4689ba6de4b911ca4fda514.zip
Updating to current trunk
(bzr r8254.1.38)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/dxf2svg/entities2elements.cpp4
-rw-r--r--src/extension/internal/cairo-ps-out.cpp24
-rw-r--r--src/extension/internal/cairo-render-context.h4
-rw-r--r--src/extension/internal/emf-win32-inout.cpp1
-rw-r--r--src/extension/internal/odf.cpp4
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp1
-rw-r--r--src/extension/internal/pdfinput/svg-builder.cpp4
7 files changed, 22 insertions, 20 deletions
diff --git a/src/extension/dxf2svg/entities2elements.cpp b/src/extension/dxf2svg/entities2elements.cpp
index cf42dac32..ab160e265 100644
--- a/src/extension/dxf2svg/entities2elements.cpp
+++ b/src/extension/dxf2svg/entities2elements.cpp
@@ -80,7 +80,7 @@ void pline2svg(polyline pline, int type, int precision, char * units, double sca
// 2 is pline2polygon
- char delim[1];
+ char delim[2];
double mag_bulge = 0;
double prev_mag_bulge = 0;
@@ -185,7 +185,7 @@ void lwpline2svg(lwpolyline pline, int type, int precision, char * units, double
// 2 is pline2polygon
- char delim[1];
+ char delim[2];
double mag_bulge = 0;
double prev_mag_bulge = 0;
diff --git a/src/extension/internal/cairo-ps-out.cpp b/src/extension/internal/cairo-ps-out.cpp
index 9ac19326f..737bb2885 100644
--- a/src/extension/internal/cairo-ps-out.cpp
+++ b/src/extension/internal/cairo-ps-out.cpp
@@ -42,22 +42,22 @@ namespace Inkscape {
namespace Extension {
namespace Internal {
-bool
-CairoPsOutput::check (Inkscape::Extension::Extension * module)
+bool CairoPsOutput::check (Inkscape::Extension::Extension * /*module*/)
{
- if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_PRINT_CAIRO_PS))
- return FALSE;
-
- return TRUE;
+ if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_PRINT_CAIRO_PS)) {
+ return FALSE;
+ } else {
+ return TRUE;
+ }
}
-bool
-CairoEpsOutput::check (Inkscape::Extension::Extension * module)
+bool CairoEpsOutput::check (Inkscape::Extension::Extension * /*module*/)
{
- if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_PRINT_CAIRO_EPS))
- return FALSE;
-
- return TRUE;
+ if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_PRINT_CAIRO_EPS)) {
+ return FALSE;
+ } else {
+ return TRUE;
+ }
}
static bool
diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h
index e6f2d698e..a1f902457 100644
--- a/src/extension/internal/cairo-render-context.h
+++ b/src/extension/internal/cairo-render-context.h
@@ -71,12 +71,12 @@ public:
CairoRenderer *getRenderer(void) const;
cairo_t *getCairoContext(void) const;
- typedef enum CairoRenderMode {
+ enum CairoRenderMode {
RENDER_MODE_NORMAL,
RENDER_MODE_CLIP
};
- typedef enum CairoClipMode {
+ enum CairoClipMode {
CLIP_MODE_PATH,
CLIP_MODE_MASK
};
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp
index f400a3649..9d25f3a7f 100644
--- a/src/extension/internal/emf-win32-inout.cpp
+++ b/src/extension/internal/emf-win32-inout.cpp
@@ -127,6 +127,7 @@ emf_print_document_to_file(SPDocument *doc, gchar const *filename)
/* Print document */
ret = mod->begin(doc);
if (ret) {
+ g_free(oldoutput);
throw Inkscape::Extension::Output::save_failed();
}
sp_item_invoke_print(mod->base, &context);
diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp
index cc8489302..46e0361ce 100644
--- a/src/extension/internal/odf.cpp
+++ b/src/extension/internal/odf.cpp
@@ -795,8 +795,8 @@ void SingularValueDecomposition::calculate()
}
}
- delete e;
- delete work;
+ delete [] e;
+ delete [] work;
}
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index c2d417f2c..ba00fe343 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -734,6 +734,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
delete builder;
g_free(docname);
delete pdf_doc;
+ delete dlg;
// Restore undo
sp_document_set_undo_sensitive(doc, saved);
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 00bd8fa4d..b9583545f 100644
--- a/src/extension/internal/pdfinput/svg-builder.cpp
+++ b/src/extension/internal/pdfinput/svg-builder.cpp
@@ -1536,7 +1536,7 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *str, int width, int height
}
png_write_row(png_ptr, (png_bytep)buffer);
}
- delete buffer;
+ delete [] buffer;
} else if (color_map) {
image_stream = new ImageStream(str, width,
color_map->getNumPixelComps(),
@@ -1575,7 +1575,7 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *str, int width, int height
png_write_row(png_ptr, (png_bytep)buffer);
}
}
- delete buffer;
+ delete [] buffer;
} else { // A colormap must be provided, so quit
png_destroy_write_struct(&png_ptr, &info_ptr);