mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-06 00:10:25 +00:00
use nsIWebBrowserPersist for saving (bug 98550)
This commit is contained in:
parent
08fa569190
commit
d115e1e868
@ -643,10 +643,6 @@ function SaveDocument(aSaveAs, aSaveCopy, aMimeType)
|
||||
var docURI = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI);
|
||||
docURI.spec = urlstring;
|
||||
|
||||
window.editorShell.editor.SaveFile(docURI, replacing, aSaveCopy, aMimeType);
|
||||
// remove the "if" and curly braces and the above line to get the nsWebBrowserPersist saving!
|
||||
if (!success)
|
||||
{
|
||||
if (!tempLocalFile)
|
||||
{
|
||||
tempLocalFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||
@ -673,7 +669,6 @@ if (!success)
|
||||
var persistAPI = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(Components.interfaces.nsIWebBrowserPersist);
|
||||
persistAPI.progressListener = gEditorOutputProgressListener;
|
||||
persistAPI.saveDocument(editorDoc, tempLocalFile, parentDir, aMimeType, outputFlags, wrapColumn);
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user