diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-09-29 15:46:40 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-09-29 15:46:40 +0800 |
commit | 94ff531ca59a495547530f5c080d8e04e1f34ace (patch) | |
tree | 50597c12e13de7688d1eb42a7bb72e5fbd25f3eb /vcl/win | |
parent | af9614943d37f8e7c6a068cde7497dd7f6248451 (diff) |
removetooltypes: #i112600# some more changes in vcl and tools, reverted config strings in l10ntools and rsc
Diffstat (limited to 'vcl/win')
29 files changed, 532 insertions, 532 deletions
diff --git a/vcl/win/inc/salbmp.h b/vcl/win/inc/salbmp.h index 7a31add2ae19..07655d6b7a65 100644 --- a/vcl/win/inc/salbmp.h +++ b/vcl/win/inc/salbmp.h @@ -49,16 +49,16 @@ private: Size maSize; HGLOBAL mhDIB; HBITMAP mhDDB; - USHORT mnBitCount; + sal_uInt16 mnBitCount; public: HGLOBAL ImplGethDIB() const { return mhDIB; } HBITMAP ImplGethDDB() const { return mhDDB; } - static HGLOBAL ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); + static HGLOBAL ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ); - static USHORT ImplGetDIBColorCount( HGLOBAL hDIB ); + static sal_uInt16 ImplGetDIBColorCount( HGLOBAL hDIB ); static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, const Size& rSizePixel, bool bRLE4 ); @@ -70,15 +70,15 @@ public: public: bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ); - virtual bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ); + virtual bool Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); virtual bool Create( const SalBitmap& rSalBmpImpl ); virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics ); - virtual bool Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount ); + virtual bool Create( const SalBitmap& rSalBmpImpl, sal_uInt16 nNewBitCount ); virtual void Destroy(); virtual Size GetSize() const { return maSize; } - virtual USHORT GetBitCount() const { return mnBitCount; } + virtual sal_uInt16 GetBitCount() const { return mnBitCount; } virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ); virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); diff --git a/vcl/win/inc/saldata.hxx b/vcl/win/inc/saldata.hxx index ec67272ed07f..6de4d4a44abe 100644 --- a/vcl/win/inc/saldata.hxx +++ b/vcl/win/inc/saldata.hxx @@ -84,7 +84,7 @@ public: void initKeyCodeMap(); // checks if the menuhandle was created by VCL - BOOL IsKnownMenuHandle( HMENU hMenu ); + sal_Bool IsKnownMenuHandle( HMENU hMenu ); public: HINSTANCE mhInst; // default instance handle @@ -97,12 +97,12 @@ public: long* mpDitherDiff; // Dither mapping table BYTE* mpDitherLow; // Dither mapping table BYTE* mpDitherHigh; // Dither mapping table - ULONG mnTimerMS; // Current Time (in MS) of the Timer - ULONG mnTimerOrgMS; // Current Original Time (in MS) + sal_uIntPtr mnTimerMS; // Current Time (in MS) of the Timer + sal_uIntPtr mnTimerOrgMS; // Current Original Time (in MS) DWORD mnNextTimerTime; DWORD mnLastEventTime; UINT mnTimerId; // windows timer id - BOOL mbInTimerProc; // timer event is currently being dispatched + sal_Bool mbInTimerProc; // timer event is currently being dispatched HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test @@ -118,25 +118,25 @@ public: COLORREF maStockBrushColorAry[MAX_STOCKBRUSH]; HPEN mhStockPenAry[MAX_STOCKPEN]; HBRUSH mhStockBrushAry[MAX_STOCKBRUSH]; - USHORT mnStockPenCount; // count of static pens - USHORT mnStockBrushCount; // count of static brushes + sal_uInt16 mnStockPenCount; // count of static pens + sal_uInt16 mnStockBrushCount; // count of static brushes WPARAM mnSalObjWantKeyEvt; // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll BYTE mnCacheDCInUse; // count of CacheDC in use - BOOL mbObjClassInit; // is SALOBJECTCLASS initialised - BOOL mbInPalChange; // is in WM_QUERYNEWPALETTE + sal_Bool mbObjClassInit; // is SALOBJECTCLASS initialised + sal_Bool mbInPalChange; // is in WM_QUERYNEWPALETTE DWORD mnAppThreadId; // Id from Applikation-Thread - WIN_BOOL mbScrSvrEnabled; // ScreenSaver enabled + BOOL mbScrSvrEnabled; // ScreenSaver enabled int mnSageStatus; // status of Sage-DLL (DISABLE_AGENT == nicht vorhanden) SysAgt_Enable_PROC mpSageEnableProc; // funktion to deactivate the system agent SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none TempFontItem* mpTempFontItem; - BOOL mbThemeChanged; // true if visual theme was changed: throw away theme handles + sal_Bool mbThemeChanged; // true if visual theme was changed: throw away theme handles // for GdiPlus GdiplusStartup/GdiplusShutdown ULONG_PTR gdiplusToken; std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle() - std::map< UINT,USHORT > maVKMap; // map some dynamic VK_* entries + std::map< UINT,sal_uInt16 > maVKMap; // map some dynamic VK_* entries }; inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; } @@ -154,10 +154,10 @@ struct SalShlData UINT mnWheelScrollChars; // WheelScrollChars UINT mnWheelMsgId; // Wheel-Message-Id fuer W95 WORD mnVersion; // System-Version (311 == 3.11) - WIN_BOOL mbWNT; // kein W16/W95/W98 sondern ein NT - WIN_BOOL mbW40; // Is System-Version >= 4.0 - WIN_BOOL mbWXP; // Windows XP - WIN_BOOL mbWPrinter; // true: use unicode printer functions + BOOL mbWNT; // kein W16/W95/W98 sondern ein NT + BOOL mbW40; // Is System-Version >= 4.0 + BOOL mbWXP; // Windows XP + BOOL mbWPrinter; // true: use unicode printer functions // false: use anis compat printer functions OSVERSIONINFO maVersionInfo; }; @@ -184,8 +184,8 @@ struct HDCCache }; void ImplClearHDCCache( SalData* pData ); -HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 ); -void ImplReleaseCachedDC( ULONG nID ); +HDC ImplGetCachedDC( sal_uIntPtr nID, HBITMAP hBmp = 0 ); +void ImplReleaseCachedDC( sal_uIntPtr nID ); bool ImplAddTempFont( SalData&, const String& rFontFileURL ); void ImplReleaseTempFonts( SalData& ); @@ -196,7 +196,7 @@ void ImplReleaseTempFonts( SalData& ); HCURSOR ImplLoadSalCursor( int nId ); HBITMAP ImplLoadSalBitmap( int nId ); -BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon ); +sal_Bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon ); // SALGDI.CXX void ImplInitSalGDI(); @@ -208,11 +208,11 @@ void ImplFreeSalGDI(); // \\WIN\SOURCE\APP\SALINST.CXX void ImplSalYieldMutexAcquireWithWait(); -BOOL ImplSalYieldMutexTryToAcquire(); +sal_Bool ImplSalYieldMutexTryToAcquire(); void ImplSalYieldMutexAcquire(); void ImplSalYieldMutexRelease(); -ULONG ImplSalReleaseYieldMutex(); -void ImplSalAcquireYieldMutex( ULONG nCount ); +sal_uIntPtr ImplSalReleaseYieldMutex(); +void ImplSalAcquireYieldMutex( sal_uIntPtr nCount ); // \\WIN\SOURCE\WINDOW\SALFRAME.CXX LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); @@ -223,16 +223,16 @@ void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime ) // \WIN\SOURCE\WINDOW\SALFRAME.CXX void SalTestMouseLeave(); -BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall ); +sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall ); // \WIN\SOURCE\WINDOW\SALFRAME.CXX long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ); -BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ); +sal_Bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ); // \WIN\SOURCE\WINDOW\SALOBJ.CXX WinSalObject* ImplFindSalObject( HWND hWndChild ); -BOOL ImplSalPreDispatchMsg( MSG* pMsg ); +sal_Bool ImplSalPreDispatchMsg( MSG* pMsg ); void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult ); // \WIN\SOURCE\GDI\SALGDI3.CXX @@ -242,7 +242,7 @@ bool ImplIsFontAvailable( HDC hDC, const UniString& rName ); // \WIN\SOURCE\APP\SALDATA.CXX rtl_TextEncoding ImplSalGetSystemEncoding(); -ByteString ImplSalGetWinAnsiString( const UniString& rStr, BOOL bFileName = FALSE ); +ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName = FALSE ); UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN ); int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); @@ -343,10 +343,10 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); // A/W-Wrapper LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong ); LONG ImplGetWindowLong( HWND hWnd, int nIndex ); -WIN_BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); -WIN_BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); -WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ); -WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ); +BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); +BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); +BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ); +BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ); LONG ImplDispatchMessage( CONST MSG *lpMsg ); inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis ) diff --git a/vcl/win/inc/salframe.h b/vcl/win/inc/salframe.h index f9aa8ef9dc4b..cfb26847db02 100644 --- a/vcl/win/inc/salframe.h +++ b/vcl/win/inc/salframe.h @@ -62,33 +62,33 @@ public: int mnFullScreenShowState; // fullscreen restore show state UINT mnInputLang; // current Input Language UINT mnInputCodePage; // current Input CodePage - ULONG mnStyle; // style - BOOL mbGraphics; // is Graphics used - BOOL mbCaption; // has window a caption - BOOL mbBorder; // has window a border - BOOL mbFixBorder; // has window a fixed border - BOOL mbSizeBorder; // has window a sizeable border - BOOL mbNoIcon; // is an window without an icon - BOOL mbFloatWin; // is a FloatingWindow - BOOL mbFullScreen; // TRUE: in full screen mode - BOOL mbPresentation; // TRUE: Presentation Mode running - BOOL mbInShow; // innerhalb eines Show-Aufrufs - BOOL mbRestoreMaximize; // Restore-Maximize - BOOL mbInMoveMsg; // Move-Message wird verarbeitet - BOOL mbInSizeMsg; // Size-Message wird verarbeitet - BOOL mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode - BOOL mbDefPos; // default-position - BOOL mbOverwriteState; // TRUE: WindowState darf umgesetzt werden - BOOL mbIME; // TRUE: We are in IME Mode - BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages - BOOL mbSpezIME; // TRUE: Spez IME - BOOL mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages - BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus - static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting + sal_uIntPtr mnStyle; // style + sal_Bool mbGraphics; // is Graphics used + sal_Bool mbCaption; // has window a caption + sal_Bool mbBorder; // has window a border + sal_Bool mbFixBorder; // has window a fixed border + sal_Bool mbSizeBorder; // has window a sizeable border + sal_Bool mbNoIcon; // is an window without an icon + sal_Bool mbFloatWin; // is a FloatingWindow + sal_Bool mbFullScreen; // TRUE: in full screen mode + sal_Bool mbPresentation; // TRUE: Presentation Mode running + sal_Bool mbInShow; // innerhalb eines Show-Aufrufs + sal_Bool mbRestoreMaximize; // Restore-Maximize + sal_Bool mbInMoveMsg; // Move-Message wird verarbeitet + sal_Bool mbInSizeMsg; // Size-Message wird verarbeitet + sal_Bool mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode + sal_Bool mbDefPos; // default-position + sal_Bool mbOverwriteState; // TRUE: WindowState darf umgesetzt werden + sal_Bool mbIME; // TRUE: We are in IME Mode + sal_Bool mbHandleIME; // TRUE: Wir handeln die IME-Messages + sal_Bool mbSpezIME; // TRUE: Spez IME + sal_Bool mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages + sal_Bool mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus + static sal_Bool mbInReparent; // TRUE: ignore focus lost and gain due to reparenting RGNDATA* mpClipRgnData; RECT* mpNextClipRect; - BOOL mbFirstClipRect; + sal_Bool mbFirstClipRect; sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor void updateScreenNumber(); @@ -98,37 +98,37 @@ public: virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL PostEvent( void* pData ); + virtual sal_Bool PostEvent( void* pData ); virtual void SetTitle( const XubString& rTitle ); - virtual void SetIcon( USHORT nIcon ); + virtual void SetIcon( sal_uInt16 nIcon ); virtual void SetMenu( SalMenu* pSalMenu ); virtual void DrawMenuBar(); virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ); - virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); - virtual void Enable( BOOL bEnable ); + virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = FALSE ); + virtual void Enable( sal_Bool bEnable ); virtual void SetMinClientSize( long nWidth, long nHeight ); virtual void SetMaxClientSize( long nWidth, long nHeight ); - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); + virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); virtual void GetClientSize( long& rWidth, long& rHeight ); virtual void GetWorkArea( Rectangle& rRect ); virtual SalFrame* GetParent() const; virtual void SetWindowState( const SalFrameState* pState ); - virtual BOOL GetWindowState( SalFrameState* pState ); - virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ); - virtual void StartPresentation( BOOL bStart ); - virtual void SetAlwaysOnTop( BOOL bOnTop ); - virtual void ToTop( USHORT nFlags ); + virtual sal_Bool GetWindowState( SalFrameState* pState ); + virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); + virtual void StartPresentation( sal_Bool bStart ); + virtual void SetAlwaysOnTop( sal_Bool bOnTop ); + virtual void ToTop( sal_uInt16 nFlags ); virtual void SetPointer( PointerStyle ePointerStyle ); - virtual void CaptureMouse( BOOL bMouse ); + virtual void CaptureMouse( sal_Bool bMouse ); virtual void SetPointerPos( long nX, long nY ); using SalFrame::Flush; virtual void Flush(); virtual void Sync(); virtual void SetInputContext( SalInputContext* pContext ); - virtual void EndExtTextInput( USHORT nFlags ); - virtual String GetKeyName( USHORT nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); - virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual void EndExtTextInput( sal_uInt16 nFlags ); + virtual String GetKeyName( sal_uInt16 nKeyCode ); + virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); + virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); virtual LanguageType GetInputLanguage(); virtual SalBitmap* SnapShot(); virtual void UpdateSettings( AllSettings& rSettings ); @@ -140,7 +140,7 @@ public: virtual void SetBackgroundBitmap( SalBitmap* ); virtual void SetScreenNumber( unsigned int ); virtual void ResetClipRegion(); - virtual void BeginSetClipRegion( ULONG nRects ); + virtual void BeginSetClipRegion( sal_uIntPtr nRects ); virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); virtual void EndSetClipRegion(); }; diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h index 4b97eeb98c0b..b0e251eb19ca 100644 --- a/vcl/win/inc/salgdi.h +++ b/vcl/win/inc/salgdi.h @@ -58,8 +58,8 @@ class ImplWinFontData : public ImplFontData { public: ImplWinFontData( const ImplDevFontAttributes&, - int nFontHeight, WIN_BYTE eWinCharSet, - WIN_BYTE nPitchAndFamily ); + int nFontHeight, BYTE eWinCharSet, + BYTE nPitchAndFamily ); ~ImplWinFontData(); virtual ImplFontData* Clone() const; @@ -70,8 +70,8 @@ public: bool HasChar( sal_uInt32 cChar ) const; - WIN_BYTE GetCharSet() const { return meWinCharSet; } - WIN_BYTE GetPitchAndFamily() const { return mnPitchAndFamily; } + BYTE GetCharSet() const { return meWinCharSet; } + BYTE GetPitchAndFamily() const { return mnPitchAndFamily; } bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; } bool SupportsKorean() const { return mbHasKoreanRange; } bool SupportsCJK() const { return mbHasCJKSupport; } @@ -107,8 +107,8 @@ private: // TODO: get rid of the members below needed to work with the Win9x non-unicode API BYTE* mpFontCharSets; // all Charsets for the current font (used on W98 for kerning) BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried - WIN_BYTE meWinCharSet; - WIN_BYTE mnPitchAndFamily; + BYTE meWinCharSet; + BYTE mnPitchAndFamily; bool mbAliasSymbolsHigh; bool mbAliasSymbolsLow; private: @@ -153,23 +153,23 @@ public: RGNDATA* mpClipRgnData; // ClipRegion-Data RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data RECT* mpNextClipRect; // Naechstes ClipRegion-Rect - BOOL mbFirstClipRect; // Flag for first cliprect to insert + sal_Bool mbFirstClipRect; // Flag for first cliprect to insert LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x) ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts BYTE* mpFontCharSets; // All Charsets for the current font BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried - BOOL mbFontKernInit; // FALSE: FontKerns must be queried + sal_Bool mbFontKernInit; // FALSE: FontKerns must be queried KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font - ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font + sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of the current Font int mnPenWidth; // Linienbreite - BOOL mbStockPen; // is Pen a stockpen - BOOL mbStockBrush; // is Brush a stcokbrush - BOOL mbPen; // is Pen (FALSE == NULL_PEN) - BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH) - BOOL mbPrinter; // is Printer - BOOL mbVirDev; // is VirDev - BOOL mbWindow; // is Window - BOOL mbScreen; // is Screen compatible + sal_Bool mbStockPen; // is Pen a stockpen + sal_Bool mbStockBrush; // is Brush a stcokbrush + sal_Bool mbPen; // is Pen (FALSE == NULL_PEN) + sal_Bool mbBrush; // is Brush (FALSE == NULL_BRUSH) + sal_Bool mbPrinter; // is Printer + sal_Bool mbVirDev; // is VirDev + sal_Bool mbWindow; // is Window + sal_Bool mbScreen; // is Screen compatible bool mbXORMode; // _every_ output with RasterOp XOR // remember RGB values for SetLineColor/SetFillColor @@ -183,25 +183,25 @@ public: virtual ~WinSalGraphics(); protected: - virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ); + virtual sal_Bool unionClipRegion( long nX, long nY, long nWidth, long nHeight ); virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ); // draw --> LineColor and FillColor and RasterOp and ClipRegion virtual void drawPixel( long nX, long nY ); virtual void drawPixel( long nX, long nY, SalColor nSalColor ); virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ); virtual void drawRect( long nX, long nY, long nWidth, long nHeight ); - virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ); - virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ); + virtual void drawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry ); + virtual void drawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry ); virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ); virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin); - virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); - virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); + virtual sal_Bool drawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); + virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ); // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, USHORT nFlags ); + long nSrcHeight, sal_uInt16 nFlags ); // CopyBits and DrawBitmap --> RasterOp and ClipRegion // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics @@ -222,20 +222,20 @@ protected: // invert --> ClipRegion (only Windows or VirDevs) virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags); - virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ); + virtual void invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); + virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); // native widget rendering methods that require mirroring - virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, - const Point& aPos, BOOL& rIsInside ); - virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, + virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, + const Point& aPos, sal_Bool& rIsInside ); + virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, const ImplControlValue& aValue, const rtl::OUString& aCaption ); - virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion, + virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, const ImplControlValue& aValue, const rtl::OUString& aCaption ); - virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, + virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, const ImplControlValue& aValue, const rtl::OUString& aCaption, Region &rNativeBoundingRegion, Region &rNativeContentRegion ); @@ -250,7 +250,7 @@ public: // get device resolution virtual void GetResolution( long& rDPIX, long& rDPIY ); // get the depth of the device - virtual USHORT GetBitCount(); + virtual sal_uInt16 GetBitCount(); // get the width of the device virtual long GetGraphicsWidth() const; @@ -258,7 +258,7 @@ public: virtual void ResetClipRegion(); // begin setting the clip region, add rectangles to the // region with the UnionClipRegion call - virtual void BeginSetClipRegion( ULONG nCount ); + virtual void BeginSetClipRegion( sal_uIntPtr nCount ); // all rectangles were added and the clip region should be set now virtual void EndSetClipRegion(); @@ -280,12 +280,12 @@ public: // set the text color to a specific color virtual void SetTextColor( SalColor nSalColor ); // set the font - virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); // get the current font's etrics virtual void GetFontMetric( ImplFontMetricData* ); // get kernign pairs of the current font // return only PairCount if (pKernPairs == NULL) - virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); + virtual sal_uIntPtr GetKernPairs( sal_uIntPtr nPairs, ImplKernPairData* pKernPairs ); // get the repertoire of the current font virtual ImplFontCharMap* GetImplFontCharMap() const; // graphics must fill supplied font list @@ -306,7 +306,7 @@ public: // rInfo: additional outgoing information // implementation note: encoding 0 with glyph id 0 should be added implicitly // as "undefined character" - virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData*, long* pGlyphIDs, sal_uInt8* pEncoding, @@ -344,15 +344,15 @@ public: Ucs2UIntMap& rUnicodeEnc ); virtual int GetMinKashidaWidth(); - virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ); - virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); + virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& ); + virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& ); virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); virtual void DrawServerFontLayout( const ServerFontLayout& ); virtual bool supportsOperation( OutDevSupportType ) const; // Query the platform layer for control support - virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); + virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); virtual SystemGraphicsData GetGraphicsData() const; virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; @@ -370,7 +370,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, const ImplFontSelectData*, // - Defines - // ----------- -#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS)) +#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS)) // ----------- // - Inlines - diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h index f3005e3ad30b..85f107e1fe12 100644 --- a/vcl/win/inc/salinst.h +++ b/vcl/win/inc/salinst.h @@ -46,19 +46,19 @@ public: HWND mhComWnd; // window, for communication (between threads and the main thread) SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex - USHORT mnYieldWaitCount; // Wait-Count + sal_uInt16 mnYieldWaitCount; // Wait-Count public: WinSalInstance(); virtual ~WinSalInstance(); - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); + virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle ); + virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle ); virtual void DestroyFrame( SalFrame* pFrame ); - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); + virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = TRUE ); virtual void DestroyObject( SalObject* pObject ); virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData ); + sal_uInt16 nBitCount, const SystemGraphicsData *pData ); virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, @@ -75,11 +75,11 @@ public: virtual SalSystem* CreateSalSystem(); virtual SalBitmap* CreateSalBitmap(); virtual vos::IMutex* GetYieldMutex(); - virtual ULONG ReleaseYieldMutex(); - virtual void AcquireYieldMutex( ULONG nCount ); + virtual sal_uIntPtr ReleaseYieldMutex(); + virtual void AcquireYieldMutex( sal_uIntPtr nCount ); virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ); - virtual bool AnyInput( USHORT nType ); - virtual SalMenu* CreateMenu( BOOL bMenuBar ); + virtual bool AnyInput( sal_uInt16 nType ); + virtual SalMenu* CreateMenu( sal_Bool bMenuBar ); virtual void DestroyMenu( SalMenu* ); virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); virtual void DestroyMenuItem( SalMenuItem* ); @@ -94,10 +94,10 @@ public: // - Prototypen - // -------------- -SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle ); +SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPtr nSalFrameStyle ); SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent ); -HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild ); -void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE ); +HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild ); +void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex = FALSE ); void ImplSalPrinterAbortJobAsync( HDC hPrnDC ); #endif // _SV_SALINST_H diff --git a/vcl/win/inc/salmenu.h b/vcl/win/inc/salmenu.h index 7f1774b61975..c9442ced8936 100644 --- a/vcl/win/inc/salmenu.h +++ b/vcl/win/inc/salmenu.h @@ -38,22 +38,22 @@ class WinSalMenu : public SalMenu public: WinSalMenu(); virtual ~WinSalMenu(); - virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars + virtual sal_Bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars // otherwise only menu messages are processed (eg, OLE on Windows) virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); virtual void RemoveItem( unsigned nPos ); virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); virtual void SetFrame( const SalFrame* pFrame ); - virtual void CheckItem( unsigned nPos, BOOL bCheck ); - virtual void EnableItem( unsigned nPos, BOOL bEnable ); + virtual void CheckItem( unsigned nPos, sal_Bool bCheck ); + virtual void EnableItem( unsigned nPos, sal_Bool bEnable ); virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ); virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); virtual void GetSystemMenuData( SystemMenuData* pData ); HMENU mhMenu; // the menu handle - BOOL mbMenuBar; // true for menu bars + sal_Bool mbMenuBar; // true for menu bars HWND mhWnd; // the window handle where the menubar is attached, may be NULL WinSalMenu *mpParentMenu; // the parent menu }; diff --git a/vcl/win/inc/salobj.h b/vcl/win/inc/salobj.h index 11ae96931321..402c2c2be3ce 100644 --- a/vcl/win/inc/salobj.h +++ b/vcl/win/inc/salobj.h @@ -45,7 +45,7 @@ public: RGNDATA* mpClipRgnData; // ClipRegion-Data RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data RECT* mpNextClipRect; // Naechstes ClipRegion-Rect - BOOL mbFirstClipRect; // Flag for first cliprect to insert + sal_Bool mbFirstClipRect; // Flag for first cliprect to insert WinSalObject* mpNextObject; // pointer to next object @@ -53,13 +53,13 @@ public: virtual ~WinSalObject(); virtual void ResetClipRegion(); - virtual USHORT GetClipRegionType(); - virtual void BeginSetClipRegion( ULONG nRects ); + virtual sal_uInt16 GetClipRegionType(); + virtual void BeginSetClipRegion( sal_uIntPtr nRects ); virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); virtual void EndSetClipRegion(); virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ); - virtual void Show( BOOL bVisible ); - virtual void Enable( BOOL nEnable ); + virtual void Show( sal_Bool bVisible ); + virtual void Enable( sal_Bool nEnable ); virtual void GrabFocus(); virtual void SetBackground(); virtual void SetBackground( SalColor nSalColor ); diff --git a/vcl/win/inc/salprn.h b/vcl/win/inc/salprn.h index 57ae8eae55e3..14141b6e7e6b 100644 --- a/vcl/win/inc/salprn.h +++ b/vcl/win/inc/salprn.h @@ -36,7 +36,7 @@ // ----------------- // WNT3 -#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433) +#define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433) #define SAL_DRIVERDATA_VERSION_A 1 #define SAL_DRIVERDATA_VERSION_W 2 @@ -44,9 +44,9 @@ struct SalDriverData { - ULONG mnSysSignature; - USHORT mnVersion; - USHORT mnDriverOffset; + sal_uIntPtr mnSysSignature; + sal_uInt16 mnVersion; + sal_uInt16 mnDriverOffset; BYTE maDriverData[1]; }; @@ -66,23 +66,23 @@ public: XubString maDeviceName; // printer device name XubString maPortName; // printer port name HDC mhDC; // printer hdc - BOOL mbGraphics; // is Graphics used + sal_Bool mbGraphics; // is Graphics used public: WinSalInfoPrinter(); virtual ~WinSalInfoPrinter(); virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); - virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ); - virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ); + virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); + virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData ); + virtual sal_Bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ); virtual void GetPageInfo( const ImplJobSetup* pSetupData, long& rOutWidth, long& rOutHeight, long& rPageOffX, long& rPageOffY, long& rPageWidth, long& rPageHeight ); - virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ); - virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ); - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ); + virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ); + virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData ); + virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ); virtual void InitPaperFormats( const ImplJobSetup* pSetupData ); virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ); }; @@ -98,10 +98,10 @@ public: WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter WinSalPrinter* mpNextPrinter; // next printing printer HDC mhDC; // printer hdc - ULONG mnError; // Error Code - ULONG mnCopies; // Kopien - BOOL mbCollate; // Sortierte Kopien - BOOL mbAbort; // Job Aborted + sal_uIntPtr mnError; // Error Code + sal_uIntPtr mnCopies; // Kopien + sal_Bool mbCollate; // Sortierte Kopien + sal_Bool mbAbort; // Job Aborted bool mbValid; @@ -110,18 +110,18 @@ public: virtual ~WinSalPrinter(); using SalPrinter::StartJob; - virtual BOOL StartJob( const XubString* pFileName, + virtual sal_Bool StartJob( const XubString* pFileName, const XubString& rJobName, const XubString& rAppName, - ULONG nCopies, + sal_uIntPtr nCopies, bool bCollate, bool bDirect, ImplJobSetup* pSetupData ); - virtual BOOL EndJob(); - virtual BOOL AbortJob(); - virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ); - virtual BOOL EndPage(); - virtual ULONG GetErrorCode(); + virtual sal_Bool EndJob(); + virtual sal_Bool AbortJob(); + virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ); + virtual sal_Bool EndPage(); + virtual sal_uIntPtr GetErrorCode(); void markInvalid(); bool isValid() const { return mbValid; } diff --git a/vcl/win/inc/salsys.h b/vcl/win/inc/salsys.h index b6eadc6e6818..51a8c0443b58 100644 --- a/vcl/win/inc/salsys.h +++ b/vcl/win/inc/salsys.h @@ -83,7 +83,7 @@ public: const std::vector<DisplayMonitor>& getMonitors() { initMonitors(); return m_aMonitors;} - BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/, + sal_Bool handleMonitorCallback( sal_IntPtr /*HMONITOR*/, sal_IntPtr /*HDC*/, sal_IntPtr /*LPRECT*/ ); }; diff --git a/vcl/win/inc/saltimer.h b/vcl/win/inc/saltimer.h index c24af459aa97..38f861fad441 100644 --- a/vcl/win/inc/saltimer.h +++ b/vcl/win/inc/saltimer.h @@ -37,7 +37,7 @@ public: virtual ~WinSalTimer(); // overload all pure virtual methods - void Start( ULONG nMS ); + void Start( sal_uIntPtr nMS ); void Stop(); }; diff --git a/vcl/win/inc/salvd.h b/vcl/win/inc/salvd.h index d0f32a6460a9..24aa8b99ba01 100644 --- a/vcl/win/inc/salvd.h +++ b/vcl/win/inc/salvd.h @@ -45,16 +45,16 @@ public: HBITMAP mhDefBmp; // Default Bitmap WinSalGraphics* mpGraphics; // current VirDev graphics WinSalVirtualDevice* mpNext; // next VirDev - USHORT mnBitCount; // BitCount (0 or 1) - BOOL mbGraphics; // is Graphics used - BOOL mbForeignDC; // uses a foreign DC instead of a bitmap + sal_uInt16 mnBitCount; // BitCount (0 or 1) + sal_Bool mbGraphics; // is Graphics used + sal_Bool mbForeignDC; // uses a foreign DC instead of a bitmap WinSalVirtualDevice(); virtual ~WinSalVirtualDevice(); virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual BOOL SetSize( long nNewDX, long nNewDY ); + virtual sal_Bool SetSize( long nNewDX, long nNewDY ); virtual void GetSize( long& rWidth, long& rHeight ); }; diff --git a/vcl/win/inc/wincomp.hxx b/vcl/win/inc/wincomp.hxx index 61e04779dbce..141ea4106238 100644 --- a/vcl/win/inc/wincomp.hxx +++ b/vcl/win/inc/wincomp.hxx @@ -129,17 +129,17 @@ inline DWORD GetWindowExStyle( HWND hWnd ) return GetWindowLong( hWnd, GWL_EXSTYLE ); } -inline WIN_BOOL IsMinimized( HWND hWnd ) +inline BOOL IsMinimized( HWND hWnd ) { return IsIconic( hWnd ); } -inline WIN_BOOL IsMaximized( HWND hWnd ) +inline BOOL IsMaximized( HWND hWnd ) { return IsZoomed( hWnd ); } -inline void SetWindowFont( HWND hWnd, HFONT hFont, WIN_BOOL bRedraw ) +inline void SetWindowFont( HWND hWnd, HFONT hFont, BOOL bRedraw ) { SendMessage( hWnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM((UINT)bRedraw,0) ); } diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index bb8a198a96e6..1da1387edfe0 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -54,7 +54,7 @@ rtl_TextEncoding ImplSalGetSystemEncoding() // ----------------------------------------------------------------------- -ByteString ImplSalGetWinAnsiString( const UniString& rStr, BOOL bFileName ) +ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName ) { rtl_TextEncoding eEncoding = ImplSalGetSystemEncoding(); if ( bFileName ) @@ -137,7 +137,7 @@ LONG ImplGetWindowLong( HWND hWnd, int nIndex ) // ----------------------------------------------------------------------- -WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { if ( aSalShlData.mbWNT ) return PostMessageW( hWnd, nMsg, wParam, lParam ); @@ -147,9 +147,9 @@ WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { - WIN_BOOL bRet; + BOOL bRet; if ( aSalShlData.mbWNT ) bRet = SendMessageW( hWnd, nMsg, wParam, lParam ); else @@ -160,7 +160,7 @@ WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) +BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) { if ( aSalShlData.mbWNT ) return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); @@ -170,7 +170,7 @@ WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFi // ----------------------------------------------------------------------- -WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) +BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) { if ( aSalShlData.mbWNT ) return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index b7ea81d313ae..808504c9542e 100644 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -70,7 +70,7 @@ WinSalSystem::~WinSalSystem() // ----------------------------------------------------------------------- -static WIN_BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor, +static BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor, HDC hDC, LPRECT lpRect, LPARAM dwData ) @@ -81,7 +81,7 @@ static WIN_BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor, reinterpret_cast<sal_IntPtr>(lpRect) ); } -BOOL WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_IntPtr ) +sal_Bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_IntPtr ) { MONITORINFOEXW aInfo; aInfo.cbSize = sizeof( aInfo ); @@ -106,7 +106,7 @@ BOOL WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_I m_nPrimary = it->second; } } - return TRUE; + return sal_True; } void WinSalSystem::clearMonitors() diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 97dbb5285cca..1a536348ce54 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -107,7 +107,7 @@ class SalYieldMutex : public vos::OMutex { public: // for ImplSalYield() WinSalInstance* mpInstData; - ULONG mnCount; + sal_uIntPtr mnCount; DWORD mnThreadId; public: @@ -117,7 +117,7 @@ public: virtual void SAL_CALL release(); virtual sal_Bool SAL_CALL tryToAcquire(); - ULONG GetAcquireCount( ULONG nThreadId ); + sal_uIntPtr GetAcquireCount( sal_uIntPtr nThreadId ); }; // ----------------------------------------------------------------------- @@ -196,7 +196,7 @@ sal_Bool SAL_CALL SalYieldMutex::tryToAcquire() // ----------------------------------------------------------------------- -ULONG SalYieldMutex::GetAcquireCount( ULONG nThreadId ) +sal_uIntPtr SalYieldMutex::GetAcquireCount( sal_uIntPtr nThreadId ) { if ( nThreadId == mnThreadId ) return mnCount; @@ -222,7 +222,7 @@ void ImplSalYieldMutexAcquireWithWait() { // Wenn wir den Mutex nicht bekommen, muessen wir solange // warten, bis wir Ihn bekommen - BOOL bAcquire = FALSE; + sal_Bool bAcquire = FALSE; do { if ( pInst->mpSalYieldMutex->tryToAcquire() ) @@ -255,7 +255,7 @@ void ImplSalYieldMutexAcquireWithWait() // ----------------------------------------------------------------------- -BOOL ImplSalYieldMutexTryToAcquire() +sal_Bool ImplSalYieldMutexTryToAcquire() { WinSalInstance* pInst = GetSalData()->mpFirstInstance; if ( pInst ) @@ -287,15 +287,15 @@ void ImplSalYieldMutexRelease() // ----------------------------------------------------------------------- -ULONG ImplSalReleaseYieldMutex() +sal_uIntPtr ImplSalReleaseYieldMutex() { WinSalInstance* pInst = GetSalData()->mpFirstInstance; if ( !pInst ) return 0; SalYieldMutex* pYieldMutex = pInst->mpSalYieldMutex; - ULONG nCount = pYieldMutex->GetAcquireCount( GetCurrentThreadId() ); - ULONG n = nCount; + sal_uIntPtr nCount = pYieldMutex->GetAcquireCount( GetCurrentThreadId() ); + sal_uIntPtr n = nCount; while ( n ) { pYieldMutex->release(); @@ -307,7 +307,7 @@ ULONG ImplSalReleaseYieldMutex() // ----------------------------------------------------------------------- -void ImplSalAcquireYieldMutex( ULONG nCount ) +void ImplSalAcquireYieldMutex( sal_uIntPtr nCount ) { WinSalInstance* pInst = GetSalData()->mpFirstInstance; if ( !pInst ) @@ -682,14 +682,14 @@ vos::IMutex* WinSalInstance::GetYieldMutex() // ----------------------------------------------------------------------- -ULONG WinSalInstance::ReleaseYieldMutex() +sal_uIntPtr WinSalInstance::ReleaseYieldMutex() { return ImplSalReleaseYieldMutex(); } // ----------------------------------------------------------------------- -void WinSalInstance::AcquireYieldMutex( ULONG nCount ) +void WinSalInstance::AcquireYieldMutex( sal_uIntPtr nCount ) { ImplSalAcquireYieldMutex( nCount ); } @@ -711,7 +711,7 @@ static void ImplSalDispatchMessage( MSG* pMsg ) // ----------------------------------------------------------------------- -void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents ) +void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents ) { MSG aMsg; bool bWasMsg = false, bOneEvent = false; @@ -746,8 +746,8 @@ void WinSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) SalYieldMutex* pYieldMutex = mpSalYieldMutex; SalData* pSalData = GetSalData(); DWORD nCurThreadId = GetCurrentThreadId(); - ULONG nCount = pYieldMutex->GetAcquireCount( nCurThreadId ); - ULONG n = nCount; + sal_uIntPtr nCount = pYieldMutex->GetAcquireCount( nCurThreadId ); + sal_uIntPtr n = nCount; while ( n ) { pYieldMutex->release(); @@ -804,7 +804,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar rDef = FALSE; break; case SAL_MSG_THREADYIELD: - ImplSalYield( (BOOL)wParam, (BOOL)lParam ); + ImplSalYield( (sal_Bool)wParam, (sal_Bool)lParam ); rDef = FALSE; break; // If we get this message, because another GetMessage() call @@ -819,11 +819,11 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar rDef = FALSE; break; case SAL_MSG_STARTTIMER: - ImplSalStartTimer( (ULONG) lParam, FALSE ); + ImplSalStartTimer( (sal_uIntPtr) lParam, FALSE ); rDef = FALSE; break; case SAL_MSG_CREATEFRAME: - nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (ULONG)wParam ); + nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (sal_uIntPtr)wParam ); rDef = FALSE; break; case SAL_MSG_RECREATEHWND: @@ -938,7 +938,7 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa // ----------------------------------------------------------------------- -bool WinSalInstance::AnyInput( USHORT nType ) +bool WinSalInstance::AnyInput( sal_uInt16 nType ) { MSG aMsg; @@ -1020,7 +1020,7 @@ bool WinSalInstance::AnyInput( USHORT nType ) // ----------------------------------------------------------------------- -void SalTimer::Start( ULONG nMS ) +void SalTimer::Start( sal_uIntPtr nMS ) { // Um auf Main-Thread umzuschalten SalData* pSalData = GetSalData(); @@ -1037,7 +1037,7 @@ void SalTimer::Start( ULONG nMS ) // ----------------------------------------------------------------------- -SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, ULONG nSalFrameStyle ) +SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uIntPtr nSalFrameStyle ) { // Um auf Main-Thread umzuschalten return (SalFrame*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd ); @@ -1045,7 +1045,7 @@ SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, // ----------------------------------------------------------------------- -SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, ULONG nSalFrameStyle ) +SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uIntPtr nSalFrameStyle ) { // Um auf Main-Thread umzuschalten HWND hWndParent; @@ -1067,7 +1067,7 @@ void WinSalInstance::DestroyFrame( SalFrame* pFrame ) SalObject* WinSalInstance::CreateObject( SalFrame* pParent, SystemWindowData* /*pWindowData*/, // SystemWindowData meaningless on Windows - BOOL /*bShow*/ ) + sal_Bool /*bShow*/ ) { // Um auf Main-Thread umzuschalten return (SalObject*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) ); diff --git a/vcl/win/source/app/salshl.cxx b/vcl/win/source/app/salshl.cxx index 0f3b0c41e258..578b3cb804bd 100644 --- a/vcl/win/source/app/salshl.cxx +++ b/vcl/win/source/app/salshl.cxx @@ -43,15 +43,15 @@ extern "C" { #ifdef __MINGW32__ -BOOL WINAPI DllMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved ) +sal_Bool WINAPI DllMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved ) #else #ifdef ICC int _CRT_init(void); #else -WIN_BOOL WINAPI _CRT_INIT( HINSTANCE hInst, DWORD nReason, LPVOID pReserved ); +BOOL WINAPI _CRT_INIT( HINSTANCE hInst, DWORD nReason, LPVOID pReserved ); #endif -WIN_BOOL WINAPI LibMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved ) +BOOL WINAPI LibMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved ) #endif { // Unsere DLL-Initialisierung @@ -102,7 +102,7 @@ HBITMAP ImplLoadSalBitmap( int nId ) // ----------------------------------------------------------------------- -BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon ) +sal_Bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon ) { DBG_ASSERT( aSalShlData.mhInst, "no DLL instance handle" ); diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx index d512be753f9c..43e4989e4924 100644 --- a/vcl/win/source/app/saltimer.cxx +++ b/vcl/win/source/app/saltimer.cxx @@ -42,7 +42,7 @@ // ======================================================================= -void ImplSalStartTimer( ULONG nMS, BOOL bMutex ) +void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex ) { SalData* pSalData = GetSalData(); @@ -51,7 +51,7 @@ void ImplSalStartTimer( ULONG nMS, BOOL bMutex ) if ( !bMutex ) pSalData->mnTimerOrgMS = nMS; - // Periode darf nicht zu gross sein, da Windows mit USHORT arbeitet + // Periode darf nicht zu gross sein, da Windows mit sal_uInt16 arbeitet if ( nMS > MAX_SYSPERIOD ) nMS = MAX_SYSPERIOD; @@ -70,7 +70,7 @@ WinSalTimer::~WinSalTimer() { } -void WinSalTimer::Start( ULONG nMS ) +void WinSalTimer::Start( sal_uIntPtr nMS ) { // switch to main thread SalData* pSalData = GetSalData(); diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 444df039dd69..97b2683ff1f8 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -119,7 +119,7 @@ bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ) // ------------------------------------------------------------------ -bool WinSalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) +bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { bool bRet = FALSE; @@ -212,7 +212,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) // ------------------------------------------------------------------ -bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, USHORT nNewBitCount ) +bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount ) { bool bRet = FALSE; @@ -277,9 +277,9 @@ void WinSalBitmap::Destroy() // ------------------------------------------------------------------ -USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB ) +sal_uInt16 WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB ) { - USHORT nColors = 0; + sal_uInt16 nColors = 0; if( hDIB ) { @@ -291,7 +291,7 @@ USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB ) if( pBIH->biBitCount <= 8 ) { if ( pBIH->biClrUsed ) - nColors = (USHORT) pBIH->biClrUsed; + nColors = (sal_uInt16) pBIH->biClrUsed; else nColors = 1 << pBIH->biBitCount; } @@ -307,7 +307,7 @@ USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB ) // ------------------------------------------------------------------ -HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const BitmapPalette& rPal ) +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!" ); @@ -315,8 +315,8 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitm if ( rSize.Width() && rSize.Height() ) { - const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height(); - const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0; + const sal_uIntPtr nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height(); + const sal_uInt16 nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0; hDIB = GlobalAlloc( GHND, sizeof( BITMAPINFOHEADER ) + nColors * sizeof( RGBQUAD ) + nImageSize ); @@ -339,7 +339,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitm if ( nColors ) { - const USHORT nMinCount = Min( nColors, rPal.GetEntryCount() ); + const sal_uInt16 nMinCount = Min( nColors, rPal.GetEntryCount() ); if( nMinCount ) memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof( RGBQUAD ) ); @@ -360,7 +360,7 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ) if ( bDIB && hHdl ) { - const ULONG nSize = GlobalSize( hHdl ); + const sal_uIntPtr nSize = GlobalSize( hHdl ); if ( (hCopy = GlobalAlloc( GHND, nSize )) != 0 ) { @@ -418,8 +418,8 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ ) { PBITMAPINFO pNewBI = (PBITMAPINFO) GlobalLock( hNewDIB ); PBITMAPINFOHEADER pNewBIH = (PBITMAPINFOHEADER) pNewBI; - const USHORT nColorCount = ImplGetDIBColorCount( hNewDIB ); - const ULONG nOffset = *(DWORD*) pBI + nColorCount * sizeof( RGBQUAD ); + const sal_uInt16 nColorCount = ImplGetDIBColorCount( hNewDIB ); + const sal_uIntPtr nOffset = *(DWORD*) pBI + nColorCount * sizeof( RGBQUAD ); BYTE* pOldBits = (PBYTE) pBI + nOffset; BYTE* pNewBits = (PBYTE) pNewBI + nOffset; @@ -452,11 +452,11 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ ) pBuffer->mnWidth = maSize.Width(); pBuffer->mnHeight = maSize.Height(); pBuffer->mnScanlineSize = AlignedWidth4Bytes( maSize.Width() * pBIH->biBitCount ); - pBuffer->mnBitCount = (USHORT) pBIH->biBitCount; + pBuffer->mnBitCount = (sal_uInt16) pBIH->biBitCount; if( pBuffer->mnBitCount <= 8 ) { - const USHORT nPalCount = ImplGetDIBColorCount( mhDIB ); + const sal_uInt16 nPalCount = ImplGetDIBColorCount( mhDIB ); pBuffer->maPalette.SetEntryCount( nPalCount ); memcpy( pBuffer->maPalette.ImplGetColorBuffer(), pBI->bmiColors, nPalCount * sizeof( RGBQUAD ) ); @@ -464,7 +464,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ ) } else if( ( pBIH->biBitCount == 16 ) || ( pBIH->biBitCount == 32 ) ) { - ULONG nOffset = 0UL; + sal_uIntPtr nOffset = 0UL; if( pBIH->biCompression == BI_BITFIELDS ) { @@ -508,7 +508,7 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) if( !bReadOnly && !!pBuffer->maPalette ) { PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB ); - const USHORT nCount = pBuffer->maPalette.GetEntryCount(); + const sal_uInt16 nCount = pBuffer->maPalette.GetEntryCount(); memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), nCount * sizeof( RGBQUAD ) ); GlobalUnlock( mhDIB ); @@ -529,12 +529,12 @@ void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, HPBYTE pRLE = (HPBYTE) pSrcBuf; HPBYTE pDIB = (HPBYTE) pDstBuf; HPBYTE pRow = (HPBYTE) pDstBuf; - ULONG nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) ); + sal_uIntPtr nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) ); HPBYTE pLast = pDIB + rSizePixel.Height() * nWidthAl - 1; - ULONG nCountByte; - ULONG nRunByte; - ULONG nX = 0; - ULONG i; + sal_uIntPtr nCountByte; + sal_uIntPtr nRunByte; + sal_uIntPtr nX = 0; + sal_uIntPtr i; BYTE cTmp; bool bEndDecoding = FALSE; diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index eb260eb808c6..f58050a1890f 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -189,7 +189,7 @@ void ImplInitSalGDI() HBITMAP hBmpOld = (HBITMAP) ::SelectObject( hMemDC, hMemBmp ); HBRUSH hMemBrush = ::CreateSolidBrush( PALETTERGB( 175, 171, 169 ) ); HBRUSH hBrushOld = (HBRUSH) ::SelectObject( hMemDC, hMemBrush ); - BOOL bDither16 = TRUE; + sal_Bool bDither16 = TRUE; ::PatBlt( hMemDC, 0, 0, 8, 8, PATCOPY ); const COLORREF aCol( ::GetPixel( hMemDC, 0, 0 ) ); @@ -240,13 +240,13 @@ void ImplInitSalGDI() BYTE nR, nG, nB; PALETTEENTRY* pPalEntry; LOGPALETTE* pLogPal; - const USHORT nDitherPalCount = DITHER_PAL_COUNT; - ULONG nTotalCount = DITHER_MAX_SYSCOLOR + nDitherPalCount + DITHER_EXTRA_COLORS; + const sal_uInt16 nDitherPalCount = DITHER_PAL_COUNT; + sal_uIntPtr nTotalCount = DITHER_MAX_SYSCOLOR + nDitherPalCount + DITHER_EXTRA_COLORS; // create logical palette pLogPal = (LOGPALETTE*) new char[ sizeof( LOGPALETTE ) + ( nTotalCount * sizeof( PALETTEENTRY ) ) ]; pLogPal->palVersion = 0x0300; - pLogPal->palNumEntries = (USHORT) nTotalCount; + pLogPal->palNumEntries = (sal_uInt16) nTotalCount; pPalEntry = pLogPal->palPalEntry; // Standard colors @@ -404,7 +404,7 @@ static int ImplIsPaletteEntry( BYTE nRed, BYTE nGreen, BYTE nBlue ) PALETTEENTRY* pPalEntry = aImplSalSysPalEntryAry; // standard palette color? - for ( USHORT i = 0; i < DITHER_MAX_SYSCOLOR; i++, pPalEntry++ ) + for ( sal_uInt16 i = 0; i < DITHER_MAX_SYSCOLOR; i++, pPalEntry++ ) { if( pPalEntry->peRed == nRed && pPalEntry->peGreen == nGreen && pPalEntry->peBlue == nBlue ) return TRUE; @@ -551,7 +551,7 @@ void ImplSalDeInitGraphics( WinSalGraphics* pData ) // ======================================================================= -HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp ) +HDC ImplGetCachedDC( sal_uIntPtr nID, HBITMAP hBmp ) { SalData* pSalData = GetSalData(); HDCCache* pC = &pSalData->mpHDCCache[ nID ]; @@ -585,7 +585,7 @@ HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp ) // ======================================================================= -void ImplReleaseCachedDC( ULONG nID ) +void ImplReleaseCachedDC( sal_uIntPtr nID ) { SalData* pSalData = GetSalData(); HDCCache* pC = &pSalData->mpHDCCache[ nID ]; @@ -598,7 +598,7 @@ void ImplReleaseCachedDC( ULONG nID ) void ImplClearHDCCache( SalData* pData ) { - for( ULONG i = 0; i < CACHESIZE_HDC; i++ ) + for( sal_uIntPtr i = 0; i < CACHESIZE_HDC; i++ ) { HDCCache* pC = &pData->mpHDCCache[ i ]; @@ -621,21 +621,21 @@ void ImplClearHDCCache( SalData* pData ) // might also contain bezier control points for the PolyDraw() GDI method // Make sure pWinPointAry and pWinFlagAry are big enough void ImplPreparePolyDraw( bool bCloseFigures, - ULONG nPoly, - const ULONG* pPoints, + sal_uIntPtr nPoly, + const sal_uIntPtr* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry, POINT* pWinPointAry, BYTE* pWinFlagAry ) { - ULONG nCurrPoly; + sal_uIntPtr nCurrPoly; for( nCurrPoly=0; nCurrPoly<nPoly; ++nCurrPoly ) { const POINT* pCurrPoint = reinterpret_cast<const POINT*>( *pPtAry++ ); const BYTE* pCurrFlag = *pFlgAry++; - const ULONG nCurrPoints = *pPoints++; + const sal_uIntPtr nCurrPoints = *pPoints++; const bool bHaveFlagArray( pCurrFlag ); - ULONG nCurrPoint; + sal_uIntPtr nCurrPoint; if( nCurrPoints ) { @@ -691,11 +691,11 @@ void ImplPreparePolyDraw( bool bCloseFigures, // ======================================================================= // #100127# draw an array of points which might also contain bezier control points -void ImplRenderPath( HDC hdc, ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +void ImplRenderPath( HDC hdc, sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) { if( nPoints ) { - USHORT i; + sal_uInt16 i; // TODO: profile whether the following options are faster: // a) look ahead and draw consecutive bezier or line segments by PolyBezierTo/PolyLineTo resp. // b) convert our flag array to window's and use PolyDraw @@ -805,9 +805,9 @@ void WinSalGraphics::GetResolution( long& rDPIX, long& rDPIY ) // ----------------------------------------------------------------------- -USHORT WinSalGraphics::GetBitCount() +sal_uInt16 WinSalGraphics::GetBitCount() { - return (USHORT)GetDeviceCaps( mhDC, BITSPIXEL ); + return (sal_uInt16)GetDeviceCaps( mhDC, BITSPIXEL ); } // ----------------------------------------------------------------------- @@ -849,7 +849,7 @@ void WinSalGraphics::ResetClipRegion() // ----------------------------------------------------------------------- -void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount ) +void WinSalGraphics::BeginSetClipRegion( sal_uIntPtr nRectCount ) { if ( mhRegion ) { @@ -857,7 +857,7 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount ) mhRegion = 0; } - ULONG nRectBufSize = sizeof(RECT)*nRectCount; + sal_uIntPtr nRectBufSize = sizeof(RECT)*nRectCount; if ( nRectCount < SAL_CLIPRECT_COUNT ) { if ( !mpStdClipRgnData ) @@ -878,7 +878,7 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount ) // ----------------------------------------------------------------------- -BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) +sal_Bool WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight ) { if ( nWidth && nHeight ) { @@ -946,7 +946,7 @@ void WinSalGraphics::EndSetClipRegion() } else { - ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); + sal_uIntPtr nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData ); // if ExtCreateRegion(...) is not supported @@ -960,7 +960,7 @@ void WinSalGraphics::EndSetClipRegion() mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); pRect++; - for( ULONG n = 1; n < pHeader->nCount; n++, pRect++ ) + for( sal_uIntPtr n = 1; n < pHeader->nCount; n++, pRect++ ) { HRGN hRgn = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom ); CombineRgn( mhRegion, mhRegion, hRgn, RGN_OR ); @@ -1008,14 +1008,14 @@ void WinSalGraphics::SetLineColor( SalColor nSalColor ) SALCOLOR_GREEN( nSalColor ), SALCOLOR_BLUE( nSalColor ) ); HPEN hNewPen = 0; - BOOL bStockPen = FALSE; + sal_Bool bStockPen = FALSE; // search for stock pen (only screen, because printer have problems, // when we use stock objects) if ( !mbPrinter ) { SalData* pSalData = GetSalData(); - for ( USHORT i = 0; i < pSalData->mnStockPenCount; i++ ) + for ( sal_uInt16 i = 0; i < pSalData->mnStockPenCount; i++ ) { if ( nPenColor == pSalData->maStockPenColorAry[i] ) { @@ -1092,13 +1092,13 @@ void WinSalGraphics::SetFillColor( SalColor nSalColor ) BYTE nBlue = SALCOLOR_BLUE( nSalColor ); COLORREF nBrushColor = PALETTERGB( nRed, nGreen, nBlue ); HBRUSH hNewBrush = 0; - BOOL bStockBrush = FALSE; + sal_Bool bStockBrush = FALSE; // search for stock brush (only screen, because printer have problems, // when we use stock objects) if ( !mbPrinter ) { - for ( USHORT i = 0; i < pSalData->mnStockBrushCount; i++ ) + for ( sal_uInt16 i = 0; i < pSalData->mnStockBrushCount; i++ ) { if ( nBrushColor == pSalData->maStockBrushColorAry[ i ] ) { @@ -1318,7 +1318,7 @@ void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) // ----------------------------------------------------------------------- -void WinSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) +void WinSalGraphics::drawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry ) { // Unter NT koennen wir das Array direkt weiterreichen DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ), @@ -1333,7 +1333,7 @@ void WinSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) // ----------------------------------------------------------------------- -void WinSalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) +void WinSalGraphics::drawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry ) { // Unter NT koennen wir das Array direkt weiterreichen DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ), @@ -1421,7 +1421,7 @@ void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoint // ----------------------------------------------------------------------- -sal_Bool WinSalGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +sal_Bool WinSalGraphics::drawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) { #ifdef USE_GDI_BEZIERS // Unter NT koennen wir das Array direkt weiterreichen @@ -1438,7 +1438,7 @@ sal_Bool WinSalGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtA // ----------------------------------------------------------------------- -sal_Bool WinSalGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +sal_Bool WinSalGraphics::drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) { #ifdef USE_GDI_BEZIERS // Unter NT koennen wir das Array direkt weiterreichen @@ -1497,8 +1497,8 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ), "WinSalGraphics::DrawPolyPolygonBezier(): POINT != SalPoint" ); - ULONG nCurrPoly, nTotalPoints; - const ULONG* pCurrPoints = pPoints; + sal_uIntPtr nCurrPoly, nTotalPoints; + const sal_uIntPtr* pCurrPoints = pPoints; for( nCurrPoly=0, nTotalPoints=0; nCurrPoly<nPoly; ++nCurrPoly ) nTotalPoints += *pCurrPoints++; @@ -1550,11 +1550,11 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt #define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox // in the first 4096 bytes -static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ) +static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, sal_uIntPtr nComp, sal_uIntPtr nSize ) { while ( nComp-- >= nSize ) { - ULONG i; + sal_uIntPtr i; for ( i = 0; i < nSize; i++ ) { if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) @@ -1567,9 +1567,9 @@ static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSi return NULL; } -static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ) +static sal_Bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uIntPtr nSize ) { - BOOL bRetValue = FALSE; + sal_Bool bRetValue = FALSE; BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nSize, 14 ); if ( pDest ) { @@ -1584,9 +1584,9 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ) for ( i = 0; ( i < 4 ) && nSizeLeft; i++ ) { int nDivision = 1; - BOOL bDivision = FALSE; - BOOL bNegative = FALSE; - BOOL bValid = TRUE; + sal_Bool bDivision = FALSE; + sal_Bool bNegative = FALSE; + sal_Bool bValid = TRUE; while ( ( --nSizeLeft ) && ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) pDest++; BYTE nByte = *pDest; @@ -1629,9 +1629,9 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ) return bRetValue; } -BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) +sal_Bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ) { - BOOL bRetValue = FALSE; + sal_Bool bRetValue = FALSE; if ( mbPrinter ) { @@ -1645,7 +1645,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* { OStringBuffer aBuf( POSTSCRIPT_BUFSIZE ); - // reserve place for a USHORT + // reserve place for a sal_uInt16 aBuf.append( "aa" ); // #107797# Write out EPS encapsulation header @@ -1723,7 +1723,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* // #107797# Write out buffer // ---------------------------------------------------------------------------------- - *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 ); + *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 ); Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 ); @@ -1731,7 +1731,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* // ---------------------------------------------------------------------------------- double dM11 = nWidth / ( nBoundingBox[2] - nBoundingBox[0] ); double dM22 = nHeight / (nBoundingBox[1] - nBoundingBox[3] ); - // reserve a USHORT again + // reserve a sal_uInt16 again aBuf.setLength( 2 ); aBuf.append( "\n\n[" ); aBuf.append( dM11 ); @@ -1743,14 +1743,14 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* aBuf.append( nY - ( dM22 * nBoundingBox[3] ) ); aBuf.append( "] concat\n" "%%BeginDocument:\n" ); - *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 ); + *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 ); Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 ); // #107797# Write out actual EPS content // ---------------------------------------------------------------------------------- - ULONG nToDo = nSize; - ULONG nDoNow; + sal_uIntPtr nToDo = nSize; + sal_uIntPtr nDoNow; while ( nToDo ) { nDoNow = nToDo; @@ -1758,9 +1758,9 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* nDoNow = POSTSCRIPT_BUFSIZE - 2; // the following is based on the string buffer allocation // of size POSTSCRIPT_BUFSIZE at construction time of aBuf - *((USHORT*)aBuf.getStr()) = (USHORT)nDoNow; + *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)nDoNow; memcpy( (void*)(aBuf.getStr() + 2), (BYTE*)pPtr + nSize - nToDo, nDoNow ); - ULONG nResult = Escape ( mhDC, nEscape, nDoNow + 2, (LPTSTR)aBuf.getStr(), 0 ); + sal_uIntPtr nResult = Escape ( mhDC, nEscape, nDoNow + 2, (LPTSTR)aBuf.getStr(), 0 ); if (!nResult ) break; nToDo -= nResult; @@ -1769,13 +1769,13 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* // #107797# Write out EPS encapsulation footer // ---------------------------------------------------------------------------------- - // reserve a USHORT again + // reserve a sal_uInt16 again aBuf.setLength( 2 ); aBuf.append( "%%EndDocument\n" "count op_count_salWin sub {pop} repeat\n" "countdictstack dict_count_salWin sub {end} repeat\n" "b4_Inc_state_salWin restore\n\n" ); - *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 ); + *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 ); Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 ); bRetValue = TRUE; } diff --git a/vcl/win/source/gdi/salgdi2.cxx b/vcl/win/source/gdi/salgdi2.cxx index 803c0886f429..e10d3e1c2864 100644 --- a/vcl/win/source/gdi/salgdi2.cxx +++ b/vcl/win/source/gdi/salgdi2.cxx @@ -147,7 +147,7 @@ void ImplCalcOutSideRgn( const RECT& rSrcRect, void WinSalGraphics::copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - USHORT nFlags ) + sal_uInt16 nFlags ) { bool bRestoreClipRgn = false; HRGN hOldClipRgn = 0; @@ -344,14 +344,14 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY, void ImplDrawBitmap( HDC hDC, const SalTwoRect* pPosAry, const WinSalBitmap& rSalBitmap, - BOOL bPrinter, int nDrawMode ) + sal_Bool bPrinter, int nDrawMode ) { if( hDC ) { HGLOBAL hDrawDIB; HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB(); WinSalBitmap* pTmpSalBmp = NULL; - BOOL bPrintDDB = ( bPrinter && hDrawDDB ); + sal_Bool bPrintDDB = ( bPrinter && hDrawDDB ); if( bPrintDDB ) { @@ -385,7 +385,7 @@ void ImplDrawBitmap( HDC hDC, HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_DRAW, hDrawDDB ); COLORREF nOldBkColor = RGB(0xFF,0xFF,0xFF); COLORREF nOldTextColor = RGB(0,0,0); - BOOL bMono = ( rSalBitmap.GetBitCount() == 1 ); + sal_Bool bMono = ( rSalBitmap.GetBitCount() == 1 ); if( bMono ) { @@ -667,7 +667,7 @@ SalBitmap* WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) HDC hDC = mhDC; HBITMAP hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY ); HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_1, hBmpBitmap ); - BOOL bRet; + sal_Bool bRet; DWORD err = 0; bRet = BitBlt( hBmpDC, 0, 0, (int) nDX, (int) nDY, hDC, (int) nX, (int) nY, SRCCOPY ) ? TRUE : FALSE; @@ -754,7 +754,7 @@ void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv // ----------------------------------------------------------------------- -void WinSalGraphics::invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nSalFlags ) +void WinSalGraphics::invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nSalFlags ) { HPEN hPen; HPEN hOldPen; diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index d1b5a9cfdeae..ada39acae35b 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -128,7 +128,7 @@ private: FontAttrMap aFontAttributes; rtl::OUString aCacheFileName; String aBaseURL; - BOOL bModified; + sal_Bool bModified; protected: String OptimizeURL( const String& rURL ) const; @@ -644,7 +644,7 @@ static CharSet ImplCharSetToSal( BYTE nCharSet ) if ( nCharSet == OEM_CHARSET ) { - UINT nCP = (USHORT)GetOEMCP(); + UINT nCP = (sal_uInt16)GetOEMCP(); switch ( nCP ) { // It is unclear why these two (undefined?) code page numbers are @@ -1093,7 +1093,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ) // ======================================================================= ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS, - int nHeight, WIN_BYTE eWinCharSet, WIN_BYTE nPitchAndFamily ) + int nHeight, BYTE eWinCharSet, BYTE nPitchAndFamily ) : ImplFontData( rDFS, 0 ), meWinCharSet( eWinCharSet ), mnPitchAndFamily( nPitchAndFamily ), @@ -1686,7 +1686,7 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont return hNewFont; } -USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel ) +sal_uInt16 WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel ) { // return early if there is no new font if( !pFont ) @@ -1880,12 +1880,12 @@ static void ImplGetAllFontCharSets( WinSalGraphics* pData ) static void ImplAddKerningPairs( WinSalGraphics* pData ) { - ULONG nPairs = ::GetKerningPairsA( pData->mhDC, 0, NULL ); + sal_uIntPtr nPairs = ::GetKerningPairsA( pData->mhDC, 0, NULL ); if ( !nPairs ) return; CHARSETINFO aInfo; - if ( !TranslateCharsetInfo( (DWORD*)(ULONG)GetTextCharset( pData->mhDC ), &aInfo, TCI_SRCCHARSET ) ) + if ( !TranslateCharsetInfo( (DWORD*)(sal_uIntPtr)GetTextCharset( pData->mhDC ), &aInfo, TCI_SRCCHARSET ) ) return; if ( !pData->mpFontKernPairs ) @@ -1900,15 +1900,15 @@ static void ImplAddKerningPairs( WinSalGraphics* pData ) } UINT nCP = aInfo.ciACP; - ULONG nOldPairs = pData->mnFontKernPairCount; + sal_uIntPtr nOldPairs = pData->mnFontKernPairCount; KERNINGPAIR* pTempPair = pData->mpFontKernPairs+pData->mnFontKernPairCount; nPairs = ::GetKerningPairsA( pData->mhDC, nPairs, pTempPair ); - for ( ULONG i = 0; i < nPairs; i++ ) + for ( sal_uIntPtr i = 0; i < nPairs; i++ ) { unsigned char aBuf[2]; wchar_t nChar; int nLen; - BOOL bAdd = TRUE; + sal_Bool bAdd = TRUE; // None-ASCII?, then we must convert the char if ( (pTempPair->wFirst > 125) || (pTempPair->wFirst == 92) ) @@ -1952,7 +1952,7 @@ static void ImplAddKerningPairs( WinSalGraphics* pData ) // TODO: get rid of linear search! KERNINGPAIR* pTempPair2 = pData->mpFontKernPairs; - for ( ULONG j = 0; j < nOldPairs; j++ ) + for ( sal_uIntPtr j = 0; j < nOldPairs; j++ ) { if ( (pTempPair2->wFirst == pTempPair->wFirst) && (pTempPair2->wSecond == pTempPair->wSecond) ) @@ -1977,7 +1977,7 @@ static void ImplAddKerningPairs( WinSalGraphics* pData ) // ----------------------------------------------------------------------- -ULONG WinSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ) +sal_uIntPtr WinSalGraphics::GetKernPairs( sal_uIntPtr nPairs, ImplKernPairData* pKernPairs ) { DBG_ASSERT( sizeof( KERNINGPAIR ) == sizeof( ImplKernPairData ), "WinSalGraphics::GetKernPairs(): KERNINGPAIR != ImplKernPairData" ); @@ -2442,8 +2442,8 @@ bool WinSalGraphics::AddTempDevFont( ImplDevFontList* pFontList, */ ImplWinFontData* pFontData = new ImplWinFontData( aDFA, 0, - sal::static_int_cast<WIN_BYTE>(nPreferedCharSet), - sal::static_int_cast<WIN_BYTE>(TMPF_VECTOR|TMPF_TRUETYPE) ); + sal::static_int_cast<BYTE>(nPreferedCharSet), + sal::static_int_cast<BYTE>(TMPF_VECTOR|TMPF_TRUETYPE) ); pFontData->SetFontId( reinterpret_cast<sal_IntPtr>(pFontData) ); pFontList->Add( pFontData ); return true; @@ -2566,7 +2566,7 @@ void WinSalGraphics::GetDevFontSubstList( OutputDevice* ) // ----------------------------------------------------------------------- -BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect ) +sal_Bool WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect ) { HDC hDC = mhDC; @@ -2603,12 +2603,12 @@ BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect ) // ----------------------------------------------------------------------- -BOOL WinSalGraphics::GetGlyphOutline( long nIndex, +sal_Bool WinSalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) { rB2DPolyPoly.clear(); - BOOL bRet = FALSE; + sal_Bool bRet = FALSE; HDC hDC = mhDC; // use unity matrix @@ -2658,7 +2658,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex, // get start point; next start points are end points // of previous segment - USHORT nPnt = 0; + sal_uInt16 nPnt = 0; long nX = IntTimes256FromFixed( pHeader->pfxStart.x ); long nY = IntTimes256FromFixed( pHeader->pfxStart.y ); @@ -2678,7 +2678,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex, nPtSize = 2 * nNeededSize; pPoints = new Point[ nPtSize ]; pFlags = new BYTE[ nPtSize ]; - for( USHORT i = 0; i < nPnt; ++i ) + for( sal_uInt16 i = 0; i < nPnt; ++i ) { pPoints[ i ] = pOldPoints[ i ]; pFlags[ i ] = pOldFlags[ i ]; @@ -2857,7 +2857,7 @@ int ScopedTrueTypeFont::open(void * pBuffer, sal_uInt32 nLen, return OpenTTFontBuffer(pBuffer, nLen, nFaceNum, &m_pFont); } -BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, +sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData* pFont, long* pGlyphIDs, sal_uInt8* pEncoding, sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo ) { @@ -2950,7 +2950,7 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, // subset TTF-glyphs and get their properties // take care that subset fonts require the NotDef glyph in pos 0 int nOrigCount = nGlyphCount; - USHORT aShortIDs[ 256 ]; + sal_uInt16 aShortIDs[ 256 ]; sal_uInt8 aTempEncs[ 256 ]; int nNotDef=-1, i; @@ -2970,7 +2970,7 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, nGlyphIdx = ::MapChar( aSftTTF.get(), cChar, bVertical ); } } - aShortIDs[i] = static_cast<USHORT>( nGlyphIdx ); + aShortIDs[i] = static_cast<sal_uInt16>( nGlyphIdx ); if( !nGlyphIdx ) if( nNotDef < 0 ) nNotDef = i; // first NotDef glyph found @@ -3041,7 +3041,7 @@ const void* WinSalGraphics::GetEmbedFontData( const ImplFontData* pFont, nFNLen--; if( nFNLen == 0 ) *pDataLen = 0; - rInfo.m_aPSName = String( reinterpret_cast<const sal_Unicode*>(aFaceName), sal::static_int_cast<USHORT>(nFNLen) ); + rInfo.m_aPSName = String( reinterpret_cast<const sal_Unicode*>(aFaceName), sal::static_int_cast<sal_uInt16>(nFNLen) ); rInfo.m_nAscent = +aTm.tmAscent; rInfo.m_nDescent = -aTm.tmDescent; rInfo.m_aFontBBox = Rectangle( Point( -aTm.tmOverhang, -aTm.tmDescent ), diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index be5d7f8360bc..f5634fc64380 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -78,7 +78,7 @@ private: public: VisualStylesAPI(); ~VisualStylesAPI(); - BOOL IsAvailable() { return (mhModule != NULL); } + sal_Bool IsAvailable() { return (mhModule != NULL); } HTHEME OpenThemeData( HWND hwnd, LPCWSTR pszClassList ); HRESULT CloseThemeData( HTHEME hTheme ); @@ -215,7 +215,7 @@ static HTHEME getThemeHandle( HWND hWnd, LPCWSTR name ) * Returns TRUE if the platform supports native * drawing of the control defined by nPart */ -BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) +sal_Bool WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) { HTHEME hTheme = NULL; @@ -315,16 +315,16 @@ BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP * aPos was or was not inside the native widget specified by the * nType/nPart combination. */ -BOOL WinSalGraphics::hitTestNativeControl( ControlType, +sal_Bool WinSalGraphics::hitTestNativeControl( ControlType, ControlPart, const Region&, const Point&, - BOOL& ) + sal_Bool& ) { return FALSE; } -BOOL ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr) +sal_Bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr) { HRESULT hr = vsAPI.DrawThemeBackground( hTheme, hDC, iPart, iState, &rc, 0); @@ -419,7 +419,7 @@ void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState, // ---- -BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, +sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, ControlType nType, ControlPart nPart, ControlState nState, @@ -556,7 +556,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, SpinbuttonValue *pValue = (SpinbuttonValue*) aValue.getOptionalVal(); if( pValue ) { - BOOL bOk = FALSE; + sal_Bool bOk = FALSE; RECT rect; ImplConvertSpinbuttonValues( pValue->mnUpperPart, pValue->mnUpperState, pValue->maUpperRect, &iPart, &iState, &rect ); @@ -581,7 +581,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, SpinbuttonValue *pValue = (SpinbuttonValue*) aValue.getOptionalVal(); if( pValue ) { - BOOL bOk = FALSE; + sal_Bool bOk = FALSE; RECT rect; ImplConvertSpinbuttonValues( pValue->mnUpperPart, pValue->mnUpperState, pValue->maUpperRect, &iPart, &iState, &rect ); @@ -686,7 +686,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nType == CTRL_RADIOBUTTON ) { iPart = BP_RADIOBUTTON; - BOOL bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON ); + sal_Bool bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON ); if( nState & CTRL_STATE_PRESSED ) iState = bChecked ? RBS_CHECKEDPRESSED : RBS_UNCHECKEDPRESSED; @@ -833,7 +833,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nPart == PART_BUTTON ) { iPart = TP_BUTTON; - BOOL bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON ); + sal_Bool bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON ); if( !(nState & CTRL_STATE_ENABLED) ) //iState = TS_DISABLED; // disabled buttons are typically not painted at all but we need visual @@ -961,14 +961,14 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -BOOL WinSalGraphics::drawNativeControl( ControlType nType, +sal_Bool WinSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ) { - BOOL bOk = false; + sal_Bool bOk = false; HTHEME hTheme = NULL; switch( nType ) @@ -1078,7 +1078,7 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -BOOL WinSalGraphics::drawNativeControlText( ControlType, +sal_Bool WinSalGraphics::drawNativeControlText( ControlType, ControlPart, const Region&, ControlState, @@ -1102,7 +1102,7 @@ BOOL WinSalGraphics::drawNativeControlText( ControlType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -BOOL WinSalGraphics::getNativeControlRegion( ControlType nType, +sal_Bool WinSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, @@ -1111,7 +1111,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType, Region &rNativeBoundingRegion, Region &rNativeContentRegion ) { - BOOL bRet = FALSE; + sal_Bool bRet = FALSE; HDC hDC = GetDC( mhWnd ); if( nType == CTRL_TOOLBAR ) diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 9d8d41723f64..8d8af1bb245f 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -128,9 +128,9 @@ static LPDEVMODEW SAL_DEVMODE_W( const ImplJobSetup* pSetupData ) // ======================================================================= -static ULONG ImplWinQueueStatusToSal( DWORD nWinStatus ) +static sal_uIntPtr ImplWinQueueStatusToSal( DWORD nWinStatus ) { - ULONG nStatus = 0; + sal_uIntPtr nStatus = 0; if ( nWinStatus & PRINTER_STATUS_PAUSED ) nStatus |= QUEUE_STATUS_PAUSED; if ( nWinStatus & PRINTER_STATUS_ERROR ) @@ -192,7 +192,7 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList ) DWORD n; DWORD nBytes = 0; DWORD nInfoPrn2; - BOOL bFound = FALSE; + sal_Bool bFound = FALSE; PRINTER_INFO_2* pWinInfo2 = NULL; PRINTER_INFO_2* pGetInfo2; EnumPrintersA( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &nBytes, &nInfoPrn2 ); @@ -262,7 +262,7 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList ) pTmp = pPortName; while ( *pTmp != ',' ) pTmp++; - XubString aDriver( ImplSalGetUniString( pPortName, (USHORT)(pTmp-pPortName) ) ); + XubString aDriver( ImplSalGetUniString( pPortName, (sal_uInt16)(pTmp-pPortName) ) ); pPortName = pTmp; // get port names @@ -273,11 +273,11 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList ) while ( *pTmp && (*pTmp != ',') ) pTmp++; - String aPortName( ImplSalGetUniString( pPortName, (USHORT)(pTmp-pPortName) ) ); + String aPortName( ImplSalGetUniString( pPortName, (sal_uInt16)(pTmp-pPortName) ) ); // create new entry // look up if printer was already found in first loop - BOOL bAdd = TRUE; + sal_Bool bAdd = TRUE; if ( pWinInfo2 ) { pGetInfo2 = pWinInfo2; @@ -446,7 +446,7 @@ void WinSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) XubString WinSalInstance::GetDefaultPrinter() { static bool bGetDefPrtAPI = true; - static BOOL(WINAPI*pGetDefaultPrinter)(LPWSTR,LPDWORD) = NULL; + static sal_Bool(WINAPI*pGetDefaultPrinter)(LPWSTR,LPDWORD) = NULL; // try to use GetDefaultPrinter API (not available prior to W2000) if( bGetDefPrtAPI ) { @@ -463,7 +463,7 @@ XubString WinSalInstance::GetDefaultPrinter() pFunc = osl_getFunctionSymbol( pLib, queryFuncName.pData ); } - pGetDefaultPrinter = (BOOL(WINAPI*)(LPWSTR,LPDWORD)) pFunc; + pGetDefaultPrinter = (sal_Bool(WINAPI*)(LPWSTR,LPDWORD)) pFunc; } } if( pGetDefaultPrinter ) @@ -533,8 +533,8 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps, // ----------------------------------------------------------------------- -static BOOL ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, - ImplJobSetup* pSetupData, BOOL bDelete ) +static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, + ImplJobSetup* pSetupData, sal_Bool bDelete ) { if ( pSetupData && pSetupData->mpDriverData ) { @@ -658,8 +658,8 @@ static BOOL ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, // ----------------------------------------------------------------------- -static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, - BOOL bIn, WinSalFrame* pVisibleDlgParent ) +static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, + sal_Bool bIn, WinSalFrame* pVisibleDlgParent ) { ByteString aPrinterNameA = ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE ); HANDLE hPrn; @@ -682,7 +682,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS LONG nSysJobSize = -1; HWND hWnd = 0; DWORD nMode = DM_OUT_BUFFER; - ULONG nDriverDataLen = 0; + sal_uIntPtr nDriverDataLen = 0; SalDriverData* pOutBuffer = NULL; BYTE* pInBuffer = NULL; @@ -708,7 +708,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS pOutBuffer->mnSysSignature = SAL_DRIVERDATA_SYSSIGN; pOutBuffer->mnVersion = aSalShlData.mbWPrinter ? SAL_DRIVERDATA_VERSION_W : SAL_DRIVERDATA_VERSION_A; // calculate driver data offset including structure padding - pOutBuffer->mnDriverOffset = sal::static_int_cast<USHORT>( + pOutBuffer->mnDriverOffset = sal::static_int_cast<sal_uInt16>( (char*)pOutBuffer->maDriverData - (char*)pOutBuffer ); @@ -727,7 +727,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS } // Release mutex, in the other case we don't get paints and so on - ULONG nMutexCount=0; + sal_uIntPtr nMutexCount=0; if ( pVisibleDlgParent ) nMutexCount = ImplSalReleaseYieldMutex(); @@ -807,7 +807,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS #define CHOOSE_DEVMODE(i)\ (pDevModeW ? pDevModeW->i : pDevModeA->i) -static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, ULONG nFlags ) +static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, sal_uIntPtr nFlags ) { if ( !pSetupData || !pSetupData->mpDriverData ) return; @@ -826,7 +826,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS // PaperBin if ( nFlags & SAL_JOBSET_PAPERBIN ) { - ULONG nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData ); + sal_uIntPtr nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData ); if ( nCount && (nCount != GDI_ERROR) ) { @@ -835,11 +835,11 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS pSetupData->mnPaperBin = 0; // search the right bin and assign index to mnPaperBin - for( ULONG i = 0; i < nCount; i++ ) + for( sal_uIntPtr i = 0; i < nCount; i++ ) { if( CHOOSE_DEVMODE(dmDefaultSource) == pBins[ i ] ) { - pSetupData->mnPaperBin = (USHORT)i; + pSetupData->mnPaperBin = (sal_uInt16)i; break; } } @@ -858,9 +858,9 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS } else { - ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData ); + sal_uIntPtr nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData ); WORD* pPapers = NULL; - ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData ); + sal_uIntPtr nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData ); POINT* pPaperSizes = NULL; if ( nPaperCount && (nPaperCount != GDI_ERROR) ) { @@ -874,7 +874,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS } if( nPaperSizeCount == nPaperCount && pPaperSizes && pPapers ) { - for( ULONG i = 0; i < nPaperCount; i++ ) + for( sal_uIntPtr i = 0; i < nPaperCount; i++ ) { if( pPapers[ i ] == CHOOSE_DEVMODE(dmPaperSize) ) { @@ -1075,7 +1075,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS // ----------------------------------------------------------------------- -static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, ULONG nFlags ) +static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, sal_uIntPtr nFlags ) { if ( !pSetupData || !pSetupData->mpDriverData ) return; @@ -1095,7 +1095,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS // PaperBin if ( nFlags & SAL_JOBSET_PAPERBIN ) { - ULONG nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData ); + sal_uIntPtr nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData ); if ( nCount && (nCount != GDI_ERROR) ) { @@ -1273,9 +1273,9 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS default: { short nPaper = 0; - ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData ); + sal_uIntPtr nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData ); WORD* pPapers = NULL; - ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData ); + sal_uIntPtr nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData ); POINT* pPaperSizes = NULL; DWORD nLandscapeAngle = ImplDeviceCaps( pPrinter, DC_ORIENTATION, NULL, pSetupData ); if ( nPaperCount && (nPaperCount != GDI_ERROR) ) @@ -1292,7 +1292,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS { PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight); // compare paper formats and select a good match - for ( ULONG i = 0; i < nPaperCount; i++ ) + for ( sal_uIntPtr i = 0; i < nPaperCount; i++ ) { if ( aInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10))) { @@ -1307,7 +1307,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS if ( !nPaper && nLandscapeAngle != 0 ) { PaperInfo aRotatedInfo(pSetupData->mnPaperHeight, pSetupData->mnPaperWidth); - for ( ULONG i = 0; i < nPaperCount; i++ ) + for ( sal_uIntPtr i = 0; i < nPaperCount; i++ ) { if ( aRotatedInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10)) ) { @@ -1463,7 +1463,7 @@ static WinSalGraphics* ImplCreateSalPrnGraphics( HDC hDC ) // ----------------------------------------------------------------------- -static BOOL ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData ) +static sal_Bool ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData ) { HDC hNewDC = ImplCreateSalPrnIC( pPrinter, pSetupData ); if ( !hNewDC ) @@ -1623,7 +1623,7 @@ void WinSalInfoPrinter::ReleaseGraphics( SalGraphics* ) // ----------------------------------------------------------------------- -BOOL WinSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) +sal_Bool WinSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) { if ( ImplUpdateSalJobSetup( this, pSetupData, TRUE, static_cast<WinSalFrame*>(pFrame) ) ) { @@ -1636,7 +1636,7 @@ BOOL WinSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) // ----------------------------------------------------------------------- -BOOL WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData ) +sal_Bool WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData ) { if ( !ImplTestSalJobSetup( this, pSetupData, FALSE ) ) return FALSE; @@ -1645,7 +1645,7 @@ BOOL WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData ) // ----------------------------------------------------------------------- -BOOL WinSalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData ) +sal_Bool WinSalInfoPrinter::SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ) { ImplJobSetupToDevMode( this, pSetupData, nFlags ); if ( ImplUpdateSalJobSetup( this, pSetupData, TRUE, NULL ) ) @@ -1659,7 +1659,7 @@ BOOL WinSalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData ) // ----------------------------------------------------------------------- -ULONG WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData ) +sal_uIntPtr WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData ) { DWORD nRet = ImplDeviceCaps( this, DC_BINS, NULL, pSetupData ); if ( nRet && (nRet != GDI_ERROR) ) @@ -1670,7 +1670,7 @@ ULONG WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData ) // ----------------------------------------------------------------------- -XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) +XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ) { XubString aPaperBinName; @@ -1700,7 +1700,7 @@ XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, UL // ----------------------------------------------------------------------- -ULONG WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) +sal_uIntPtr WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) { DWORD nRet; @@ -1785,11 +1785,11 @@ void WinSalInstance::DestroyPrinter( SalPrinter* pPrinter ) // ======================================================================= -WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) +BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) { SalData* pSalData = GetSalData(); WinSalPrinter* pPrinter; - BOOL bWhile = TRUE; + sal_Bool bWhile = TRUE; int i = 0; do @@ -1826,19 +1826,19 @@ WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) // ----------------------------------------------------------------------- -static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCollate ) +static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, sal_uIntPtr nCopies, sal_Bool bCollate ) { LPDEVMODEA pNewDevMode = pDevMode; if ( pDevMode && (nCopies > 1) ) { if ( nCopies > 32765 ) nCopies = 32765; - ULONG nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra; + sal_uIntPtr nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra; pNewDevMode = (LPDEVMODEA)rtl_allocateMemory( nDevSize ); memcpy( pNewDevMode, pDevMode, nDevSize ); pDevMode = pNewDevMode; pDevMode->dmFields |= DM_COPIES; - pDevMode->dmCopies = (short)(USHORT)nCopies; + pDevMode->dmCopies = (short)(sal_uInt16)nCopies; if ( aSalShlData.mbW40 ) { pDevMode->dmFields |= DM_COLLATE; @@ -1852,19 +1852,19 @@ static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCo return pNewDevMode; } -static LPDEVMODEW ImplSalSetCopies( LPDEVMODEW pDevMode, ULONG nCopies, BOOL bCollate ) +static LPDEVMODEW ImplSalSetCopies( LPDEVMODEW pDevMode, sal_uIntPtr nCopies, sal_Bool bCollate ) { LPDEVMODEW pNewDevMode = pDevMode; if ( pDevMode && (nCopies > 1) ) { if ( nCopies > 32765 ) nCopies = 32765; - ULONG nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra; + sal_uIntPtr nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra; pNewDevMode = (LPDEVMODEW)rtl_allocateMemory( nDevSize ); memcpy( pNewDevMode, pDevMode, nDevSize ); pDevMode = pNewDevMode; pDevMode->dmFields |= DM_COPIES; - pDevMode->dmCopies = (short)(USHORT)nCopies; + pDevMode->dmCopies = (short)(sal_uInt16)nCopies; if ( aSalShlData.mbW40 ) { pDevMode->dmFields |= DM_COLLATE; @@ -1960,10 +1960,10 @@ static int lcl_StartDocA( HDC hDC, DOCINFOA* pInfo, WinSalPrinter* pPrt ) return nRet; } -BOOL WinSalPrinter::StartJob( const XubString* pFileName, +sal_Bool WinSalPrinter::StartJob( const XubString* pFileName, const XubString& rJobName, const XubString&, - ULONG nCopies, + sal_uIntPtr nCopies, bool bCollate, bool /*bDirect*/, ImplJobSetup* pSetupData ) @@ -2052,7 +2052,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName, // Wegen Telocom Balloon Fax-Treiber, der uns unsere Messages // ansonsten oefters schickt, versuchen wir vorher alle // zu verarbeiten und dann eine Dummy-Message reinstellen - BOOL bWhile = TRUE; + sal_Bool bWhile = TRUE; int i = 0; do { @@ -2180,7 +2180,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName, // ----------------------------------------------------------------------- -BOOL WinSalPrinter::EndJob() +sal_Bool WinSalPrinter::EndJob() { DWORD err = 0; HDC hDC = mhDC; @@ -2200,7 +2200,7 @@ BOOL WinSalPrinter::EndJob() // call, however the real solution is supposed to be the threading // framework yet to come. SalData* pSalData = GetSalData(); - ULONG nAcquire = pSalData->mpFirstInstance->ReleaseYieldMutex(); + sal_uIntPtr nAcquire = pSalData->mpFirstInstance->ReleaseYieldMutex(); CATCH_DRIVER_EX_BEGIN; if( ::EndDoc( hDC ) <= 0 ) err = GetLastError(); @@ -2216,7 +2216,7 @@ BOOL WinSalPrinter::EndJob() // ----------------------------------------------------------------------- -BOOL WinSalPrinter::AbortJob() +sal_Bool WinSalPrinter::AbortJob() { mbAbort = TRUE; @@ -2273,7 +2273,7 @@ void ImplSalPrinterAbortJobAsync( HDC hPrnDC ) // ----------------------------------------------------------------------- -SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) +SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ) { if( ! isValid() || mhDC == 0 ) return NULL; @@ -2328,7 +2328,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat // ----------------------------------------------------------------------- -BOOL WinSalPrinter::EndPage() +sal_Bool WinSalPrinter::EndPage() { HDC hDC = mhDC; if ( hDC && mpGraphics ) @@ -2358,7 +2358,7 @@ BOOL WinSalPrinter::EndPage() // ----------------------------------------------------------------------- -ULONG WinSalPrinter::GetErrorCode() +sal_uIntPtr WinSalPrinter::GetErrorCode() { return mnError; } diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx index 816a8fef1141..3a6e89059a69 100644 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -38,7 +38,7 @@ // ======================================================================= static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY, - USHORT nBitCount ) + sal_uInt16 nBitCount ) { HBITMAP hBitmap; @@ -78,14 +78,14 @@ static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY, SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, long nDX, long nDY, - USHORT nBitCount, + sal_uInt16 nBitCount, const SystemGraphicsData* pData ) { WinSalGraphics* pGraphics = static_cast<WinSalGraphics*>(pSGraphics); HDC hDC = NULL; HBITMAP hBmp = NULL; - BOOL bOk = FALSE; + sal_Bool bOk = FALSE; if( pData ) { @@ -226,7 +226,7 @@ void WinSalVirtualDevice::ReleaseGraphics( SalGraphics* ) // ----------------------------------------------------------------------- -BOOL WinSalVirtualDevice::SetSize( long nDX, long nDY ) +sal_Bool WinSalVirtualDevice::SetSize( long nDX, long nDY ) { if( mbForeignDC || !mhBmp ) return TRUE; // ??? diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index ba19f2255646..1737d12de1b0 100644..100755 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1250,7 +1250,7 @@ static bool InitUSP() DWORD nHandle; DWORD nBufSize = ::GetFileVersionInfoSizeW( const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(pModuleFileCStr)), &nHandle ); char* pBuffer = (char*)alloca( nBufSize ); - WIN_BOOL bRC = ::GetFileVersionInfoW( const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(pModuleFileCStr)), nHandle, nBufSize, pBuffer ); + BOOL bRC = ::GetFileVersionInfoW( const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(pModuleFileCStr)), nHandle, nBufSize, pBuffer ); VS_FIXEDFILEINFO* pFixedFileInfo = NULL; UINT nFixedFileSize = 0; if( bRC ) diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx index eb53fb4d8699..68a37cf8186f 100644 --- a/vcl/win/source/gdi/wntgdi.cxx +++ b/vcl/win/source/gdi/wntgdi.cxx @@ -40,7 +40,7 @@ extern "C" { -BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ) +sal_Bool WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ) { return Rectangle( hDC, X1, Y1, X2, Y2 ); } @@ -50,7 +50,7 @@ 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 ) +sal_Bool WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ) { return Polygon( hDC, ppt, ncnt ); } @@ -60,7 +60,7 @@ 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 ) +sal_Bool WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ) { return PolyPolygon( hDC, ppt, npcnt, ncnt ); } diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 7314fd2b6164..6fecfdf398b3 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -128,8 +128,8 @@ void MyOutputDebugString( char *s) { OutputDebugString( s ); } // misssing prototypes and constants for LayeredWindows extern "C" { - //WINUSERAPI BOOL WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD); - typedef BOOL ( WINAPI * SetLayeredWindowAttributes_Proc_T ) (HWND,COLORREF,BYTE,DWORD); + //WINUSERAPI sal_Bool WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD); + typedef sal_Bool ( WINAPI * SetLayeredWindowAttributes_Proc_T ) (HWND,COLORREF,BYTE,DWORD); static SetLayeredWindowAttributes_Proc_T lpfnSetLayeredWindowAttributes; }; @@ -137,7 +137,7 @@ extern "C" { const unsigned int WM_USER_SYSTEM_WINDOW_ACTIVATED = RegisterWindowMessageA("SYSTEM_WINDOW_ACTIVATED"); -BOOL WinSalFrame::mbInReparent = FALSE; +sal_Bool WinSalFrame::mbInReparent = FALSE; // ======================================================================= @@ -168,7 +168,7 @@ static void ImplSaveFrameState( WinSalFrame* pFrame ) // Position, Groesse und Status fuer GetWindowState() merken if ( !pFrame->mbFullScreen ) { - BOOL bVisible = (GetWindowStyle( pFrame->mhWnd ) & WS_VISIBLE) != 0; + sal_Bool bVisible = (GetWindowStyle( pFrame->mhWnd ) & WS_VISIBLE) != 0; if ( IsIconic( pFrame->mhWnd ) ) { pFrame->maState.mnState |= SAL_FRAMESTATE_MINIMIZED; @@ -333,13 +333,13 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect ) // ======================================================================= SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, - HWND hWndParent, ULONG nSalFrameStyle ) + HWND hWndParent, sal_uIntPtr nSalFrameStyle ) { WinSalFrame* pFrame = new WinSalFrame; HWND hWnd; DWORD nSysStyle = 0; DWORD nExSysStyle = 0; - BOOL bSubFrame = FALSE; + sal_Bool bSubFrame = FALSE; if( getenv( "SAL_SYNCHRONIZE" ) ) // no buffering of drawing commands GdiSetBatchLimit( 1 ); @@ -586,11 +586,11 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, // helper that only creates the HWND // to allow for easy reparenting of system windows, (i.e. destroy and create new) -HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild ) +HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild ) { HINSTANCE hInstance = GetSalData()->mhInst; - ULONG nSysStyle = GetWindowLong( oldhWnd, GWL_STYLE ); - ULONG nExSysStyle = GetWindowLong( oldhWnd, GWL_EXSTYLE ); + sal_uIntPtr nSysStyle = GetWindowLong( oldhWnd, GWL_STYLE ); + sal_uIntPtr nExSysStyle = GetWindowLong( oldhWnd, GWL_EXSTYLE ); if( bAsChild ) { @@ -621,7 +621,7 @@ HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild ) // Uebersetzungstabelle von System-Keycodes in StarView-Keycodes #define KEY_TAB_SIZE 146 -static USHORT aImplTranslateKeyTab[KEY_TAB_SIZE] = +static sal_uInt16 aImplTranslateKeyTab[KEY_TAB_SIZE] = { // StarView-Code System-Code Index 0, // 0 @@ -918,7 +918,7 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame, // ----------------------------------------------------------------------- -static void ImplSalFrameFullScreenPos( WinSalFrame* pFrame, BOOL bAlways = FALSE ) +static void ImplSalFrameFullScreenPos( WinSalFrame* pFrame, sal_Bool bAlways = FALSE ) { if ( bAlways || !IsIconic( pFrame->mhWnd ) ) { @@ -1182,9 +1182,9 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics ) // ----------------------------------------------------------------------- -BOOL WinSalFrame::PostEvent( void* pData ) +sal_Bool WinSalFrame::PostEvent( void* pData ) { - return (BOOL)ImplPostMessage( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData ); + return (sal_Bool)ImplPostMessage( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData ); } // ----------------------------------------------------------------------- @@ -1202,7 +1202,7 @@ void WinSalFrame::SetTitle( const XubString& rTitle ) // ----------------------------------------------------------------------- -void WinSalFrame::SetIcon( USHORT nIcon ) +void WinSalFrame::SetIcon( sal_uInt16 nIcon ) { // If we have a window without an Icon (for example a dialog), ignore this call if ( mbNoIcon ) @@ -1259,7 +1259,7 @@ SalFrame* WinSalFrame::GetParent() const // ----------------------------------------------------------------------- -static void ImplSalShow( HWND hWnd, BOOL bVisible, BOOL bNoActivate ) +static void ImplSalShow( HWND hWnd, sal_Bool bVisible, sal_Bool bNoActivate ) { WinSalFrame* pFrame = GetWindowPtr( hWnd ); if ( !pFrame ) @@ -1374,7 +1374,7 @@ void WinSalFrame::SetExtendedFrameStyle( SalExtStyle ) // ----------------------------------------------------------------------- -void WinSalFrame::Show( BOOL bVisible, BOOL bNoActivate ) +void WinSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate ) { // Post this Message to the window, because this only works // in the thread of the window, which has create this window. @@ -1387,7 +1387,7 @@ void WinSalFrame::Show( BOOL bVisible, BOOL bNoActivate ) // ----------------------------------------------------------------------- -void WinSalFrame::Enable( BOOL bEnable ) +void WinSalFrame::Enable( sal_Bool bEnable ) { EnableWindow( mhWnd, bEnable ); } @@ -1409,9 +1409,9 @@ void WinSalFrame::SetMaxClientSize( long nWidth, long nHeight ) // ----------------------------------------------------------------------- void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, - USHORT nFlags ) + sal_uInt16 nFlags ) { - BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; + sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; if ( !bVisible ) { Window *pClientWin = GetWindow()->ImplGetClientWindow(); @@ -1426,7 +1426,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, ShowWindow( mhWnd, SW_RESTORE ); } - USHORT nEvent = 0; + sal_uInt16 nEvent = 0; UINT nPosSize = 0; RECT aClientRect, aWindowRect; GetClientRect( mhWnd, &aClientRect ); // x,y always 0,0, but width and height without border @@ -1578,7 +1578,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, // Adjust Window in the screen - BOOL bCheckOffScreen = TRUE; + sal_Bool bCheckOffScreen = TRUE; // but don't do this for floaters or ownerdraw windows that are currently moved interactively if( (mnStyle & SAL_FRAME_STYLE_FLOAT) && !(mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) @@ -1621,7 +1621,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, // ----------------------------------------------------------------------- -static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, BOOL bAsChild ) +static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, sal_Bool bAsChild ) { // save hwnd, will be overwritten in WM_CREATE during createwindow HWND hWndOld = pThis->mhWnd; @@ -1654,8 +1654,8 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, BOOL bAs pObject = pObject->mpNextObject; } - BOOL bNeedGraphics = pThis->mbGraphics; - BOOL bNeedCacheDC = FALSE; + sal_Bool bNeedGraphics = pThis->mbGraphics; + sal_Bool bNeedCacheDC = FALSE; HFONT hFont = NULL; HPEN hPen = NULL; @@ -1895,8 +1895,8 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState ) GetWindowPlacement( mhWnd, &aPlacement ); // Status setzen - BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; - BOOL bUpdateHiddenFramePos = FALSE; + sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; + sal_Bool bUpdateHiddenFramePos = FALSE; if ( !bVisible ) { aPlacement.showCmd = SW_HIDE; @@ -1969,7 +1969,7 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState ) // ----------------------------------------------------------------------- -BOOL WinSalFrame::GetWindowState( SalFrameState* pState ) +sal_Bool WinSalFrame::GetWindowState( SalFrameState* pState ) { if ( maState.mnWidth && maState.mnHeight ) { @@ -2019,7 +2019,7 @@ void WinSalFrame::SetScreenNumber( unsigned int nNewScreen ) // ----------------------------------------------------------------------- -void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) +void WinSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) { if ( (mbFullScreen == bFullScreen) && (!bFullScreen || (mnDisplay == nDisplay)) ) return; @@ -2052,7 +2052,7 @@ void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) { // wenn ShowState wieder hergestellt werden muss, hiden wir zuerst // das Fenster, damit es nicht so sehr flackert - BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; + sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; if ( bVisible && (mnShowState != mnFullScreenShowState) ) ShowWindow( mhWnd, SW_HIDE ); @@ -2084,7 +2084,7 @@ void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) // ----------------------------------------------------------------------- -void WinSalFrame::StartPresentation( BOOL bStart ) +void WinSalFrame::StartPresentation( sal_Bool bStart ) { if ( mbPresentation == bStart ) return; @@ -2139,7 +2139,7 @@ void WinSalFrame::StartPresentation( BOOL bStart ) // ----------------------------------------------------------------------- -void WinSalFrame::SetAlwaysOnTop( BOOL bOnTop ) +void WinSalFrame::SetAlwaysOnTop( sal_Bool bOnTop ) { HWND hWnd; if ( bOnTop ) @@ -2151,7 +2151,7 @@ void WinSalFrame::SetAlwaysOnTop( BOOL bOnTop ) // ----------------------------------------------------------------------- -static void ImplSalToTop( HWND hWnd, USHORT nFlags ) +static void ImplSalToTop( HWND hWnd, sal_uInt16 nFlags ) { WinSalFrame* pToTopFrame = GetWindowPtr( hWnd ); if( pToTopFrame && (pToTopFrame->mnStyle & SAL_FRAME_STYLE_SYSTEMCHILD) != 0 ) @@ -2207,7 +2207,7 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags ) // ----------------------------------------------------------------------- -void WinSalFrame::ToTop( USHORT nFlags ) +void WinSalFrame::ToTop( sal_uInt16 nFlags ) { nFlags &= ~SAL_FRAME_TOTOP_GRABFOCUS; // this flag is not needed on win32 // Post this Message to the window, because this only works @@ -2358,7 +2358,7 @@ void WinSalFrame::SetPointer( PointerStyle ePointerStyle ) // ----------------------------------------------------------------------- -void WinSalFrame::CaptureMouse( BOOL bCapture ) +void WinSalFrame::CaptureMouse( sal_Bool bCapture ) { // Send this Message to the window, because CaptureMouse() only work // in the thread of the window, which has create this window @@ -2400,7 +2400,7 @@ void WinSalFrame::Sync() static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* pContext ) { WinSalFrame* pFrame = GetWindowPtr( hWnd ); - BOOL bIME = (pContext->mnOptions & SAL_INPUTCONTEXT_TEXT) != 0; + sal_Bool bIME = (pContext->mnOptions & SAL_INPUTCONTEXT_TEXT) != 0; if ( bIME ) { if ( !pFrame->mbIME ) @@ -2467,7 +2467,7 @@ void WinSalFrame::SetInputContext( SalInputContext* pContext ) // ----------------------------------------------------------------------- -static void ImplSalFrameEndExtTextInput( HWND hWnd, USHORT nFlags ) +static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags ) { HIMC hIMC = ImmGetContext( hWnd ); if ( hIMC ) @@ -2485,7 +2485,7 @@ static void ImplSalFrameEndExtTextInput( HWND hWnd, USHORT nFlags ) // ----------------------------------------------------------------------- -void WinSalFrame::EndExtTextInput( USHORT nFlags ) +void WinSalFrame::EndExtTextInput( sal_uInt16 nFlags ) { // Must be called in the main thread! ImplSendMessage( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 ); @@ -2585,7 +2585,7 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf, // ----------------------------------------------------------------------- -XubString WinSalFrame::GetKeyName( USHORT nKeyCode ) +XubString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode ) { static const int nMaxKeyLen = 350; sal_Unicode aKeyBuf[ nMaxKeyLen ]; @@ -2595,26 +2595,26 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode ) if ( nKeyCode & KEY_MOD1 ) { nSysCode = MapVirtualKey( VK_CONTROL, 0 ); - nSysCode = (nSysCode << 16) | (((ULONG)1) << 25); + nSysCode = (nSysCode << 16) | (((sal_uIntPtr)1) << 25); ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Ctrl" ); } if ( nKeyCode & KEY_MOD2 ) { nSysCode = MapVirtualKey( VK_MENU, 0 ); - nSysCode = (nSysCode << 16) | (((ULONG)1) << 25); + nSysCode = (nSysCode << 16) | (((sal_uIntPtr)1) << 25); ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Alt" ); } if ( nKeyCode & KEY_SHIFT ) { nSysCode = MapVirtualKey( VK_SHIFT, 0 ); - nSysCode = (nSysCode << 16) | (((ULONG)1) << 25); + nSysCode = (nSysCode << 16) | (((sal_uIntPtr)1) << 25); ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Shift" ); } - USHORT nCode = nKeyCode & 0x0FFF; - ULONG nSysCode2 = 0; + sal_uInt16 nCode = nKeyCode & 0x0FFF; + sal_uIntPtr nSysCode2 = 0; sal_Char* pReplace = NULL; sal_Unicode cSVCode = 0; sal_Char aFBuf[4]; @@ -2653,42 +2653,42 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode ) { case KEY_DOWN: nSysCode = VK_DOWN; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Down"; break; case KEY_UP: nSysCode = VK_UP; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Up"; break; case KEY_LEFT: nSysCode = VK_LEFT; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Left"; break; case KEY_RIGHT: nSysCode = VK_RIGHT; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Right"; break; case KEY_HOME: nSysCode = VK_HOME; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Home"; break; case KEY_END: nSysCode = VK_END; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "End"; break; case KEY_PAGEUP: nSysCode = VK_PRIOR; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Page Up"; break; case KEY_PAGEDOWN: nSysCode = VK_NEXT; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Page Down"; break; case KEY_RETURN: @@ -2713,12 +2713,12 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode ) break; case KEY_INSERT: nSysCode = VK_INSERT; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Insert"; break; case KEY_DELETE: nSysCode = VK_DELETE; - nSysCode2 = (((ULONG)1) << 24); + nSysCode2 = (((sal_uIntPtr)1) << 24); pReplace = "Delete"; break; @@ -2773,12 +2773,12 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode ) if( !nKeyBufLen ) return XubString(); - return XubString( aKeyBuf, sal::static_int_cast< USHORT >(nKeyBufLen) ); + return XubString( aKeyBuf, sal::static_int_cast< sal_uInt16 >(nKeyBufLen) ); } // ----------------------------------------------------------------------- -XubString WinSalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode ) +XubString WinSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode ) { return GetKeyName( nKeyCode ); } @@ -2881,14 +2881,14 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) &nType, aValueBuf, &nValueSize ) == ERROR_SUCCESS ) { if ( nType == REG_SZ ) - aMouseSettings.SetMenuDelay( (ULONG)ImplA2I( aValueBuf ) ); + aMouseSettings.SetMenuDelay( (sal_uIntPtr)ImplA2I( aValueBuf ) ); } RegCloseKey( hRegKey ); } StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - BOOL bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0; + sal_Bool bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0; // TODO: once those options vanish: just set bCompBorder to TRUE // to have the system colors read aStyleSettings.SetScrollBarSize( GetSystemMetrics( SM_CXVSCROLL ) ); @@ -2972,9 +2972,9 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) // Checked-Color berechnen Color aColor1 = aStyleSettings.GetFaceColor(); Color aColor2 = aStyleSettings.GetLightColor(); - BYTE nRed = (BYTE)(((USHORT)aColor1.GetRed() + (USHORT)aColor2.GetRed())/2); - BYTE nGreen = (BYTE)(((USHORT)aColor1.GetGreen() + (USHORT)aColor2.GetGreen())/2); - BYTE nBlue = (BYTE)(((USHORT)aColor1.GetBlue() + (USHORT)aColor2.GetBlue())/2); + BYTE nRed = (BYTE)(((sal_uInt16)aColor1.GetRed() + (sal_uInt16)aColor2.GetRed())/2); + BYTE nGreen = (BYTE)(((sal_uInt16)aColor1.GetGreen() + (sal_uInt16)aColor2.GetGreen())/2); + BYTE nBlue = (BYTE)(((sal_uInt16)aColor1.GetBlue() + (sal_uInt16)aColor2.GetBlue())/2); aStyleSettings.SetCheckedColor( Color( nRed, nGreen, nBlue ) ); } @@ -3071,10 +3071,10 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetInfoFont( aAppFont ); aStyleSettings.SetToolFont( aAppFont ); - WIN_BOOL bDragFull; + BOOL bDragFull; if ( SystemParametersInfo( SPI_GETDRAGFULLWINDOWS, 0, &bDragFull, 0 ) ) { - ULONG nDragFullOptions = aStyleSettings.GetDragFullOptions(); + sal_uIntPtr nDragFullOptions = aStyleSettings.GetDragFullOptions(); if ( bDragFull ) nDragFullOptions |= DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT; else @@ -3097,7 +3097,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) { if ( nType == REG_SZ ) { - nValue = (ULONG)ImplA2I( aValueBuf ); + nValue = (sal_uIntPtr)ImplA2I( aValueBuf ); if ( (nValue > 1000) && (nValue < 10000) ) { MiscSettings aMiscSettings = rSettings.GetMiscSettings(); @@ -3128,7 +3128,7 @@ SalBitmap* WinSalFrame::SnapShot() HDC hDC = GetWindowDC( mhWnd ); HBITMAP hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY ); HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_1, hBmpBitmap ); - BOOL bRet; + sal_Bool bRet; bRet = BitBlt( hBmpDC, 0, 0, nDX, nDY, hDC, 0, 0, SRCCOPY ) ? TRUE : FALSE; ImplReleaseCachedDC( CACHED_HDC_1 ); @@ -3213,11 +3213,11 @@ void WinSalFrame::ResetClipRegion() // ----------------------------------------------------------------------- -void WinSalFrame::BeginSetClipRegion( ULONG nRects ) +void WinSalFrame::BeginSetClipRegion( sal_uIntPtr nRects ) { if( mpClipRgnData ) delete [] (BYTE*)mpClipRgnData; - ULONG nRectBufSize = sizeof(RECT)*nRects; + sal_uIntPtr nRectBufSize = sizeof(RECT)*nRects; mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize]; mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER ); mpClipRgnData->rdh.iType = RDH_RECTANGLES; @@ -3289,7 +3289,7 @@ void WinSalFrame::EndSetClipRegion() } else { - ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); + sal_uIntPtr nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); hRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData ); } delete [] (BYTE*)mpClipRgnData; @@ -3334,8 +3334,8 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg, } SalMouseEvent aMouseEvt; long nRet; - USHORT nEvent = 0; - BOOL bCall = TRUE; + sal_uInt16 nEvent = 0; + sal_Bool bCall = TRUE; aMouseEvt.mnX = (short)LOWORD( lParam ); aMouseEvt.mnY = (short)HIWORD( lParam ); @@ -3569,9 +3569,9 @@ static long ImplHandleWheelMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar // ----------------------------------------------------------------------- -static USHORT ImplSalGetKeyCode( WPARAM wParam ) +static sal_uInt16 ImplSalGetKeyCode( WPARAM wParam ) { - USHORT nKeyCode; + sal_uInt16 nKeyCode; // convert KeyCode if ( wParam < KEY_TAB_SIZE ) @@ -3579,7 +3579,7 @@ static USHORT ImplSalGetKeyCode( WPARAM wParam ) else { SalData* pSalData = GetSalData(); - std::map< UINT, USHORT >::const_iterator it = pSalData->maVKMap.find( (UINT)wParam ); + std::map< UINT, sal_uInt16 >::const_iterator it = pSalData->maVKMap.find( (UINT)wParam ); if( it != pSalData->maVKMap.end() ) nKeyCode = it->second; else @@ -3593,7 +3593,7 @@ static USHORT ImplSalGetKeyCode( WPARAM wParam ) static UINT ImplStrToNum( const sal_Char* pStr ) { - USHORT n = 0; + sal_uInt16 n = 0; // Solange es sich um eine Ziffer handelt, String umwandeln while( (*pStr >= 48) && (*pStr <= 57) ) @@ -3610,7 +3610,7 @@ static UINT ImplStrToNum( const sal_Char* pStr ) static void ImplUpdateInputLang( WinSalFrame* pFrame ) { - BOOL bLanguageChange = FALSE; + sal_Bool bLanguageChange = FALSE; UINT nLang = LOWORD( GetKeyboardLayout( 0 ) ); if ( nLang && nLang != pFrame->mnInputLang ) { @@ -3692,9 +3692,9 @@ LanguageType WinSalFrame::GetInputLanguage() // ----------------------------------------------------------------------- -BOOL WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) +sal_Bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) { - BOOL bRet = FALSE; + sal_Bool bRet = FALSE; HKL hkl = 0; // just use the passed language identifier, do not try to load additional keyboard support @@ -3734,14 +3734,14 @@ BOOL WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangT static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rResult ) { - static BOOL bIgnoreCharMsg = FALSE; + static sal_Bool bIgnoreCharMsg = FALSE; static WPARAM nDeadChar = 0; static WPARAM nLastVKChar = 0; - static USHORT nLastChar = 0; - static USHORT nLastModKeyCode = 0; + static sal_uInt16 nLastChar = 0; + static sal_uInt16 nLastModKeyCode = 0; static bool bWaitForModKeyRelease = false; - USHORT nRepeat = LOWORD( lParam )-1; - USHORT nModCode = 0; + sal_uInt16 nRepeat = LOWORD( lParam )-1; + sal_uInt16 nModCode = 0; // Key wurde evtl. durch SysChild an uns weitergeleitet und // darf somit dann nicht doppelt verarbeitet werden @@ -3801,11 +3801,11 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, SalKeyEvent aKeyEvt; if ( (wParam >= '0') && (wParam <= '9') ) - aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_NUM + wParam - '0'); + aKeyEvt.mnCode = sal::static_int_cast<sal_uInt16>(KEYGROUP_NUM + wParam - '0'); else if ( (wParam >= 'A') && (wParam <= 'Z') ) - aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_ALPHA + wParam - 'A'); + aKeyEvt.mnCode = sal::static_int_cast<sal_uInt16>(KEYGROUP_ALPHA + wParam - 'A'); else if ( (wParam >= 'a') && (wParam <= 'z') ) - aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_ALPHA + wParam - 'a'); + aKeyEvt.mnCode = sal::static_int_cast<sal_uInt16>(KEYGROUP_ALPHA + wParam - 'a'); else if ( wParam == 0x0D ) // RETURN aKeyEvt.mnCode = KEY_RETURN; else if ( wParam == 0x1B ) // ESCAPE @@ -3873,7 +3873,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, aModEvt.mnCode = nModCode; aModEvt.mnModKeyCode = 0; // no command events will be sent if this member is 0 - USHORT tmpCode = 0; + sal_uInt16 tmpCode = 0; if( GetKeyState( VK_LSHIFT ) & 0x8000 ) tmpCode |= MODKEY_LSHIFT; if( GetKeyState( VK_RSHIFT ) & 0x8000 ) @@ -3907,11 +3907,11 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, else { SalKeyEvent aKeyEvt; - USHORT nEvent; + sal_uInt16 nEvent; MSG aCharMsg; - WIN_BOOL bCharPeek = FALSE; + BOOL bCharPeek = FALSE; UINT nCharMsg = WM_CHAR; - BOOL bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP); + sal_Bool bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP); nLastModKeyCode = 0; // make sure no modkey messages are sent if they belong to a hotkey (see above) aKeyEvt.mnCharCode = 0; @@ -4026,8 +4026,8 @@ long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, if ( !pFrame ) return 0; - USHORT nRepeat = LOWORD( lParam )-1; - USHORT nModCode = 0; + sal_uInt16 nRepeat = LOWORD( lParam )-1; + sal_uInt16 nModCode = 0; // determine modifiers if ( GetKeyState( VK_SHIFT ) & 0x8000 ) @@ -4040,8 +4040,8 @@ long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, if ( (wParam != VK_SHIFT) && (wParam != VK_CONTROL) && (wParam != VK_MENU) ) { SalKeyEvent aKeyEvt; - USHORT nEvent; - BOOL bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP); + sal_uInt16 nEvent; + sal_Bool bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP); // convert KeyCode aKeyEvt.mnCode = ImplSalGetKeyCode( wParam ); @@ -4076,9 +4076,9 @@ long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) if ( !pFrame ) return 0; - USHORT nRepeat = LOWORD( lParam )-1; - USHORT nModCode = 0; - USHORT cKeyCode = (USHORT)wParam; + sal_uInt16 nRepeat = LOWORD( lParam )-1; + sal_uInt16 nModCode = 0; + sal_uInt16 cKeyCode = (sal_uInt16)wParam; // determine modifiers if ( GetKeyState( VK_SHIFT ) & 0x8000 ) @@ -4110,7 +4110,7 @@ long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) static bool ImplHandlePaintMsg( HWND hWnd ) { - BOOL bMutex = FALSE; + sal_Bool bMutex = FALSE; if ( ImplSalYieldMutexTryToAcquire() ) bMutex = TRUE; @@ -4462,7 +4462,7 @@ static long ImplHandleShutDownMsg( HWND hWnd ) static void ImplHandleSettingsChangeMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { - USHORT nSalEvent = SALEVENT_SETTINGSCHANGED; + sal_uInt16 nSalEvent = SALEVENT_SETTINGSCHANGED; if ( nMsg == WM_DEVMODECHANGE ) nSalEvent = SALEVENT_PRINTERCHANGED; @@ -4566,7 +4566,7 @@ static void ImplHandleForcePalette( HWND hWnd ) // ----------------------------------------------------------------------- -static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, +static LRESULT ImplHandlePalette( sal_Bool bFrame, HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) { SalData* pSalData = GetSalData(); @@ -4584,7 +4584,7 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, return 0; } - BOOL bReleaseMutex = FALSE; + sal_Bool bReleaseMutex = FALSE; if ( (nMsg == WM_QUERYNEWPALETTE) || (nMsg == WM_PALETTECHANGED) ) { // Da Windows diese Messages auch sendet, muss hier auch die @@ -4603,8 +4603,8 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, HDC hDC; HPALETTE hOldPal; UINT nCols; - BOOL bStdDC; - BOOL bUpdate; + sal_Bool bStdDC; + sal_Bool bUpdate; pSalData->mbInPalChange = TRUE; @@ -4797,7 +4797,7 @@ static int ImplHandleMinMax( HWND hWnd, LPARAM lParam ) // the pointer is stored in every item, so if no position // is specified we just use the first item (ie, pos=0) // if bByPosition is FALSE then nPos denotes a menu id instead of a position -static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, BOOL bByPosition=TRUE ) +static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, sal_Bool bByPosition=TRUE ) { DWORD err=0; @@ -4952,9 +4952,9 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) COLORREF clrPrevText, clrPrevBkgnd; HFONT hfntOld; HBRUSH hbrOld; - BOOL fChecked = (pDI->itemState & ODS_CHECKED) ? TRUE : FALSE; - BOOL fSelected = (pDI->itemState & ODS_SELECTED) ? TRUE : FALSE; - BOOL fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? TRUE : FALSE; + sal_Bool fChecked = (pDI->itemState & ODS_CHECKED) ? TRUE : FALSE; + sal_Bool fSelected = (pDI->itemState & ODS_SELECTED) ? TRUE : FALSE; + sal_Bool fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? TRUE : FALSE; // Set the appropriate foreground and background colors. RECT aRect = pDI->rcItem; @@ -5098,7 +5098,7 @@ static int ImplHandleMenuActivate( HWND hWnd, WPARAM wParam, LPARAM ) HMENU hMenu = (HMENU) wParam; // WORD nPos = LOWORD (lParam); - // BOOL bWindowMenu = (BOOL) HIWORD(lParam); + // sal_Bool bWindowMenu = (sal_Bool) HIWORD(lParam); // Send activate and deactivate together, so we have not keep track of opened menues // this will be enough to have the menues updated correctly @@ -5133,7 +5133,7 @@ static int ImplHandleMenuSelect( HWND hWnd, WPARAM wParam, LPARAM lParam ) if( !GetSalData()->IsKnownMenuHandle( hMenu ) ) return 0; - BOOL bByPosition = FALSE; + sal_Bool bByPosition = FALSE; if( nFlags & MF_POPUP ) bByPosition = TRUE; @@ -5233,8 +5233,8 @@ static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam ) if ( pFrame->mbFullScreen ) { - WIN_BOOL bMaximize = IsZoomed( pFrame->mhWnd ); - WIN_BOOL bMinimize = IsIconic( pFrame->mhWnd ); + BOOL bMaximize = IsZoomed( pFrame->mhWnd ); + BOOL bMinimize = IsIconic( pFrame->mhWnd ); if ( (nCommand == SC_SIZE) || (!bMinimize && (nCommand == SC_MOVE)) || (!bMaximize && (nCommand == SC_MAXIMIZE)) || @@ -5298,7 +5298,7 @@ static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam ) if ( ((cKeyCode >= 48) && (cKeyCode <= 57)) || ((cKeyCode >= 97) && (cKeyCode <= 122)) ) { - USHORT nModCode = 0; + sal_uInt16 nModCode = 0; if ( GetKeyState( VK_SHIFT ) & 0x8000 ) nModCode |= KEY_SHIFT; if ( GetKeyState( VK_CONTROL ) & 0x8000 ) @@ -5387,9 +5387,9 @@ static void ImplUpdateIMECursorPos( WinSalFrame* pFrame, HIMC hIMC ) // ----------------------------------------------------------------------- -static BOOL ImplHandleIMEStartComposition( HWND hWnd ) +static sal_Bool ImplHandleIMEStartComposition( HWND hWnd ) { - BOOL bDef = TRUE; + sal_Bool bDef = TRUE; ImplSalYieldMutexAcquireWithWait(); @@ -5417,10 +5417,10 @@ static BOOL ImplHandleIMEStartComposition( HWND hWnd ) // ----------------------------------------------------------------------- -static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame, +static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame, HIMC hIMC, LPARAM lParam ) { - BOOL bDef = TRUE; + sal_Bool bDef = TRUE; // Init Event SalExtTextInputEvent aEvt; @@ -5461,7 +5461,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame, { bDef = FALSE; - USHORT* pSalAttrAry = NULL; + sal_uInt16* pSalAttrAry = NULL; LONG nTextLen = ImmGetCompositionStringW( hIMC, GCS_COMPSTR, 0, 0 ) / sizeof( WCHAR ); if ( nTextLen > 0 ) { @@ -5470,23 +5470,23 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame, aEvt.maText = XubString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (xub_StrLen)nTextLen ); delete [] pTextBuf; - WIN_BYTE* pAttrBuf = NULL; + BYTE* pAttrBuf = NULL; LONG nAttrLen = ImmGetCompositionStringW( hIMC, GCS_COMPATTR, 0, 0 ); if ( nAttrLen > 0 ) { - pAttrBuf = new WIN_BYTE[nAttrLen]; + pAttrBuf = new BYTE[nAttrLen]; ImmGetCompositionStringW( hIMC, GCS_COMPATTR, pAttrBuf, nAttrLen ); } if ( pAttrBuf ) { xub_StrLen nTextLen = aEvt.maText.Len(); - pSalAttrAry = new USHORT[nTextLen]; - memset( pSalAttrAry, 0, nTextLen*sizeof( USHORT ) ); + pSalAttrAry = new sal_uInt16[nTextLen]; + memset( pSalAttrAry, 0, nTextLen*sizeof( sal_uInt16 ) ); for ( xub_StrLen i = 0; (i < nTextLen) && (i < nAttrLen); i++ ) { - WIN_BYTE nWinAttr = pAttrBuf[i]; - USHORT nSalAttr; + BYTE nWinAttr = pAttrBuf[i]; + sal_uInt16 nSalAttr; if ( nWinAttr == ATTR_TARGET_CONVERTED ) { nSalAttr = SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE; @@ -5549,9 +5549,9 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame, // ----------------------------------------------------------------------- -static BOOL ImplHandleIMEComposition( HWND hWnd, LPARAM lParam ) +static sal_Bool ImplHandleIMEComposition( HWND hWnd, LPARAM lParam ) { - BOOL bDef = TRUE; + sal_Bool bDef = TRUE; ImplSalYieldMutexAcquireWithWait(); WinSalFrame* pFrame = GetWindowPtr( hWnd ); @@ -5597,9 +5597,9 @@ static BOOL ImplHandleIMEComposition( HWND hWnd, LPARAM lParam ) // ----------------------------------------------------------------------- -static BOOL ImplHandleIMEEndComposition( HWND hWnd ) +static sal_Bool ImplHandleIMEEndComposition( HWND hWnd ) { - BOOL bDef = TRUE; + sal_Bool bDef = TRUE; ImplSalYieldMutexAcquireWithWait(); @@ -5785,8 +5785,8 @@ static LRESULT ImplHandleIMEConfirmReconvertString( HWND hWnd, LPARAM lParam ) pFrame->CallCallback( SALEVENT_SURROUNDINGTEXTREQUEST, (void*)&aEvt ); - ULONG nTmpStart = pReconvertString->dwCompStrOffset / sizeof(WCHAR); - ULONG nTmpEnd = nTmpStart + pReconvertString->dwCompStrLen; + sal_uIntPtr nTmpStart = pReconvertString->dwCompStrOffset / sizeof(WCHAR); + sal_uIntPtr nTmpEnd = nTmpStart + pReconvertString->dwCompStrLen; if( nTmpStart != aEvt.mnStart || nTmpEnd != aEvt.mnEnd ) { @@ -6174,11 +6174,11 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP rDef = FALSE; break; case SAL_MSG_TOTOP: - ImplSalToTop( hWnd, (USHORT)wParam ); + ImplSalToTop( hWnd, (sal_uInt16)wParam ); rDef = FALSE; break; case SAL_MSG_SHOW: - ImplSalShow( hWnd, (BOOL)wParam, (BOOL)lParam ); + ImplSalShow( hWnd, (sal_Bool)wParam, (sal_Bool)lParam ); rDef = FALSE; break; case SAL_MSG_SETINPUTCONTEXT: @@ -6186,7 +6186,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP rDef = FALSE; break; case SAL_MSG_ENDEXTTEXTINPUT: - ImplSalFrameEndExtTextInput( hWnd, (USHORT)(ULONG)(void*)wParam ); + ImplSalFrameEndExtTextInput( hWnd, (sal_uInt16)(sal_uIntPtr)(void*)wParam ); rDef = FALSE; break; @@ -6353,11 +6353,11 @@ LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l // ----------------------------------------------------------------------- -BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ) +sal_Bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ) { // handle all messages concerning all frames so they get processed only once // Must work for Unicode and none Unicode - BOOL bResult = FALSE; + sal_Bool bResult = FALSE; if ( (nMsg == WM_PALETTECHANGED) || (nMsg == SAL_MSG_POSTPALCHANGED) ) { int bDef = TRUE; @@ -6376,7 +6376,7 @@ BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LR // ----------------------------------------------------------------------- -BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall ) +sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall ) { static int first=1; // if VCL_LOGFILE_ENABLED is set, Win32 API error messages can be written @@ -6384,7 +6384,7 @@ BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall ) static char *logEnabled = getenv("VCL_LOGFILE_ENABLED"); if( logEnabled ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = FALSE; static char *szTmp = getenv("TMP"); if( !szTmp || !*szTmp ) szTmp = getenv("TEMP"); diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx index 1eb75969ea38..bbb0b4288a4e 100644 --- a/vcl/win/source/window/salmenu.cxx +++ b/vcl/win/source/window/salmenu.cxx @@ -47,7 +47,7 @@ static DWORD myerr=0; // ======================================================================= -BOOL SalData::IsKnownMenuHandle( HMENU hMenu ) +sal_Bool SalData::IsKnownMenuHandle( HMENU hMenu ) { if( mhMenuSet.find( hMenu ) == mhMenuSet.end() ) return FALSE; @@ -59,7 +59,7 @@ BOOL SalData::IsKnownMenuHandle( HMENU hMenu ) // WinSalInst factory methods -SalMenu* WinSalInstance::CreateMenu( BOOL bMenuBar ) +SalMenu* WinSalInstance::CreateMenu( sal_Bool bMenuBar ) { WinSalMenu *pSalMenu = new WinSalMenu(); @@ -168,7 +168,7 @@ WinSalMenu::~WinSalMenu() ::DestroyMenu( mhMenu ); } -BOOL WinSalMenu::VisibleMenuBar() +sal_Bool WinSalMenu::VisibleMenuBar() { // The Win32 implementation never shows a native // menubar. Thus, native menues are only visible @@ -294,13 +294,13 @@ void WinSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig } } -void WinSalMenu::CheckItem( unsigned nPos, BOOL bCheck ) +void WinSalMenu::CheckItem( unsigned nPos, sal_Bool bCheck ) { if( -1 != ::CheckMenuItem( mhMenu, nPos, MF_BYPOSITION|(bCheck ? MF_CHECKED : MF_UNCHECKED) ) ) ImplDrawMenuBar( this ); } -void WinSalMenu::EnableItem( unsigned nPos, BOOL bEnable ) +void WinSalMenu::EnableItem( unsigned nPos, sal_Bool bEnable ) { if( -1 != ::EnableMenuItem( mhMenu, nPos, MF_BYPOSITION|(bEnable ? MF_ENABLED : (MF_DISABLED|MF_GRAYED) ) ) ) ImplDrawMenuBar( this ); diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx index 2f657968284f..54858cd820dd 100644 --- a/vcl/win/source/window/salobj.cxx +++ b/vcl/win/source/window/salobj.cxx @@ -42,7 +42,7 @@ // ======================================================================= -static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) +static sal_Bool ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) { if ( hWndParent == hWndChild ) return TRUE; @@ -161,7 +161,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -BOOL ImplSalPreDispatchMsg( MSG* pMsg ) +sal_Bool ImplSalPreDispatchMsg( MSG* pMsg ) { // Used for Unicode and none Unicode SalData* pSalData = GetSalData(); @@ -186,7 +186,7 @@ BOOL ImplSalPreDispatchMsg( MSG* pMsg ) // SysKeys werden als WM_SYSCOMMAND verarbeitet // Char-Events verarbeiten wir nicht, da wir nur // Accelerator relevante Keys verarbeiten wollen - BOOL bWantedKeyCode = FALSE; + sal_Bool bWantedKeyCode = FALSE; // A-Z, 0-9 nur in Verbindung mit Control-Taste if ( ((pMsg->wParam >= 65) && (pMsg->wParam <= 90)) || ((pMsg->wParam >= 48) && (pMsg->wParam <= 57)) ) @@ -214,13 +214,13 @@ BOOL ImplSalPreDispatchMsg( MSG* pMsg ) { pSalData->mnSalObjWantKeyEvt = 0; - USHORT nKeyCode = LOWORD( pMsg->wParam ); + sal_uInt16 nKeyCode = LOWORD( pMsg->wParam ); // Nur 0-9 und A-Z if ( ((nKeyCode >= 48) && (nKeyCode <= 57)) || ((nKeyCode >= 65) && (nKeyCode <= 90)) || ((nKeyCode >= 97) && (nKeyCode <= 122)) ) { - BOOL bRet = FALSE; + sal_Bool bRet = FALSE; ImplSalYieldMutexAcquireWithWait(); pObject = ImplFindSalObject( pMsg->hwnd ); if ( pObject ) @@ -338,7 +338,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l { pSysObj = GetSalObjWindowPtr( hWnd ); HWND hFocusWnd = ::GetFocus(); - USHORT nEvent; + sal_uInt16 nEvent; if ( hFocusWnd && ImplIsSysWindowOrChild( hWnd, hFocusWnd ) ) nEvent = SALOBJ_EVENT_GETFOCUS; else @@ -682,16 +682,16 @@ void WinSalObject::ResetClipRegion() // ----------------------------------------------------------------------- -USHORT WinSalObject::GetClipRegionType() +sal_uInt16 WinSalObject::GetClipRegionType() { return SAL_OBJECT_CLIP_INCLUDERECTS; } // ----------------------------------------------------------------------- -void WinSalObject::BeginSetClipRegion( ULONG nRectCount ) +void WinSalObject::BeginSetClipRegion( sal_uIntPtr nRectCount ) { - ULONG nRectBufSize = sizeof(RECT)*nRectCount; + sal_uIntPtr nRectBufSize = sizeof(RECT)*nRectCount; if ( nRectCount < SAL_CLIPRECT_COUNT ) { if ( !mpStdClipRgnData ) @@ -763,7 +763,7 @@ void WinSalObject::EndSetClipRegion() } else { - ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); + sal_uIntPtr nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER); hRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData ); if ( mpClipRgnData != mpStdClipRgnData ) delete [] (BYTE*)mpClipRgnData; @@ -777,8 +777,8 @@ void WinSalObject::EndSetClipRegion() void WinSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight ) { - ULONG nStyle = 0; - BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; + sal_uIntPtr nStyle = 0; + sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; if ( bVisible ) { ShowWindow( mhWnd, SW_HIDE ); @@ -791,7 +791,7 @@ void WinSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight ) // ----------------------------------------------------------------------- -void WinSalObject::Show( BOOL bVisible ) +void WinSalObject::Show( sal_Bool bVisible ) { if ( bVisible ) ShowWindow( mhWnd, SW_SHOWNORMAL ); @@ -801,7 +801,7 @@ void WinSalObject::Show( BOOL bVisible ) // ----------------------------------------------------------------------- -void WinSalObject::Enable( BOOL bEnable ) +void WinSalObject::Enable( sal_Bool bEnable ) { EnableWindow( mhWnd, bEnable ); } |