diff options
Diffstat (limited to 'vcl/win/source/gdi')
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 38 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi.cxx | 111 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi2.cxx | 27 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 103 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi_gdiplus.cxx | 9 | ||||
-rw-r--r-- | vcl/win/source/gdi/salnativewidgets-luna.cxx | 7 | ||||
-rw-r--r-- | vcl/win/source/gdi/salvd.cxx | 13 | ||||
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 105 | ||||
-rw-r--r-- | vcl/win/source/gdi/wntgdi.cxx | 7 |
9 files changed, 0 insertions, 420 deletions
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 5324581d4c6d..e1d53aadb592 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <svsys.h> #include <vcl/bitmap.hxx> #include <vcl/salbtype.hxx> @@ -63,8 +62,6 @@ #pragma warning(pop) #endif - - // - Inlines - inline void ImplSetPixel4( const HPBYTE pScanline, long nX, const BYTE cIndex ) @@ -75,7 +72,6 @@ inline void ImplSetPixel4( const HPBYTE pScanline, long nX, const BYTE cIndex ) ( rByte &= 0x0f, rByte |= ( cIndex << 4 ) ); } - // Helper class to manage Gdiplus::Bitmap instances inside of // WinSalBitmap @@ -194,13 +190,11 @@ public: } }; - // Global instance of GdiPlusBuffer which manages Gdiplus::Bitmap // instances static GdiPlusBuffer aGdiPlusBuffer; - // - WinSalBitmap - WinSalBitmap::WinSalBitmap() @@ -213,15 +207,11 @@ WinSalBitmap::WinSalBitmap() { } - - WinSalBitmap::~WinSalBitmap() { Destroy(); } - - void WinSalBitmap::Destroy() { if(maGdiPlusBitmap.get()) @@ -238,8 +228,6 @@ void WinSalBitmap::Destroy() mnBitCount = 0; } - - GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSource) const { WinSalBitmap* pThat = const_cast< WinSalBitmap* >(this); @@ -281,8 +269,6 @@ GdiPlusBmpPtr WinSalBitmap::ImplGetGdiPlusBitmap(const WinSalBitmap* pAlphaSourc return maGdiPlusBitmap; } - - Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap() { Gdiplus::Bitmap* pRetval(0); @@ -372,8 +358,6 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap() return pRetval; } - - Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlphaSource) { Gdiplus::Bitmap* pRetval(0); @@ -530,8 +514,6 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlph return pRetval; } - - bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ) { bool bRet = TRUE; @@ -581,8 +563,6 @@ bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ) return bRet; } - - bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { bool bRet = FALSE; @@ -599,8 +579,6 @@ bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const Bitmap return bRet; } - - bool WinSalBitmap::Create( const SalBitmap& rSSalBitmap ) { bool bRet = FALSE; @@ -628,8 +606,6 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBitmap ) return bRet; } - - bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) { bool bRet = FALSE; @@ -674,8 +650,6 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) return bRet; } - - bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount ) { bool bRet = FALSE; @@ -726,8 +700,6 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount ) return bRet; } - - bool WinSalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas, Size& /*rSize*/, bool bMask ) { ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > @@ -775,8 +747,6 @@ sal_uInt16 WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB ) return nColors; } - - HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rPal ) { DBG_ASSERT( nBits == 1 || nBits == 4 || nBits == 8 || nBits == 16 || nBits == 24, "Unsupported BitCount!" ); @@ -832,8 +802,6 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const return hDIB; } - - HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ) { HANDLE hCopy = 0; @@ -878,8 +846,6 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ) return hCopy; } - - BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ ) { BitmapBuffer* pBuffer = NULL; @@ -977,8 +943,6 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ ) return pBuffer; } - - void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) { if( pBuffer ) @@ -1001,8 +965,6 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) } } - - void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, const Size& rSizePixel, bool bRLE4 ) { diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index 464583d4f5b4..9cb39cc15f20 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <stdio.h> #include <string.h> #include <svsys.h> @@ -33,13 +32,9 @@ #include <win/salframe.h> #include <basegfx/matrix/b2dhommatrixtools.hxx> - - // comment out to prevent use of beziers on GDI functions #define USE_GDI_BEZIERS - - #define DITHER_PAL_DELTA 51 #define DITHER_PAL_STEPS 6 #define DITHER_PAL_COUNT (DITHER_PAL_STEPS*DITHER_PAL_STEPS*DITHER_PAL_STEPS) @@ -47,29 +42,21 @@ #define DITHER_EXTRA_COLORS 1 #define DMAP( _def_nVal, _def_nThres ) ((pDitherDiff[_def_nVal]>(_def_nThres))?pDitherHigh[_def_nVal]:pDitherLow[_def_nVal]) - - struct SysColorEntry { DWORD nRGB; SysColorEntry* pNext; }; - - static SysColorEntry* pFirstSysColor = NULL; static SysColorEntry* pActSysColor = NULL; - - // Blue7 static PALETTEENTRY aImplExtraColor1 = { 0, 184, 255, 0 }; - - static PALETTEENTRY aImplSalSysPalEntryAry[ DITHER_MAX_SYSCOLOR ] = { { 0, 0, 0, 0 }, @@ -90,8 +77,6 @@ static PALETTEENTRY aImplSalSysPalEntryAry[ DITHER_MAX_SYSCOLOR ] = { 0xFF, 0xFF, 0xFF, 0 } }; - - static BYTE aOrdDither8Bit[8][8] = { { 0, 38, 9, 48, 2, 40, 12, 50 }, @@ -104,8 +89,6 @@ static BYTE aOrdDither8Bit[8][8] = { 33, 20, 30, 17, 32, 20, 29, 16 } }; - - static BYTE aOrdDither16Bit[8][8] = { { 0, 6, 1, 7, 0, 6, 1, 7 }, @@ -118,20 +101,14 @@ static BYTE aOrdDither16Bit[8][8] = { 5, 3, 4, 2, 5, 3, 4, 2 } }; - - // we must create pens with 1-pixel width; otherwise the S3-graphics card // map has many paint problems when drawing polygons/polyLines and a // complex is set #define GSL_PEN_WIDTH 1 - - #define SAL_POLYPOLYCOUNT_STACKBUF 8 #define SAL_POLYPOLYPOINTS_STACKBUF 64 - - void ImplInitSalGDI() { SalData* pSalData = GetSalData(); @@ -309,8 +286,6 @@ void ImplInitSalGDI() ReleaseDC( 0, hDC ); } - - void ImplFreeSalGDI() { SalData* pSalData = GetSalData(); @@ -383,8 +358,6 @@ void ImplFreeSalGDI() ImplReleaseTempFonts( *pSalData ); } - - static int ImplIsPaletteEntry( BYTE nRed, BYTE nGreen, BYTE nBlue ) { // dither color? @@ -411,8 +384,6 @@ static int ImplIsPaletteEntry( BYTE nRed, BYTE nGreen, BYTE nBlue ) return FALSE; } - - int ImplIsSysColorEntry( SalColor nSalColor ) { SysColorEntry* pEntry = pFirstSysColor; @@ -430,8 +401,6 @@ int ImplIsSysColorEntry( SalColor nSalColor ) return FALSE; } - - static void ImplInsertSysColorEntry( int nSysIndex ) { const DWORD nRGB = GetSysColor( nSysIndex ); @@ -453,8 +422,6 @@ static void ImplInsertSysColorEntry( int nSysIndex ) } } - - void ImplUpdateSysColorEntries() { // delete old SysColorList @@ -492,8 +459,6 @@ void ImplUpdateSysColorEntries() ImplInsertSysColorEntry( COLOR_INACTIVECAPTIONTEXT ); } - - static SalColor ImplGetROPSalColor( SalROPColor nROPColor ) { SalColor nSalColor; @@ -504,8 +469,6 @@ static SalColor ImplGetROPSalColor( SalROPColor nROPColor ) return nSalColor; } - - void ImplSalInitGraphics( WinSalGraphics* pData ) { // calculate the minimal line width for the printer @@ -523,8 +486,6 @@ void ImplSalInitGraphics( WinSalGraphics* pData ) ::SetROP2( pData->getHDC(), R2_COPYPEN ); } - - void ImplSalDeInitGraphics( WinSalGraphics* pData ) { // clear clip region @@ -538,8 +499,6 @@ void ImplSalDeInitGraphics( WinSalGraphics* pData ) SelectFont( pData->getHDC(), pData->mhDefFont ); } - - HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp ) { SalData* pSalData = GetSalData(); @@ -572,8 +531,6 @@ HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp ) return pC->mhDC; } - - void ImplReleaseCachedDC( sal_uLong nID ) { SalData* pSalData = GetSalData(); @@ -583,8 +540,6 @@ void ImplReleaseCachedDC( sal_uLong nID ) SelectObject( pC->mhDC, pC->mhSelBmp ); } - - void ImplClearHDCCache( SalData* pData ) { for( sal_uLong i = 0; i < CACHESIZE_HDC; i++ ) @@ -604,8 +559,6 @@ void ImplClearHDCCache( SalData* pData ) } } - - // #100127# Fill point and flag memory from array of points which // might also contain bezier control points for the PolyDraw() GDI method // Make sure pWinPointAry and pWinFlagAry are big enough @@ -677,8 +630,6 @@ void ImplPreparePolyDraw( bool bCloseFigures, } } - - // #100127# draw an array of points which might also contain bezier control points void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) { @@ -707,8 +658,6 @@ void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const B } } - - WinSalGraphics::WinSalGraphics() { for( int i = 0; i < MAX_FALLBACK; ++i ) @@ -741,8 +690,6 @@ WinSalGraphics::WinSalGraphics() mnPenWidth = GSL_PEN_WIDTH; } - - WinSalGraphics::~WinSalGraphics() { // free obsolete GDI objects @@ -776,8 +723,6 @@ WinSalGraphics::~WinSalGraphics() delete mpFontKernPairs; } - - void WinSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) { rDPIX = GetDeviceCaps( getHDC(), LOGPIXELSX ); @@ -790,15 +735,11 @@ void WinSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) rDPIX = rDPIY = 600; } - - sal_uInt16 WinSalGraphics::GetBitCount() const { return (sal_uInt16)GetDeviceCaps( getHDC(), BITSPIXEL ); } - - long WinSalGraphics::GetGraphicsWidth() const { if( mhWnd && IsWindow( mhWnd ) ) @@ -821,8 +762,6 @@ long WinSalGraphics::GetGraphicsWidth() const return 0; } - - void WinSalGraphics::ResetClipRegion() { if ( mhRegion ) @@ -834,8 +773,6 @@ void WinSalGraphics::ResetClipRegion() SelectClipRgn( getHDC(), 0 ); } - - bool WinSalGraphics::setClipRegion( const Region& i_rClip ) { if ( mhRegion ) @@ -1065,8 +1002,6 @@ bool WinSalGraphics::setClipRegion( const Region& i_rClip ) return true; } - - void WinSalGraphics::SetLineColor() { // create and select new pen @@ -1088,8 +1023,6 @@ void WinSalGraphics::SetLineColor() mbStockPen = TRUE; } - - void WinSalGraphics::SetLineColor( SalColor nSalColor ) { maLineColor = nSalColor; @@ -1147,8 +1080,6 @@ void WinSalGraphics::SetLineColor( SalColor nSalColor ) mbStockPen = bStockPen; } - - void WinSalGraphics::SetFillColor() { // create and select new brush @@ -1170,8 +1101,6 @@ void WinSalGraphics::SetFillColor() mbStockBrush = TRUE; } - - void WinSalGraphics::SetFillColor( SalColor nSalColor ) { maFillColor = nSalColor; @@ -1275,30 +1204,22 @@ void WinSalGraphics::SetFillColor( SalColor nSalColor ) mbStockBrush = bStockBrush; } - - void WinSalGraphics::SetXORMode( bool bSet, bool ) { mbXORMode = bSet; ::SetROP2( getHDC(), bSet ? R2_XORPEN : R2_COPYPEN ); } - - void WinSalGraphics::SetROPLineColor( SalROPColor nROPColor ) { SetLineColor( ImplGetROPSalColor( nROPColor ) ); } - - void WinSalGraphics::SetROPFillColor( SalROPColor nROPColor ) { SetFillColor( ImplGetROPSalColor( nROPColor ) ); } - - void WinSalGraphics::drawPixel( long nX, long nY ) { if ( mbXORMode ) @@ -1313,8 +1234,6 @@ void WinSalGraphics::drawPixel( long nX, long nY ) SetPixel( getHDC(), (int)nX, (int)nY, mnPenColor ); } - - void WinSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) { COLORREF nCol = PALETTERGB( SALCOLOR_RED( nSalColor ), @@ -1338,8 +1257,6 @@ void WinSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) ::SetPixel( getHDC(), (int)nX, (int)nY, nCol ); } - - void WinSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) { MoveToEx( getHDC(), (int)nX1, (int)nY1, NULL ); @@ -1380,8 +1297,6 @@ void WinSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) } } - - void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) { if ( !mbPen ) @@ -1405,8 +1320,6 @@ void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) WIN_Rectangle( getHDC(), (int)nX, (int)nY, (int)(nX+nWidth), (int)(nY+nHeight) ); } - - void WinSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) { // for NT, we can handover the array directly @@ -1454,8 +1367,6 @@ void WinSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) } } - - void WinSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) { // for NT, we can handover the array directly @@ -1468,8 +1379,6 @@ void WinSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) WIN_Polygon( getHDC(), pWinPtAry, MAX_64KSALPOINTS ); } - - void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) { @@ -1537,12 +1446,8 @@ void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoint delete [] pWinPointAryAry; } - - #define SAL_POLY_STACKBUF 32 - - bool WinSalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) { #ifdef USE_GDI_BEZIERS @@ -1558,8 +1463,6 @@ bool WinSalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPt #endif } - - bool WinSalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) { #ifdef USE_GDI_BEZIERS @@ -1610,8 +1513,6 @@ bool WinSalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtA #endif } - - bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) { @@ -1667,8 +1568,6 @@ bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* #endif } - - #define POSTSCRIPT_BUFSIZE 0x4000 // MAXIMUM BUFSIZE EQ 0xFFFF static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, sal_uLong nComp, sal_uLong nSize ) @@ -1771,7 +1670,6 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* // #107797# Write out EPS encapsulation header - // directly taken from the PLRM 3.0, p. 726. Note: // this will definitely cause problems when // recursively creating and embedding PostScript files @@ -1799,10 +1697,8 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* " } if\n" "} if\n\n" ); - // #i10737# Apply clipping manually - // Windows seems to ignore any clipping at the HDC, // when followed by a POSTSCRIPT_PASSTHROUGH @@ -1847,7 +1743,6 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 ); Escape ( getHDC(), nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 ); - // #107797# Write out EPS transformation code double dM11 = nWidth / ( nBoundingBox[2] - nBoundingBox[0] ); @@ -1867,7 +1762,6 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 ); Escape ( getHDC(), nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 ); - // #107797# Write out actual EPS content sal_uLong nToDo = nSize; @@ -1887,7 +1781,6 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* nToDo -= nResult; } - // #107797# Write out EPS encapsulation footer // reserve a sal_uInt16 again @@ -1906,8 +1799,6 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* return bRetValue; } - - SystemGraphicsData WinSalGraphics::GetGraphicsData() const { SystemGraphicsData aRes; @@ -1916,6 +1807,4 @@ SystemGraphicsData WinSalGraphics::GetGraphicsData() const return aRes; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/win/source/gdi/salgdi2.cxx b/vcl/win/source/gdi/salgdi2.cxx index dc7f4c5d749e..720a61c35bc7 100644 --- a/vcl/win/source/gdi/salgdi2.cxx +++ b/vcl/win/source/gdi/salgdi2.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <string.h> #include <stdlib.h> @@ -55,8 +54,6 @@ bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const return bRet; } - - void WinSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) { HDC hSrcDC; @@ -96,8 +93,6 @@ void WinSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraph } } - - void ImplCalcOutSideRgn( const RECT& rSrcRect, int nLeft, int nTop, int nRight, int nBottom, HRGN& rhInvalidateRgn ) @@ -139,8 +134,6 @@ void ImplCalcOutSideRgn( const RECT& rSrcRect, } } - - void WinSalGraphics::copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, @@ -335,8 +328,6 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY, } - - void ImplDrawBitmap( HDC hDC, const SalTwoRect& rPosAry, const WinSalBitmap& rSalBitmap, bool bPrinter, int nDrawMode ) @@ -443,8 +434,6 @@ void ImplDrawBitmap( HDC hDC, } } - - void WinSalGraphics::drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) { bool bTryDirectPaint(!mbPrinter && !mbXORMode); @@ -472,8 +461,6 @@ void WinSalGraphics::drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSal mbXORMode ? SRCINVERT : SRCCOPY ); } - - void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSSalBitmap, SalColor nTransparentColor ) @@ -528,8 +515,6 @@ void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry, delete pMask; } - - void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSSalBitmap, const SalBitmap& rSTransparentBitmap ) @@ -623,8 +608,6 @@ void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry, } } - - bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) { @@ -652,8 +635,6 @@ bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth, return bRet; } - - void WinSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSSalBitmap, SalColor nMaskColor ) @@ -686,8 +667,6 @@ void WinSalGraphics::drawMask( const SalTwoRect& rPosAry, DeleteBrush( hMaskBrush ); } - - SalBitmap* WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) { DBG_ASSERT( !mbPrinter, "No ::GetBitmap() from printer possible!" ); @@ -724,8 +703,6 @@ SalBitmap* WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) return pSalBitmap; } - - SalColor WinSalGraphics::getPixel( long nX, long nY ) { COLORREF aWinCol = ::GetPixel( getHDC(), (int) nX, (int) nY ); @@ -738,8 +715,6 @@ SalColor WinSalGraphics::getPixel( long nX, long nY ) GetBValue( aWinCol ) ); } - - void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ) { if ( nFlags & SAL_INVERT_TRACKFRAME ) @@ -783,8 +758,6 @@ void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv } } - - void WinSalGraphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nSalFlags ) { HPEN hPen; diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index c88cc5882c8f..1154967df349 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -49,40 +49,28 @@ #include "win/saldata.hxx" #include "win/salgdi.h" - using namespace vcl; static const int MAXFONTHEIGHT = 2048; - // - Inlines - - inline FIXED FixedFromDouble( double d ) { const long l = (long) ( d * 65536. ); return *(FIXED*) &l; } - - inline int IntTimes256FromFixed(FIXED f) { int nFixedTimes256 = (f.value << 8) + ((f.fract+0x80) >> 8); return nFixedTimes256; } - - // these variables can be static because they store system wide settings static bool bImplSalCourierScalable = false; static bool bImplSalCourierNew = false; - - - - - // TODO: also support temporary TTC font files typedef std::map< OUString, ImplDevFontAttributes > FontAttrMap; @@ -223,8 +211,6 @@ void ImplFontAttrCache::AddFontAttr( const OUString& rFontFileName, const ImplDe } } - - // raw font data with a scoped lifetime class RawFontData { @@ -289,7 +275,6 @@ RawFontData::RawFontData( HDC hDC, DWORD nTableTag ) } } - // platform specific font substitution hooks for glyph fallback enhancement // TODO: move into i18n module (maybe merge with svx/ucsubset.* // or merge with i18nutil/source/utility/unicode_data.h) @@ -597,8 +582,6 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon return bFound; } - - struct ImplEnumInfo { HDC mhDC; @@ -614,8 +597,6 @@ struct ImplEnumInfo int mnFontCount; }; - - static rtl_TextEncoding ImplCharSetToSal( BYTE nCharSet ) { rtl_TextEncoding eTextEncoding; @@ -645,8 +626,6 @@ static rtl_TextEncoding ImplCharSetToSal( BYTE nCharSet ) return eTextEncoding; } - - static FontFamily ImplFamilyToSal( BYTE nFamily ) { switch ( nFamily & 0xF0 ) @@ -673,8 +652,6 @@ static FontFamily ImplFamilyToSal( BYTE nFamily ) return FAMILY_DONTKNOW; } - - static BYTE ImplFamilyToWin( FontFamily eFamily ) { switch ( eFamily ) @@ -704,8 +681,6 @@ static BYTE ImplFamilyToWin( FontFamily eFamily ) return FF_DONTCARE; } - - static FontWeight ImplWeightToSal( int nWeight ) { if ( nWeight <= FW_THIN ) @@ -728,8 +703,6 @@ static FontWeight ImplWeightToSal( int nWeight ) return WEIGHT_BLACK; } - - static int ImplWeightToWin( FontWeight eWeight ) { switch ( eWeight ) @@ -769,8 +742,6 @@ static int ImplWeightToWin( FontWeight eWeight ) return 0; } - - inline FontPitch ImplLogPitchToSal( BYTE nPitch ) { if ( nPitch & FIXED_PITCH ) @@ -779,8 +750,6 @@ inline FontPitch ImplLogPitchToSal( BYTE nPitch ) return PITCH_VARIABLE; } - - inline FontPitch ImplMetricPitchToSal( BYTE nPitch ) { // Grrrr! See NT help @@ -790,8 +759,6 @@ inline FontPitch ImplMetricPitchToSal( BYTE nPitch ) return PITCH_VARIABLE; } - - inline BYTE ImplPitchToWin( FontPitch ePitch ) { if ( ePitch == PITCH_FIXED ) @@ -802,8 +769,6 @@ inline BYTE ImplPitchToWin( FontPitch ePitch ) return DEFAULT_PITCH; } - - static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXA& rEnumFont, const NEWTEXTMETRICA& rMetric, DWORD nFontType ) { @@ -877,8 +842,6 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXA& rE return aDFA; } - - static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont, const NEWTEXTMETRICW& rMetric, DWORD nFontType ) { @@ -952,8 +915,6 @@ static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rE return aDFA; } - - static ImplWinFontData* ImplLogMetricToDevFontDataA( const ENUMLOGFONTEXA* pLogFont, const NEWTEXTMETRICA* pMetric, DWORD nFontType ) @@ -971,8 +932,6 @@ static ImplWinFontData* ImplLogMetricToDevFontDataA( const ENUMLOGFONTEXA* pLogF return pData; } - - static ImplWinFontData* ImplLogMetricToDevFontDataW( const ENUMLOGFONTEXW* pLogFont, const NEWTEXTMETRICW* pMetric, DWORD nFontType ) @@ -990,8 +949,6 @@ static ImplWinFontData* ImplLogMetricToDevFontDataW( const ENUMLOGFONTEXW* pLogF return pData; } - - void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ) { OUString aFontName( reinterpret_cast<const sal_Unicode*>(rLogFont.lfFaceName) ); @@ -1029,7 +986,6 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ) } } - #if ENABLE_GRAPHITE #ifdef DEBUG @@ -1176,8 +1132,6 @@ ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS, #endif } - - ImplWinFontData::~ImplWinFontData() { delete[] mpFontCharSets; @@ -1194,20 +1148,14 @@ ImplWinFontData::~ImplWinFontData() delete mpEncodingVector; } - - sal_IntPtr ImplWinFontData::GetFontId() const { return mnId; } - - static unsigned GetUInt( const unsigned char* p ) { return((p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]);} static inline DWORD CalcTag( const char p[4]) { return (p[0]+(p[1]<<8)+(p[2]<<16)+(p[3]<<24)); } - - void ImplWinFontData::UpdateFromHDC( HDC hDC ) const { // short circuit if already initialized @@ -1264,7 +1212,6 @@ const gr_face* ImplWinFontData::GraphiteFace() const } #endif - bool ImplWinFontData::HasGSUBstitutions( HDC hDC ) const { if( !mbGsubRead ) @@ -1272,15 +1219,11 @@ bool ImplWinFontData::HasGSUBstitutions( HDC hDC ) const return !maGsubTable.empty(); } - - bool ImplWinFontData::IsGSUBstituted( sal_UCS4 cChar ) const { return( maGsubTable.find( cChar ) != maGsubTable.end() ); } - - const ImplFontCharMap* ImplWinFontData::GetImplFontCharMap() const { if( !mpUnicodeMap ) @@ -1294,8 +1237,6 @@ bool ImplWinFontData::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabi return !rFontCapabilities.maUnicodeRange.empty() || !rFontCapabilities.maCodePageRange.empty(); } - - void ImplWinFontData::ReadGsubTable( HDC hDC ) const { mbGsubRead = true; @@ -1341,8 +1282,6 @@ void ImplWinFontData::ReadGsubTable( HDC hDC ) const CloseTTFont( pTTFont ); } - - void ImplWinFontData::ReadCmapTable( HDC hDC ) const { if( mpUnicodeMap != NULL ) @@ -1411,8 +1350,6 @@ void ImplWinFontData::GetFontCapabilities( HDC hDC ) const } } - - void WinSalGraphics::SetTextColor( SalColor nSalColor ) { COLORREF aCol = PALETTERGB( SALCOLOR_RED( nSalColor ), @@ -1429,8 +1366,6 @@ void WinSalGraphics::SetTextColor( SalColor nSalColor ) ::SetTextColor( getHDC(), aCol ); } - - int CALLBACK SalEnumQueryFontProcExW( const ENUMLOGFONTEXW*, const NEWTEXTMETRICEXW*, DWORD, LPARAM lParam ) @@ -1439,8 +1374,6 @@ int CALLBACK SalEnumQueryFontProcExW( const ENUMLOGFONTEXW*, return 0; } - - void ImplGetLogFontFromFontSelect( HDC hDC, const FontSelectPattern* pFont, LOGFONTW& rLogFont, @@ -1512,8 +1445,6 @@ void ImplGetLogFontFromFontSelect( HDC hDC, } } - - HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ) { HFONT hNewFont = 0; @@ -1661,8 +1592,6 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* pFont, int nFallbackLevel return 0; } - - void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel ) { // temporarily change the HDC to the font in the fallback level @@ -1739,8 +1668,6 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe pMetric->mnMinKashida = GetMinKashidaWidth(); } - - sal_uLong WinSalGraphics::GetKernPairs() { if ( mbFontKernInit ) @@ -1770,8 +1697,6 @@ sal_uLong WinSalGraphics::GetKernPairs() return mnFontKernPairCount; } - - const ImplFontCharMap* WinSalGraphics::GetImplFontCharMap() const { if( !mpWinFontData[0] ) @@ -1786,8 +1711,6 @@ bool WinSalGraphics::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabil return mpWinFontData[0]->GetImplFontCapabilities(rFontCapabilities); } - - int CALLBACK SalEnumFontsProcExA( const ENUMLOGFONTEXA* pLogFont, const NEWTEXTMETRICEXA* pMetric, DWORD nFontType, LPARAM lParam ) @@ -1842,8 +1765,6 @@ int CALLBACK SalEnumFontsProcExA( const ENUMLOGFONTEXA* pLogFont, return 1; } - - int CALLBACK SalEnumFontsProcExW( const ENUMLOGFONTEXW* pLogFont, const NEWTEXTMETRICEXW* pMetric, DWORD nFontType, LPARAM lParam ) @@ -1892,8 +1813,6 @@ int CALLBACK SalEnumFontsProcExW( const ENUMLOGFONTEXW* pLogFont, return 1; } - - struct TempFontItem { OUString maFontFilePath; @@ -1971,8 +1890,6 @@ bool ImplAddTempFont( SalData& rSalData, const OUString& rFontFileURL ) return (nRet > 0); } - - void ImplReleaseTempFonts( SalData& rSalData ) { int nCount = 0; @@ -2002,8 +1919,6 @@ void ImplReleaseTempFonts( SalData& rSalData ) #endif // FR_PRIVATE } - - static bool ImplGetFontAttrFromFile( const OUString& rFontFileURL, ImplDevFontAttributes& rDFA ) { @@ -2095,12 +2010,9 @@ static bool ImplGetFontAttrFromFile( const OUString& rFontFileURL, // byte offsets 0x4D0/0x4D1: winascent+windescent-emunits // byte offsets 0x4DF/0x4E0: avgwidth - return true; } - - bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection, const OUString& rFontFileURL, const OUString& rFontName ) { @@ -2157,8 +2069,6 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection, return true; } - - void WinSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection ) { // make sure all fonts are registered at least temporarily @@ -2259,8 +2169,6 @@ void WinSalGraphics::ClearDevFontCache() //anything to do here ? } - - bool WinSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) { HDC hDC = getHDC(); @@ -2291,8 +2199,6 @@ bool WinSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) return true; } - - bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) { @@ -2475,8 +2381,6 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, return true; } - - class ScopedFont { public: @@ -2690,7 +2594,6 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, return (nRC == SF_OK); } - const void* WinSalGraphics::GetEmbedFontData( const PhysicalFontFace* pFont, const sal_Unicode* pUnicodes, sal_Int32* pCharWidths, FontSubsetInfo& rInfo, long* pDataLen ) @@ -2746,13 +2649,11 @@ const void* WinSalGraphics::GetEmbedFontData( const PhysicalFontFace* pFont, return (void*)pData; } - void WinSalGraphics::FreeEmbedFontData( const void* pData, long /*nLen*/ ) { delete[] reinterpret_cast<char*>(const_cast<void*>(pData)); } - const Ucs2SIntMap* WinSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded ) { // TODO: even for builtin fonts we get here... why? @@ -2778,7 +2679,6 @@ const Ucs2SIntMap* WinSalGraphics::GetFontEncodingVector( const PhysicalFontFace return pEncoding; } - void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, bool bVertical, Int32Vector& rWidths, @@ -2871,11 +2771,9 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, } } - void WinSalGraphics::DrawServerFontLayout( const ServerFontLayout& ) {} - SystemFontData WinSalGraphics::GetSysFontData( int nFallbacklevel ) const { SystemFontData aSysFontData; @@ -2891,5 +2789,4 @@ SystemFontData WinSalGraphics::GetSysFontData( int nFallbacklevel ) const return aSysFontData; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx index 23b286abdd88..1dc4f05a088a 100644 --- a/vcl/win/source/gdi/salgdi_gdiplus.cxx +++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx @@ -61,8 +61,6 @@ #include <basegfx/polygon/b2dpolygon.hxx> - - void impAddB2DPolygonToGDIPlusGraphicsPathReal(Gdiplus::GpPath *pPath, const basegfx::B2DPolygon& rPolygon, bool bNoLineJoin) { sal_uInt32 nCount(rPolygon.count()); @@ -324,8 +322,6 @@ bool WinSalGraphics::drawPolyLine( return true; } - - void paintToGdiPlus( Gdiplus::Graphics& rGraphics, const SalTwoRect& rTR, @@ -359,8 +355,6 @@ void paintToGdiPlus( 0); } - - void setInterpolationMode( Gdiplus::Graphics& rGraphics, const long& rSrcWidth, @@ -394,7 +388,6 @@ void setInterpolationMode( } } - bool WinSalGraphics::tryDrawBitmapGdiPlus(const SalTwoRect& rTR, const SalBitmap& rSrcBitmap) { if(rTR.mnSrcWidth && rTR.mnSrcHeight && rTR.mnDestWidth && rTR.mnDestHeight) @@ -459,8 +452,6 @@ bool WinSalGraphics::drawAlphaBitmap( return false; } - - bool WinSalGraphics::drawTransformedBitmap( const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX, diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 45d6c5997987..8fcc16ef2540 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -50,11 +50,9 @@ using namespace std; - typedef map< wstring, HTHEME > ThemeMap; static ThemeMap aThemeMap; - /**************************************************** wrap visual styles API to avoid linking against it it is not available on all Windows platforms @@ -194,7 +192,6 @@ void SalData::initNWF( void ) pSVData->maNWFData.mbMenuBarDockingAreaCommonBG = true; } - // ********************************************************* // * Release theming handles // ******************************************************** @@ -343,7 +340,6 @@ bool WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP return (hTheme != NULL); } - /* * HitTestNativeControl() * @@ -376,7 +372,6 @@ bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, cons return (hr == S_OK); } - Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE ) { SIZE aSz; @@ -389,7 +384,6 @@ Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const // Helper functions - void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, const Rectangle& rRect, int* pLunaPart, int *pLunaState, RECT *pRect ) { @@ -1277,7 +1271,6 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, // restore alignment SetTextAlign( getHDC(), ta ); - //GdiFlush(); return bOk; diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx index f349cd943f37..fec719b1aaa1 100644 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <svsys.h> #include <vcl/sysdata.hxx> @@ -28,8 +27,6 @@ #include <win/salgdi.h> #include <win/salvd.h> - - static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY, sal_uInt16 nBitCount ) { @@ -67,8 +64,6 @@ static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY, return hBitmap; } - - SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, long nDX, long nDY, sal_uInt16 nBitCount, @@ -163,8 +158,6 @@ WinSalVirtualDevice::WinSalVirtualDevice() mbForeignDC = FALSE; // uses a foreign DC instead of a bitmap } - - WinSalVirtualDevice::~WinSalVirtualDevice() { // remove VirDev from list of virtual devices @@ -188,8 +181,6 @@ WinSalVirtualDevice::~WinSalVirtualDevice() mpGraphics = NULL; } - - SalGraphics* WinSalVirtualDevice::AcquireGraphics() { if ( mbGraphics ) @@ -201,15 +192,11 @@ SalGraphics* WinSalVirtualDevice::AcquireGraphics() return mpGraphics; } - - void WinSalVirtualDevice::ReleaseGraphics( SalGraphics* ) { mbGraphics = FALSE; } - - bool WinSalVirtualDevice::SetSize( long nDX, long nDY ) { if( mbForeignDC || !mhBmp ) diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index f47456bf286d..adbb98eb1441 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <svsys.h> #include "rtl/ustring.hxx" @@ -59,11 +58,8 @@ typedef boost::unordered_map<int,int> IntMap; #define DROPPED_OUTGLYPH 0xFFFF - #include <config_mingw.h> - - // win32 specific physical font instance class ImplWinFontEntry : public ImplFontEntry { @@ -102,8 +98,6 @@ private: mutable int mnMinKashidaGlyph; }; - - inline void ImplWinFontEntry::CacheGlyphWidth( int nCharCode, int nCharWidth ) { maWidthMap[ nCharCode ] = nCharWidth; @@ -117,8 +111,6 @@ inline int ImplWinFontEntry::GetCachedGlyphWidth( int nCharCode ) const return it->second; } - - class WinLayout : public SalLayout { public: @@ -141,8 +133,6 @@ protected: ImplWinFontEntry& mrWinFontEntry; }; - - class SimpleWinLayout : public WinLayout { public: @@ -187,8 +177,6 @@ private: BYTE mnCharSet; }; - - WinLayout::WinLayout( HDC hDC, const ImplWinFontData& rWFD, ImplWinFontEntry& rWFE ) : mhDC( hDC ), mhFont( (HFONT)::GetCurrentObject(hDC,OBJ_FONT) ), @@ -198,15 +186,11 @@ WinLayout::WinLayout( HDC hDC, const ImplWinFontData& rWFD, ImplWinFontEntry& rW mrWinFontEntry( rWFE ) {} - - void WinLayout::InitFont() const { ::SelectObject( mhDC, mhFont ); } - - // Using reasonably sized fonts to emulate huge fonts works around // a lot of problems in printer and display drivers. Huge fonts are // mostly used by high resolution reference devices which are never @@ -229,8 +213,6 @@ HFONT WinLayout::DisableFontScaling() const return SelectFont( mhDC, hHugeFont ); } - - SimpleWinLayout::SimpleWinLayout( HDC hDC, BYTE nCharSet, const ImplWinFontData& rWinFontData, ImplWinFontEntry& rWinFontEntry ) : WinLayout( hDC, rWinFontData, rWinFontEntry ), @@ -251,8 +233,6 @@ SimpleWinLayout::SimpleWinLayout( HDC hDC, BYTE nCharSet, mbDisableGlyphs = true; } - - SimpleWinLayout::~SimpleWinLayout() { delete[] mpGlyphRTLFlags; @@ -265,8 +245,6 @@ SimpleWinLayout::~SimpleWinLayout() delete[] mpOutGlyphs; } - - bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) { // prepare layout @@ -537,8 +515,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) return true; } - - int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& rPos, int& nStart, long* pGlyphAdvances, int* pCharIndexes, const PhysicalFontFace** /*pFallbackFonts*/ ) const @@ -606,8 +582,6 @@ int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& rPo return nCount; } - - void SimpleWinLayout::DrawText( SalGraphics& rGraphics ) const { if( mnGlyphCount <= 0 ) @@ -654,8 +628,6 @@ void SimpleWinLayout::DrawText( SalGraphics& rGraphics ) const DeleteFont( SelectFont( aHDC, hOrigFont ) ); } - - long SimpleWinLayout::FillDXArray( long* pDXArray ) const { if( !mnWidth ) @@ -674,8 +646,6 @@ long SimpleWinLayout::FillDXArray( long* pDXArray ) const return mnWidth; } - - sal_Int32 SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const // NOTE: the nFactor is used to prevent rounding errors for small nCharExtra values { @@ -699,8 +669,6 @@ sal_Int32 SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nF return -1; } - - void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const { long nXPos = mnBaseAdv; @@ -743,8 +711,6 @@ void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const } } - - void SimpleWinLayout::Justify( long nNewWidth ) { long nOldWidth = mnWidth; @@ -780,8 +746,6 @@ void SimpleWinLayout::Justify( long nNewWidth ) } } - - void SimpleWinLayout::AdjustLayout( ImplLayoutArgs& rArgs ) { SalLayout::AdjustLayout( rArgs ); @@ -819,8 +783,6 @@ void SimpleWinLayout::AdjustLayout( ImplLayoutArgs& rArgs ) } } - - void SimpleWinLayout::ApplyDXArray( const ImplLayoutArgs& rArgs ) { // try to avoid disturbance of text flow for LSB rounding case; @@ -864,8 +826,6 @@ void SimpleWinLayout::ApplyDXArray( const ImplLayoutArgs& rArgs ) } } - - void SimpleWinLayout::MoveGlyph( int nStart, long nNewXPos ) { if( nStart > mnGlyphCount ) @@ -892,15 +852,11 @@ void SimpleWinLayout::MoveGlyph( int nStart, long nNewXPos ) mnBaseAdv += nDelta; } - - void SimpleWinLayout::DropGlyph( int nStart ) { mpOutGlyphs[ nStart ] = DROPPED_OUTGLYPH; } - - void SimpleWinLayout::Simplify( bool /*bIsBase*/ ) { // return early if no glyph has been dropped @@ -981,8 +937,6 @@ void SimpleWinLayout::Simplify( bool /*bIsBase*/ ) mnWidth = mnBaseAdv = 0; } - - struct VisualItem { public: @@ -1002,8 +956,6 @@ public: bool HasKashidas() const { return mbHasKashidas; } }; - - class UniscribeLayout : public WinLayout { public: @@ -1074,8 +1026,6 @@ static bool bUspInited = false; static bool bManualCellAlign = true; - - static bool InitUSP() { // get the usp10.dll version info @@ -1114,8 +1064,6 @@ static bool InitUSP() return true; } - - UniscribeLayout::UniscribeLayout( HDC hDC, const ImplWinFontData& rWinFontData, ImplWinFontEntry& rWinFontEntry ) : WinLayout( hDC, rWinFontData, rWinFontEntry ), @@ -1139,8 +1087,6 @@ UniscribeLayout::UniscribeLayout( HDC hDC, mbDisableGlyphInjection( false ) {} - - UniscribeLayout::~UniscribeLayout() { delete[] mpScriptItems; @@ -1155,8 +1101,6 @@ UniscribeLayout::~UniscribeLayout() delete[] mpGlyphs2Chars; } - - bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs ) { // for a base layout only the context glyphs have to be dropped @@ -1575,8 +1519,6 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs ) return true; } - - // calculate the range of relevant glyphs for this visual item bool UniscribeLayout::GetItemSubrange( const VisualItem& rVisualItem, int& rMinGlyphPos, int& rEndGlyphPos ) const @@ -1638,8 +1580,6 @@ bool UniscribeLayout::GetItemSubrange( const VisualItem& rVisualItem, return true; } - - int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int& nStartx8, sal_Int32* pGlyphAdvances, int* pCharPosAry, const PhysicalFontFace** /*pFallbackFonts*/ ) const @@ -1905,8 +1845,6 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, return nCount; } - - void UniscribeLayout::MoveGlyph( int nStartx8, long nNewXPos ) { DBG_ASSERT( !(nStartx8 & 0xff), "USP::MoveGlyph(): glyph injection not disabled!" ); @@ -1972,8 +1910,6 @@ void UniscribeLayout::MoveGlyph( int nStartx8, long nNewXPos ) } } - - void UniscribeLayout::DropGlyph( int nStartx8 ) { DBG_ASSERT( !(nStartx8 & 0xff), "USP::DropGlyph(): glyph injection not disabled!" ); @@ -2001,8 +1937,6 @@ void UniscribeLayout::DropGlyph( int nStartx8 ) mpOutGlyphs[ nStart ] = DROPPED_OUTGLYPH; } - - void UniscribeLayout::Simplify( bool /*bIsBase*/ ) { static const WCHAR cDroppedGlyph = DROPPED_OUTGLYPH; @@ -2104,8 +2038,6 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ ) } } - - void UniscribeLayout::DrawText( SalGraphics& ) const { HFONT hOrigFont = DisableFontScaling(); @@ -2156,8 +2088,6 @@ void UniscribeLayout::DrawText( SalGraphics& ) const DeleteFont( SelectFont( mhDC, hOrigFont ) ); } - - long UniscribeLayout::FillDXArray( long* pDXArray ) const { // calculate width of the complete layout @@ -2187,8 +2117,6 @@ long UniscribeLayout::FillDXArray( long* pDXArray ) const return nWidth; } - - sal_Int32 UniscribeLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const { long nWidth = 0; @@ -2232,8 +2160,6 @@ sal_Int32 UniscribeLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nF return -1; } - - void UniscribeLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const { int i; @@ -2301,8 +2227,6 @@ void UniscribeLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const } } - - void UniscribeLayout::AdjustLayout( ImplLayoutArgs& rArgs ) { SalLayout::AdjustLayout( rArgs ); @@ -2314,8 +2238,6 @@ void UniscribeLayout::AdjustLayout( ImplLayoutArgs& rArgs ) Justify( rArgs.mnLayoutWidth ); } - - void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs ) { const long* pDXArray = rArgs.mpDXArray; @@ -2453,8 +2375,6 @@ void UniscribeLayout::ApplyDXArray( const ImplLayoutArgs& rArgs ) } } - - void UniscribeLayout::InitKashidaHandling() { if( mnMinKashidaGlyph != 0 ) // already initialized @@ -2597,8 +2517,6 @@ bool UniscribeLayout::KashidaWordFix ( int nMinGlyphPos, int nEndGlyphPos, int* return true; } - - void UniscribeLayout::Justify( long nNewWidth ) { long nOldWidth = 0; @@ -2649,8 +2567,6 @@ void UniscribeLayout::Justify( long nNewWidth ) } } - - bool UniscribeLayout::IsKashidaPosValid ( int nCharPos ) const { // we have to find the visual item first since the mpLogClusters[] @@ -2904,7 +2820,6 @@ void GraphiteWinLayout::Simplify( bool is_base ) } #endif // ENABLE_GRAPHITE - SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) { DBG_ASSERT( mpWinFontEntry[nFallbackLevel], "WinSalGraphics mpWinFontEntry==NULL"); @@ -2957,8 +2872,6 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe return pWinLayout; } - - int WinSalGraphics::GetMinKashidaWidth() { if( !mpWinFontEntry[0] ) @@ -2968,8 +2881,6 @@ int WinSalGraphics::GetMinKashidaWidth() return nMinKashida; } - - ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD ) : ImplFontEntry( rFSD ) , mpKerningPairs( NULL ) @@ -2981,8 +2892,6 @@ ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD ) maScriptCache = NULL; } - - ImplWinFontEntry::~ImplWinFontEntry() { if( maScriptCache != NULL ) @@ -2990,15 +2899,11 @@ ImplWinFontEntry::~ImplWinFontEntry() delete[] mpKerningPairs; } - - bool ImplWinFontEntry::HasKernData() const { return (mnKerningPairs >= 0); } - - void ImplWinFontEntry::SetKernData( int nPairCount, const KERNINGPAIR* pPairData ) { mnKerningPairs = nPairCount; @@ -3006,8 +2911,6 @@ void ImplWinFontEntry::SetKernData( int nPairCount, const KERNINGPAIR* pPairData ::memcpy( mpKerningPairs, (const void*)pPairData, nPairCount*sizeof(KERNINGPAIR) ); } - - int ImplWinFontEntry::GetKerning( sal_Unicode cLeft, sal_Unicode cRight ) const { int nKernAmount = 0; @@ -3027,8 +2930,6 @@ int ImplWinFontEntry::GetKerning( sal_Unicode cLeft, sal_Unicode cRight ) const return nKernAmount; } - - bool ImplWinFontEntry::InitKashidaHandling( HDC hDC ) { if( mnMinKashidaWidth >= 0 ) // already cached? @@ -3052,8 +2953,6 @@ bool ImplWinFontEntry::InitKashidaHandling( HDC hDC ) return true; } - - PhysicalFontFace* ImplWinFontData::Clone() const { if( mpUnicodeMap ) @@ -3066,14 +2965,10 @@ PhysicalFontFace* ImplWinFontData::Clone() const return pClone; } - - ImplFontEntry* ImplWinFontData::CreateFontInstance( FontSelectPattern& rFSD ) const { ImplFontEntry* pEntry = new ImplWinFontEntry( rFSD ); return pEntry; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx index 54ae7ea58b32..7beb176814bd 100644 --- a/vcl/win/source/gdi/wntgdi.cxx +++ b/vcl/win/source/gdi/wntgdi.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #if defined _MSC_VER #pragma warning(push, 1) #endif @@ -26,8 +25,6 @@ #pragma warning(pop) #endif - - extern "C" { BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ) @@ -36,8 +33,6 @@ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ) } } - - extern "C" { BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ) @@ -46,8 +41,6 @@ BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ) } } - - extern "C" { BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ) |