From 180dd91c189de0bf03d5062e33c20da94c5d35d9 Mon Sep 17 00:00:00 2001 From: Noel Date: Wed, 21 Oct 2020 15:26:38 +0200 Subject: long->tools::Long in emfio..filter Change-Id: I961cee10d45d628ff70dea0694a7a63a4fe867ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104624 Tested-by: Jenkins Reviewed-by: Noel Grandin --- extensions/source/bibliography/bibbeam.cxx | 2 +- extensions/source/bibliography/bibconfig.hxx | 13 +++++++------ extensions/source/bibliography/bibcont.cxx | 8 ++++---- extensions/source/bibliography/general.cxx | 4 ++-- extensions/source/scanner/grid.cxx | 8 ++++---- extensions/source/scanner/sanedlg.cxx | 14 +++++++------- 6 files changed, 25 insertions(+), 24 deletions(-) (limited to 'extensions') diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index e31c21ee9d7f..a38c723852bc 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -258,7 +258,7 @@ namespace bib IMPL_LINK_NOARG( BibBeamer, RecalcLayout_Impl, void*, void ) { - long nHeight = pToolBar->get_preferred_size().Height(); + tools::Long nHeight = pToolBar->get_preferred_size().Height(); SetItemSize( ID_TOOLBAR, nHeight ); } diff --git a/extensions/source/bibliography/bibconfig.hxx b/extensions/source/bibliography/bibconfig.hxx index 0240b69c036a..37559999abf0 100644 --- a/extensions/source/bibliography/bibconfig.hxx +++ b/extensions/source/bibliography/bibconfig.hxx @@ -21,6 +21,7 @@ #define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBCONFIG_HXX #include +#include #include #include @@ -95,8 +96,8 @@ class BibConfig : public utl::ConfigItem OUString sQueryField; OUString sQueryText; MappingArray mvMappings; - long nBeamerSize; - long nViewSize; + tools::Long nBeamerSize; + tools::Long nViewSize; bool bShowColumnAssignmentWarning; OUString aColumnDefaults[COLUMN_COUNT]; @@ -121,10 +122,10 @@ public: {return aColumnDefaults[nIndex];} - void setBeamerSize(long nSize) {SetModified(); nBeamerSize = nSize;} - long getBeamerSize()const {return nBeamerSize;} - void setViewSize(long nSize) {SetModified(); nViewSize = nSize;} - long getViewSize() const {return nViewSize;} + void setBeamerSize(tools::Long nSize) {SetModified(); nBeamerSize = nSize;} + tools::Long getBeamerSize()const {return nBeamerSize;} + void setViewSize(tools::Long nSize) {SetModified(); nViewSize = nSize;} + tools::Long getViewSize() const {return nViewSize;} const OUString& getQueryField() const {return sQueryField;} void setQueryField(const OUString& rSet) {SetModified(); sQueryField = rSet;} diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 562d720a35e8..7c24b0fb3fd2 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -146,7 +146,7 @@ void BibBookContainer::Split() } IMPL_LINK_NOARG( BibBookContainer, SplitHdl, Timer*, void) { - long nSize= GetItemSize( TOP_WINDOW); + tools::Long nSize= GetItemSize( TOP_WINDOW); BibConfig* pConfig = BibModul::GetConfig(); pConfig->setBeamerSize(nSize); nSize = GetItemSize( BOTTOM_WINDOW); @@ -163,7 +163,7 @@ void BibBookContainer::createTopFrame( BibShortCutHandler* pWin ) pTopWin=VclPtr::Create(this,pWin); pTopWin->Show(); BibConfig* pConfig = BibModul::GetConfig(); - long nSize = pConfig->getBeamerSize(); + tools::Long nSize = pConfig->getBeamerSize(); InsertItem(TOP_WINDOW, pTopWin, nSize, 1, 0, SplitWindowItemFlags::PercentSize ); } @@ -179,7 +179,7 @@ void BibBookContainer::createBottomFrame( BibShortCutHandler* pWin ) pBottomWin=VclPtr::Create(this,pWin); BibConfig* pConfig = BibModul::GetConfig(); - long nSize = pConfig->getViewSize(); + tools::Long nSize = pConfig->getViewSize(); InsertItem(BOTTOM_WINDOW, pBottomWin, nSize, 1, 0, SplitWindowItemFlags::PercentSize ); } @@ -208,7 +208,7 @@ bool BibBookContainer::PreNotify( NotifyEvent& rNEvt ) { sal_uInt16 nFirstWinId = KEY_UP == nKey ? TOP_WINDOW : BOTTOM_WINDOW; sal_uInt16 nSecondWinId = KEY_UP == nKey ? BOTTOM_WINDOW : TOP_WINDOW; - long nHeight = GetItemSize( nFirstWinId ); + tools::Long nHeight = GetItemSize( nFirstWinId ); nHeight -= WIN_STEP_SIZE; if(nHeight < WIN_MIN_HEIGHT) nHeight = WIN_MIN_HEIGHT; diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index ea4f8d059e39..deaaafa4d9dc 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -596,13 +596,13 @@ void BibGeneralPage::focusGained(const awt::FocusEvent& rEvent) ::Size aOutSize = pScrolledWindow->getVisibleChildSize(); awt::Rectangle aRect = xCtrWin->getPosSize(); Point aOffset(pGrid->GetPosPixel()); - long nX = aRect.X + aOffset.X(); + tools::Long nX = aRect.X + aOffset.X(); if (nX < 0 || nX > aOutSize.Width()) { pScrolledWindow->getHorzScrollBar().DoScroll(aRect.X); } - long nY = aRect.Y + aOffset.Y(); + tools::Long nY = aRect.Y + aOffset.Y(); if (nY < 0 || nY > aOutSize.Height()) { pScrolledWindow->getVertScrollBar().DoScroll(aRect.Y); diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 4560d8f2baf7..38046f67b7d2 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -301,10 +301,10 @@ Point GridWindow::transform( double x, double y ) { Point aRet; - aRet.setX( static_cast( ( x - m_fMinX ) * + aRet.setX( static_cast( ( x - m_fMinX ) * static_cast(m_aGridArea.GetWidth()) / ( m_fMaxX - m_fMinX ) + m_aGridArea.Left() ) ); - aRet.setY( static_cast( + aRet.setY( static_cast( m_aGridArea.Bottom() - ( y - m_fMinY ) * static_cast(m_aGridArea.GetHeight()) / ( m_fMaxY - m_fMinY ) ) ); @@ -313,8 +313,8 @@ Point GridWindow::transform( double x, double y ) void GridWindow::transform( const Point& rOriginal, double& x, double& y ) { - const long nWidth = m_aGridArea.GetWidth(); - const long nHeight = m_aGridArea.GetHeight(); + const tools::Long nWidth = m_aGridArea.GetWidth(); + const tools::Long nHeight = m_aGridArea.GetHeight(); if (!nWidth || !nHeight) return; x = ( rOriginal.X() - m_aGridArea.Left() ) * (m_fMaxX - m_fMinX) / static_cast(nWidth) + m_fMinX; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 96c2144c5bdd..197da88d94fd 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -143,25 +143,25 @@ public: rBottomRight = maMaxBottomRight; } - void ChangePreviewLogicTopLeftY(long Y) + void ChangePreviewLogicTopLeftY(tools::Long Y) { Point aPoint(0, Y); aPoint = GetPixelPos(aPoint); maTopLeft.setY( aPoint.Y() ); } - void ChangePreviewLogicTopLeftX(long X) + void ChangePreviewLogicTopLeftX(tools::Long X) { Point aPoint(X, 0); aPoint = GetPixelPos(aPoint); maTopLeft.setX( aPoint.X() ); } - void ChangePreviewLogicBottomRightY(long Y) + void ChangePreviewLogicBottomRightY(tools::Long Y) { Point aPoint(0, Y); aPoint = GetPixelPos(aPoint); maBottomRight.setY( aPoint.Y() ); } - void ChangePreviewLogicBottomRightX(long X) + void ChangePreviewLogicBottomRightX(tools::Long X) { Point aPoint(X, 0); aPoint = GetPixelPos(aPoint); @@ -440,11 +440,11 @@ void SaneDlg::InitFields() { if( pDouble ) { - pField->set_min( static_cast(pDouble[0]), FieldUnit::NONE ); + pField->set_min( static_cast(pDouble[0]), FieldUnit::NONE ); if( nValue ) - pField->set_max( static_cast(pDouble[ nValue-1 ]), FieldUnit::NONE ); + pField->set_max( static_cast(pDouble[ nValue-1 ]), FieldUnit::NONE ); else - pField->set_max( static_cast(pDouble[ 1 ]), FieldUnit::NONE ); + pField->set_max( static_cast(pDouble[ 1 ]), FieldUnit::NONE ); } switch( i ) { case 0: aMinTopLeft.setX( pField->get_min(FieldUnit::NONE) );break; -- cgit