summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Bitmap.cxx2
-rw-r--r--vcl/qt5/Qt5FilePicker.cxx4
-rw-r--r--vcl/qt5/Qt5Frame.cxx14
-rw-r--r--vcl/qt5/Qt5Graphics_Controls.cxx3
-rw-r--r--vcl/qt5/Qt5Graphics_GDI.cxx33
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx4
-rw-r--r--vcl/qt5/Qt5Instance.cxx7
-rw-r--r--vcl/qt5/Qt5Object.cxx5
-rw-r--r--vcl/qt5/Qt5VirtualDevice.cxx9
9 files changed, 44 insertions, 37 deletions
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index 01c6ebc4dd2b..bb7f762ee874 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -149,7 +149,7 @@ bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount)
sal_uInt32 nWidth = pBitmap->m_aSize.Height() / 2;
bool isOdd(0 != pBitmap->m_aSize.Height() % 2);
- for (long h = 0; h < pBitmap->m_aSize.Height(); ++h)
+ for (tools::Long h = 0; h < pBitmap->m_aSize.Height(); ++h)
{
sal_uInt8* buffer_data = buffer_data_pos;
buffer_data_pos += pBitmap->m_nScanline;
diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx
index 5e0f88412056..9dea45ed4444 100644
--- a/vcl/qt5/Qt5FilePicker.cxx
+++ b/vcl/qt5/Qt5FilePicker.cxx
@@ -840,11 +840,11 @@ void SAL_CALL Qt5FilePicker::initialize(const uno::Sequence<uno::Any>& args)
aAny >>= xSysWin;
const auto& pFrames = pSalInst->getFrames();
- const long aWindowHandle = xSysWin.WindowHandle;
+ const tools::Long aWindowHandle = xSysWin.WindowHandle;
const auto it
= std::find_if(pFrames.begin(), pFrames.end(), [&aWindowHandle](auto pFrame) -> bool {
const SystemEnvData* pData = pFrame->GetSystemData();
- return pData && long(pData->aWindow) == aWindowHandle;
+ return pData && tools::Long(pData->aWindow) == aWindowHandle;
});
if (it != pFrames.end())
m_pParentWidget = static_cast<Qt5Frame*>(*it)->asChild();
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index f008f4538bd7..41a5a5436a67 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -430,7 +430,7 @@ void Qt5Frame::Show(bool bVisible, bool /*bNoActivate*/)
pSalInst->RunInMainThread([this, bVisible]() { asChild()->setVisible(bVisible); });
}
-void Qt5Frame::SetMinClientSize(long nWidth, long nHeight)
+void Qt5Frame::SetMinClientSize(tools::Long nWidth, tools::Long nHeight)
{
if (!isChild())
{
@@ -439,7 +439,7 @@ void Qt5Frame::SetMinClientSize(long nWidth, long nHeight)
}
}
-void Qt5Frame::SetMaxClientSize(long nWidth, long nHeight)
+void Qt5Frame::SetMaxClientSize(tools::Long nWidth, tools::Long nHeight)
{
if (!isChild())
{
@@ -513,7 +513,8 @@ void Qt5Frame::SetDefaultSize()
assert(!m_bDefaultSize);
}
-void Qt5Frame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags)
+void Qt5Frame::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ sal_uInt16 nFlags)
{
if (!isWindow() || isChild(true, false))
return;
@@ -578,7 +579,7 @@ void Qt5Frame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt1
asChild()->move(round(nX / devicePixelRatioF()), round(nY / devicePixelRatioF()));
}
-void Qt5Frame::GetClientSize(long& rWidth, long& rHeight)
+void Qt5Frame::GetClientSize(tools::Long& rWidth, tools::Long& rHeight)
{
rWidth = round(m_pQWidget->width() * devicePixelRatioF());
rHeight = round(m_pQWidget->height() * devicePixelRatioF());
@@ -795,7 +796,7 @@ void Qt5Frame::CaptureMouse(bool bMouse)
m_pQWidget->releaseMouse();
}
-void Qt5Frame::SetPointerPos(long nX, long nY)
+void Qt5Frame::SetPointerPos(tools::Long nX, tools::Long nY)
{
// some cursor already exists (and it has m_ePointerStyle shape)
// so here we just reposition it
@@ -1179,7 +1180,8 @@ void Qt5Frame::BeginSetClipRegion(sal_uInt32)
m_aRegion = QRegion(QRect(QPoint(0, 0), m_pQWidget->size()));
}
-void Qt5Frame::UnionClipRegion(long nX, long nY, long nWidth, long nHeight)
+void Qt5Frame::UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
m_aRegion
= m_aRegion.united(scaledQRect(QRect(nX, nY, nWidth, nHeight), 1 / devicePixelRatioF()));
diff --git a/vcl/qt5/Qt5Graphics_Controls.cxx b/vcl/qt5/Qt5Graphics_Controls.cxx
index 732c25e241cb..b28734b4aefc 100644
--- a/vcl/qt5/Qt5Graphics_Controls.cxx
+++ b/vcl/qt5/Qt5Graphics_Controls.cxx
@@ -545,7 +545,8 @@ bool Qt5Graphics_Controls::drawNativeControl(ControlType type, ControlPart part,
// If the scrollbar has a mnMin == 0 and mnMax == 0 then mnVisibleSize is set to -1?!
// I don't know if a negative mnVisibleSize makes any sense, so just handle this case
// without crashing LO with a SIGFPE in the Qt library.
- const long nVisibleSize = (sbVal->mnMin == sbVal->mnMax) ? 0 : sbVal->mnVisibleSize;
+ const tools::Long nVisibleSize
+ = (sbVal->mnMin == sbVal->mnMax) ? 0 : sbVal->mnVisibleSize;
option.minimum = sbVal->mnMin;
option.maximum = sbVal->mnMax - nVisibleSize;
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index 2cbced7ddcab..d9a9a2b12f16 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -166,14 +166,14 @@ void Qt5Graphics::ResetClipRegion()
}
}
-void Qt5Graphics::drawPixel(long nX, long nY)
+void Qt5Graphics::drawPixel(tools::Long nX, tools::Long nY)
{
Qt5Painter aPainter(*this);
aPainter.drawPoint(nX, nY);
aPainter.update(nX, nY, 1, 1);
}
-void Qt5Graphics::drawPixel(long nX, long nY, Color nColor)
+void Qt5Graphics::drawPixel(tools::Long nX, tools::Long nY, Color nColor)
{
Qt5Painter aPainter(*this);
aPainter.setPen(toQColor(nColor));
@@ -182,12 +182,12 @@ void Qt5Graphics::drawPixel(long nX, long nY, Color nColor)
aPainter.update(nX, nY, 1, 1);
}
-void Qt5Graphics::drawLine(long nX1, long nY1, long nX2, long nY2)
+void Qt5Graphics::drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)
{
Qt5Painter aPainter(*this);
aPainter.drawLine(nX1, nY1, nX2, nY2);
- long tmp;
+ tools::Long tmp;
if (nX1 > nX2)
{
tmp = nX1;
@@ -203,7 +203,7 @@ void Qt5Graphics::drawLine(long nX1, long nY1, long nX2, long nY2)
aPainter.update(nX1, nY1, nX2 - nX1 + 1, nY2 - nY1 + 1);
}
-void Qt5Graphics::drawRect(long nX, long nY, long nWidth, long nHeight)
+void Qt5Graphics::drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
if (SALCOLOR_NONE == m_aFillColor && SALCOLOR_NONE == m_aLineColor)
return;
@@ -437,8 +437,9 @@ void Qt5Graphics::drawScaledImage(const SalTwoRect& rPosAry, const QImage& rImag
aPainter.update(aDestRect);
}
-void Qt5Graphics::copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, bool /*bWindowInvalidate*/)
+void Qt5Graphics::copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX,
+ tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
+ bool /*bWindowInvalidate*/)
{
if (nDestX == nSrcX && nDestY == nSrcY)
return;
@@ -509,14 +510,16 @@ void Qt5Graphics::drawMask(const SalTwoRect& rPosAry, const SalBitmap& /*rSalBit
assert(rPosAry.mnSrcHeight == rPosAry.mnDestHeight);
}
-std::shared_ptr<SalBitmap> Qt5Graphics::getBitmap(long nX, long nY, long nWidth, long nHeight)
+std::shared_ptr<SalBitmap> Qt5Graphics::getBitmap(tools::Long nX, tools::Long nY,
+ tools::Long nWidth, tools::Long nHeight)
{
return std::make_shared<Qt5Bitmap>(m_pQImage->copy(nX, nY, nWidth, nHeight));
}
-Color Qt5Graphics::getPixel(long nX, long nY) { return m_pQImage->pixel(nX, nY); }
+Color Qt5Graphics::getPixel(tools::Long nX, tools::Long nY) { return m_pQImage->pixel(nX, nY); }
-void Qt5Graphics::invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags)
+void Qt5Graphics::invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
+ SalInvert nFlags)
{
Qt5Painter aPainter(*this);
if (SalInvert::N50 & nFlags)
@@ -548,8 +551,8 @@ void Qt5Graphics::invert(sal_uInt32 /*nPoints*/, const SalPoint* /*pPtAry*/, Sal
{
}
-bool Qt5Graphics::drawEPS(long /*nX*/, long /*nY*/, long /*nWidth*/, long /*nHeight*/,
- void* /*pPtr*/, sal_uInt32 /*nSize*/)
+bool Qt5Graphics::drawEPS(tools::Long /*nX*/, tools::Long /*nY*/, tools::Long /*nWidth*/,
+ tools::Long /*nHeight*/, void* /*pPtr*/, sal_uInt32 /*nSize*/)
{
return false;
}
@@ -649,8 +652,8 @@ bool Qt5Graphics::drawTransformedBitmap(const basegfx::B2DPoint& rNull, const ba
return true;
}
-bool Qt5Graphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
- sal_uInt8 nTransparency)
+bool Qt5Graphics::drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt8 nTransparency)
{
if (SALCOLOR_NONE == m_aFillColor && SALCOLOR_NONE == m_aLineColor)
return true;
@@ -686,7 +689,7 @@ void Qt5Graphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY)
sal_uInt16 Qt5Graphics::GetBitCount() const { return getFormatBits(m_pQImage->format()); }
-long Qt5Graphics::GetGraphicsWidth() const { return m_pQImage->width(); }
+tools::Long Qt5Graphics::GetGraphicsWidth() const { return m_pQImage->width(); }
void Qt5Graphics::SetLineColor() { m_aLineColor = SALCOLOR_NONE; }
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index de39fc7009b8..b9eb2864bb45 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -253,12 +253,12 @@ bool Qt5Graphics::CreateFontSubset(const OUString& rToFile, const PhysicalFontFa
pGlyphIds, pEncoding, pGlyphWidths, nGlyphCount);
}
-const void* Qt5Graphics::GetEmbedFontData(const PhysicalFontFace*, long* /*pDataLen*/)
+const void* Qt5Graphics::GetEmbedFontData(const PhysicalFontFace*, tools::Long* /*pDataLen*/)
{
return nullptr;
}
-void Qt5Graphics::FreeEmbedFontData(const void* /*pData*/, long /*nDataLen*/) {}
+void Qt5Graphics::FreeEmbedFontData(const void* /*pData*/, tools::Long /*nDataLen*/) {}
void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* pFontFace, bool bVertical,
std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc)
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index bba348890898..ca1f914dd707 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -285,10 +285,9 @@ void Qt5Instance::DestroyObject(SalObject* pObject)
}
}
-std::unique_ptr<SalVirtualDevice> Qt5Instance::CreateVirtualDevice(SalGraphics* pGraphics,
- long& nDX, long& nDY,
- DeviceFormat eFormat,
- const SystemGraphicsData* pGd)
+std::unique_ptr<SalVirtualDevice>
+Qt5Instance::CreateVirtualDevice(SalGraphics* pGraphics, tools::Long& nDX, tools::Long& nDY,
+ DeviceFormat eFormat, const SystemGraphicsData* pGd)
{
if (m_bUseCairo)
{
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx
index 5bbfef5a5870..29bcb980f7c7 100644
--- a/vcl/qt5/Qt5Object.cxx
+++ b/vcl/qt5/Qt5Object.cxx
@@ -84,7 +84,8 @@ void Qt5Object::ResetClipRegion()
void Qt5Object::BeginSetClipRegion(sal_uInt32) { m_pRegion = QRegion(); }
-void Qt5Object::UnionClipRegion(long nX, long nY, long nWidth, long nHeight)
+void Qt5Object::UnionClipRegion(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight)
{
m_pRegion += QRect(nX, nY, nWidth, nHeight);
}
@@ -95,7 +96,7 @@ void Qt5Object::EndSetClipRegion()
m_pRegion = m_pRegion.intersected(m_pQWidget->geometry());
}
-void Qt5Object::SetPosSize(long nX, long nY, long nWidth, long nHeight)
+void Qt5Object::SetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
{
if (m_pQWidget)
{
diff --git a/vcl/qt5/Qt5VirtualDevice.cxx b/vcl/qt5/Qt5VirtualDevice.cxx
index 10b2066ccbf6..30b6e37643f8 100644
--- a/vcl/qt5/Qt5VirtualDevice.cxx
+++ b/vcl/qt5/Qt5VirtualDevice.cxx
@@ -46,12 +46,13 @@ void Qt5VirtualDevice::ReleaseGraphics(SalGraphics* pGraphics)
delete pGraphics;
}
-bool Qt5VirtualDevice::SetSize(long nNewDX, long nNewDY)
+bool Qt5VirtualDevice::SetSize(tools::Long nNewDX, tools::Long nNewDY)
{
return SetSizeUsingBuffer(nNewDX, nNewDY, nullptr);
}
-bool Qt5VirtualDevice::SetSizeUsingBuffer(long nNewDX, long nNewDY, sal_uInt8* pBuffer)
+bool Qt5VirtualDevice::SetSizeUsingBuffer(tools::Long nNewDX, tools::Long nNewDY,
+ sal_uInt8* pBuffer)
{
if (nNewDX == 0)
nNewDX = 1;
@@ -88,8 +89,8 @@ bool Qt5VirtualDevice::SetSizeUsingBuffer(long nNewDX, long nNewDY, sal_uInt8* p
return true;
}
-long Qt5VirtualDevice::GetWidth() const { return m_pImage ? m_aFrameSize.width() : 0; }
+tools::Long Qt5VirtualDevice::GetWidth() const { return m_pImage ? m_aFrameSize.width() : 0; }
-long Qt5VirtualDevice::GetHeight() const { return m_pImage ? m_aFrameSize.height() : 0; }
+tools::Long Qt5VirtualDevice::GetHeight() const { return m_pImage ? m_aFrameSize.height() : 0; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */