file.cpp revision ec35142cad8ce4f534989cacd6cc98e276263548
1879N/A#ifdef HAVE_CONFIG_H
0N/A#include "application/application.h"
2772N/A#include "application/editor.h"
0N/A#include "desktop-handles.h"
0N/A#include "dir-util.h"
0N/A#include "document-private.h"
0N/A#include "helper/png-write.h"
0N/A#include "id-clash.h"
0N/A#include "inkscape.h"
0N/A#include "inkscape.h"
0N/A#include "interface.h"
0N/A#include "message-stack.h"
0N/A#include "path-prefix.h"
0N/A#include "preferences.h"
0N/A#include "selection-chemistry.h"
0N/A#include "selection.h"
0N/A#include "sp-namedview.h"
0N/A#include "ui/dialog/filedialog.h"
0N/A#include "ui/dialog/ocaldialogs.h"
0N/A#include "ui/view/view-widget.h"
1879N/A#include "xml/rebase-hrefs.h"
#ifdef WITH_GNOME_VFS
#ifdef WITH_INKBOARD
#include "jabber_whiteboard/session-manager.h"
#ifdef WIN32
#include <windows.h>
if (fn) {
if (uri_to_add) {
return dt;
// TRANSLATORS: default.svg is localizable - this is the name of the default document
// localized share/templates/default.xx.svg file, where xx is your language code.
if (desktop)
if (desktop)
if (doc) {
if (add_to_recent) {
return TRUE;
return FALSE;
if (!uri) {
desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("Document not saved yet. Cannot revert."));
bool do_revert = true;
gchar *text = g_strdup_printf(_("Changes will be lost! Are you sure you want to reload document %s?"), uri);
if (!response) {
do_revert = false;
bool reverted;
if (do_revert) {
if (reverted) {
reverted = false;
if (reverted) {
for (unsigned i = 0; i < total; i++) {
if (i < dataLen) {
if (i < byteLen) {
if ( i < cstrLen ) {
#ifdef WIN32
if(utf8path)
if (!success)
delete openDialogInstance;
delete openDialogInstance;
#ifdef INK_DUMP_FILENAME_CONV
if (diff > 0) {
diff),
diff);
gchar *text = g_strdup_printf(_("No Inkscape extension found to save document (%s). This may have been caused by an unknown filename extension."), safeUri);
return FALSE;
return FALSE;
return FALSE;
#ifdef WITH_GNOME_VFS
#ifdef WITH_GNOME_VFS
result = gnome_vfs_create (&to_handle, uri_local, GNOME_VFS_OPEN_WRITE, FALSE, GNOME_VFS_PERM_USER_ALL);
if (!attr) {
if (extension)
char const * dialog_title;
if (is_copy) {
if (!success) {
delete saveDialog;
return success;
delete saveDialog;
saveDialog = 0;
if (success) {
return success;
bool success = true;
SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("No changes need to be saved."));
return success;
if (!SP_ACTIVE_DOCUMENT)
if (!SP_ACTIVE_DOCUMENT)
if (!SP_ACTIVE_DOCUMENT)
if (desktop) {
if (sel_bbox) {
if (!doc)
if (!success) {
delete importDialogInstance;
delete importDialogInstance;
#ifdef NEW_EXPORT_DIALOG
if (!attr) {
if (extension)
if (!success) {
delete exportDialogInstance;
return success;
delete exportDialogInstance;
if (success) {
return success;
if (!SP_ACTIVE_DOCUMENT)
bool success = false;
static bool gotSuccess = false;
(void)repr;
if (!success) {
delete exportDialogInstance;
return success;
delete exportDialogInstance;
if (!success){
return success;
if(!gotSuccess)
if (!success) {
delete exportPasswordDialogInstance;
return success;
delete exportPasswordDialogInstance;
if (!success)
gchar *text = g_strdup_printf(_("Error exporting the document. Verify if the server name, username and password are correct, if the server has support for webdav and verify if you didn't forget to choose a license."));
gotSuccess = true;
return success;
if (!SP_ACTIVE_DOCUMENT)
if (success)
if (!doc)
if (!importDialogInstance) {
importDialogInstance = new
if (!success) {
delete importDialogInstance;
delete importDialogInstance;
if (doc)
if (doc)