summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 15:27:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-22 08:06:43 +0200
commit700a833520396604b10c713c478d5138578a60b6 (patch)
treefbdcbd42910c9b15e3d0051d0d2e5a10c7e7ae60 /forms
parent5d422c0348efd1df6b3d44dd6efcf5c5490fc321 (diff)
long->tools::Long in forms..framework
Change-Id: I4cb29aade5ad1d3c3588b9437197e8493292872e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104625 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/imgprod.cxx28
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx20
-rw-r--r--forms/source/runtime/formoperations.hxx3
3 files changed, 26 insertions, 25 deletions
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 9bd74f9f4792..3e79596bb07f 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -365,14 +365,14 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
Bitmap aMask( aBmpEx.GetMask() );
BitmapReadAccess* pMskAcc = !!aMask ? aMask.AcquireReadAccess() : nullptr;
- const long nWidth = pBmpAcc->Width();
- const long nHeight = pBmpAcc->Height();
- const long nStartX = 0;
- const long nEndX = nWidth - 1;
- const long nStartY = 0;
- const long nEndY = nHeight - 1;
- const long nPartWidth = nEndX - nStartX + 1;
- const long nPartHeight = nEndY - nStartY + 1;
+ const tools::Long nWidth = pBmpAcc->Width();
+ const tools::Long nHeight = pBmpAcc->Height();
+ const tools::Long nStartX = 0;
+ const tools::Long nEndX = nWidth - 1;
+ const tools::Long nStartY = 0;
+ const tools::Long nEndY = nHeight - 1;
+ const tools::Long nPartWidth = nEndX - nStartX + 1;
+ const tools::Long nPartHeight = nEndY - nStartY + 1;
if( !pMskAcc )
{
@@ -393,11 +393,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
css::uno::Sequence<sal_Int8> aData( nPartWidth * nPartHeight );
sal_Int8* pTmp = aData.getArray();
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
Scanline pScanlineMask = pMskAcc->GetScanline( nY );
Scanline pScanline = pBmpAcc->GetScanline( nY );
- for( long nX = nStartX; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX; nX <= nEndX; nX++ )
{
if( pMskAcc->GetPixelFromData( pScanlineMask, nX ) == aWhite )
*pTmp++ = sal::static_int_cast< sal_Int8 >(
@@ -416,11 +416,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
css::uno::Sequence<sal_Int32> aData( nPartWidth * nPartHeight );
sal_Int32* pTmp = aData.getArray();
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
Scanline pScanlineMask = pMskAcc->GetScanline( nY );
Scanline pScanline = pBmpAcc->GetScanline( nY );
- for( long nX = nStartX; nX <= nEndX; nX++ )
+ for( tools::Long nX = nStartX; nX <= nEndX; nX++ )
{
if( pMskAcc->GetPixelFromData( pScanlineMask, nX ) == aWhite )
*pTmp++ = mnTransIndex;
@@ -440,11 +440,11 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
const BitmapColor aWhite( pMskAcc->GetBestMatchingColor( COL_WHITE ) );
sal_Int32* pTmp = aData.getArray();
- for( long nY = nStartY; nY <= nEndY; nY++ )
+ for( tools::Long nY = nStartY; nY <= nEndY; nY++ )
{
Scanline pScanlineMask = pMskAcc->GetScanline( nY );
Scanline pScanline = pBmpAcc->GetScanline( nY );
- for( long nX = nStartX; nX <= nEndX; nX++, pTmp++ )
+ for( tools::Long nX = nStartX; nX <= nEndX; nX++, pTmp++ )
{
const BitmapColor aCol( pBmpAcc->GetPixelFromData( pScanline, nX ) );
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 0634c57f9661..36c28323bd94 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -390,8 +390,8 @@ namespace frm
const StyleSettings& rStyleSettings = m_pAntiImpl->GetSettings().GetStyleSettings();
- long nScrollBarWidth = m_pVScroll ? rStyleSettings.GetScrollBarSize() : 0;
- long nScrollBarHeight = m_pHScroll ? rStyleSettings.GetScrollBarSize() : 0;
+ tools::Long nScrollBarWidth = m_pVScroll ? rStyleSettings.GetScrollBarSize() : 0;
+ tools::Long nScrollBarHeight = m_pHScroll ? rStyleSettings.GetScrollBarSize() : 0;
if ( m_pAntiImpl->IsZoom() )
{
@@ -405,11 +405,11 @@ namespace frm
// the size of the viewport - note that the viewport does *not* occupy all the place
// which is left when subtracting the scrollbar width/height
Size aViewportPlaygroundPixel( aPlaygroundSizePixel );
- aViewportPlaygroundPixel.setWidth( ::std::max( long( 10 ), long( aViewportPlaygroundPixel.Width() - nScrollBarWidth ) ) );
- aViewportPlaygroundPixel.setHeight( ::std::max( long( 10 ), long( aViewportPlaygroundPixel.Height() - nScrollBarHeight ) ) );
+ aViewportPlaygroundPixel.setWidth( ::std::max( tools::Long( 10 ), tools::Long( aViewportPlaygroundPixel.Width() - nScrollBarWidth ) ) );
+ aViewportPlaygroundPixel.setHeight( ::std::max( tools::Long( 10 ), tools::Long( aViewportPlaygroundPixel.Height() - nScrollBarHeight ) ) );
Size aViewportPlaygroundLogic( m_pViewport->PixelToLogic( aViewportPlaygroundPixel ) );
- const long nOffset = 2;
+ const tools::Long nOffset = 2;
Size aViewportSizePixel( aViewportPlaygroundPixel.Width() - 2 * nOffset, aViewportPlaygroundPixel.Height() - 2 * nOffset );
Size aViewportSizeLogic( m_pViewport->PixelToLogic( aViewportSizePixel ) );
@@ -436,7 +436,7 @@ namespace frm
m_pVScroll->SetVisibleSize( aViewportPlaygroundLogic.Height() );
// the default height of a text line...
- long nFontHeight = m_pEngine->GetStandardFont(0).GetFontSize().Height();
+ tools::Long nFontHeight = m_pEngine->GetStandardFont(0).GetFontSize().Height();
// ... is the scroll size for the vertical scrollbar
m_pVScroll->SetLineSize( nFontHeight );
// the viewport width, minus one line, is the page scroll size
@@ -448,7 +448,7 @@ namespace frm
{
m_pHScroll->SetVisibleSize( aViewportPlaygroundLogic.Width() );
- long nFontWidth = m_pEngine->GetStandardFont(0).GetFontSize().Width();
+ tools::Long nFontWidth = m_pEngine->GetStandardFont(0).GetFontSize().Width();
if ( !nFontWidth )
{
m_pViewport->Push( PushFlags::FONT );
@@ -471,7 +471,7 @@ namespace frm
{
if ( m_pVScroll )
{
- long nOverallTextHeight = m_pEngine->GetTextHeight();
+ tools::Long nOverallTextHeight = m_pEngine->GetTextHeight();
m_pVScroll->SetRange( Range( 0, nOverallTextHeight ) );
m_pVScroll->SetThumbPos( m_pView->GetVisArea().Top() );
}
@@ -479,7 +479,7 @@ namespace frm
if ( m_pHScroll )
{
Size aPaperSize( m_pEngine->GetPaperSize() );
- long nOverallTextWidth = ( aPaperSize.Width() == EMPTY_PAPER_SIZE ) ? m_pEngine->CalcTextWidth() : aPaperSize.Width();
+ tools::Long nOverallTextWidth = ( aPaperSize.Width() == EMPTY_PAPER_SIZE ) ? m_pEngine->CalcTextWidth() : aPaperSize.Width();
m_pHScroll->SetRange( Range( 0, nOverallTextWidth ) );
m_pHScroll->SetThumbPos( m_pView->GetVisArea().Left() );
}
@@ -539,7 +539,7 @@ namespace frm
namespace
{
- void lcl_inflate( tools::Rectangle& _rRect, long _nInflateX, long _nInflateY )
+ void lcl_inflate( tools::Rectangle& _rRect, tools::Long _nInflateX, tools::Long _nInflateY )
{
_rRect.AdjustLeft( -_nInflateX );
_rRect.AdjustRight(_nInflateX );
diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx
index fcac2220608d..86c44feff3f2 100644
--- a/forms/source/runtime/formoperations.hxx
+++ b/forms/source/runtime/formoperations.hxx
@@ -35,6 +35,7 @@
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <connectivity/dbtools.hxx>
+#include <tools/long.hxx>
namespace frm
{
@@ -70,7 +71,7 @@ namespace frm
bool m_bActiveControlModified;
bool m_bConstructed;
#ifdef DBG_UTIL
- mutable long
+ mutable tools::Long
m_nMethodNestingLevel;
#endif