summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e1a718)
raw | patch | inline | side by side (parent: 2e1a718)
author | cilix42 <cilix42@users.sourceforge.net> | |
Tue, 4 Dec 2007 20:03:34 +0000 (20:03 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Tue, 4 Dec 2007 20:03:34 +0000 (20:03 +0000) |
src/helper/png-write.cpp | patch | blob | history |
index 6feefec7d69c722de91a6855de8d660a4c8a1ea7..2128abd393f315e190f79d09c61b0546801cd3ad 100644 (file)
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
/**
* Export the given document as a Portable Network Graphics (PNG) file.
*
- * \return true if succeeded, false if an error occurred.
+ * \return true if succeeded (or if no action was taken), false if an error occurred.
*/
bool
sp_export_png_file(SPDocument *doc, gchar const *filename,
g_return_val_if_fail(height >= 1, false);
if (!force_overwrite && !sp_ui_overwrite_file(filename)) {
- return false;
+ /* Remark: We return true so as not to invoke an error dialog in case export is cancelled
+ by the user; currently this is safe because the callers only act when false is returned.
+ If this changes in the future we need better distinction of return types (e.g., use int)
+ */
+ return true;
}
// export with maximum blur rendering quality