Fix for bug 84065. Add an AppleFileDecoder into the stream converters and modify save/save all attachment in order to be able to select the decoder when dealing with an apple double attachment. R=mscott, SR=sspitzer, A=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@97886 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
#ifdef XP_MAC
|
||||
#include "nsILocalFileMac.h"
|
||||
#include "nsIInternetConfigService.h"
|
||||
#include "nsDecodeAppleFile.h"
|
||||
#include "nsIAppleFileDecoder.h"
|
||||
#endif // XP_MAC
|
||||
|
||||
const char *FORCE_ALWAYS_ASK_PREF = "browser.helperApps.alwaysAsk.force";
|
||||
@@ -797,12 +797,12 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel)
|
||||
(nsCRT::strcasecmp(contentType, APPLICATION_APPLEFILE) == 0) ||
|
||||
(nsCRT::strcasecmp(contentType, MULTIPART_APPLEDOUBLE) == 0))
|
||||
{
|
||||
nsCOMPtr<nsIOutputStream> appleFileDecoder;
|
||||
NS_NEWXPCOM(appleFileDecoder, nsDecodeAppleFile);
|
||||
if (appleFileDecoder)
|
||||
nsCOMPtr<nsIAppleFileDecoder> appleFileDecoder = do_CreateInstance(NS_IAPPLEFILEDECODER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && appleFileDecoder)
|
||||
{
|
||||
NS_STATIC_CAST(nsDecodeAppleFile*, NS_STATIC_CAST(nsIOutputStream*, appleFileDecoder))->Initialize(mOutStream, mTempFile);
|
||||
mOutStream = appleFileDecoder;
|
||||
rv = appleFileDecoder->Initialize(mOutStream, mTempFile);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mOutStream = do_QueryInterface(appleFileDecoder, &rv);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user