Part of fix for bug 359341 that somehow didn't make it in the first time. r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@215289 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-11-14 22:32:40 +00:00
parent a308018d0e
commit 769c6eb18d
3 changed files with 7 additions and 9 deletions

View File

@@ -94,11 +94,10 @@ nsFont *font;
nsPoint *pointlist;
// Get the size of a pixel.
nsIDeviceContext* deviceContext;
aSurface->GetDeviceContext(deviceContext);
nsCOMPtr<nsIDeviceContext> deviceContext;
aSurface->GetDeviceContext(*getter_AddRefs(deviceContext));
float p2t; // pixel to twips conversion
p2t = deviceContext->DevUnitsToAppUnits();
NS_RELEASE(deviceContext);
font = new nsFont("Times", NS_FONT_STYLE_NORMAL,NS_FONT_VARIANT_NORMAL,NS_FONT_WEIGHT_BOLD,0,12);
aSurface->SetFont(*font);