From 77d5600e48bb32f10e30eecda1022b8163d1db06 Mon Sep 17 00:00:00 2001 From: "spider%netscape.com" Date: Wed, 7 Oct 1998 21:38:54 +0000 Subject: [PATCH] Memory corruption fix. --- .../ui/canvas/src/nsCalCommandCanvas.cpp | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/calendar/modules/ui/canvas/src/nsCalCommandCanvas.cpp b/calendar/modules/ui/canvas/src/nsCalCommandCanvas.cpp index fea6c2d7cf6..8a3a3d3af0b 100644 --- a/calendar/modules/ui/canvas/src/nsCalCommandCanvas.cpp +++ b/calendar/modules/ui/canvas/src/nsCalCommandCanvas.cpp @@ -116,35 +116,6 @@ nsresult nsCalCommandCanvas :: Init() gXPFCToolkit->GetCanvasManager()->RegisterView((nsIXPFCCanvas*)this,mStaticTextField); - nsFont font("Times", NS_FONT_STYLE_NORMAL, - NS_FONT_VARIANT_NORMAL, - NS_FONT_WEIGHT_BOLD, - 0, - 8); - - nsIFontMetrics * fm ; - nsIDeviceContext * ctx; - - gXPFCToolkit->GetViewManager()->GetDeviceContext(ctx); - - ctx->GetMetricsFor(font, fm); - - - nscoord width ; - - nsIRenderingContext * aRC; - - ctx->CreateRenderingContext(mStaticTextField, aRC); - - aRC->SetFont(font); - - aRC->GetWidth(text,width); - - NS_RELEASE(aRC); - NS_RELEASE(ctx); - - rect.width = width ; - mStaticTextField->Init(gXPFCToolkit->GetViewManager(), rect, GetParent()->GetView(), @@ -174,11 +145,6 @@ nsresult nsCalCommandCanvas :: Init() * Writeable Command field */ - GetBounds(rect); - - rect.x += width; - rect.width -= width; - res = nsRepository::CreateInstance(kViewCID, nsnull, kIViewIID,