Bug 1156742 Part 9: Add a new nsIDeviceContextSpec for proxied printing. r=roc

This also changes aPrintToFileName parameter for BeginDocument to an nsAString& from char16_t*.
Having a char16_t* caused a pain with VS2105 where wchar_t != char16_t (as on VS2103), after it had been sent over IPDL.
This could have been worked around with casting, but this seemed like the tidier solution.
This commit is contained in:
Bob Owen
2016-01-05 10:08:57 +00:00
parent ca0132eb6f
commit b4f6f23c16
22 changed files with 312 additions and 30 deletions

View File

@@ -21,6 +21,9 @@
#include "nsPrimitiveHelpers.h"
#include "mozilla/UniquePtr.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsXPCOM.h"
#include "nsISupportsPrimitives.h"
@@ -60,7 +63,7 @@ nsPrimitiveHelpers :: CreatePrimitiveForData ( const char* aFlavor, const void*
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
if (primitive ) {
if (aDataLen % 2) {
auto buffer = MakeUnique<char[]>(aDataLen + 1);
auto buffer = mozilla::MakeUnique<char[]>(aDataLen + 1);
if (!MOZ_LIKELY(buffer))
return;