diff options
Diffstat (limited to 'canvas/source/cairo/cairo_win32_cairo.cxx')
-rw-r--r-- | canvas/source/cairo/cairo_win32_cairo.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx index ef08b9cec925..d286604706c6 100644 --- a/canvas/source/cairo/cairo_win32_cairo.cxx +++ b/canvas/source/cairo/cairo_win32_cairo.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ ************************************************************************/ #include <tools/prewin.h> -#include <windows.h> +#include <windows.h> #include <tools/postwin.h> #include <osl/diagnose.h> @@ -81,7 +81,7 @@ namespace cairo * @param x horizontal location of the new surface * @param y vertical location of the new surface * - * pSysData contains the platform native Window reference. + * pSysData contains the platform native Window reference. * pSysData is used to create a surface on the Window * * Set the mpSurface to the new surface or NULL @@ -106,7 +106,7 @@ namespace cairo mpSurface() { OSL_ASSERT(rBmpData.pDIB == NULL); - + if(rBmpData.pDIB != NULL) { // So just leave mpSurface to NULL, little else we can do at // this stage. Hopefully the Win32 patch to @@ -114,8 +114,8 @@ namespace cairo // const Size&) will catch the cases where this // constructor would be called with a DIB bitmap, and we // will never get here. At least it worked for Ballmer.ppt. - } - else + } + else { HDC hDC = CreateCompatibleDC(NULL); void* hOrigBitmap; @@ -141,7 +141,7 @@ namespace cairo } /** - * Surface::getSimilar: Create new similar Canvas surface + * Surface::getSimilar: Create new similar Canvas surface * @param aContent format of the new surface (cairo_content_t from cairo/src/cairo.h) * @param width width of the new surface * @param height height of the new surface @@ -152,11 +152,11 @@ namespace cairo * Cairo surface from aContent (cairo_content_t) * * @return new surface or NULL - **/ + **/ SurfaceSharedPtr Win32Surface::getSimilar( Content aContent, int width, int height ) const { return SurfaceSharedPtr( - new Win32Surface( + new Win32Surface( CairoSurfaceSharedPtr( cairo_surface_create_similar( mpSurface.get(), aContent, width, height ), &cairo_surface_destroy ))); @@ -184,7 +184,7 @@ namespace cairo /** * Surface::getDepth: Get the color depth of the Canvas surface. * - * @return color depth + * @return color depth **/ int Win32Surface::getDepth() const { @@ -275,9 +275,9 @@ namespace cairo const BitmapSystemData& rData, const Size& rSize ) { - OSL_TRACE( "requested size: %d x %d available size: %d x %d", + OSL_TRACE( "requested size: %d x %d available size: %d x %d", rSize.Width(), rSize.Height(), rData.mnWidth, rData.mnHeight ); - + if ( rData.mnWidth == rSize.Width() && rData.mnHeight == rSize.Height() ) return SurfaceSharedPtr(new Win32Surface( rData )); else @@ -298,24 +298,24 @@ namespace cairo WORD glyph_index; HDC hdc = NULL; int i = 0; - + hdc = CreateCompatibleDC (NULL); - + if (!hdc) return 0; if (!SetGraphicsMode (hdc, GM_ADVANCED)) { DeleteDC (hdc); return 0; } - + SelectObject (hdc, hfont); SetMapMode (hdc, MM_TEXT); - + unicode[0] = ucs4; unicode[1] = 0; if (GetGlyphIndicesW (hdc, unicode, 1, &glyph_index, 0) == GDI_ERROR) { glyph_index = 0; } - + DeleteDC (hdc); return glyph_index; } |