index 2e0082832fa0274075a06cf95dde3f8c5006c144..3537be4504646f29236e8d0f7578112a798a0273 100644 (file)
}
}
- delete e;
- delete work;
+ delete [] e;
+ delete [] work;
}
* Get the bounding box of an item, as mapped onto
* an ODF document, in cm.
*/
-static boost::optional<Geom::Rect> getODFBoundingBox(const SPItem *item)
+static Geom::OptRect getODFBoundingBox(const SPItem *item)
{
- boost::optional<Geom::Rect> bbox_temp = sp_item_bbox_desktop((SPItem *)item);
- boost::optional<Geom::Rect> bbox;
+ Geom::OptRect bbox_temp = sp_item_bbox_desktop((SPItem *)item);
+ Geom::OptRect bbox;
if (bbox_temp) {
bbox = *bbox_temp;
double doc_height = sp_document_height(SP_ACTIVE_DOCUMENT);
GradientInfo gi;
SPGradient *grvec = sp_gradient_get_vector(gradient, FALSE);
- for (SPStop *stop = sp_first_stop(grvec) ;
+ for (SPStop *stop = grvec->getFirstStop() ;
stop ; stop = sp_next_stop(stop))
{
unsigned long rgba = sp_stop_get_rgba32(stop);
Geom::Matrix tf = getODFTransform(item);
//### Get ODF bounding box params for item
- boost::optional<Geom::Rect> bbox = getODFBoundingBox(item);
+ Geom::OptRect bbox = getODFBoundingBox(item);
if (!bbox) {
return true;
}
* Descends into the SVG tree, mapping things to ODF when appropriate
*/
void
-OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gchar const *uri)
+OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gchar const *filename)
{
reset();
- //g_message("native file:%s\n", uri);
- documentUri = URI(uri);
+ //g_message("native file:%s\n", filename);
+ documentUri = URI(filename);
+ /* fixme: It looks like we really are using documentUri as a URI, so we ought to call
+ * g_filename_to_uri for the URI constructor. */
ZipFile zf;
preprocess(zf, doc->rroot);
@@ -2395,7 +2397,7 @@ OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gchar con
return;
}
- if (!zf.writeFile(uri))
+ if (!zf.writeFile(filename))
{
return;
}