summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/bitmap/impoctree.hxx5
-rw-r--r--vcl/inc/win/salframe.h12
-rw-r--r--vcl/inc/win/salgdi.h32
-rw-r--r--vcl/inc/win/salinst.h2
-rw-r--r--vcl/inc/win/salobj.h4
-rw-r--r--vcl/inc/win/salprn.h2
-rw-r--r--vcl/inc/win/salvd.h14
-rw-r--r--vcl/opengl/gdiimpl.cxx8
-rw-r--r--vcl/skia/gdiimpl.cxx5
-rw-r--r--vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx6
-rw-r--r--vcl/source/bitmap/BitmapEmbossGreyFilter.cxx3
-rw-r--r--vcl/source/bitmap/BitmapFilterStackBlur.cxx2
-rw-r--r--vcl/source/bitmap/BitmapSobelGreyFilter.cxx3
-rw-r--r--vcl/source/control/edit.cxx16
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
-rw-r--r--vcl/source/gdi/bitmap3.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx12
-rw-r--r--vcl/source/gdi/impvect.cxx4
-rw-r--r--vcl/source/gdi/impvect.hxx2
-rw-r--r--vcl/source/gdi/metaact.cxx6
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx2
-rw-r--r--vcl/source/gdi/salmisc.cxx8
-rw-r--r--vcl/source/gdi/svmconverter.cxx6
-rw-r--r--vcl/source/gdi/textlayout.cxx2
-rw-r--r--vcl/source/graphic/GraphicObject.cxx4
-rw-r--r--vcl/source/outdev/bitmap.cxx26
-rw-r--r--vcl/source/outdev/gradient.cxx4
-rw-r--r--vcl/source/outdev/hatch.cxx2
-rw-r--r--vcl/source/outdev/map.cxx4
-rw-r--r--vcl/source/outdev/rect.cxx4
-rw-r--r--vcl/source/outdev/text.cxx6
-rw-r--r--vcl/source/window/menu.cxx4
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/syswin.cxx8
-rw-r--r--vcl/win/gdi/gdiimpl.cxx28
-rw-r--r--vcl/win/gdi/gdiimpl.hxx32
-rw-r--r--vcl/win/gdi/salfont.cxx4
-rw-r--r--vcl/win/gdi/salgdi.cxx12
-rw-r--r--vcl/win/gdi/salgdi2.cxx16
-rw-r--r--vcl/win/gdi/salprn.cxx2
-rw-r--r--vcl/win/gdi/salvd.cxx8
-rw-r--r--vcl/win/window/salframe.cxx26
-rw-r--r--vcl/win/window/salobj.cxx8
-rw-r--r--vcl/workben/vcldemo.cxx2
47 files changed, 191 insertions, 187 deletions
diff --git a/vcl/inc/bitmap/impoctree.hxx b/vcl/inc/bitmap/impoctree.hxx
index 6b242a2a367c..aab1c53f5019 100644
--- a/vcl/inc/bitmap/impoctree.hxx
+++ b/vcl/inc/bitmap/impoctree.hxx
@@ -100,8 +100,9 @@ inline void ImpErrorQuad::ImplAddColorError7(const ImpErrorQuad& rErrQuad)
inline BitmapColor ImpErrorQuad::ImplGetColor()
{
- return BitmapColor(std::clamp(nRed, 0L, 8160L) >> 5, std::clamp(nGreen, 0L, 8160L) >> 5,
- std::clamp(nBlue, 0L, 8160L) >> 5);
+ return BitmapColor(std::clamp(nRed, tools::Long(0), tools::Long(8160)) >> 5,
+ std::clamp(nGreen, tools::Long(0), tools::Long(8160)) >> 5,
+ std::clamp(nBlue, tools::Long(0), tools::Long(8160)) >> 5);
}
#endif // INCLUDED_VCL_INC_IMPOCTREE_HXX
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index f0c758806f71..05f907dc66b9 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -102,10 +102,10 @@ public:
virtual void DrawMenuBar() override;
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override;
virtual void Show( bool bVisible, bool bNoActivate = false ) override;
- virtual void SetMinClientSize( long nWidth, long nHeight ) override;
- virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
- virtual void GetClientSize( long& rWidth, long& rHeight ) override;
+ virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) override;
+ virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) override;
virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
@@ -116,7 +116,7 @@ public:
virtual void ToTop( SalFrameToTop nFlags ) override;
virtual void SetPointer( PointerStyle ePointerStyle ) override;
virtual void CaptureMouse( bool bMouse ) override;
- virtual void SetPointerPos( long nX, long nY ) override;
+ virtual void SetPointerPos( tools::Long nX, tools::Long nY ) override;
using SalFrame::Flush;
virtual void Flush() override;
virtual void SetInputContext( SalInputContext* pContext ) override;
@@ -136,7 +136,7 @@ public:
virtual void SetApplicationID( const OUString &rApplicationID ) override;
virtual void ResetClipRegion() override;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void EndSetClipRegion() override;
};
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index bec473b296b4..585cdd913825 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -130,8 +130,8 @@ public:
SalTwoRect getTwoRect() const { return maRects; }
- long getBitmapWidth() const { return maRects.mnSrcWidth; }
- long getBitmapHeight() const { return maRects.mnSrcHeight; }
+ tools::Long getBitmapWidth() const { return maRects.mnSrcWidth; }
+ tools::Long getBitmapHeight() const { return maRects.mnSrcHeight; }
/// Reset the DC with the defined color.
void fill(sal_uInt32 color);
@@ -227,10 +227,10 @@ public:
protected:
virtual bool setClipRegion( const vcl::Region& ) 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 drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) 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( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) 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;
virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) override;
@@ -255,8 +255,8 @@ protected:
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rGradient) override;
// CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, bool bWindowInvalidate ) override;
+ virtual void copyArea( 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
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
@@ -269,14 +269,14 @@ protected:
const SalBitmap& rSalBitmap,
Color nMaskColor ) override;
- virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
- virtual Color getPixel( long nX, long nY ) override;
+ virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) 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, SalInvert nFlags) override;
+ virtual void invert( 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, void* pPtr, sal_uInt32 nSize ) override;
+ virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
// native widget rendering methods that require mirroring
protected:
@@ -308,7 +308,7 @@ public:
const basegfx::B2DPoint& rY,
const SalBitmap& rSourceBitmap,
const SalBitmap* pAlphaBitmap) override;
- virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) override;
+ virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency ) override;
private:
// local helpers
@@ -323,7 +323,7 @@ public:
// get the depth of the device
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;
@@ -383,9 +383,9 @@ public:
// embeddable by GetDevFontList or NULL in case of error
// parameters: pFont: describes the font in question
// pDataLen: out parameter, contains the byte length of the returned buffer
- virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
// frees the font data again
- virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
+ virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
virtual void GetGlyphWidths( const PhysicalFontFace*,
bool bVertical,
std::vector< sal_Int32 >& rWidths,
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index c06e51c84050..bd923390d077 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -50,7 +50,7 @@ public:
virtual void DestroyObject( SalObject* pObject ) override;
virtual std::unique_ptr<SalVirtualDevice>
CreateVirtualDevice( SalGraphics* pGraphics,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
ImplJobSetup* pSetupData ) override;
diff --git a/vcl/inc/win/salobj.h b/vcl/inc/win/salobj.h
index 465c9ec778ab..e76c4787eb71 100644
--- a/vcl/inc/win/salobj.h
+++ b/vcl/inc/win/salobj.h
@@ -41,9 +41,9 @@ public:
virtual void ResetClipRegion() override;
virtual void BeginSetClipRegion( sal_uInt32 nRects ) override;
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight) override;
+ virtual void UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override;
virtual void EndSetClipRegion() override;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual void Show( bool bVisible ) override;
virtual void Enable( bool bEnable ) override;
virtual void GrabFocus() override;
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index 44b88525812e..c2a47ebb941f 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -59,7 +59,7 @@ public:
virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override;
virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
virtual void GetPageInfo( const ImplJobSetup* pSetupData,
- long& rOutWidth, long& rOutHeight,
+ tools::Long& rOutWidth, tools::Long& rOutHeight,
Point& rPageOffset,
Size& rPaperSize ) override;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
diff --git a/vcl/inc/win/salvd.h b/vcl/inc/win/salvd.h
index 4121d2c89979..7a776056c3a2 100644
--- a/vcl/inc/win/salvd.h
+++ b/vcl/inc/win/salvd.h
@@ -41,8 +41,8 @@ private:
sal_uInt16 mnBitCount; // BitCount (0 or 1)
bool mbGraphics; // is Graphics used
bool mbForeignDC; // uses a foreign DC instead of a bitmap
- long mnWidth;
- long mnHeight;
+ tools::Long mnWidth;
+ tools::Long mnHeight;
public:
HDC getHDC() const { return mhLocalDC; }
@@ -50,18 +50,18 @@ public:
void setGraphics(WinSalGraphics* pVirGraphics) { mpGraphics.reset(pVirGraphics); }
WinSalVirtualDevice* getNext() const { return mpNext; }
- WinSalVirtualDevice(HDC hDC = nullptr, HBITMAP hBMP = nullptr, sal_uInt16 nBitCount = 0, bool bForeignDC = false, long nWidth = 0, long nHeight = 0);
+ WinSalVirtualDevice(HDC hDC = nullptr, HBITMAP hBMP = nullptr, sal_uInt16 nBitCount = 0, bool bForeignDC = false, tools::Long nWidth = 0, tools::Long nHeight = 0);
virtual ~WinSalVirtualDevice() override;
virtual SalGraphics* AcquireGraphics() override;
virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
- virtual bool SetSize( long nNewDX, long nNewDY ) override;
+ virtual bool SetSize( tools::Long nNewDX, tools::Long nNewDY ) override;
- static HBITMAP ImplCreateVirDevBitmap(HDC hDC, long nDX, long nDY, sal_uInt16 nBitCount, void **ppDummy);
+ static HBITMAP ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, tools::Long nDY, sal_uInt16 nBitCount, void **ppDummy);
// SalGeometryProvider
- virtual long GetWidth() const override { return mnWidth; }
- virtual long GetHeight() const override { return mnHeight; }
+ virtual tools::Long GetWidth() const override { return mnWidth; }
+ virtual tools::Long GetHeight() const override { return mnHeight; }
};
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index d2218590091b..a44ddbff68c8 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -858,8 +858,8 @@ void OpenGLSalGraphicsImpl::DrawRect( tools::Long nX, tools::Long nY, tools::Lon
tools::Long nY1( nY );
tools::Long nX2( nX + nWidth );
tools::Long nY2( nY + nHeight );
- const SalPoint aPoints[] = { { nX1, nY2 }, { nX1, nY1 },
- { nX2, nY1 }, { nX2, nY2 }};
+ const SalPoint aPoints[] = { { static_cast<sal_Int32>(nX1), static_cast<sal_Int32>(nY2) }, { static_cast<sal_Int32>(nX1), static_cast<sal_Int32>(nY1) },
+ { static_cast<sal_Int32>(nX2), static_cast<sal_Int32>(nY1) }, { static_cast<sal_Int32>(nX2), static_cast<sal_Int32>(nY2) }};
DrawConvexPolygon( 4, aPoints, true );
}
@@ -870,8 +870,8 @@ void OpenGLSalGraphicsImpl::DrawRect( const tools::Rectangle& rRect )
tools::Long nY1( rRect.Top() );
tools::Long nX2( rRect.Right() );
tools::Long nY2( rRect.Bottom() );
- const SalPoint aPoints[] = { { nX1, nY2 }, { nX1, nY1 },
- { nX2, nY1 }, { nX2, nY2 }};
+ const SalPoint aPoints[] = { { static_cast<sal_Int32>(nX1), static_cast<sal_Int32>(nY2) }, { static_cast<sal_Int32>(nX1), static_cast<sal_Int32>(nY1) },
+ { static_cast<sal_Int32>(nX2), static_cast<sal_Int32>(nY1) }, { static_cast<sal_Int32>(nX2), static_cast<sal_Int32>(nY2) }};
DrawConvexPolygon( 4, aPoints, true );
}
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index d9440df0795d..9659f8c91ee9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -754,8 +754,9 @@ void SkiaSalGraphicsImpl::privateDrawAlphaRect(tools::Long nX, tools::Long nY, t
// The obnoxious "-1 DrawRect()" hack that I don't understand the purpose of (and I'm not sure
// if anybody does), but without it some cases do not work. The max() is needed because Skia
// will not draw anything if width or height is 0.
- canvas->drawIRect(
- SkIRect::MakeXYWH(nX, nY, std::max(1L, nWidth - 1), std::max(1L, nHeight - 1)), paint);
+ canvas->drawIRect(SkIRect::MakeXYWH(nX, nY, std::max(tools::Long(1), nWidth - 1),
+ std::max(tools::Long(1), nHeight - 1)),
+ paint);
}
postDraw();
}
diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
index 1febdf3503c5..b92a0124b458 100644
--- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
+++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
@@ -35,8 +35,8 @@ BitmapEx BitmapConvolutionMatrixFilter::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]);
@@ -45,7 +45,7 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
BitmapColor* pRowTmp3 = pColRow3.get();
BitmapColor* pColor;
tools::Long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
- std::array<std::array<long, 256>, 9> aKoeff;
+ std::array<std::array<tools::Long, 256>, 9> aKoeff;
tools::Long* pTmp;
// create LUT of products of matrix value and possible color component values
diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
index a19683ab6582..aa8dff8aaa29 100644
--- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
@@ -55,7 +55,8 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const
const tools::Long nLz = FRound(sin(fElev) * 255.0);
const auto nZ2 = ((6 * 255) / 4) * ((6 * 255) / 4);
const tools::Long nNzLz = ((6 * 255) / 4) * nLz;
- const sal_uInt8 cLz = static_cast<sal_uInt8>(std::clamp(nLz, 0L, 255L));
+ const sal_uInt8 cLz
+ = static_cast<sal_uInt8>(std::clamp(nLz, tools::Long(0), tools::Long(255)));
// fill mapping tables
pHMap[0] = 0;
diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx
index 9bf4b810ac60..d3e1ddea9310 100644
--- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx
+++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx
@@ -96,7 +96,7 @@ struct BlurArrays
{
for (tools::Long i = 0; i < maShared.mnDiv; i++)
{
- maPositionTable[i] = std::clamp(i - maShared.mnRadius, 0L, nLastIndex);
+ maPositionTable[i] = std::clamp(i - maShared.mnRadius, tools::Long(0), nLastIndex);
maWeightTable[i] = maShared.mnRadius + 1 - std::abs(i - maShared.mnRadius);
}
}
diff --git a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
index e6609f77d9f4..e34af85df300 100644
--- a/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapSobelGreyFilter.cxx
@@ -120,7 +120,8 @@ BitmapEx BitmapSobelGreyFilter::execute(BitmapEx const& rBitmapEx) const
nSum1 = static_cast<tools::Long>(
sqrt(static_cast<double>(nSum1 * nSum1 + nSum2 * nSum2)));
- aGrey.SetIndex(~static_cast<sal_uInt8>(std::clamp(nSum1, 0L, 255L)));
+ aGrey.SetIndex(~static_cast<sal_uInt8>(
+ std::clamp(nSum1, tools::Long(0), tools::Long(255))));
pWriteAcc->SetPixelOnData(pScanline, nX, aGrey);
if (nX < (nWidth - 1))
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 27eaddaf1949..0484797de298 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -472,14 +472,14 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
const sal_Int32 nLen = aText.getLength();
tools::Long nDXBuffer[256];
- std::unique_ptr<long[]> pDXBuffer;
+ std::unique_ptr<tools::Long[]> pDXBuffer;
tools::Long* pDX = nDXBuffer;
if (nLen)
{
if (o3tl::make_unsigned(2 * nLen) > SAL_N_ELEMENTS(nDXBuffer))
{
- pDXBuffer.reset(new long[2 * (nLen + 1)]);
+ pDXBuffer.reset(new tools::Long[2 * (nLen + 1)]);
pDX = pDXBuffer.get();
}
@@ -1068,14 +1068,14 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
tools::Long nTextPos = 0;
tools::Long nDXBuffer[256];
- std::unique_ptr<long[]> pDXBuffer;
+ std::unique_ptr<tools::Long[]> pDXBuffer;
tools::Long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
if( o3tl::make_unsigned(2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new tools::Long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
@@ -1192,11 +1192,11 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
OUString aText = ImplGetText();
tools::Long nDXBuffer[256];
- std::unique_ptr<long[]> pDXBuffer;
+ std::unique_ptr<tools::Long[]> pDXBuffer;
tools::Long* pDX = nDXBuffer;
if( o3tl::make_unsigned(2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new tools::Long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
@@ -2131,14 +2131,14 @@ void Edit::Command( const CommandEvent& rCEvt )
{
OUString aText = ImplGetText();
tools::Long nDXBuffer[256];
- std::unique_ptr<long[]> pDXBuffer;
+ std::unique_ptr<tools::Long[]> pDXBuffer;
tools::Long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
if( o3tl::make_unsigned(2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new tools::Long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 3b3b75204f81..b0681709eb2a 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -105,7 +105,7 @@ static boolean fill_input_buffer (j_decompress_ptr cinfo)
return TRUE;
}
-static void skip_input_data (j_decompress_ptr cinfo, tools::Long numberOfBytes)
+static void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes)
{
SourceManagerStruct * source = reinterpret_cast<SourceManagerStruct *>(cinfo->src);
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 63026cd2e7dc..b2d692e339dd 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -846,18 +846,18 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c
return;
sal_uInt32 nNormWidth;
- std::unique_ptr<long[]> pOwnArray;
+ std::unique_ptr<tools::Long[]> pOwnArray;
tools::Long* pDX;
// get text sizes
if( pDXArray )
{
nNormWidth = maVDev->GetTextWidth( rText );
- pDX = const_cast<long*>(pDXArray);
+ pDX = const_cast<tools::Long*>(pDXArray);
}
else
{
- pOwnArray.reset(new long[ nLen ]);
+ pOwnArray.reset(new tools::Long[ nLen ]);
nNormWidth = maVDev->GetTextArray( rText, pOwnArray.get() );
pDX = pOwnArray.get();
}
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 43463c10e62e..515468386488 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1196,7 +1196,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
pVirDev->SetFont( aSrcFont );
const sal_Int32 nLen = aTemp.getLength();
- std::unique_ptr<long[]> pDXAry(nLen ? new long[ nLen ] : nullptr);
+ std::unique_ptr<tools::Long[]> pDXAry(nLen ? new tools::Long[ nLen ] : nullptr);
const sal_Int32 nNormSize = pVirDev->GetTextArray( aTemp, pDXAry.get() );
if (nLen && nNormSize == 0)
{
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 78ac64e7961f..3b0b1cd76bfb 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -591,7 +591,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color const * pExtColor)
pWriteAcc->SetPalette(aPalette);
- for (tools::Long nY = 0; nY < std::min(nHeight, 2L); nY++, nYTmp++)
+ for (tools::Long nY = 0; nY < std::min(nHeight, tools::Long(2)); nY++, nYTmp++)
{
pQLine2 = !nY ? aErrQuad1.data() : aErrQuad2.data();
Scanline pScanlineRead = pReadAcc->GetScanline(nYTmp);
@@ -872,8 +872,8 @@ bool Bitmap::Dither()
tools::Long nW2 = nW - 3;
tools::Long nRErr, nGErr, nBErr;
tools::Long nRC, nGC, nBC;
- std::unique_ptr<long[]> p1(new long[ nW ]);
- std::unique_ptr<long[]> p2(new long[ nW ]);
+ std::unique_ptr<tools::Long[]> p1(new tools::Long[ nW ]);
+ std::unique_ptr<tools::Long[]> p2(new tools::Long[ nW ]);
tools::Long* p1T = p1.get();
tools::Long* p2T = p2.get();
tools::Long* pTmp;
@@ -991,7 +991,7 @@ bool Bitmap::Dither()
return bRet;
}
-void Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<long,void>* pProgress )
+void Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<tools::Long,void>* pProgress )
{
ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, pProgress );
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 40c1d7aba529..5fdcac0b3255 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2181,16 +2181,16 @@ void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pRepla
tools::Long nVal;
nVal = pSearchColors[ i ].GetRed();
- aColParam.pMinR[ i ] = static_cast<sal_uLong>(std::max( nVal, 0L ));
- aColParam.pMaxR[ i ] = static_cast<sal_uLong>(std::min( nVal, 255L ));
+ aColParam.pMinR[ i ] = static_cast<sal_uLong>(std::max( nVal, tools::Long(0) ));
+ aColParam.pMaxR[ i ] = static_cast<sal_uLong>(std::min( nVal, tools::Long(255) ));
nVal = pSearchColors[ i ].GetGreen();
- aColParam.pMinG[ i ] = static_cast<sal_uLong>(std::max( nVal, 0L ));
- aColParam.pMaxG[ i ] = static_cast<sal_uLong>(std::min( nVal, 255L ));
+ aColParam.pMinG[ i ] = static_cast<sal_uLong>(std::max( nVal, tools::Long(0) ));
+ aColParam.pMaxG[ i ] = static_cast<sal_uLong>(std::min( nVal, tools::Long(255) ));
nVal = pSearchColors[ i ].GetBlue();
- aColParam.pMinB[ i ] = static_cast<sal_uLong>(std::max( nVal, 0L ));
- aColParam.pMaxB[ i ] = static_cast<sal_uLong>(std::min( nVal, 255L ));
+ aColParam.pMinB[ i ] = static_cast<sal_uLong>(std::max( nVal, tools::Long(0) ));
+ aColParam.pMaxB[ i ] = static_cast<sal_uLong>(std::min( nVal, tools::Long(255) ));
}
aColParam.pDstCols = pReplaceColors;
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 621a3592661a..f64d5c437c26 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -49,7 +49,7 @@ static constexpr tools::Long BACK_MAP( tools::Long _def_nVal )
{
return ((_def_nVal + 2) >> 2) - 1;
}
-static void VECT_PROGRESS( const Link<long, void>* pProgress, tools::Long _def_nVal )
+static void VECT_PROGRESS( const Link<tools::Long, void>* pProgress, tools::Long _def_nVal )
{
if(pProgress)
pProgress->Call(_def_nVal);
@@ -642,7 +642,7 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
namespace ImplVectorizer {
bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- sal_uInt8 cReduce, const Link<long,void>* pProgress )
+ sal_uInt8 cReduce, const Link<tools::Long,void>* pProgress )
{
bool bRet = false;
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index 017b2dc1a728..41f0884e9626 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -27,7 +27,7 @@ namespace tools { class PolyPolygon; }
namespace ImplVectorizer
{
bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- sal_uInt8 cReduce, const Link<long,void>* pProgress );
+ sal_uInt8 cReduce, const Link<tools::Long,void>* pProgress );
};
#endif
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index ac70349d4647..2a1bb8562438 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1091,7 +1091,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
{
if( rAction.mpDXAry )
{
- mpDXAry.reset( new long[ mnLen ] );
+ mpDXAry.reset( new tools::Long[ mnLen ] );
memcpy( mpDXAry.get(), rAction.mpDXAry.get(), mnLen * sizeof( long ) );
}
}
@@ -1111,7 +1111,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
if (nAryLen > 0)
{
- mpDXAry.reset( new long[ nAryLen ] );
+ mpDXAry.reset( new tools::Long[ nAryLen ] );
memcpy( mpDXAry.get(), pDXAry, nAryLen * sizeof(long) );
}
}
@@ -1194,7 +1194,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
// #i9762#, #106172# Ensure that DX array is at least mnLen entries long
if ( mnLen >= nAryLen )
{
- mpDXAry.reset( new (std::nothrow)long[ mnLen ] );
+ mpDXAry.reset( new (std::nothrow)tools::Long[ mnLen ] );
if ( mpDXAry )
{
sal_Int32 i;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 16db9ad61bd4..756752275b51 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -240,7 +240,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
tools::Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
const Size aDPISize( LogicToPixel(Size(1, 1), MapMode(MapUnit::MapInch)) );
- const tools::Long nBaseExtent = std::max( FRound( aDPISize.Width() / 300. ), 1L );
+ const tools::Long nBaseExtent = std::max<tools::Long>( FRound( aDPISize.Width() / 300. ), 1 );
tools::Long nMove;
const sal_uInt16 nTrans = ( nTransparencePercent < 13 ) ? 0 :
( nTransparencePercent < 38 ) ? 25 :
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 16fa84ab95d5..7beea9a01091 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1486,7 +1486,7 @@ void MultiSalLayout::GetCaretPositions( int nMaxIndex, tools::Long* pCaretXArray
if( mnLevel <= 1 )
return;
- std::unique_ptr<long[]> const pTempPos(new long[nMaxIndex]);
+ std::unique_ptr<tools::Long[]> const pTempPos(new tools::Long[nMaxIndex]);
for( int n = 1; n < mnLevel; ++n )
{
mpLayouts[ n ]->GetCaretPositions( nMaxIndex, pTempPos.get() );
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index aa9220b53136..a077e50be4d6 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -363,15 +363,15 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
std::unique_ptr<Scanline[]> pSrcScan;
std::unique_ptr<Scanline[]> pDstScan;
- std::unique_ptr<long[]> pMapX;
- std::unique_ptr<long[]> pMapY;
+ std::unique_ptr<tools::Long[]> pMapX;
+ std::unique_ptr<tools::Long[]> pMapY;
try
{
pSrcScan.reset(new Scanline[rSrcBuffer.mnHeight]);
pDstScan.reset(new Scanline[pDstBuffer->mnHeight]);
- pMapX.reset(new long[pDstBuffer->mnWidth]);
- pMapY.reset(new long[pDstBuffer->mnHeight]);
+ pMapX.reset(new tools::Long[pDstBuffer->mnWidth]);
+ pMapY.reset(new tools::Long[pDstBuffer->mnHeight]);
}
catch( const std::bad_alloc& )
{
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 2af54eabf368..6912654a6164 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -713,7 +713,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
- std::unique_ptr<long[]> pDXAry;
+ std::unique_ptr<tools::Long[]> pDXAry;
if (nAryLen > 0)
{
const size_t nMinRecordSize = sizeof(sal_Int32);
@@ -740,7 +740,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
}
else
{
- pDXAry.reset(new long[nDXAryLen]);
+ pDXAry.reset(new tools::Long[nDXAryLen]);
for (sal_Int32 j = 0; j < nAryLen; ++j)
{
@@ -753,7 +753,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
if (nAryLen+1 == nStrLen && nIndex >= 0)
{
- std::unique_ptr<long[]> pTmpAry(new long[nStrLen]);
+ std::unique_ptr<tools::Long[]> pTmpAry(new tools::Long[nStrLen]);
aFontVDev->GetTextArray( aStr, pTmpAry.get(), nIndex, nLen );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 988c5bfa578f..ea86aa47b049 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -207,7 +207,7 @@ namespace vcl
return;
}
- std::unique_ptr<long[]> pCharWidths(new long[ _nLength ]);
+ std::unique_ptr<tools::Long[]> pCharWidths(new tools::Long[ _nLength ]);
tools::Long nTextWidth = GetTextArray( _rText, pCharWidths.get(), _nStartIndex, _nLength );
m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, pCharWidths.get(), _nStartIndex, _nLength );
pCharWidths.reset();
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index aa8b5a3169b7..a34e8a064d46 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -527,8 +527,8 @@ void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea
const MapMode aOutMapMode( pOut->GetMapMode() );
// #106258# Clamp size to 1 for zero values. This is okay, since
// logical size of zero is handled above already
- const Size aOutTileSize( ::std::max( 1L, pOut->LogicToPixel( rSize, aOutMapMode ).Width() ),
- ::std::max( 1L, pOut->LogicToPixel( rSize, aOutMapMode ).Height() ) );
+ const Size aOutTileSize( ::std::max( tools::Long(1), pOut->LogicToPixel( rSize, aOutMapMode ).Width() ),
+ ::std::max( tools::Long(1), pOut->LogicToPixel( rSize, aOutMapMode ).Height() ) );
//#i69780 clip final tile size to a sane max size
while ((static_cast<sal_Int64>(rSize.Width()) * nTileCacheSize1D) > SAL_MAX_UINT16)
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index ad25020a620e..7b6e8ab6be91 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -726,19 +726,19 @@ namespace
struct LinearScaleContext
{
- std::unique_ptr<long[]> mpMapX;
- std::unique_ptr<long[]> mpMapY;
+ std::unique_ptr<tools::Long[]> mpMapX;
+ std::unique_ptr<tools::Long[]> mpMapY;
- std::unique_ptr<long[]> mpMapXOffset;
- std::unique_ptr<long[]> mpMapYOffset;
+ std::unique_ptr<tools::Long[]> mpMapXOffset;
+ std::unique_ptr<tools::Long[]> mpMapYOffset;
LinearScaleContext(tools::Rectangle const & aDstRect, tools::Rectangle const & aBitmapRect,
Size const & aOutSize, tools::Long nOffX, tools::Long nOffY)
- : mpMapX(new long[aDstRect.GetWidth()])
- , mpMapY(new long[aDstRect.GetHeight()])
- , mpMapXOffset(new long[aDstRect.GetWidth()])
- , mpMapYOffset(new long[aDstRect.GetHeight()])
+ : mpMapX(new tools::Long[aDstRect.GetWidth()])
+ , mpMapY(new tools::Long[aDstRect.GetHeight()])
+ , mpMapXOffset(new tools::Long[aDstRect.GetWidth()])
+ , mpMapYOffset(new tools::Long[aDstRect.GetHeight()])
{
const tools::Long nSrcWidth = aBitmapRect.GetWidth();
const tools::Long nSrcHeight = aBitmapRect.GetHeight();
@@ -760,7 +760,7 @@ private:
const double fReverseScale = (std::abs(nOutDimension) > 1) ? (nSrcDimension - 1) / double(std::abs(nOutDimension) - 1) : 0.0;
- tools::Long nSampleRange = std::max(0L, nSrcDimension - 2);
+ tools::Long nSampleRange = std::max(tools::Long(0), nSrcDimension - 2);
for (tools::Long i = 0; i < nDstDimension; i++)
{
@@ -893,14 +893,14 @@ public:
struct TradScaleContext
{
- std::unique_ptr<long[]> mpMapX;
- std::unique_ptr<long[]> mpMapY;
+ std::unique_ptr<tools::Long[]> mpMapX;
+ std::unique_ptr<tools::Long[]> mpMapY;
TradScaleContext(tools::Rectangle const & aDstRect, tools::Rectangle const & aBitmapRect,
Size const & aOutSize, tools::Long nOffX, tools::Long nOffY)
- : mpMapX(new long[aDstRect.GetWidth()])
- , mpMapY(new long[aDstRect.GetHeight()])
+ : mpMapX(new tools::Long[aDstRect.GetWidth()])
+ , mpMapY(new tools::Long[aDstRect.GetHeight()])
{
const tools::Long nSrcWidth = aBitmapRect.GetWidth();
const tools::Long nSrcHeight = aBitmapRect.GetHeight();
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index d67430da187d..32852eefc34e 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -479,7 +479,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
tools::Long nStepCount = GetGradientSteps( rGradient, rRect, false/*bMtf*/, true/*bComplex*/ );
// at least three steps and at most the number of colour differences
- tools::Long nSteps = std::max( nStepCount, 2L );
+ tools::Long nSteps = std::max( nStepCount, tools::Long(2) );
tools::Long nCalcSteps = std::abs( nRedSteps );
tools::Long nTempSteps = std::abs( nGreenSteps );
if ( nTempSteps > nCalcSteps )
@@ -829,7 +829,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
tools::Long nStepCount = GetGradientSteps( rGradient, rRect, true, true );
// at least three steps and at most the number of colour differences
- tools::Long nSteps = std::max( nStepCount, 2L );
+ tools::Long nSteps = std::max( nStepCount, tools::Long(2) );
tools::Long nCalcSteps = std::abs( nRedSteps );
tools::Long nTempSteps = std::abs( nGreenSteps );
if ( nTempSteps > nCalcSteps )
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index bb2cb67cb1ac..44cf941149bb 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -167,7 +167,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
{
tools::Rectangle aRect( rPolyPoly.GetBoundRect() );
const tools::Long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
- const tools::Long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
+ const tools::Long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), tools::Long(3) ) );
std::unique_ptr<Point[]> pPtBuffer(new Point[ HATCH_MAXPOINTS ]);
Point aPt1, aPt2, aEndPt1;
Size aInc;
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 2a1b46ae0b72..a2134bd468d5 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -588,12 +588,12 @@ LineInfo OutputDevice::ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const
if( aInfo.GetStyle() == LineStyle::Dash )
{
if( aInfo.GetDotCount() && aInfo.GetDotLen() )
- aInfo.SetDotLen( std::max( ImplLogicWidthToDevicePixel( aInfo.GetDotLen() ), 1L ) );
+ aInfo.SetDotLen( std::max( ImplLogicWidthToDevicePixel( aInfo.GetDotLen() ), tools::Long(1) ) );
else
aInfo.SetDotCount( 0 );
if( aInfo.GetDashCount() && aInfo.GetDashLen() )
- aInfo.SetDashLen( std::max( ImplLogicWidthToDevicePixel( aInfo.GetDashLen() ), 1L ) );
+ aInfo.SetDashLen( std::max( ImplLogicWidthToDevicePixel( aInfo.GetDashLen() ), tools::Long(1) ) );
else
aInfo.SetDashCount( 0 );
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 252cbc308daf..9252959d0f5e 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -251,8 +251,8 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( mbOutputClipped )
return;
- const tools::Long nDistX = std::max( rDist.Width(), 1L );
- const tools::Long nDistY = std::max( rDist.Height(), 1L );
+ const tools::Long nDistX = std::max( rDist.Width(), tools::Long(1) );
+ const tools::Long nDistY = std::max( rDist.Height(), tools::Long(1) );
tools::Long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
tools::Long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
const tools::Long nRight = aDstRect.Right();
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 8573affbae99..0057fb4a2a14 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1622,7 +1622,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
tools::Long nMnemonicY;
DeviceCoordinate nMnemonicWidth;
- std::unique_ptr<long[]> const pCaretXArray(new long[2 * nLineLen]);
+ std::unique_ptr<tools::Long[]> const pCaretXArray(new tools::Long[2 * nLineLen]);
/*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(),
nIndex, nLineLen );
tools::Long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)];
@@ -1691,7 +1691,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta
DeviceCoordinate nMnemonicWidth = 0;
if ( nMnemonicPos != -1 )
{
- std::unique_ptr<long[]> const pCaretXArray(new long[2 * aStr.getLength()]);
+ std::unique_ptr<tools::Long[]> const pCaretXArray(new tools::Long[2 * aStr.getLength()]);
/*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray.get(), 0, aStr.getLength() );
tools::Long lc_x1 = pCaretXArray[2*nMnemonicPos];
tools::Long lc_x2 = pCaretXArray[2*nMnemonicPos+1];
@@ -2129,7 +2129,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
nMnemonicPos = nLen-1;
}
- std::unique_ptr<long[]> const pCaretXArray(new long[2 * nLen]);
+ std::unique_ptr<tools::Long[]> const pCaretXArray(new tools::Long[2 * nLen]);
/*sal_Bool bRet =*/ GetCaretPositions( aStr, pCaretXArray.get(), nIndex, nLen, pGlyphs );
tools::Long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ];
tools::Long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ];
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 800b869f0676..1f13715a5e7f 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1577,7 +1577,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
if( nMaxWidth > nScreenWidth/2 )
nMaxWidth = nScreenWidth/2;
- sal_uInt16 gfxExtra = static_cast<sal_uInt16>(std::max( nExtra, 7L )); // #107710# increase space between checkmarks/images/text
+ sal_uInt16 gfxExtra = static_cast<sal_uInt16>(std::max( nExtra, tools::Long(7) )); // #107710# increase space between checkmarks/images/text
nImgOrChkPos = static_cast<sal_uInt16>(nExtra);
tools::Long nImgOrChkWidth = 0;
if( aMaxSize.Height() > 0 ) // NWF case
@@ -2968,7 +2968,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
SAL_WARN_IF(nMaxHeight < 768, "vcl",
"Available height misdetected as " << nMaxHeight
<< "px. Setting to 768px instead.");
- nMaxHeight = std::max(nMaxHeight, 768l);
+ nMaxHeight = std::max(nMaxHeight, tools::Long(768));
if (pStartedFrom && pStartedFrom->IsMenuBar())
nMaxHeight -= pW->GetSizePixel().Height();
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 2d26fcff10e8..d43eccb2725c 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1762,7 +1762,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
{
std::vector< ImplSplitItem >& rItems = mpSplitSet->mvItems;
sal_uInt16 nItems = mpSplitSet->mvItems.size();
- mpLastSizes = new long[nItems*2];
+ mpLastSizes = new tools::Long[nItems*2];
for ( sal_uInt16 i = 0; i < nItems; i++ )
{
mpLastSizes[i*2] = rItems[i].mnSize;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index a16cce9c39f0..8e396207df92 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -707,15 +707,15 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( std::abs(g.nX-aState.mnX) < 2 && std::abs(g.nY-aState.mnY) < 5 )
{
tools::Long displacement = g.nTopDecoration ? g.nTopDecoration : 20;
- if( aState.mnX + displacement + aState.mnWidth + g.nRightDecoration > o3tl::make_unsigned(aDesktop.Right()) ||
- aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration > o3tl::make_unsigned(aDesktop.Bottom()) )
+ if( static_cast<tools::Long>(aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > aDesktop.Right() ||
+ static_cast<tools::Long>(aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > aDesktop.Bottom() )
{
// displacing would leave screen
aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0)
aState.mnY = displacement;
if( bWrapped ||
- aState.mnX + displacement + aState.mnWidth + g.nRightDecoration > o3tl::make_unsigned(aDesktop.Right()) ||
- aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration > o3tl::make_unsigned(aDesktop.Bottom()) )
+ static_cast<tools::Long>(aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > aDesktop.Right() ||
+ static_cast<tools::Long>(aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > aDesktop.Bottom() )
break; // further displacement not possible -> break
// avoid endless testing
bWrapped = true;
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index b5964319ab22..ecfec5c8dccf 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -247,7 +247,7 @@ void WinSalGraphicsImpl::freeResources()
{
}
-bool WinSalGraphicsImpl::drawEPS(long, long, long, long, void*, sal_uInt32)
+bool WinSalGraphicsImpl::drawEPS(tools::Long, tools::Long, tools::Long, tools::Long, void*, sal_uInt32)
{
return false;
}
@@ -332,9 +332,9 @@ void ImplCalcOutSideRgn( const RECT& rSrcRect,
} // namespace
-void WinSalGraphicsImpl::copyArea( long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+void WinSalGraphicsImpl::copyArea( tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate )
{
bool bRestoreClipRgn = false;
@@ -735,8 +735,8 @@ void WinSalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry,
BitBlt( hDC, nDstX, nDstY, nDstWidth, nDstHeight, hMemDC.get(), 0, 0, SRCCOPY );
}
-bool WinSalGraphicsImpl::drawAlphaRect( long nX, long nY, long nWidth,
- long nHeight, sal_uInt8 nTransparency )
+bool WinSalGraphicsImpl::drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency )
{
if( mbPen || !mbBrush || mbXORMode )
return false; // can only perform solid fills without XOR.
@@ -790,7 +790,7 @@ void WinSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry,
ImplDrawBitmap( hDC, aPosAry, rSalBitmap, false, 0x00B8074AUL );
}
-std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( long nX, long nY, long nDX, long nDY )
+std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
SAL_WARN_IF( mrParent.isPrinter(), "vcl", "No ::GetBitmap() from printer possible!" );
@@ -829,7 +829,7 @@ std::shared_ptr<SalBitmap> WinSalGraphicsImpl::getBitmap( long nX, long nY, long
return pSalBitmap;
}
-Color WinSalGraphicsImpl::getPixel( long nX, long nY )
+Color WinSalGraphicsImpl::getPixel( tools::Long nX, tools::Long nY )
{
COLORREF aWinCol = ::GetPixel( mrParent.getHDC(), static_cast<int>(nX), static_cast<int>(nY) );
@@ -859,7 +859,7 @@ HBRUSH Get50PercentBrush()
} // namespace
-void WinSalGraphicsImpl::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags )
+void WinSalGraphicsImpl::invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags )
{
if ( nFlags & SalInvert::TrackFrame )
{
@@ -953,7 +953,7 @@ sal_uInt16 WinSalGraphicsImpl::GetBitCount() const
return static_cast<sal_uInt16>(GetDeviceCaps( mrParent.getHDC(), BITSPIXEL ));
}
-long WinSalGraphicsImpl::GetGraphicsWidth() const
+tools::Long WinSalGraphicsImpl::GetGraphicsWidth() const
{
if( mrParent.gethWnd() && IsWindow( mrParent.gethWnd() ) )
{
@@ -1574,12 +1574,12 @@ void WinSalGraphicsImpl::DrawPixelImpl( long nX, long nY, COLORREF crColor )
PatBlt(hDC, static_cast<int>(nX), static_cast<int>(nY), int(1), int(1), PATINVERT);
}
-void WinSalGraphicsImpl::drawPixel( long nX, long nY )
+void WinSalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY )
{
DrawPixelImpl( nX, nY, mnPenColor );
}
-void WinSalGraphicsImpl::drawPixel( long nX, long nY, Color nColor )
+void WinSalGraphicsImpl::drawPixel( tools::Long nX, tools::Long nY, Color nColor )
{
COLORREF nCol = PALETTERGB( nColor.GetRed(),
nColor.GetGreen(),
@@ -1593,7 +1593,7 @@ void WinSalGraphicsImpl::drawPixel( long nX, long nY, Color nColor )
DrawPixelImpl( nX, nY, nCol );
}
-void WinSalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 )
+void WinSalGraphicsImpl::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 )
{
MoveToEx( mrParent.getHDC(), static_cast<int>(nX1), static_cast<int>(nY1), nullptr );
@@ -1604,7 +1604,7 @@ void WinSalGraphicsImpl::drawLine( long nX1, long nY1, long nX2, long nY2 )
DrawPixelImpl( nX2, nY2, mnPenColor );
}
-void WinSalGraphicsImpl::drawRect( long nX, long nY, long nWidth, long nHeight )
+void WinSalGraphicsImpl::drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
if ( !mbPen )
{
diff --git a/vcl/win/gdi/gdiimpl.hxx b/vcl/win/gdi/gdiimpl.hxx
index 92ef89e3f221..c6844a2b4325 100644
--- a/vcl/win/gdi/gdiimpl.hxx
+++ b/vcl/win/gdi/gdiimpl.hxx
@@ -78,7 +78,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;
@@ -107,12 +107,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;
@@ -154,9 +154,9 @@ public:
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea(
- long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight, bool bWindowInvalidate ) override;
+ 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
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
@@ -174,21 +174,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;
@@ -234,8 +234,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;
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index ac9316a8ca29..c1d209f4d765 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1614,7 +1614,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile,
pEncoding, pGlyphWidths, nGlyphCount);
}
-const void* WinSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long* pDataLen)
+const void* WinSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen)
{
// create matching FontSelectPattern
// we need just enough to get to the font file data
@@ -1635,7 +1635,7 @@ const void* WinSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long
return pData;
}
-void WinSalGraphics::FreeEmbedFontData( const void* pData, long /*nLen*/ )
+void WinSalGraphics::FreeEmbedFontData( const void* pData, tools::Long /*nLen*/ )
{
delete[] static_cast<char const *>(pData);
}
diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx
index 813ce8c4e9da..f117bc9a9ba0 100644
--- a/vcl/win/gdi/salgdi.cxx
+++ b/vcl/win/gdi/salgdi.cxx
@@ -714,7 +714,7 @@ sal_uInt16 WinSalGraphics::GetBitCount() const
return mpImpl->GetBitCount();
}
-long WinSalGraphics::GetGraphicsWidth() const
+tools::Long WinSalGraphics::GetGraphicsWidth() const
{
return mpImpl->GetGraphicsWidth();
}
@@ -770,22 +770,22 @@ void WinSalGraphics::SetROPFillColor( SalROPColor nROPColor )
mpImpl->SetROPFillColor( nROPColor );
}
-void WinSalGraphics::drawPixel( long nX, long nY )
+void WinSalGraphics::drawPixel( tools::Long nX, tools::Long nY )
{
mpImpl->drawPixel( nX, nY );
}
-void WinSalGraphics::drawPixel( long nX, long nY, Color nColor )
+void WinSalGraphics::drawPixel( tools::Long nX, tools::Long nY, Color nColor )
{
mpImpl->drawPixel( nX, nY, nColor );
}
-void WinSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
+void WinSalGraphics::drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 )
{
mpImpl->drawLine( nX1, nY1, nX2, nY2 );
}
-void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
+void WinSalGraphics::drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
mpImpl->drawRect( nX, nY, nWidth, nHeight );
}
@@ -913,7 +913,7 @@ static bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uLong nSize )
#define POSTSCRIPT_BUFSIZE 0x4000 // MAXIMUM BUFSIZE EQ 0xFFFF
-bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize )
+bool WinSalGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize )
{
bool bRetValue = false;
diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx
index fdac864d0f32..e23ebb4430a8 100644
--- a/vcl/win/gdi/salgdi2.cxx
+++ b/vcl/win/gdi/salgdi2.cxx
@@ -57,9 +57,9 @@ void WinSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraph
mpImpl->copyBits( rPosAry, pSrcGraphics );
}
-void WinSalGraphics::copyArea( long nDestX, long nDestY,
- long nSrcX, long nSrcY,
- long nSrcWidth, long nSrcHeight,
+void WinSalGraphics::copyArea( tools::Long nDestX, tools::Long nDestY,
+ tools::Long nSrcX, tools::Long nSrcY,
+ tools::Long nSrcWidth, tools::Long nSrcHeight,
bool bWindowInvalidate )
{
mpImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY,
@@ -212,8 +212,8 @@ void WinSalGraphics::drawBitmap( const SalTwoRect& rPosAry,
}
}
-bool WinSalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
- long nHeight, sal_uInt8 nTransparency )
+bool WinSalGraphics::drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency )
{
return mpImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
}
@@ -225,17 +225,17 @@ void WinSalGraphics::drawMask( const SalTwoRect& rPosAry,
mpImpl->drawMask( rPosAry, rSSalBitmap, nMaskColor );
}
-std::shared_ptr<SalBitmap> WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
+std::shared_ptr<SalBitmap> WinSalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY )
{
return mpImpl->getBitmap( nX, nY, nDX, nDY );
}
-Color WinSalGraphics::getPixel( long nX, long nY )
+Color WinSalGraphics::getPixel( tools::Long nX, tools::Long nY )
{
return mpImpl->getPixel( nX, nY );
}
-void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags )
+void WinSalGraphics::invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags )
{
mpImpl->invert( nX, nY, nWidth, nHeight, nFlags );
}
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index ea48833d4c3c..d552d17ed96b 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1261,7 +1261,7 @@ sal_uInt32 WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, P
}
void WinSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
- long& rOutWidth, long& rOutHeight,
+ tools::Long& rOutWidth, tools::Long& rOutHeight,
Point& rPageOffset,
Size& rPaperSize )
{
diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx
index e1cacb8b098a..489c5f0bebf1 100644
--- a/vcl/win/gdi/salvd.cxx
+++ b/vcl/win/gdi/salvd.cxx
@@ -32,7 +32,7 @@
#include <sal/log.hxx>
#include <o3tl/temporary.hxx>
-HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, long nDX, long nDY, sal_uInt16 nBitCount, void **ppData)
+HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, tools::Long nDX, tools::Long nDY, sal_uInt16 nBitCount, void **ppData)
{
HBITMAP hBitmap;
@@ -73,7 +73,7 @@ HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, long nDX, long nDY,
}
std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
- long &nDX, long &nDY,
+ tools::Long &nDX, tools::Long &nDY,
DeviceFormat eFormat,
const SystemGraphicsData* pData )
{
@@ -141,7 +141,7 @@ std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( SalGraphi
return std::unique_ptr<SalVirtualDevice>(pVDev);
}
-WinSalVirtualDevice::WinSalVirtualDevice(HDC hDC, HBITMAP hBMP, sal_uInt16 nBitCount, bool bForeignDC, long nWidth, long nHeight)
+WinSalVirtualDevice::WinSalVirtualDevice(HDC hDC, HBITMAP hBMP, sal_uInt16 nBitCount, bool bForeignDC, tools::Long nWidth, tools::Long nHeight)
: mhLocalDC(hDC), // HDC or 0 for Cache Device
mhBmp(hBMP), // Memory Bitmap
mnBitCount(nBitCount), // BitCount (0 or 1)
@@ -197,7 +197,7 @@ void WinSalVirtualDevice::ReleaseGraphics( SalGraphics* )
mbGraphics = false;
}
-bool WinSalVirtualDevice::SetSize( long nDX, long nDY )
+bool WinSalVirtualDevice::SetSize( tools::Long nDX, tools::Long nDY )
{
if( mbForeignDC || !mhBmp )
return true; // ???
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 13ae25af8225..ab4102056604 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1214,19 +1214,19 @@ void WinSalFrame::Show( bool bVisible, bool bNoActivate )
ImplSalShow( mhWnd, bVisible, bNoActivate );
}
-void WinSalFrame::SetMinClientSize( long nWidth, long nHeight )
+void WinSalFrame::SetMinClientSize( tools::Long nWidth, tools::Long nHeight )
{
mnMinWidth = nWidth;
mnMinHeight = nHeight;
}
-void WinSalFrame::SetMaxClientSize( long nWidth, long nHeight )
+void WinSalFrame::SetMaxClientSize( tools::Long nWidth, tools::Long nHeight )
{
mnMaxWidth = nWidth;
mnMaxHeight = nHeight;
}
-void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
+void WinSalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
sal_uInt16 nFlags )
{
bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
@@ -1578,7 +1578,7 @@ void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )
rRect.SetBottom( aRect.bottom-1 );
}
-void WinSalFrame::GetClientSize( long& rWidth, long& rHeight )
+void WinSalFrame::GetClientSize( tools::Long& rWidth, tools::Long& rHeight )
{
rWidth = maGeometry.nWidth;
rHeight = maGeometry.nHeight;
@@ -1614,10 +1614,10 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState )
RECT aRect2 = aWinRect;
AdjustWindowRectEx( &aRect2, GetWindowStyle( mhWnd ),
FALSE, GetWindowExStyle( mhWnd ) );
- long nTopDeco = abs( aWinRect.top - aRect2.top );
- long nLeftDeco = abs( aWinRect.left - aRect2.left );
- long nBottomDeco = abs( aWinRect.bottom - aRect2.bottom );
- long nRightDeco = abs( aWinRect.right - aRect2.right );
+ tools::Long nTopDeco = abs( aWinRect.top - aRect2.top );
+ tools::Long nLeftDeco = abs( aWinRect.left - aRect2.left );
+ tools::Long nBottomDeco = abs( aWinRect.bottom - aRect2.bottom );
+ tools::Long nRightDeco = abs( aWinRect.right - aRect2.right );
// adjust window position/size to fit the screen
if ( !(pState->mnMask & (WindowStateMask::X | WindowStateMask::Y)) )
@@ -2176,7 +2176,7 @@ void WinSalFrame::CaptureMouse( bool bCapture )
SendMessageW( mhWnd, nMsg, 0, 0 );
}
-void WinSalFrame::SetPointerPos( long nX, long nY )
+void WinSalFrame::SetPointerPos( tools::Long nX, tools::Long nY )
{
POINT aPt;
aPt.x = static_cast<int>(nX);
@@ -2927,15 +2927,15 @@ void WinSalFrame::BeginSetClipRegion( sal_uInt32 nRects )
mbFirstClipRect = true;
}
-void WinSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+void WinSalFrame::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
if( ! mpClipRgnData )
return;
RECT* pRect = mpNextClipRect;
RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ tools::Long nRight = nX + nWidth;
+ tools::Long nBottom = nY + nHeight;
if ( mbFirstClipRect )
{
@@ -4520,7 +4520,7 @@ static LRESULT ImplMeasureItem( HWND hWnd, WPARAM wParam, LPARAM lParam )
Size checkSize( GetSystemMetrics( SM_CXMENUCHECK ), GetSystemMetrics( SM_CYMENUCHECK ) );
pMI->itemWidth = checkSize.Width() + 3 + bmpSize.Width() + 3 + strSize.cx;
- pMI->itemHeight = std::max( std::max( checkSize.Height(), bmpSize.Height() ), strSize.cy );
+ pMI->itemHeight = std::max( std::max( checkSize.Height(), bmpSize.Height() ), tools::Long(strSize.cy) );
pMI->itemHeight += 4;
DeleteObject( SelectObject(hdc, hfntOld) );
diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx
index de9a7e45fb90..e2ba3856b1de 100644
--- a/vcl/win/window/salobj.cxx
+++ b/vcl/win/window/salobj.cxx
@@ -622,12 +622,12 @@ void WinSalObject::BeginSetClipRegion( sal_uInt32 nRectCount )
mbFirstClipRect = true;
}
-void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+void WinSalObject::UnionClipRegion( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
RECT* pRect = mpNextClipRect;
RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ tools::Long nRight = nX + nWidth;
+ tools::Long nBottom = nY + nHeight;
if ( mbFirstClipRect )
{
@@ -682,7 +682,7 @@ void WinSalObject::EndSetClipRegion()
SetWindowRgn( mhWnd, hRegion, TRUE );
}
-void WinSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
+void WinSalObject::SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
sal_uLong nStyle = 0;
bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 36711fc58084..09b1f47608e0 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -642,7 +642,7 @@ public:
}
// DX array rendering
- std::unique_ptr<long[]> pItems(new long[aText.getLength()+10]);
+ std::unique_ptr<tools::Long[]> pItems(new tools::Long[aText.getLength()+10]);
rDev.GetTextArray(aText, pItems.get());
for (tools::Long j = 0; j < aText.getLength(); ++j)
{