зеркало из https://github.com/mozilla/gecko-dev.git
using the passed in title for the jobname. r=rods sr=attinasi
This commit is contained in:
Родитель
999dab80e2
Коммит
cef0dff830
|
@ -30,6 +30,7 @@
|
||||||
#include "nsIScreenManager.h"
|
#include "nsIScreenManager.h"
|
||||||
#include "nsIScreen.h"
|
#include "nsIScreen.h"
|
||||||
#include "nsGfxCIID.h"
|
#include "nsGfxCIID.h"
|
||||||
|
#include "nsReadableutils.h"
|
||||||
|
|
||||||
// Print Options
|
// Print Options
|
||||||
#include "nsIPrintOptions.h"
|
#include "nsIPrintOptions.h"
|
||||||
|
@ -832,26 +833,17 @@ NS_IMETHODIMP nsDeviceContextWin :: BeginDocument(PRUnichar * aTitle)
|
||||||
{
|
{
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
if (NULL != mDC)
|
if (NULL != mDC){
|
||||||
{
|
|
||||||
DOCINFO docinfo;
|
DOCINFO docinfo;
|
||||||
|
|
||||||
char * title = nsnull;
|
|
||||||
NS_WITH_SERVICE(nsIPrintOptions, printService, kPrintOptionsCID, &rv);
|
char *title = nsnull;
|
||||||
if (NS_SUCCEEDED(rv) && printService) {
|
if( nsnull != aTitle) {
|
||||||
PRUnichar * uTitle = nsnull;
|
title = ToNewCString(nsLiteralString(aTitle));
|
||||||
printService->GetTitle(&uTitle);
|
|
||||||
if (uTitle != nsnull) {
|
|
||||||
nsAutoString str;
|
|
||||||
str = uTitle;
|
|
||||||
if (str.Length() > 0) {
|
|
||||||
title = str.ToNewCString();
|
|
||||||
nsMemory::Free(uTitle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
docinfo.cbSize = sizeof(docinfo);
|
docinfo.cbSize = sizeof(docinfo);
|
||||||
docinfo.lpszDocName = title != nsnull?title:"New Layout Document";
|
docinfo.lpszDocName = title != nsnull?title:"Mozilla Document";
|
||||||
docinfo.lpszOutput = NULL;
|
docinfo.lpszOutput = NULL;
|
||||||
docinfo.lpszDatatype = NULL;
|
docinfo.lpszDatatype = NULL;
|
||||||
docinfo.fwType = 0;
|
docinfo.fwType = 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче