diff options
Diffstat (limited to 'vcl')
24 files changed, 89 insertions, 90 deletions
diff --git a/vcl/inc/salgeom.hxx b/vcl/inc/salgeom.hxx index ac87d83f4a26..0bc7335c2977 100644 --- a/vcl/inc/salgeom.hxx +++ b/vcl/inc/salgeom.hxx @@ -29,9 +29,9 @@ struct SalFrameGeometry { // screen position of upper left corner of drawable area in pixel tools::Long nX, nY; // dimensions of the drawable area in pixel - unsigned long nWidth, nHeight; + tools::ULong nWidth, nHeight; // thickness of the decoration in pixel - unsigned long nLeftDecoration, + tools::ULong nLeftDecoration, nTopDecoration, nRightDecoration, nBottomDecoration; diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx index aa8dff8aaa29..9470dfd3acad 100644 --- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx +++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx @@ -47,8 +47,8 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const tools::Long nGrey31, nGrey32, nGrey33; double fAzim = basegfx::deg2rad(mnAzimuthAngle100 * 0.01); double fElev = basegfx::deg2rad(mnElevationAngle100 * 0.01); - std::unique_ptr<long[]> pHMap(new long[nWidth + 2]); - std::unique_ptr<long[]> pVMap(new long[nHeight + 2]); + std::unique_ptr<tools::Long[]> pHMap(new tools::Long[nWidth + 2]); + std::unique_ptr<tools::Long[]> pVMap(new tools::Long[nHeight + 2]); tools::Long nX, nY, nNx, nNy, nDotL; const tools::Long nLx = FRound(cos(fAzim) * cos(fElev) * 255.0); const tools::Long nLy = FRound(sin(fAzim) * cos(fElev) * 255.0); diff --git a/vcl/source/bitmap/BitmapFastScaleFilter.cxx b/vcl/source/bitmap/BitmapFastScaleFilter.cxx index 5b9ff591c953..7c8b63a0f729 100644 --- a/vcl/source/bitmap/BitmapFastScaleFilter.cxx +++ b/vcl/source/bitmap/BitmapFastScaleFilter.cxx @@ -58,8 +58,8 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const { const double nWidth = pReadAcc->Width(); const double nHeight = pReadAcc->Height(); - std::unique_ptr<long[]> pLutX(new long[nNewWidth]); - std::unique_ptr<long[]> pLutY(new long[nNewHeight]); + std::unique_ptr<tools::Long[]> pLutX(new tools::Long[nNewWidth]); + std::unique_ptr<tools::Long[]> pLutY(new tools::Long[nNewHeight]); for (tools::Long nX = 0; nX < nNewWidth; nX++) { diff --git a/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx b/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx index 1542b34a40c7..eb1d027bb295 100644 --- a/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx +++ b/vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx @@ -52,8 +52,8 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const const tools::Long nWidth1 = pReadAcc->Width() - 1; const double fRevScaleX = static_cast<double>(nWidth1) / nNewWidth1; - std::unique_ptr<long[]> pLutInt(new long[nNewWidth]); - std::unique_ptr<long[]> pLutFrac(new long[nNewWidth]); + std::unique_ptr<tools::Long[]> pLutInt(new tools::Long[nNewWidth]); + std::unique_ptr<tools::Long[]> pLutFrac(new tools::Long[nNewWidth]); for (tools::Long nX = 0, nTemp = nWidth - 2; nX < nNewWidth; nX++) { @@ -148,8 +148,8 @@ BitmapEx BitmapInterpolateScaleFilter::execute(BitmapEx const& rBitmapEx) const const tools::Long nHeight1 = pReadAcc->Height() - 1; const double fRevScaleY = static_cast<double>(nHeight1) / nNewHeight1; - std::unique_ptr<long[]> pLutInt(new long[nNewHeight]); - std::unique_ptr<long[]> pLutFrac(new long[nNewHeight]); + std::unique_ptr<tools::Long[]> pLutInt(new tools::Long[nNewHeight]); + std::unique_ptr<tools::Long[]> pLutFrac(new tools::Long[nNewHeight]); for (tools::Long nY = 0, nTemp = nHeight - 2; nY < nNewHeight; nY++) { diff --git a/vcl/source/bitmap/BitmapMedianFilter.cxx b/vcl/source/bitmap/BitmapMedianFilter.cxx index 4f1c857c0878..91bc75a7d4bd 100644 --- a/vcl/source/bitmap/BitmapMedianFilter.cxx +++ b/vcl/source/bitmap/BitmapMedianFilter.cxx @@ -66,8 +66,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const { const tools::Long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2; const tools::Long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2; - std::unique_ptr<long[]> pColm(new long[nWidth2]); - std::unique_ptr<long[]> pRows(new long[nHeight2]); + std::unique_ptr<tools::Long[]> pColm(new tools::Long[nWidth2]); + std::unique_ptr<tools::Long[]> pRows(new tools::Long[nHeight2]); std::unique_ptr<BitmapColor[]> pColRow1(new BitmapColor[nWidth2]); std::unique_ptr<BitmapColor[]> pColRow2(new BitmapColor[nWidth2]); std::unique_ptr<BitmapColor[]> pColRow3(new BitmapColor[nWidth2]); diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx index f1c849bd5787..dd9eb1a5999b 100644 --- a/vcl/source/bitmap/bitmappaint.cxx +++ b/vcl/source/bitmap/bitmappaint.cxx @@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, sa if (pAcc) { - std::unique_ptr<long[]> pMinR(new long[nColorCount]); - std::unique_ptr<long[]> pMaxR(new long[nColorCount]); - std::unique_ptr<long[]> pMinG(new long[nColorCount]); - std::unique_ptr<long[]> pMaxG(new long[nColorCount]); - std::unique_ptr<long[]> pMinB(new long[nColorCount]); - std::unique_ptr<long[]> pMaxB(new long[nColorCount]); + std::unique_ptr<tools::Long[]> pMinR(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMaxR(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMinG(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMaxG(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMinB(new tools::Long[nColorCount]); + std::unique_ptr<tools::Long[]> pMaxB(new tools::Long[nColorCount]); if (pTols) { diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index bcef44294468..24d64bdd7e41 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -502,7 +502,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const too rRenderContext.DrawLine(aStart, aEnd); } - for (long nDX = nGridDX; nDX <= aXSize.Width(); nDX += nGridDX) + for (tools::Long nDX = nGridDX; nDX <= aXSize.Width(); nDX += nGridDX) { Point aStart( nDX+LROFFS_WINBORDER, 0 ); Point aEnd( nDX+LROFFS_WINBORDER, aXSize.Height()); @@ -510,7 +510,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const too aEnd -= aOffs; rRenderContext.DrawLine(aStart, aEnd); } - for (long nDY = nGridDY; nDY <= aXSize.Height(); nDY += nGridDY) + for (tools::Long nDY = nGridDY; nDY <= aXSize.Height(); nDY += nGridDY) { Point aStart(0, nDY + TBOFFS_WINBORDER); Point aEnd(aXSize.Width(), nDY + TBOFFS_WINBORDER); diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx index 3dc78ce50e32..c9bf90806ade 100644 --- a/vcl/source/filter/jpeg/JpegReader.hxx +++ b/vcl/source/filter/jpeg/JpegReader.hxx @@ -36,11 +36,11 @@ enum ReadState struct JPEGCreateBitmapParam { - unsigned long nWidth; - unsigned long nHeight; - unsigned long density_unit; - unsigned long X_density; - unsigned long Y_density; + tools::ULong nWidth; + tools::ULong nHeight; + tools::ULong density_unit; + tools::ULong X_density; + tools::ULong Y_density; bool bGray; }; diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 39203304e2dd..c846d0a3a60c 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -862,7 +862,7 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL const tools::Long nRead = aCodec.Read(*pMemStm, aData.data() + nDataPos, sal_uInt32(nToRead)); if (nRead > 0) { - nDataPos += static_cast<unsigned long>(nRead); + nDataPos += static_cast<tools::ULong>(nRead); // we haven't read everything yet: resize buffer and continue if (nDataPos < nUncodedSize) aData.resize(aData.size() + nSizeInc); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 5fdcac0b3255..454363c6d88c 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2799,9 +2799,9 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion eColorConve // determine size that has the same aspect ratio as image size and // fits into the rectangle determined by nMaximumExtent if ( aSizePix.Width() && aSizePix.Height() - && ( sal::static_int_cast< unsigned long >(aSizePix.Width()) > + && ( sal::static_int_cast< tools::ULong >(aSizePix.Width()) > nMaximumExtent || - sal::static_int_cast< unsigned long >(aSizePix.Height()) > + sal::static_int_cast< tools::ULong >(aSizePix.Height()) > nMaximumExtent ) ) { const Size aOldSizePix( aSizePix ); diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index f64d5c437c26..1b340780aa8f 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -40,7 +40,7 @@ #define VECT_POLY_OUTLINE_INNER 4UL #define VECT_POLY_OUTLINE_OUTER 8UL -static void VECT_MAP( const std::unique_ptr<long []> & pMapIn, const std::unique_ptr<long []>& pMapOut, tools::Long nVal ) +static void VECT_MAP( const std::unique_ptr<tools::Long []> & pMapIn, const std::unique_ptr<tools::Long []>& pMapOut, tools::Long nVal ) { pMapIn[nVal] = (nVal * 4) + 1; pMapOut[nVal] = pMapIn[nVal] + 5; @@ -788,8 +788,8 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ) const tools::Long nNewWidth = ( nOldWidth << 2 ) + 4; const tools::Long nNewHeight = ( nOldHeight << 2 ) + 4; const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) ); - std::unique_ptr<long[]> pMapIn(new long[ std::max( nOldWidth, nOldHeight ) ]); - std::unique_ptr<long[]> pMapOut(new long[ std::max( nOldWidth, nOldHeight ) ]); + std::unique_ptr<tools::Long[]> pMapIn(new tools::Long[ std::max( nOldWidth, nOldHeight ) ]); + std::unique_ptr<tools::Long[]> pMapOut(new tools::Long[ std::max( nOldWidth, nOldHeight ) ]); tools::Long nX, nY, nTmpX, nTmpY; pMap = new ImplVectMap( nNewWidth, nNewHeight ); diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2a1bb8562438..c966a68309e9 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1092,7 +1092,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) : if( rAction.mpDXAry ) { mpDXAry.reset( new tools::Long[ mnLen ] ); - memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( long ) ); + memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( tools::Long ) ); } } @@ -1112,7 +1112,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, if (nAryLen > 0) { mpDXAry.reset( new tools::Long[ nAryLen ] ); - memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(long) ); + memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(tools::Long) ); } } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 756752275b51..48338a879ea5 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -728,8 +728,8 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, // do painting const tools::Long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight(); tools::Long nX, nY; //, nWorkX, nWorkY, nWorkWidth, nWorkHeight; - std::unique_ptr<long[]> pMapX( new long[ nSrcWidth + 1 ] ); - std::unique_ptr<long[]> pMapY( new long[ nSrcHeight + 1 ] ); + std::unique_ptr<tools::Long[]> pMapX( new tools::Long[ nSrcWidth + 1 ] ); + std::unique_ptr<tools::Long[]> pMapY( new tools::Long[ nSrcHeight + 1 ] ); GDIMetaFile* pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index a077e50be4d6..14af546fca67 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -53,9 +53,9 @@ static tools::Long ImplIndexFromColor( const BitmapColor& rCol ) #elif TC_TO_PAL_COLORS == 32768 - return( ( ( (long) rCol.GetBlue() >> 3) << 10 ) | - ( ( (long) rCol.GetGreen() >> 3 ) << 5 ) | - ( (long) rCol.GetRed() >> 3 ) ); + return( ( ( (tools::Long) rCol.GetBlue() >> 3) << 10 ) | + ( ( (tools::Long) rCol.GetGreen() >> 3 ) << 5 ) | + ( (tools::Long) rCol.GetRed() >> 3 ) ); #endif } diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index a2134bd468d5..aba22cb4ef1f 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -37,9 +37,9 @@ // we don't actually handle units beyond, hence the zeros in the arrays const MapUnit s_MaxValidUnit = MapUnit::MapPixel; -const o3tl::enumarray<MapUnit,long> aImplNumeratorAry = +const o3tl::enumarray<MapUnit,tools::Long> aImplNumeratorAry = { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }; -const o3tl::enumarray<MapUnit,long> aImplDenominatorAry = +const o3tl::enumarray<MapUnit,tools::Long> aImplDenominatorAry = { 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1, 0, 0, 0 }; /* diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 58242661a2ac..55423fdb6385 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -168,8 +168,8 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask // do painting const tools::Long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight(); tools::Long nX, nY; // , nWorkX, nWorkY, nWorkWidth, nWorkHeight; - std::unique_ptr<long[]> pMapX(new long[ nSrcWidth + 1 ]); - std::unique_ptr<long[]> pMapY(new long[ nSrcHeight + 1 ]); + std::unique_ptr<tools::Long[]> pMapX(new tools::Long[ nSrcWidth + 1 ]); + std::unique_ptr<tools::Long[]> pMapY(new tools::Long[ nSrcHeight + 1 ]); const bool bOldMap = mbMap; mbMap = false; diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx index 1d8d5a7e7aec..1bbbc66b9452 100644 --- a/vcl/source/window/NotebookBarAddonsMerger.cxx +++ b/vcl/source/window/NotebookBarAddonsMerger.cxx @@ -64,8 +64,7 @@ static void GetAddonNotebookBarItem(const css::uno::Sequence<css::beans::Propert static void CreateNotebookBarToolBox(vcl::Window* pNotebookbarToolBox, const css::uno::Reference<css::frame::XFrame>& m_xFrame, const AddonNotebookBarItem& aAddonNotebookBarItem, - const std::vector<Image>& aImageVec, - const unsigned long& nIter) + const std::vector<Image>& aImageVec, const tools::ULong& nIter) { sal_uInt16 nItemId = 0; ToolBox* pToolbox = dynamic_cast<ToolBox*>(pNotebookbarToolBox); @@ -111,7 +110,7 @@ void MergeNotebookBarAddons(vcl::Window* pParent, const VclBuilder::customMakeWi VclBuilder::stringmap& rMap) { std::vector<Image> aImageVec = aNotebookBarAddonsItem.aImageValues; - unsigned long nIter = 0; + tools::ULong nIter = 0; sal_uInt16 nPriorityIdx = aImageVec.size(); css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> aExtension; for (std::size_t nIdx = 0; nIdx < aNotebookBarAddonsItem.aAddonValues.size(); nIdx++) @@ -147,7 +146,7 @@ void MergeNotebookBarMenuAddons(Menu* pPopupMenu, sal_Int16 nItemId, const OStri NotebookBarAddonsItem& aNotebookBarAddonsItem) { std::vector<Image> aImageVec = aNotebookBarAddonsItem.aImageValues; - unsigned long nIter = 0; + tools::ULong nIter = 0; css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> aExtension; for (std::size_t nIdx = 0; nIdx < aNotebookBarAddonsItem.aAddonValues.size(); nIdx++) { diff --git a/vcl/unx/generic/dtrans/bmp.hxx b/vcl/unx/generic/dtrans/bmp.hxx index 8d24ff41d92b..e4dc3ee30f9b 100644 --- a/vcl/unx/generic/dtrans/bmp.hxx +++ b/vcl/unx/generic/dtrans/bmp.hxx @@ -45,14 +45,14 @@ class PixmapHolder int m_nRedShift; int m_nGreenShift; int m_nBlueShift; - unsigned long m_nBlueShift2Mask, m_nRedShift2Mask, m_nGreenShift2Mask; + tools::ULong m_nBlueShift2Mask, m_nRedShift2Mask, m_nGreenShift2Mask; // these expect data pointers to bitmapinfo header void setBitmapDataTC( const sal_uInt8* pData, XImage* pImage ); void setBitmapDataTCDither( const sal_uInt8* pData, XImage* pImage ); void setBitmapDataPalette( const sal_uInt8* pData, XImage* pImage ); - unsigned long getTCPixel( sal_uInt8 r, sal_uInt8 g, sal_uInt8 b ) const; + tools::ULong getTCPixel( sal_uInt8 r, sal_uInt8 g, sal_uInt8 b ) const; public: PixmapHolder( Display* pDisplay ); ~PixmapHolder(); diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index ecfec5c8dccf..102f009dd632 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -1171,13 +1171,13 @@ bool WinSalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip ) for (auto const& rectangle : aRectangles) { - const long nW(rectangle.GetWidth()); - const long nH(rectangle.GetHeight()); + const tools::Long nW(rectangle.GetWidth()); + const tools::Long nH(rectangle.GetHeight()); if(nW && nH) { - const long nRight(rectangle.Left() + nW); - const long nBottom(rectangle.Top() + nH); + const tools::Long nRight(rectangle.Left() + nW); + const tools::Long nBottom(rectangle.Top() + nH); if(bFirstClipRect) { @@ -1560,7 +1560,7 @@ void WinSalGraphicsImpl::SetROPFillColor( SalROPColor nROPColor ) SetFillColor( ImplGetROPColor( nROPColor ) ); } -void WinSalGraphicsImpl::DrawPixelImpl( long nX, long nY, COLORREF crColor ) +void WinSalGraphicsImpl::DrawPixelImpl( tools::Long nX, tools::Long nY, COLORREF crColor ) { const HDC hDC = mrParent.getHDC(); @@ -2505,10 +2505,10 @@ static void paintToGdiPlus( static void setInterpolationMode( Gdiplus::Graphics& rGraphics, - long rSrcWidth, - long rDestWidth, - long rSrcHeight, - long rDestHeight) + tools::Long rSrcWidth, + tools::Long rDestWidth, + tools::Long rSrcHeight, + tools::Long rDestHeight) { const bool bSameWidth(rSrcWidth == rDestWidth); const bool bSameHeight(rSrcHeight == rDestHeight); @@ -2632,13 +2632,13 @@ bool WinSalGraphicsImpl::drawTransformedBitmap( if(aARGB) { - const long nSrcWidth(aARGB->GetWidth()); - const long nSrcHeight(aARGB->GetHeight()); + const tools::Long nSrcWidth(aARGB->GetWidth()); + const tools::Long nSrcHeight(aARGB->GetHeight()); if(nSrcWidth && nSrcHeight) { - const long nDestWidth(basegfx::fround(basegfx::B2DVector(rX - rNull).getLength())); - const long nDestHeight(basegfx::fround(basegfx::B2DVector(rY - rNull).getLength())); + const tools::Long nDestWidth(basegfx::fround(basegfx::B2DVector(rX - rNull).getLength())); + const tools::Long nDestHeight(basegfx::fround(basegfx::B2DVector(rY - rNull).getLength())); if(nDestWidth && nDestHeight) { diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index 43b322358b41..2418c10a1770 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -53,7 +53,7 @@ #undef max #endif -static void ImplSetPixel4( sal_uInt8* pScanline, long nX, const BYTE cIndex ) +static void ImplSetPixel4( sal_uInt8* pScanline, tools::Long nX, const BYTE cIndex ) { BYTE& rByte = pScanline[ nX >> 1 ]; diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index c1d209f4d765..04f3b46ce6e6 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -67,7 +67,7 @@ using namespace vcl; static FIXED FixedFromDouble( double d ) { - const long l = static_cast<tools::Long>( d * 65536. ); + const tools::Long l = static_cast<tools::Long>( d * 65536. ); return *reinterpret_cast<FIXED const *>(&l); } @@ -593,10 +593,10 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ) rFont.SetPitch( ImplLogPitchToSal( rLogFont.lfPitchAndFamily ) ); rFont.SetWeight( ImplWeightToSal( rLogFont.lfWeight ) ); - long nFontHeight = rLogFont.lfHeight; + tools::Long nFontHeight = rLogFont.lfHeight; if ( nFontHeight < 0 ) nFontHeight = -nFontHeight; - long nDPIY = GetDeviceCaps( hDC, LOGPIXELSY ); + tools::Long nDPIY = GetDeviceCaps( hDC, LOGPIXELSY ); if( !nDPIY ) nDPIY = 600; nFontHeight *= 72; @@ -1344,8 +1344,8 @@ bool WinFontInstance::GetGlyphOutline(sal_GlyphId nId, basegfx::B2DPolyPolygon& // of previous segment sal_uInt16 nPnt = 0; - long nX = IntTimes256FromFixed( pHeader->pfxStart.x ); - long nY = IntTimes256FromFixed( pHeader->pfxStart.y ); + tools::Long nX = IntTimes256FromFixed( pHeader->pfxStart.x ); + tools::Long nY = IntTimes256FromFixed( pHeader->pfxStart.y ); pPoints[ nPnt ] = Point( nX, nY ); pFlags[ nPnt++ ] = PolyFlags::Normal; diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index f117bc9a9ba0..92a0b62879d5 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -178,11 +178,11 @@ void ImplInitSalGDI() if( bDither16 ) { // create DIBPattern for 16Bit dithering - long n; + tools::Long n; pSalData->mhDitherDIB = GlobalAlloc( GMEM_FIXED, sizeof( BITMAPINFOHEADER ) + 192 ); pSalData->mpDitherDIB = static_cast<BYTE*>(GlobalLock( pSalData->mhDitherDIB )); - pSalData->mpDitherDiff = new long[ 256 ]; + pSalData->mpDitherDiff = new tools::Long[ 256 ]; pSalData->mpDitherLow = new BYTE[ 256 ]; pSalData->mpDitherHigh = new BYTE[ 256 ]; pSalData->mpDitherDIBData = pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER ); @@ -251,12 +251,12 @@ void ImplInitSalGDI() if( pSalData->mhDitherPal ) { // create DIBPattern for 8Bit dithering - long const nSize = sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) ) + 64; - long n; + tools::Long const nSize = sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) ) + 64; + tools::Long n; pSalData->mhDitherDIB = GlobalAlloc( GMEM_FIXED, nSize ); pSalData->mpDitherDIB = static_cast<BYTE*>(GlobalLock( pSalData->mhDitherDIB )); - pSalData->mpDitherDiff = new long[ 256 ]; + pSalData->mpDitherDiff = new tools::Long[ 256 ]; pSalData->mpDitherLow = new BYTE[ 256 ]; pSalData->mpDitherHigh = new BYTE[ 256 ]; pSalData->mpDitherDIBData = pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) ); diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx index e23ebb4430a8..54afa84c7bc4 100644 --- a/vcl/win/gdi/salgdi2.cxx +++ b/vcl/win/gdi/salgdi2.cxx @@ -77,9 +77,9 @@ public: int mnComponentSize; int mnComponentExchangeIndex; - long mnScanlineSize; + tools::Long mnScanlineSize; - ColorScanlineConverter(ScanlineFormat eSourceFormat, int nComponentSize, long nScanlineSize) + ColorScanlineConverter(ScanlineFormat eSourceFormat, int nComponentSize, tools::Long nScanlineSize) : meSourceFormat(eSourceFormat) , mnComponentSize(nComponentSize) , mnComponentExchangeIndex(0) @@ -94,7 +94,7 @@ public: void convertScanline(sal_uInt8* pSource, sal_uInt8* pDestination) { - for (long x = 0; x < mnScanlineSize; x += mnComponentSize) + for (tools::Long x = 0; x < mnScanlineSize; x += mnComponentSize) { for (int i = 0; i < mnComponentSize; ++i) { @@ -126,7 +126,7 @@ void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap) sal_uInt8* pSource(pRead->mpBits); sal_uInt8* pDestination(pWrite->mpBits); - long readRowChange = pRead->mnScanlineSize; + tools::Long readRowChange = pRead->mnScanlineSize; if(pRead->mnFormat & ScanlineFormat::TopDown) { pSource += pRead->mnScanlineSize * (pRead->mnHeight - 1); @@ -143,7 +143,7 @@ void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap) 4, pRead->mnScanlineSize)); if (pConverter) { - for (long y = 0; y < pRead->mnHeight; y++) + for (tools::Long y = 0; y < pRead->mnHeight; y++) { pConverter->convertScanline(pSource, pDestination); pSource += readRowChange; @@ -152,7 +152,7 @@ void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap) } else { - for (long y = 0; y < pRead->mnHeight; y++) + for (tools::Long y = 0; y < pRead->mnHeight; y++) { memcpy(pDestination, pSource, pRead->mnScanlineSize); pSource += readRowChange; diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index ab4102056604..e016430611ad 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -126,7 +126,7 @@ bool WinSalFrame::mbInReparent = false; // Macros for support of WM_UNICHAR & Keyman 6.0 //#define Uni_UTF32ToSurrogate1(ch) (((unsigned long) (ch) - 0x10000) / 0x400 + 0xD800) -#define Uni_UTF32ToSurrogate2(ch) ((static_cast<unsigned long>(ch) - 0x10000) % 0x400 + 0xDC00) +#define Uni_UTF32ToSurrogate2(ch) ((static_cast<tools::ULong>(ch) - 0x10000) % 0x400 + 0xDC00) #define Uni_SupplementaryPlanesStart 0x10000 static void UpdateFrameGeometry( HWND hWnd, WinSalFrame* pFrame ); @@ -160,10 +160,10 @@ static void ImplSaveFrameState( WinSalFrame* pFrame ) RECT aRect2 = aRect; AdjustWindowRectEx( &aRect2, GetWindowStyle( pFrame->mhWnd ), FALSE, GetWindowExStyle( pFrame->mhWnd ) ); - long nTopDeco = abs( aRect.top - aRect2.top ); - long nLeftDeco = abs( aRect.left - aRect2.left ); - long nBottomDeco = abs( aRect.bottom - aRect2.bottom ); - long nRightDeco = abs( aRect.right - aRect2.right ); + tools::Long nTopDeco = abs( aRect.top - aRect2.top ); + tools::Long nLeftDeco = abs( aRect.left - aRect2.left ); + tools::Long nBottomDeco = abs( aRect.bottom - aRect2.bottom ); + tools::Long nRightDeco = abs( aRect.right - aRect2.right ); pFrame->maState.mnX = aRect.left + nLeftDeco; pFrame->maState.mnY = aRect.top + nTopDeco; @@ -180,10 +180,10 @@ static void ImplSaveFrameState( WinSalFrame* pFrame ) RECT aRect2 = aRect; AdjustWindowRectEx( &aRect2, GetWindowStyle( pFrame->mhWnd ), FALSE, GetWindowExStyle( pFrame->mhWnd ) ); - long nTopDeco = abs( aRect.top - aRect2.top ); - long nLeftDeco = abs( aRect.left - aRect2.left ); - long nBottomDeco = abs( aRect.bottom - aRect2.bottom ); - long nRightDeco = abs( aRect.right - aRect2.right ); + tools::Long nTopDeco = abs( aRect.top - aRect2.top ); + tools::Long nLeftDeco = abs( aRect.left - aRect2.left ); + tools::Long nBottomDeco = abs( aRect.bottom - aRect2.bottom ); + tools::Long nRightDeco = abs( aRect.right - aRect2.right ); pFrame->maState.mnState &= ~WindowStateState(WindowStateState::Minimized | WindowStateState::Maximized); // subtract decoration @@ -2578,7 +2578,7 @@ static void ImplSalUpdateStyleFontW( HDC hDC, const LOGFONTW& rLogFont, vcl::Fon } } -static long ImplW2I( const wchar_t* pStr ) +static tools::Long ImplW2I( const wchar_t* pStr ) { long n = 0; int nSign = 1; @@ -2607,8 +2607,8 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aMouseSettings.SetDoubleClickTime( GetDoubleClickTime() ); aMouseSettings.SetDoubleClickWidth( GetSystemMetrics( SM_CXDOUBLECLK ) ); aMouseSettings.SetDoubleClickHeight( GetSystemMetrics( SM_CYDOUBLECLK ) ); - long nDragWidth = GetSystemMetrics( SM_CXDRAG ); - long nDragHeight = GetSystemMetrics( SM_CYDRAG ); + tools::Long nDragWidth = GetSystemMetrics( SM_CXDRAG ); + tools::Long nDragHeight = GetSystemMetrics( SM_CYDRAG ); if ( nDragWidth ) aMouseSettings.SetStartDragWidth( nDragWidth ); if ( nDragHeight ) |