Changes for qnx ( photon ) platform onlu. They should not affect runtime/building other platforms.

Call PgDrawTextCx when drawing justified text.
Fixed a null pointer problem.
This commit is contained in:
amardare%qnx.com 2004-04-20 16:30:02 +00:00
parent 273dee2dd2
commit a2b4b201d5
2 changed files with 5 additions and 4 deletions

View File

@ -208,15 +208,16 @@ NS_IMETHODIMP nsPrinterEnumeratorPh::GetDefaultPrinterName(PRUnichar * *aDefault
NS_ENSURE_ARG_POINTER(aDefaultPrinterName);
*aDefaultPrinterName = nsnull;
PpPrintContext_t *pc = PpCreatePC();
if( pc ) {
PpLoadDefaultPrinter( pc );
PpGetPC( pc, Pp_PC_NAME, &printer );
*aDefaultPrinterName = ToNewUnicode( NS_LITERAL_STRING( printer ) );
if( printer ) *aDefaultPrinterName = ToNewUnicode( NS_LITERAL_STRING( printer ) );
PpReleasePC( pc );
}
else *aDefaultPrinterName = nsnull;
return NS_OK;
}

View File

@ -844,7 +844,7 @@ NS_IMETHODIMP nsRenderingContextPh::DrawString(const char *aString, PRUint32 aLe
nscoord yy = y;
mTranMatrix->TransformCoord(&xx, &yy);
PhPoint_t pos = { xx, yy };
PgDrawText( ch, charlen, &pos, Pg_TEXT_LEFT);
PgDrawTextCx( mSurfaceDC, ch, charlen, &pos, Pg_TEXT_LEFT);
x += *aSpacing++;
}
}