diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-19 15:12:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-19 21:34:46 +0200 |
commit | 3aef606f2758172a27718a06fea0ff9080e4d80f (patch) | |
tree | ad323c90301d80bbb3b68163d8b87e5402b687ed /vcl/unx | |
parent | 5afba3e12c8d4eb1ebb8e087134eb87593bb017a (diff) |
use tools::Long in vcl
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
25 files changed, 231 insertions, 231 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 29035742fd99..94e3c416c3cc 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -87,7 +87,7 @@ static const char *KeyStr( KeySym n ) { return Null( XKeysymToString( n ) ); } static const char *GetAtomName( Display *d, Atom a ) { return Null( XGetAtomName( d, a ) ); } -static double Hypothenuse( long w, long h ) +static double Hypothenuse( tools::Long w, tools::Long h ) { return sqrt( static_cast<double>((w*w)+(h*h)) ); } #endif @@ -124,7 +124,7 @@ static int sal_significantBits( Pixel nMask ) } // check if the resolution is sane -static bool sal_ValidDPI(long nDPI) +static bool sal_ValidDPI(tools::Long nDPI) { return (nDPI >= 50) && (nDPI <= 500); } @@ -598,7 +598,7 @@ void SalDisplay::Init() if( pValStr != nullptr ) { const OString aValStr( pValStr ); - const long nDPI = static_cast<long>(aValStr.toDouble()); + const tools::Long nDPI = static_cast<tools::Long>(aValStr.toDouble()); // guard against insane resolution if( sal_ValidDPI(nDPI) ) { @@ -612,11 +612,11 @@ void SalDisplay::Init() * reported screen sizes and resolution. If there are multiple * screens, just fall back to the default 96x96 */ - long xDPI = 96; - long yDPI = 96; + tools::Long xDPI = 96; + tools::Long yDPI = 96; if (m_aScreens.size() == 1) { - xDPI = static_cast<long>(round(DisplayWidth(pDisp_, 0)*25.4/DisplayWidthMM(pDisp_, 0))); - yDPI = static_cast<long>(round(DisplayHeight(pDisp_, 0)*25.4/DisplayHeightMM(pDisp_, 0))); + xDPI = static_cast<tools::Long>(round(DisplayWidth(pDisp_, 0)*25.4/DisplayWidthMM(pDisp_, 0))); + yDPI = static_cast<tools::Long>(round(DisplayHeight(pDisp_, 0)*25.4/DisplayHeightMM(pDisp_, 0))); // if either is invalid set it equal to the other if (!sal_ValidDPI(xDPI) && sal_ValidDPI(yDPI)) xDPI = yDPI; @@ -2256,7 +2256,7 @@ void SalDisplay::PrintInfo() const } #endif -void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight ) +void SalDisplay::addXineramaScreenUnique( int i, tools::Long i_nX, tools::Long i_nY, tools::Long i_nWidth, tools::Long i_nHeight ) { // see if any frame buffers are at the same coordinates // this can happen with weird configuration e.g. on @@ -2371,7 +2371,7 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat aFD.fd = ConnectionNumber(GetDisplay()); aFD.events = POLLIN; aFD.revents = 0; - long nTimeout = 1000; + tools::Long nTimeout = 1000; (void)poll(&aFD, 1, nTimeout); if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) { diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 62dfcf94ce8c..ec853e26accc 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -55,7 +55,7 @@ public: virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const override; virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const override; virtual void frameIsMapping( X11SalFrame* pFrame ) const override; - virtual void setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const override; + virtual void setUserTime( X11SalFrame* i_pFrame, tools::Long i_nUserTime ) const override; }; class GnomeWMAdaptor : public WMAdaptor @@ -464,7 +464,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : ) { m_aWMWorkAreas = ::std::vector< tools::Rectangle > ( m_nDesktops ); - long* pValues = reinterpret_cast<long*>(pProperty); + tools::Long* pValues = reinterpret_cast<long*>(pProperty); for( int i = 0; i < m_nDesktops; i++ ) { Point aPoint( pValues[4*i], @@ -1109,7 +1109,7 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const * for maximizing use NorthWestGravity (including decoration) */ XSizeHints hints; - long supplied; + tools::Long supplied; bool bHint = false; if( XGetWMNormalHints( m_pDisplay, pFrame->GetShellWindow(), @@ -1199,7 +1199,7 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const * for maximizing use NorthWestGravity (including decoration) */ XSizeHints hints; - long supplied; + tools::Long supplied; bool bHint = false; if( XGetWMNormalHints( m_pDisplay, pFrame->GetShellWindow(), @@ -1268,7 +1268,7 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy // set mwm hints struct _mwmhints { unsigned long flags, func, deco; - long input_mode; + tools::Long input_mode; unsigned long status; } aHint; @@ -1777,7 +1777,7 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv int nFormat; unsigned long nItems, nBytesLeft; unsigned char* pData = nullptr; - long nOffset = 0; + tools::Long nOffset = 0; do { XGetWindowProperty( m_pDisplay, @@ -2204,14 +2204,14 @@ void NetWMAdaptor::frameIsMapping( X11SalFrame* pFrame ) const /* * WMAdaptor::setUserTime */ -void WMAdaptor::setUserTime( X11SalFrame*, long ) const +void WMAdaptor::setUserTime( X11SalFrame*, tools::Long ) const { } /* * NetWMAdaptor::setUserTime */ -void NetWMAdaptor::setUserTime( X11SalFrame* i_pFrame, long i_nUserTime ) const +void NetWMAdaptor::setUserTime( X11SalFrame* i_pFrame, tools::Long i_nUserTime ) const { if( m_aWMAtoms[NET_WM_USER_TIME] ) { @@ -2235,7 +2235,7 @@ void WMAdaptor::setPID( X11SalFrame const * i_pFrame ) const if( !(m_aWMAtoms[NET_WM_PID]) ) return; - long nPID = static_cast<long>(getpid()); + tools::Long nPID = static_cast<tools::Long>(getpid()); XChangeProperty( m_pDisplay, i_pFrame->GetShellWindow(), m_aWMAtoms[NET_WM_PID], diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 4be75f23ee56..ce98fcbd09f5 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -103,7 +103,7 @@ extern "C" } } -const long nXdndProtocolRevision = 5; +const tools::Long nXdndProtocolRevision = 5; namespace { @@ -1547,7 +1547,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, rInc.m_nTransferStartTime = time( nullptr ); // use incr protocol, signal start to requestor - long nMinSize = m_nIncrementalThreshold; + tools::Long nMinSize = m_nIncrementalThreshold; XSelectInput( m_pDisplay, requestor, PropertyChangeMask ); XChangeProperty( m_pDisplay, requestor, property, m_nINCRAtom, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&nMinSize), 1 ); @@ -1633,7 +1633,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest } else if( rRequest.target == m_nTIMESTAMPAtom ) { - long nTimeStamp = static_cast<long>(m_aSelections[rRequest.selection]->m_nOrigTimestamp); + tools::Long nTimeStamp = static_cast<tools::Long>(m_aSelections[rRequest.selection]->m_nOrigTimestamp); XChangeProperty( m_pDisplay, rRequest.requestor, rRequest.property, XA_INTEGER, 32, PropModeReplace, reinterpret_cast<unsigned char*>(&nTimeStamp), 1 ); aNotify.xselection.property = rRequest.property; diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx index 8b67c5951667..793f17f44342 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx @@ -38,7 +38,7 @@ namespace cairo { explicit X11SysData( const SystemEnvData& ); void* pDisplay; // the relevant display connection - long hDrawable; // a drawable + tools::Long hDrawable; // a drawable void* pVisual; // the visual in use int nScreen; // the current screen of the drawable void* pRenderFormat; // render format for drawable @@ -48,9 +48,9 @@ namespace cairo { struct X11Pixmap { void* mpDisplay; // the relevant display connection - long mhDrawable; // a drawable + tools::Long mhDrawable; // a drawable - X11Pixmap( long hDrawable, void* pDisplay ) : + X11Pixmap( tools::Long hDrawable, void* pDisplay ) : mpDisplay(pDisplay), mhDrawable(hDrawable) {} diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index 5a6f04fd856f..2c53f277c12d 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -94,12 +94,12 @@ bool X11SalGraphics::CreateFontSubset( pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo); } -const void* X11SalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen) +const void* X11SalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) { return mxTextRenderImpl->GetEmbedFontData(pFont, pDataLen); } -void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) +void X11SalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen ) { mxTextRenderImpl->FreeEmbedFontData(pData, nLen); } diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx index b364406f1e1d..0e6556b24588 100644 --- a/vcl/unx/generic/gdi/freetypetextrender.cxx +++ b/vcl/unx/generic/gdi/freetypetextrender.cxx @@ -181,7 +181,7 @@ bool FreeTypeTextRenderImpl::CreateFontSubset( return bSuccess; } -const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen) +const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) { // in this context the pFont->GetFontId() is a valid PSP // font since they are the only ones left after the PDF @@ -192,7 +192,7 @@ const void* FreeTypeTextRenderImpl::GetEmbedFontData(const PhysicalFontFace* pFo return GenPspGraphics::DoGetEmbedFontData(aFont, pDataLen); } -void FreeTypeTextRenderImpl::FreeEmbedFontData( const void* pData, long nLen ) +void FreeTypeTextRenderImpl::FreeEmbedFontData( const void* pData, tools::Long nLen ) { GenPspGraphics::DoFreeEmbedFontData( pData, nLen ); } diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 337454c2a868..eaccc865cd41 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -543,9 +543,9 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, } } -void X11SalGraphicsImpl::copyArea ( long nDestX, long nDestY, - long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, +void X11SalGraphicsImpl::copyArea ( tools::Long nDestX, tools::Long nDestY, + tools::Long nSrcX, tools::Long nSrcY, + tools::Long nSrcWidth, tools::Long nSrcHeight, bool /*bWindowInvalidate*/) { SalTwoRect aPosAry(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight); @@ -558,7 +558,7 @@ void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& Display* pXDisp = pSalDisp->GetDisplay(); const Drawable aDrawable( mrParent.GetDrawable() ); const SalColormap& rColMap = pSalDisp->GetColormap( mrParent.m_nXScreen ); - const long nDepth = mrParent.GetDisplay()->GetVisual( mrParent.m_nXScreen ).GetDepth(); + const tools::Long nDepth = mrParent.GetDisplay()->GetVisual( mrParent.m_nXScreen ).GetDepth(); GC aGC( GetCopyGC() ); XGCValues aOldVal, aNewVal; int nValues = GCForeground | GCBackground; @@ -791,7 +791,7 @@ bool X11SalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR, // the alpha values need to be inverted for XRender // TODO: make upper layers use standard alpha - long* pLDst = reinterpret_cast<long*>(pAlphaBits); + tools::Long* pLDst = reinterpret_cast<long*>(pAlphaBits); for( int i = nImageSize/sizeof(long); --i >= 0; ++pLDst ) *pLDst = ~*pLDst; @@ -851,8 +851,8 @@ bool X11SalGraphicsImpl::drawTransformedBitmap( return false; } -bool X11SalGraphicsImpl::drawAlphaRect( long nX, long nY, long nWidth, - long nHeight, sal_uInt8 nTransparency ) +bool X11SalGraphicsImpl::drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, + tools::Long nHeight, sal_uInt8 nTransparency ) { if( ! mrParent.m_pFrame && ! mrParent.m_pVDev ) return false; @@ -951,11 +951,11 @@ bool X11SalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip ) for (auto const& rectangle : aRectangles) { - const long nW(rectangle.GetWidth()); + const tools::Long nW(rectangle.GetWidth()); if(nW) { - const long nH(rectangle.GetHeight()); + const tools::Long nH(rectangle.GetHeight()); if(nH) { @@ -1116,13 +1116,13 @@ void X11SalGraphicsImpl::SetXORMode( bool bSet, bool ) } } -void X11SalGraphicsImpl::drawPixel( long nX, long nY ) +void X11SalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY ) { if( mnPenColor != SALCOLOR_NONE ) XDrawPoint( mrParent.GetXDisplay(), mrParent.GetDrawable(), SelectPen(), nX, nY ); } -void X11SalGraphicsImpl::drawPixel( long nX, long nY, Color nColor ) +void X11SalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY, Color nColor ) { if( nColor == SALCOLOR_NONE ) return; @@ -1150,7 +1150,7 @@ void X11SalGraphicsImpl::drawPixel( long nX, long nY, Color nColor ) } } -void X11SalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 ) +void X11SalGraphicsImpl::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) { if( mnPenColor != SALCOLOR_NONE ) { @@ -1159,7 +1159,7 @@ void X11SalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 ) } } -void X11SalGraphicsImpl::drawRect( long nX, long nY, long nDX, long nDY ) +void X11SalGraphicsImpl::drawRect( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) { if( mnBrushColor != SALCOLOR_NONE ) { @@ -1320,10 +1320,10 @@ bool X11SalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, return false; } -void X11SalGraphicsImpl::invert( long nX, - long nY, - long nDX, - long nDY, +void X11SalGraphicsImpl::invert( tools::Long nX, + tools::Long nY, + tools::Long nDX, + tools::Long nDY, SalInvert nFlags ) { GC pGC; @@ -1372,7 +1372,7 @@ void X11SalGraphicsImpl::invert( sal_uInt32 nPoints, Complex, CoordModeOrigin ); } -bool X11SalGraphicsImpl::drawEPS( long,long,long,long,void*,sal_uInt32 ) +bool X11SalGraphicsImpl::drawEPS( tools::Long,tools::Long,tools::Long,tools::Long,void*,sal_uInt32 ) { return false; } @@ -1428,7 +1428,7 @@ bool X11SalGraphicsImpl::drawPolyPolygon( return bDrawn; } -long X11SalGraphicsImpl::GetGraphicsHeight() const +tools::Long X11SalGraphicsImpl::GetGraphicsHeight() const { if( mrParent.m_pFrame ) return mrParent.m_pFrame->maGeometry.nHeight; @@ -1850,7 +1850,7 @@ bool X11SalGraphicsImpl::drawPolyLine( return bDrawnOk; } -Color X11SalGraphicsImpl::getPixel( long nX, long nY ) +Color X11SalGraphicsImpl::getPixel( tools::Long nX, tools::Long nY ) { if( mrParent.bWindow_ && !mrParent.bVirDev_ ) { @@ -1884,7 +1884,7 @@ Color X11SalGraphicsImpl::getPixel( long nX, long nY ) return mrParent.GetColormap().GetColor( aXColor.pixel ); } -std::shared_ptr<SalBitmap> X11SalGraphicsImpl::getBitmap( long nX, long nY, long nDX, long nDY ) +std::shared_ptr<SalBitmap> X11SalGraphicsImpl::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) { bool bFakeWindowBG = false; @@ -1909,7 +1909,7 @@ std::shared_ptr<SalBitmap> X11SalGraphicsImpl::getBitmap( long nX, long nY, long bFakeWindowBG = true; else { - long nOrgDX = nDX, nOrgDY = nDY; + tools::Long nOrgDX = nDX, nOrgDY = nDY; // clip to window size if ( nX < 0 ) @@ -1956,7 +1956,7 @@ sal_uInt16 X11SalGraphicsImpl::GetBitCount() const return mrParent.GetVisual().GetDepth(); } -long X11SalGraphicsImpl::GetGraphicsWidth() const +tools::Long X11SalGraphicsImpl::GetGraphicsWidth() const { if( mrParent.m_pFrame ) return mrParent.m_pFrame->maGeometry.nWidth; diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 6a9201cf9c6c..1379deca6f83 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -96,7 +96,7 @@ private: const basegfx::triangulator::B2DTriangleVector& rTriangles, double fTransparency); - long GetGraphicsHeight() const; + tools::Long GetGraphicsHeight() const; void drawMaskedBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, @@ -120,7 +120,7 @@ public: virtual sal_uInt16 GetBitCount() const override; // get the width of the device - virtual long GetGraphicsWidth() const override; + virtual tools::Long GetGraphicsWidth() const override; // set the clip region to empty virtual void ResetClipRegion() override; @@ -149,12 +149,12 @@ public: virtual void SetROPFillColor( SalROPColor nROPColor ) override; // draw --> LineColor and FillColor and RasterOp and ClipRegion - virtual void drawPixel( long nX, long nY ) override; - virtual void drawPixel( long nX, long nY, Color nColor ) override; + virtual void drawPixel( tools::Long nX, tools::Long nY ) override; + virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override; - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override; + virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override; - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override; + virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override; virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override; @@ -196,9 +196,9 @@ public: // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( - long nDestX, long nDestY, - long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, + tools::Long nDestX, tools::Long nDestY, + tools::Long nSrcX, tools::Long nSrcY, + tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate ) override; // CopyBits and DrawBitmap --> RasterOp and ClipRegion @@ -217,21 +217,21 @@ public: const SalBitmap& rSalBitmap, Color nMaskColor ) override; - virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override; + virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override; - virtual Color getPixel( long nX, long nY ) override; + virtual Color getPixel( tools::Long nX, tools::Long nY ) override; // invert --> ClipRegion (only Windows or VirDevs) virtual void invert( - long nX, long nY, - long nWidth, long nHeight, + tools::Long nX, tools::Long nY, + tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override; virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override; virtual bool drawEPS( - long nX, long nY, - long nWidth, long nHeight, + tools::Long nX, tools::Long nY, + tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override; @@ -279,8 +279,8 @@ public: fully transparent rectangle */ virtual bool drawAlphaRect( - long nX, long nY, - long nWidth, long nHeight, + tools::Long nX, tools::Long nY, + tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency ) override; virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override; diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index 1ca2697ee6a0..9e76a48c08e2 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -112,7 +112,7 @@ namespace size_t nExtraSpaceInScanLine = pDIB->mnScanlineSize - pDIB->mnWidth * pDIB->mnBitCount / 8; if (nExtraSpaceInScanLine) { - for (long i = 0; i < pDIB->mnHeight; ++i) + for (tools::Long i = 0; i < pDIB->mnHeight; ++i) { sal_uInt8 *pRow = pDIB->mpBits + (i * pDIB->mnScanlineSize); memset(pRow + (pDIB->mnScanlineSize - nExtraSpaceInScanLine), 0, nExtraSpaceInScanLine); @@ -168,7 +168,7 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB( pDIB->mnWidth = rSize.Width(); pDIB->mnHeight = rSize.Height(); - long nScanlineBase; + tools::Long nScanlineBase; bool bFail = o3tl::checked_multiply<long>(pDIB->mnWidth, nBitCount, nScanlineBase); if (bFail) { @@ -208,11 +208,11 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB( std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB( Drawable aDrawable, SalX11Screen nScreen, - long nDrawableDepth, - long nX, - long nY, - long nWidth, - long nHeight, + tools::Long nDrawableDepth, + tools::Long nX, + tools::Long nY, + tools::Long nWidth, + tools::Long nHeight, bool bGrey ) { std::unique_ptr<BitmapBuffer> pDIB; @@ -358,7 +358,7 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB( XImage* X11SalBitmap::ImplCreateXImage( SalDisplay const *pSalDisp, SalX11Screen nScreen, - long nDepth, + tools::Long nDepth, const SalTwoRect& rTwoRect ) const { @@ -379,8 +379,8 @@ XImage* X11SalBitmap::ImplCreateXImage( if( mpDIB && mpDIB->mnWidth && mpDIB->mnHeight ) { Display* pXDisp = pSalDisp->GetDisplay(); - long nWidth = rTwoRect.mnDestWidth; - long nHeight = rTwoRect.mnDestHeight; + tools::Long nWidth = rTwoRect.mnDestWidth; + tools::Long nHeight = rTwoRect.mnDestHeight; if( 1 == GetBitCount() ) nDepth = 1; @@ -512,11 +512,11 @@ XImage* X11SalBitmap::ImplCreateXImage( bool X11SalBitmap::ImplCreateFromDrawable( Drawable aDrawable, SalX11Screen nScreen, - long nDrawableDepth, - long nX, - long nY, - long nWidth, - long nHeight + tools::Long nDrawableDepth, + tools::Long nX, + tools::Long nY, + tools::Long nWidth, + tools::Long nHeight ) { Destroy(); @@ -529,7 +529,7 @@ bool X11SalBitmap::ImplCreateFromDrawable( ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable, SalX11Screen nXScreen, - long nDrawableDepth, + tools::Long nDrawableDepth, const SalTwoRect& rTwoRect ) const { @@ -627,7 +627,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( void X11SalBitmap::ImplDraw( Drawable aDrawable, SalX11Screen nXScreen, - long nDrawableDepth, + tools::Long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC ) const @@ -707,7 +707,7 @@ bool X11SalBitmap::Create( css::uno::Sequence< css::uno::Any > args; if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) { - long pixmapHandle = {}; // spurious -Werror=maybe-uninitialized + tools::Long pixmapHandle = {}; // spurious -Werror=maybe-uninitialized sal_Int32 depth; if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) { @@ -877,11 +877,11 @@ ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable, ImplSalDDB::ImplSalDDB( Drawable aDrawable, SalX11Screen nXScreen, - long nDrawableDepth, - long nX, - long nY, - long nWidth, - long nHeight + tools::Long nDrawableDepth, + tools::Long nX, + tools::Long nY, + tools::Long nWidth, + tools::Long nHeight ) : maTwoRect(0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight) , mnDepth( nDrawableDepth ) , mnXScreen( nXScreen ) @@ -922,7 +922,7 @@ ImplSalDDB::~ImplSalDDB() XFreePixmap( vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDisplay(), maPixmap ); } -bool ImplSalDDB::ImplMatches( SalX11Screen nXScreen, long nDepth, const SalTwoRect& rTwoRect ) const +bool ImplSalDDB::ImplMatches( SalX11Screen nXScreen, tools::Long nDepth, const SalTwoRect& rTwoRect ) const { bool bRet = false; @@ -970,14 +970,14 @@ void ImplSalDDB::ImplDraw( void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, - long nSrcDrawableDepth, + tools::Long nSrcDrawableDepth, Drawable aDstDrawable, - long nSrcX, - long nSrcY, - long nDestWidth, - long nDestHeight, - long nDestX, - long nDestY, + tools::Long nSrcX, + tools::Long nSrcY, + tools::Long nDestWidth, + tools::Long nDestHeight, + tools::Long nDestX, + tools::Long nDestY, const GC& rGC ) { SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericUnixSalData()); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 6da291c91bea..045a97e14db0 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -342,7 +342,7 @@ sal_uInt16 X11SalGraphics::GetBitCount() const return mxImpl->GetBitCount(); } -long X11SalGraphics::GetGraphicsWidth() const +tools::Long X11SalGraphics::GetGraphicsWidth() const { return mxImpl->GetGraphicsWidth(); } @@ -414,22 +414,22 @@ void X11SalGraphics::SetXORMode( bool bSet, bool bInvertOnly ) mxImpl->SetXORMode( bSet, bInvertOnly ); } -void X11SalGraphics::drawPixel( long nX, long nY ) +void X11SalGraphics::drawPixel( tools::Long nX, tools::Long nY ) { mxImpl->drawPixel( nX, nY ); } -void X11SalGraphics::drawPixel( long nX, long nY, Color nColor ) +void X11SalGraphics::drawPixel( tools::Long nX, tools::Long nY, Color nColor ) { mxImpl->drawPixel( nX, nY, nColor ); } -void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) +void X11SalGraphics::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) { mxImpl->drawLine( nX1, nY1, nX2, nY2 ); } -void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY ) +void X11SalGraphics::drawRect( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) { mxImpl->drawRect( nX, nY, nDX, nDY ); } @@ -474,8 +474,8 @@ void X11SalGraphics::invert( sal_uInt32 nPoints, mxImpl->invert( nPoints, pPtAry, nFlags ); } -bool X11SalGraphics::drawEPS( long nX, long nY, long nWidth, - long nHeight, void* pPtr, sal_uInt32 nSize ) +bool X11SalGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, + tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) { return mxImpl->drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize ); } diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index 768562bfb498..fca6051dc3cd 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -91,9 +91,9 @@ void X11SalGraphics::copyBits( const SalTwoRect& rPosAry, mxImpl->copyBits( rPosAry, pSSrcGraphics ); } -void X11SalGraphics::copyArea ( long nDestX, long nDestY, - long nSrcX, long nSrcY, - long nSrcWidth, long nSrcHeight, +void X11SalGraphics::copyArea ( tools::Long nDestX, tools::Long nDestY, + tools::Long nSrcX, tools::Long nSrcY, + tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) { mxImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, bWindowInvalidate ); @@ -141,8 +141,8 @@ bool X11SalGraphics::drawTransformedBitmap( return mxImpl->drawTransformedBitmap( rNull, rX, rY, rSourceBitmap, pAlphaBitmap ); } -bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth, - long nHeight, sal_uInt8 nTransparency ) +bool X11SalGraphics::drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, + tools::Long nHeight, sal_uInt8 nTransparency ) { return mxImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency ); } @@ -154,20 +154,20 @@ void X11SalGraphics::drawMask( const SalTwoRect& rPosAry, mxImpl->drawMask( rPosAry, rSalBitmap, nMaskColor ); } -std::shared_ptr<SalBitmap> X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) +std::shared_ptr<SalBitmap> X11SalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) { return mxImpl->getBitmap( nX, nY, nDX, nDY ); } -Color X11SalGraphics::getPixel( long nX, long nY ) +Color X11SalGraphics::getPixel( tools::Long nX, tools::Long nY ) { return mxImpl->getPixel( nX, nY ); } -void X11SalGraphics::invert( long nX, - long nY, - long nDX, - long nDY, +void X11SalGraphics::invert( tools::Long nX, + tools::Long nY, + tools::Long nDX, + tools::Long nDY, SalInvert nFlags ) { mxImpl->invert( nX, nY, nDX, nDY, nFlags ); diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 00a6f0a19416..eeb4e73fe62d 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -38,7 +38,7 @@ #endif std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(SalGraphics const * pGraphics, - long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData, + tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData, std::unique_ptr<X11SalGraphics> pNewGraphics) { assert(pNewGraphics); @@ -54,7 +54,7 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(SalGrap } std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphics* pGraphics, - long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData) + tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData) { return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, std::make_unique<X11SalGraphics>()); } @@ -92,7 +92,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, cairo_surface_t* pPreEx mxImpl->Init(); } -X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nDX, long &nDY, +X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData, std::unique_ptr<X11SalGraphics> pNewGraphics) : pGraphics_(std::move(pNewGraphics)), @@ -132,8 +132,8 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nD break; nScreen++; } - nDX_ = static_cast<long>(w); - nDY_ = static_cast<long>(h); + nDX_ = static_cast<tools::Long>(w); + nDY_ = static_cast<tools::Long>(h); nDX = nDX_; nDY = nDY_; m_nXScreen = SalX11Screen( nScreen ); @@ -199,7 +199,7 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics() void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) { bGraphics_ = false; } -bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) +bool X11SalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY ) { if( bExternPixmap_ ) return false; diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx index 91f82ac84b21..d49d932656ee 100644 --- a/vcl/unx/generic/gdi/x11cairotextrender.cxx +++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx @@ -46,7 +46,7 @@ void X11CairoTextRender::clipRegion(cairo_t* cr) Region pClipRegion = mrParent.mpClipRegion; if( pClipRegion && !XEmptyRegion( pClipRegion ) ) { - for (long i = 0; i < pClipRegion->numRects; ++i) + for (tools::Long i = 0; i < pClipRegion->numRects; ++i) { cairo_rectangle(cr, pClipRegion->rects[i].x1, diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 9b3f8dc5c6f1..cbc8f7e1b4d5 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -421,8 +421,8 @@ FreetypeFont::FreetypeFont(FreetypeFontInstance& rFontInstance, const std::share if( rFSD.mnOrientation != 0 ) { const double dRad = rFSD.mnOrientation * ( F_2PI / 3600.0 ); - mnCos = static_cast<long>( 0x10000 * cos( dRad ) + 0.5 ); - mnSin = static_cast<long>( 0x10000 * sin( dRad ) + 0.5 ); + mnCos = static_cast<tools::Long>( 0x10000 * cos( dRad ) + 0.5 ); + mnSin = static_cast<tools::Long>( 0x10000 * sin( dRad ) + 0.5 ); } // set the pixel size of the font instance @@ -729,11 +729,11 @@ class PolyArgs public: PolyArgs( tools::PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints ); - void AddPoint( long nX, long nY, PolyFlags); + void AddPoint( tools::Long nX, tools::Long nY, PolyFlags); void ClosePolygon(); - long GetPosX() const { return maPosition.x;} - long GetPosY() const { return maPosition.y;} + tools::Long GetPosX() const { return maPosition.x;} + tools::Long GetPosY() const { return maPosition.y;} private: tools::PolyPolygon& mrPolyPoly; @@ -767,7 +767,7 @@ PolyArgs::PolyArgs( tools::PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints ) maPosition.x = maPosition.y = 0; } -void PolyArgs::AddPoint( long nX, long nY, PolyFlags aFlag ) +void PolyArgs::AddPoint( tools::Long nX, tools::Long nY, PolyFlags aFlag ) { SAL_WARN_IF( (mnPoints >= mnMaxPoints), "vcl", "FTGlyphOutline: AddPoint overflow!" ); if( mnPoints >= mnMaxPoints ) @@ -852,12 +852,12 @@ static int FT_conic_to( const FT_Vector* p1, const FT_Vector* p2, void* vpPolyAr PolyArgs& rA = *static_cast<PolyArgs*>(vpPolyArgs); // VCL's Polygon only knows cubic beziers - const long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6; - const long nY1 = (2 * rA.GetPosY() + 4 * p1->y + 3) / 6; + const tools::Long nX1 = (2 * rA.GetPosX() + 4 * p1->x + 3) / 6; + const tools::Long nY1 = (2 * rA.GetPosY() + 4 * p1->y + 3) / 6; rA.AddPoint( nX1, nY1, PolyFlags::Control ); - const long nX2 = (2 * p2->x + 4 * p1->x + 3) / 6; - const long nY2 = (2 * p2->y + 4 * p1->y + 3) / 6; + const tools::Long nX2 = (2 * p2->x + 4 * p1->x + 3) / 6; + const tools::Long nY2 = (2 * p2->y + 4 * p1->y + 3) / 6; rA.AddPoint( nX2, nY2, PolyFlags::Control ); rA.AddPoint( p2->x, p2->y, PolyFlags::Normal ); @@ -923,7 +923,7 @@ bool FreetypeFont::GetGlyphOutline(sal_GlyphId nId, basegfx::B2DPolyPolygon& rB2 return true; } - long nMaxPoints = 1 + rOutline.n_points * 3; + tools::Long nMaxPoints = 1 + rOutline.n_points * 3; tools::PolyPolygon aToolPolyPolygon; PolyArgs aPolyArg( aToolPolyPolygon, nMaxPoints ); diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx index b559b9b1325f..4ddce0214190 100644 --- a/vcl/unx/generic/print/bitmap_gfx.cxx +++ b/vcl/unx/generic/print/bitmap_gfx.cxx @@ -511,9 +511,9 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& // image body std::unique_ptr<HexEncoder> xEncoder(new HexEncoder (mpPageBody)); - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn); xEncoder->EncodeByte (nByte); @@ -612,9 +612,9 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody)); - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn); xEncoder->EncodeByte (nByte); @@ -630,12 +630,12 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle& std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody)); - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) { - long nBitPos = 0; + tools::Long nBitPos = 0; unsigned char nByte = 0; - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nBit = rBitmap.GetPixelIdx (nRow, nColumn); nByte |= nBit << (7 - nBitPos); @@ -661,9 +661,9 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectang std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody)); - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { unsigned char nByte = rBitmap.GetPixelIdx (nRow, nColumn); xEncoder->EncodeByte (nByte); @@ -679,9 +679,9 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Recta std::unique_ptr<ByteEncoder> xEncoder(new LZWEncoder(mpPageBody)); - for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) + for (tools::Long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++) { - for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) + for (tools::Long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++) { PrinterColor aColor = rBitmap.GetPixelRGB (nRow, nColumn); xEncoder->EncodeByte (aColor.GetRed()); diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx index 18caa2e8f413..6d08fbb7842a 100644 --- a/vcl/unx/generic/print/genprnpsp.cxx +++ b/vcl/unx/generic/print/genprnpsp.cxx @@ -661,7 +661,7 @@ bool PspSalInfoPrinter::SetData( void PspSalInfoPrinter::GetPageInfo( const ImplJobSetup* pJobSetup, - long& rOutWidth, long& rOutHeight, + tools::Long& rOutWidth, tools::Long& rOutHeight, Point& rPageOffset, Size& rPaperSize ) { @@ -925,8 +925,8 @@ struct PDFNewJobParameters bool operator==(const PDFNewJobParameters& rComp ) const { - const long nRotatedWidth = rComp.maPageSize.Height(); - const long nRotatedHeight = rComp.maPageSize.Width(); + const tools::Long nRotatedWidth = rComp.maPageSize.Height(); + const tools::Long nRotatedHeight = rComp.maPageSize.Width(); Size aCompLSSize(nRotatedWidth, nRotatedHeight); return (maPageSize == rComp.maPageSize || maPageSize == aCompLSSize) diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index a79aaab72fd8..79e3b29175d1 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -226,7 +226,7 @@ sal_uInt16 GenPspGraphics::GetBitCount() const return m_pPrinterGfx->GetBitCount(); } -long GenPspGraphics::GetGraphicsWidth() const +tools::Long GenPspGraphics::GetGraphicsWidth() const { return 0; } @@ -245,11 +245,11 @@ bool GenPspGraphics::setClipRegion( const vcl::Region& i_rClip ) for (auto const& rectangle : aRectangles) { - const long nW(rectangle.GetWidth()); + const tools::Long nW(rectangle.GetWidth()); if(nW) { - const long nH(rectangle.GetHeight()); + const tools::Long nH(rectangle.GetHeight()); if(nH) { @@ -322,12 +322,12 @@ void GenPspGraphics::SetXORMode( bool bSet, bool ) SAL_WARN_IF( bSet, "vcl", "Error: PrinterGfx::SetXORMode() not implemented" ); } -void GenPspGraphics::drawPixel( long nX, long nY ) +void GenPspGraphics::drawPixel( tools::Long nX, tools::Long nY ) { m_pPrinterGfx->DrawPixel (Point(nX, nY)); } -void GenPspGraphics::drawPixel( long nX, long nY, Color nColor ) +void GenPspGraphics::drawPixel( tools::Long nX, tools::Long nY, Color nColor ) { psp::PrinterColor aColor (nColor.GetRed(), nColor.GetGreen(), @@ -335,12 +335,12 @@ void GenPspGraphics::drawPixel( long nX, long nY, Color nColor ) m_pPrinterGfx->DrawPixel (Point(nX, nY), aColor); } -void GenPspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) +void GenPspGraphics::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) { m_pPrinterGfx->DrawLine (Point(nX1, nY1), Point(nX2, nY2)); } -void GenPspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) +void GenPspGraphics::drawRect( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY ) { m_pPrinterGfx->DrawRect (tools::Rectangle(Point(nX, nY), Size(nDX, nDY))); } @@ -416,7 +416,7 @@ void GenPspGraphics::invert( sal_uInt32, SAL_WARN( "vcl", "Error: PrinterGfx::Invert() not implemented" ); } -bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize ) +bool GenPspGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) { return m_pPrinterGfx->DrawEPS( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); } @@ -427,7 +427,7 @@ void GenPspGraphics::copyBits( const SalTwoRect&, OSL_FAIL( "Error: PrinterGfx::CopyBits() not implemented" ); } -void GenPspGraphics::copyArea ( long,long,long,long,long,long,bool ) +void GenPspGraphics::copyArea ( tools::Long,tools::Long,tools::Long,tools::Long,tools::Long,tools::Long,bool ) { OSL_FAIL( "Error: PrinterGfx::CopyArea() not implemented" ); } @@ -461,19 +461,19 @@ void GenPspGraphics::drawMask( const SalTwoRect&, OSL_FAIL("Error: PrinterGfx::DrawMask() not implemented"); } -std::shared_ptr<SalBitmap> GenPspGraphics::getBitmap( long, long, long, long ) +std::shared_ptr<SalBitmap> GenPspGraphics::getBitmap( tools::Long, tools::Long, tools::Long, tools::Long ) { SAL_INFO("vcl", "Warning: PrinterGfx::GetBitmap() not implemented"); return nullptr; } -Color GenPspGraphics::getPixel( long, long ) +Color GenPspGraphics::getPixel( tools::Long, tools::Long ) { OSL_FAIL("Warning: PrinterGfx::GetPixel() not implemented"); return 0; } -void GenPspGraphics::invert(long,long,long,long,SalInvert) +void GenPspGraphics::invert(tools::Long,tools::Long,tools::Long,tools::Long,SalInvert) { OSL_FAIL("Warning: PrinterGfx::Invert() not implemented"); } @@ -854,7 +854,7 @@ bool GenPspGraphics::drawTransformedBitmap( return false; } -bool GenPspGraphics::drawAlphaRect( long, long, long, long, sal_uInt8 ) +bool GenPspGraphics::drawAlphaRect( tools::Long, tools::Long, tools::Long, tools::Long, sal_uInt8 ) { return false; } @@ -898,13 +898,13 @@ bool GenPspGraphics::supportsOperation( OutDevSupportType ) const return false; } -void GenPspGraphics::DoFreeEmbedFontData( const void* pData, long nLen ) +void GenPspGraphics::DoFreeEmbedFontData( const void* pData, tools::Long nLen ) { if( pData ) munmap( const_cast<void *>(pData), nLen ); } -const void* GenPspGraphics::DoGetEmbedFontData(psp::fontID aFont, long* pDataLen) +const void* GenPspGraphics::DoGetEmbedFontData(psp::fontID aFont, tools::Long* pDataLen) { psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); @@ -929,12 +929,12 @@ const void* GenPspGraphics::DoGetEmbedFontData(psp::fontID aFont, long* pDataLen return pFile; } -void GenPspGraphics::FreeEmbedFontData( const void* pData, long nLen ) +void GenPspGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen ) { DoFreeEmbedFontData( pData, nLen ); } -const void* GenPspGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen) +const void* GenPspGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) { // in this context the pFont->GetFontId() is a valid PSP // font since they are the only ones left after the PDF diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx index c27348afcff6..1afd827dfbb7 100644 --- a/vcl/unx/generic/print/glyphset.cxx +++ b/vcl/unx/generic/print/glyphset.cxx @@ -183,7 +183,7 @@ namespace { struct EncEntry { unsigned char aEnc; - long aGID; + tools::Long aGID; EncEntry() : aEnc( 0 ), aGID( 0 ) {} diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index b3137fd2b00c..06ed7fecdb9e 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -316,7 +316,7 @@ void PPDDecompressStream::Open( const OUString& i_rFile ) mpMemStream.reset( new SvMemoryStream( 4096, 4096 ) ); ZCodec aCodec; aCodec.BeginCompression( ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true ); - long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream ); + tools::Long nComp = aCodec.Decompress( *mpFileStream, *mpMemStream ); aCodec.EndCompression(); if( nComp < 0 ) { diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 3d52797f5cec..b8a3d2a5d0de 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -148,7 +148,7 @@ void X11SalFrame::setXEmbedInfo() if( !m_bXEmbed ) return; - long aInfo[2]; + tools::Long aInfo[2]; aInfo[0] = 1; // XEMBED protocol version aInfo[1] = (bMapped_ ? 1 : 0); // XEMBED_MAPPED XChangeProperty( pDisplay_->GetDisplay(), @@ -1112,7 +1112,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon ) } -void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight ) +void X11SalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) { if( IsChildWindow() ) return; @@ -1122,7 +1122,7 @@ void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight ) return; XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; + tools::Long nSupplied = 0; XGetWMNormalHints( GetXDisplay(), GetShellWindow(), pHints, @@ -1137,7 +1137,7 @@ void X11SalFrame::SetMaxClientSize( long nWidth, long nHeight ) XFree( pHints ); } -void X11SalFrame::SetMinClientSize( long nWidth, long nHeight ) +void X11SalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) { if( IsChildWindow() ) return; @@ -1147,7 +1147,7 @@ void X11SalFrame::SetMinClientSize( long nWidth, long nHeight ) return; XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; + tools::Long nSupplied = 0; XGetWMNormalHints( GetXDisplay(), GetShellWindow(), pHints, @@ -1425,7 +1425,7 @@ void X11SalFrame::GetWorkArea( tools::Rectangle& rWorkArea ) rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 ); } -void X11SalFrame::GetClientSize( long &rWidth, long &rHeight ) +void X11SalFrame::GetClientSize( tools::Long &rWidth, tools::Long &rHeight ) { if( ! bViewable_ ) { @@ -1582,7 +1582,7 @@ void X11SalFrame::updateScreenNumber() maGeometry.nDisplayScreenNumber = m_nXScreen.getXScreen(); } -void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) +void X11SalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) { if( nStyle_ & SalFrameStyleFlags::PLUG ) return; @@ -1663,7 +1663,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) ) { XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; + tools::Long nSupplied = 0; XGetWMNormalHints( GetXDisplay(), GetShellWindow(), pHints, @@ -1706,7 +1706,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) } if (pState->mnMask & WindowStateMask::Width) { - long nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0; + tools::Long nWidth = pState->mnWidth > 0 ? pState->mnWidth - 1 : 0; aPosSize.setWidth (nWidth); bDoAdjust = true; } @@ -1741,14 +1741,14 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) } // adjust position so that frame fits onto screen - if( aPosSize.Right()+static_cast<long>(aGeom.nRightDecoration) > aScreenSize.Width()-1 ) - aPosSize.Move( aScreenSize.Width() - aPosSize.Right() - static_cast<long>(aGeom.nRightDecoration), 0 ); - if( aPosSize.Bottom()+static_cast<long>(aGeom.nBottomDecoration) > aScreenSize.Height()-1 ) - aPosSize.Move( 0, aScreenSize.Height() - aPosSize.Bottom() - static_cast<long>(aGeom.nBottomDecoration) ); - if( aPosSize.Left() < static_cast<long>(aGeom.nLeftDecoration) ) - aPosSize.Move( static_cast<long>(aGeom.nLeftDecoration) - aPosSize.Left(), 0 ); - if( aPosSize.Top() < static_cast<long>(aGeom.nTopDecoration) ) - aPosSize.Move( 0, static_cast<long>(aGeom.nTopDecoration) - aPosSize.Top() ); + if( aPosSize.Right()+static_cast<tools::Long>(aGeom.nRightDecoration) > aScreenSize.Width()-1 ) + aPosSize.Move( aScreenSize.Width() - aPosSize.Right() - static_cast<tools::Long>(aGeom.nRightDecoration), 0 ); + if( aPosSize.Bottom()+static_cast<tools::Long>(aGeom.nBottomDecoration) > aScreenSize.Height()-1 ) + aPosSize.Move( 0, aScreenSize.Height() - aPosSize.Bottom() - static_cast<tools::Long>(aGeom.nBottomDecoration) ); + if( aPosSize.Left() < static_cast<tools::Long>(aGeom.nLeftDecoration) ) + aPosSize.Move( static_cast<tools::Long>(aGeom.nLeftDecoration) - aPosSize.Left(), 0 ); + if( aPosSize.Top() < static_cast<tools::Long>(aGeom.nTopDecoration) ) + aPosSize.Move( 0, static_cast<tools::Long>(aGeom.nTopDecoration) - aPosSize.Top() ); } SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT ); @@ -1848,8 +1848,8 @@ void X11SalFrame::GetPosSize( tools::Rectangle &rPosSize ) if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 ) { const Size& aScreenSize = pDisplay_->getDataForScreen( m_nXScreen ).m_aSize; - long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration; - long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration; + tools::Long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration; + tools::Long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration; rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); } @@ -1868,7 +1868,7 @@ void X11SalFrame::SetSize( const Size &rSize ) && ( nStyle_ & (SalFrameStyleFlags::FLOAT|SalFrameStyleFlags::OWNERDRAWDECORATION) ) != SalFrameStyleFlags::FLOAT ) { XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; + tools::Long nSupplied = 0; XGetWMNormalHints( GetXDisplay(), GetShellWindow(), pHints, @@ -1948,7 +1948,7 @@ void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize ) ) { XSizeHints* pHints = XAllocSizeHints(); - long nSupplied = 0; + tools::Long nSupplied = 0; XGetWMNormalHints( GetXDisplay(), GetShellWindow(), pHints, @@ -2239,7 +2239,7 @@ void X11SalFrame::SetPointer( PointerStyle ePointerStyle ) CurrentTime ); } -void X11SalFrame::SetPointerPos(long nX, long nY) +void X11SalFrame::SetPointerPos(tools::Long nX, tools::Long nY) { /* when the application tries to center the mouse in the dialog the * window isn't mapped already. So use coordinates relative to the root window. @@ -4078,7 +4078,7 @@ void X11SalFrame::BeginSetClipRegion( sal_uInt32 /*nRects*/ ) m_vClipRectangles.clear(); } -void X11SalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +void X11SalFrame::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) { m_vClipRectangles.emplace_back( XRectangle { static_cast<short>(nX), static_cast<short>(nY), static_cast<unsigned short>(nWidth), static_cast<unsigned short>(nHeight) } ); diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index 029204481ff8..864b5e22307f 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -199,7 +199,7 @@ SalClipRegion::BeginSetClipRegion( sal_uInt32 nRects ) } void -SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +SalClipRegion::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) { if ( nWidth && nHeight && (numClipRectangles < maxClipRectangles) ) { @@ -293,7 +293,7 @@ X11SalObject::BeginSetClipRegion( sal_uInt32 nRectCount ) } void -X11SalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +X11SalObject::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) { maClipRegion.UnionClipRegion ( nX, nY, nWidth, nHeight ); } @@ -316,7 +316,7 @@ X11SalObject::EndSetClipRegion() } void -X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight ) +X11SalObject::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) { if ( maPrimary && maSecondary && nWidth && nHeight ) { @@ -479,7 +479,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::A if (rEnterArgs.getLength() == 3) { rEnterArgs[0] >>= bFreePixmap; - long pixmapHandle = None; + tools::Long pixmapHandle = None; rEnterArgs[1] >>= pixmapHandle; aPixmap = pixmapHandle; } @@ -493,7 +493,7 @@ void X11SalObject::SetLeaveEnterBackgrounds(const css::uno::Sequence<css::uno::A if (rLeaveArgs.getLength() == 3) { rLeaveArgs[0] >>= bFreePixmap; - long pixmapHandle = None; + tools::Long pixmapHandle = None; rLeaveArgs[1] >>= pixmapHandle; aPixmap = pixmapHandle; } diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 4055520fe153..fd18c35aec6d 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -709,7 +709,7 @@ GtkSalFrame::~GtkSalFrame() cairo_surface_destroy(m_pSurface); } -void GtkSalFrame::moveWindow( long nX, long nY ) +void GtkSalFrame::moveWindow( tools::Long nX, tools::Long nY ) { if( isChild( false ) ) { @@ -727,12 +727,12 @@ void GtkSalFrame::moveWindow( long nX, long nY ) gtk_window_move( GTK_WINDOW(m_pWindow), nX, nY ); } -void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight) +void GtkSalFrame::widget_set_size_request(tools::Long nWidth, tools::Long nHeight) { gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight ); } -void GtkSalFrame::window_resize(long nWidth, long nHeight) +void GtkSalFrame::window_resize(tools::Long nWidth, tools::Long nHeight) { m_nWidthRequest = nWidth; m_nHeightRequest = nHeight; @@ -741,7 +741,7 @@ void GtkSalFrame::window_resize(long nWidth, long nHeight) gtk_window_resize(GTK_WINDOW(m_pWindow), nWidth, nHeight); } -void GtkSalFrame::resizeWindow( long nWidth, long nHeight ) +void GtkSalFrame::resizeWindow( tools::Long nWidth, tools::Long nHeight ) { if( isChild( false ) ) { @@ -1476,7 +1476,7 @@ void GtkSalFrame::setMinMaxSize() } } -void GtkSalFrame::SetMaxClientSize( long nWidth, long nHeight ) +void GtkSalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) { if( ! isChild() ) { @@ -1484,7 +1484,7 @@ void GtkSalFrame::SetMaxClientSize( long nWidth, long nHeight ) setMinMaxSize(); } } -void GtkSalFrame::SetMinClientSize( long nWidth, long nHeight ) +void GtkSalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) { if( ! isChild() ) { @@ -1525,7 +1525,7 @@ void GtkSalFrame::AllocateFrame() m_pGraphics->setSurface(m_pSurface, m_aFrameSize); } -void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) +void GtkSalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) { if( !m_pWindow || isChild( true, false ) ) return; @@ -1579,7 +1579,7 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u m_bDefaultPos = false; } -void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight ) +void GtkSalFrame::GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) { if( m_pWindow && !(m_nState & GDK_WINDOW_STATE_ICONIFIED) ) { @@ -1640,8 +1640,8 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) WindowStateMask::Width | WindowStateMask::Height ) ) { sal_uInt16 nPosSizeFlags = 0; - long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0); - long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0); + tools::Long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0); + tools::Long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0); if( pState->mnMask & WindowStateMask::X ) nPosSizeFlags |= SAL_FRAME_POSSIZE_X; else @@ -1681,7 +1681,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) namespace { - void GetPosAndSize(GtkWindow *pWindow, long& rX, long &rY, long &rWidth, long &rHeight) + void GetPosAndSize(GtkWindow *pWindow, tools::Long& rX, tools::Long &rY, tools::Long &rWidth, tools::Long &rHeight) { gint root_x, root_y; gtk_window_get_position(GTK_WINDOW(pWindow), &root_x, &root_y); @@ -1695,7 +1695,7 @@ namespace tools::Rectangle GetPosAndSize(GtkWindow *pWindow) { - long nX, nY, nWidth, nHeight; + tools::Long nX, nY, nWidth, nHeight; GetPosAndSize(pWindow, nX, nY, nWidth, nHeight); return tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight); } @@ -2057,7 +2057,7 @@ void GtkSalFrame::CaptureMouse( bool bCapture ) getDisplay()->CaptureMouse( bCapture ? this : nullptr ); } -void GtkSalFrame::SetPointerPos( long nX, long nY ) +void GtkSalFrame::SetPointerPos( tools::Long nX, tools::Long nY ) { GtkSalFrame* pFrame = this; while( pFrame && pFrame->isChild( false ) ) @@ -2331,7 +2331,7 @@ void GtkSalFrame::BeginSetClipRegion( sal_uInt32 ) m_pRegion = cairo_region_create(); } -void GtkSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +void GtkSalFrame::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) { if( m_pRegion ) { @@ -2635,8 +2635,8 @@ gboolean GtkSalFrame::signalButton(GtkWidget*, GdkEventButton* pEvent, gpointer if (!aDel.isDeleted()) { aEvent.mnTime = pEvent->time; - aEvent.mnX = static_cast<long>(pEvent->x_root) - pThis->maGeometry.nX; - aEvent.mnY = static_cast<long>(pEvent->y_root) - pThis->maGeometry.nY; + aEvent.mnX = static_cast<tools::Long>(pEvent->x_root) - pThis->maGeometry.nX; + aEvent.mnY = static_cast<tools::Long>(pEvent->y_root) - pThis->maGeometry.nY; aEvent.mnCode = GetMouseModCode( pEvent->state ); if( AllSettings::GetLayoutRTL() ) @@ -2869,8 +2869,8 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer { SalMouseEvent aEvent; aEvent.mnTime = pEvent->time; - aEvent.mnX = static_cast<long>(pEvent->x_root) - pThis->maGeometry.nX; - aEvent.mnY = static_cast<long>(pEvent->y_root) - pThis->maGeometry.nY; + aEvent.mnX = static_cast<tools::Long>(pEvent->x_root) - pThis->maGeometry.nX; + aEvent.mnY = static_cast<tools::Long>(pEvent->y_root) - pThis->maGeometry.nY; aEvent.mnCode = GetMouseModCode( pEvent->state ); aEvent.mnButton = 0; @@ -2898,8 +2898,8 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpoi GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame); SalMouseEvent aEvent; aEvent.mnTime = pEvent->time; - aEvent.mnX = static_cast<long>(pEvent->x_root) - pThis->maGeometry.nX; - aEvent.mnY = static_cast<long>(pEvent->y_root) - pThis->maGeometry.nY; + aEvent.mnX = static_cast<tools::Long>(pEvent->x_root) - pThis->maGeometry.nX; + aEvent.mnY = static_cast<tools::Long>(pEvent->y_root) - pThis->maGeometry.nY; aEvent.mnCode = GetMouseModCode( pEvent->state ); aEvent.mnButton = 0; diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 0a4b3a4911cf..3e2a7e7c69bd 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -332,7 +332,7 @@ void GtkYieldMutex::ThreadsLeave() } std::unique_ptr<SalVirtualDevice> GtkInstance::CreateVirtualDevice( SalGraphics *pG, - long &nDX, long &nDY, + tools::Long &nDX, tools::Long &nDY, DeviceFormat eFormat, const SystemGraphicsData* pGd ) { diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx index 1a2cea0d71da..173e1b02f356 100644 --- a/vcl/unx/gtk3/gtk3gtkobject.cxx +++ b/vcl/unx/gtk3/gtk3gtkobject.cxx @@ -134,7 +134,7 @@ void GtkSalObjectBase::BeginSetClipRegion( sal_uInt32 ) m_pRegion = cairo_region_create(); } -void GtkSalObjectBase::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) +void GtkSalObjectBase::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) { GdkRectangle aRect; aRect.x = nX; @@ -151,7 +151,7 @@ void GtkSalObject::EndSetClipRegion() gdk_window_shape_combine_region( gtk_widget_get_window(m_pSocket), m_pRegion, 0, 0 ); } -void GtkSalObject::SetPosSize(long nX, long nY, long nWidth, long nHeight) +void GtkSalObject::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) { if (m_pSocket) { @@ -375,7 +375,7 @@ void GtkSalObjectWidgetClip::ApplyClipRegion() gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(m_pScrolledWindow)), m_aClipRect.Top()); } -void GtkSalObjectWidgetClip::SetPosSize(long nX, long nY, long nWidth, long nHeight) +void GtkSalObjectWidgetClip::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) { m_aRect = tools::Rectangle(Point(nX, nY), Size(nWidth, nHeight)); if (m_pSocket) diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index c9cbf01e9ecb..64096f805065 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1492,8 +1492,8 @@ namespace { void draw_vertical_separator(GtkStyleContext *context, cairo_t *cr, const tools::Rectangle& rControlRegion) { - long nX = 0; - long nY = 0; + tools::Long nX = 0; + tools::Long nY = 0; gint nSeparatorWidth = 1; @@ -1514,8 +1514,8 @@ namespace void draw_horizontal_separator(GtkStyleContext *context, cairo_t *cr, const tools::Rectangle& rControlRegion) { - long nX = 0; - long nY = 0; + tools::Long nX = 0; + tools::Long nY = 0; gint nSeparatorHeight = 1; @@ -1762,10 +1762,10 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co clipRegion(cr); cairo_translate(cr, rControlRegion.Left(), rControlRegion.Top()); - long nX = 0; - long nY = 0; - long nWidth = rControlRegion.GetWidth(); - long nHeight = rControlRegion.GetHeight(); + tools::Long nX = 0; + tools::Long nY = 0; + tools::Long nWidth = rControlRegion.GetWidth(); + tools::Long nHeight = rControlRegion.GetHeight(); StyleContextSave aContextState; aContextState.save(context); @@ -1882,7 +1882,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co { gtk_render_background(mpProgressBarTroughStyle, cr, nX, nY, nWidth, nHeight); - long nProgressWidth = rValue.getNumericVal(); + tools::Long nProgressWidth = rValue.getNumericVal(); if (nProgressWidth) { GtkBorder padding; @@ -1935,11 +1935,11 @@ static tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, Gt { GtkRequisition aReq; gtk_widget_get_preferred_size(widget, nullptr, &aReq); - long nHeight = std::max<long>(rControlRegion.GetHeight(), aReq.height); + tools::Long nHeight = std::max<long>(rControlRegion.GetHeight(), aReq.height); return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight)); } -static tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion) +static tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, tools::Long nContentWidth, tools::Long nContentHeight, const tools::Rectangle& rControlRegion) { GtkBorder border; gtk_style_context_get_border(pStyle, gtk_style_context_get_state(pStyle), &border); |