summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-19 15:12:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-19 21:34:46 +0200
commit3aef606f2758172a27718a06fea0ff9080e4d80f (patch)
treead323c90301d80bbb3b68163d8b87e5402b687ed /vcl/source/app
parent5afba3e12c8d4eb1ebb8e087134eb87593bb017a (diff)
use tools::Long in vcl
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/help.cxx4
-rw-r--r--vcl/source/app/i18nhelp.cxx2
-rw-r--r--vcl/source/app/salvtables.cxx10
-rw-r--r--vcl/source/app/settings.cxx70
-rw-r--r--vcl/source/app/svapp.cxx16
-rw-r--r--vcl/source/app/svmain.cxx6
6 files changed, 54 insertions, 54 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index acbab4bb6b85..7f16b6a0a699 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -344,7 +344,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
OUStringBuffer aBuf;
comphelper::string::padToLength(aBuf, nCharsInLine, 'x');
OUString aXXX = aBuf.makeStringAndClear();
- long nWidth = GetTextWidth( aXXX );
+ tools::Long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
tools::Rectangle aTry1( Point(), aTmpSize );
DrawTextFlags nDrawFlags = DrawTextFlags::MultiLine | DrawTextFlags::WordBreak |
@@ -583,7 +583,7 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic
{
if ( !(nStyle & QuickHelpFlags::NoAutoPos) )
{
- long nScreenHeight = aScreenRect.GetHeight();
+ tools::Long nScreenHeight = aScreenRect.GetHeight();
aPos.AdjustX( -4 );
if ( aPos.Y() > aScreenRect.Top()+nScreenHeight-(nScreenHeight/4) )
aPos.AdjustY( -(aSz.Height()+4) );
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index ae7eed0e2fba..8bf77ac25116 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -152,7 +152,7 @@ bool vcl::I18nHelper::MatchMnemonic( const OUString& rString, sal_Unicode cMnemo
return bEqual;
}
-OUString vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep, bool bTrailingZeros ) const
+OUString vcl::I18nHelper::GetNum( tools::Long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep, bool bTrailingZeros ) const
{
return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros );
}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 190e265d0ada..093d79ce018b 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3098,8 +3098,8 @@ void SalInstanceEntry::set_max_length(int nChars)
void SalInstanceEntry::select_region(int nStartPos, int nEndPos)
{
disable_notify_events();
- long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
- long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
+ tools::Long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
+ tools::Long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
m_xEntry->SetSelection(Selection(nStart, nEnd));
enable_notify_events();
}
@@ -3609,7 +3609,7 @@ public:
m_xTreeView->SetPopupMenuHdl(LINK(this, SalInstanceTreeView, PopupMenuHdl));
m_xTreeView->SetCustomRenderHdl(LINK(this, SalInstanceTreeView, CustomRenderHdl));
m_xTreeView->SetCustomMeasureHdl(LINK(this, SalInstanceTreeView, CustomMeasureHdl));
- const long aTabPositions[] = { 0 };
+ const tools::Long aTabPositions[] = { 0 };
m_xTreeView->SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions);
LclHeaderTabListBox* pHeaderBox = dynamic_cast<LclHeaderTabListBox*>(m_xTreeView.get());
@@ -5609,8 +5609,8 @@ bool SalInstanceTextView::get_selection_bounds(int& rStartPos, int& rEndPos)
void SalInstanceTextView::select_region(int nStartPos, int nEndPos)
{
disable_notify_events();
- long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
- long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
+ tools::Long nStart = nStartPos < 0 ? SELECTION_MAX : nStartPos;
+ tools::Long nEnd = nEndPos < 0 ? SELECTION_MAX : nEndPos;
m_xTextView->SetSelection(Selection(nStart, nEnd));
enable_notify_events();
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index cb5efc485187..da23dcf9deb9 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -59,10 +59,10 @@ struct ImplMouseData
{
MouseSettingsOptions mnOptions = MouseSettingsOptions::NONE;
sal_uInt64 mnDoubleClkTime = 500;
- long mnDoubleClkWidth = 2;
- long mnDoubleClkHeight = 2;
- long mnStartDragWidth = 2 ;
- long mnStartDragHeight = 2;
+ tools::Long mnDoubleClkWidth = 2;
+ tools::Long mnDoubleClkHeight = 2;
+ tools::Long mnStartDragWidth = 2 ;
+ tools::Long mnStartDragHeight = 2;
sal_uLong mnButtonRepeat = 90;
sal_uLong mnMenuDelay = 150;
MouseFollowFlags mnFollow = MouseFollowFlags::Menu | MouseFollowFlags::DDList;
@@ -155,12 +155,12 @@ struct ImplStyleData
vcl::Font maIconFont;
vcl::Font maTabFont;
vcl::Font maGroupFont;
- long mnTitleHeight;
- long mnFloatTitleHeight;
- long mnScrollBarSize;
- long mnSpinSize;
- long mnCursorSize;
- long mnAntialiasedMin;
+ tools::Long mnTitleHeight;
+ tools::Long mnFloatTitleHeight;
+ tools::Long mnScrollBarSize;
+ tools::Long mnSpinSize;
+ tools::Long mnCursorSize;
+ tools::Long mnAntialiasedMin;
sal_uInt64 mnCursorBlinkTime;
DragFullOptions mnDragFullOptions;
SelectionOptions mnSelectionOptions;
@@ -179,7 +179,7 @@ struct ImplStyleData
TriState meUseImagesInMenus;
bool mnUseFlatBorders;
bool mbPreferredUseImagesInMenus;
- long mnMinThumbSize;
+ tools::Long mnMinThumbSize;
std::shared_ptr<vcl::IconThemeScanner>
mIconThemeScanner;
std::shared_ptr<vcl::IconThemeSelector>
@@ -271,52 +271,52 @@ MouseSettings::GetDoubleClickTime() const
}
void
-MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth )
+MouseSettings::SetDoubleClickWidth( tools::Long nDoubleClkWidth )
{
CopyData();
mxData->mnDoubleClkWidth = nDoubleClkWidth;
}
-long
+tools::Long
MouseSettings::GetDoubleClickWidth() const
{
return mxData->mnDoubleClkWidth;
}
void
-MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight )
+MouseSettings::SetDoubleClickHeight( tools::Long nDoubleClkHeight )
{
CopyData();
mxData->mnDoubleClkHeight = nDoubleClkHeight;
}
-long
+tools::Long
MouseSettings::GetDoubleClickHeight() const
{
return mxData->mnDoubleClkHeight;
}
void
-MouseSettings::SetStartDragWidth( long nDragWidth )
+MouseSettings::SetStartDragWidth( tools::Long nDragWidth )
{
CopyData();
mxData->mnStartDragWidth = nDragWidth;
}
-long
+tools::Long
MouseSettings::GetStartDragWidth() const
{
return mxData->mnStartDragWidth;
}
void
-MouseSettings::SetStartDragHeight( long nDragHeight )
+MouseSettings::SetStartDragHeight( tools::Long nDragHeight )
{
CopyData();
mxData->mnStartDragHeight = nDragHeight;
}
-long
+tools::Long
MouseSettings::GetStartDragHeight() const
{
return mxData->mnStartDragHeight;
@@ -1865,91 +1865,91 @@ StyleSettings::GetTabFont() const
return mxData->maTabFont;
}
-long
+tools::Long
StyleSettings::GetBorderSize()
{
return 1;
}
void
-StyleSettings::SetTitleHeight( long nSize )
+StyleSettings::SetTitleHeight( tools::Long nSize )
{
CopyData();
mxData->mnTitleHeight = nSize;
}
-long
+tools::Long
StyleSettings::GetTitleHeight() const
{
return mxData->mnTitleHeight;
}
void
-StyleSettings::SetFloatTitleHeight( long nSize )
+StyleSettings::SetFloatTitleHeight( tools::Long nSize )
{
CopyData();
mxData->mnFloatTitleHeight = nSize;
}
-long
+tools::Long
StyleSettings::GetFloatTitleHeight() const
{
return mxData->mnFloatTitleHeight;
}
void
-StyleSettings::SetScrollBarSize( long nSize )
+StyleSettings::SetScrollBarSize( tools::Long nSize )
{
CopyData();
mxData->mnScrollBarSize = nSize;
}
-long
+tools::Long
StyleSettings::GetScrollBarSize() const
{
return mxData->mnScrollBarSize;
}
void
-StyleSettings::SetMinThumbSize( long nSize )
+StyleSettings::SetMinThumbSize( tools::Long nSize )
{
CopyData();
mxData->mnMinThumbSize = nSize;
}
-long
+tools::Long
StyleSettings::GetMinThumbSize() const
{
return mxData->mnMinThumbSize;
}
void
-StyleSettings::SetSpinSize( long nSize )
+StyleSettings::SetSpinSize( tools::Long nSize )
{
CopyData();
mxData->mnSpinSize = nSize;
}
-long
+tools::Long
StyleSettings::GetSpinSize() const
{
return mxData->mnSpinSize;
}
-long
+tools::Long
StyleSettings::GetSplitSize()
{
return 3;
}
void
-StyleSettings::SetCursorSize( long nSize )
+StyleSettings::SetCursorSize( tools::Long nSize )
{
CopyData();
mxData->mnCursorSize = nSize;
}
-long
+tools::Long
StyleSettings::GetCursorSize() const
{
return mxData->mnCursorSize;
@@ -1965,7 +1965,7 @@ StyleSettings::SetCursorBlinkTime( sal_uInt64 nBlinkTime )
sal_uInt64
StyleSettings::GetCursorBlinkTime() const
{
- return static_cast<long>(mxData->mnCursorBlinkTime);
+ return static_cast<tools::Long>(mxData->mnCursorBlinkTime);
}
void
@@ -2008,7 +2008,7 @@ StyleSettings::GetDisplayOptions() const
}
void
-StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel )
+StyleSettings::SetAntialiasingMinPixelHeight( tools::Long nMinPixel )
{
CopyData();
mxData->mnAntialiasedMin = nMinPixel;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 1103bf179374..7f27cf4d5601 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -639,8 +639,8 @@ void Application::SetSettings( const AllSettings& rSettings )
// Update all windows
vcl::Window* pFirstFrame = pSVData->maFrameData.mpFirstFrame;
// Reset data that needs to be re-calculated
- long nOldDPIX = 0;
- long nOldDPIY = 0;
+ tools::Long nOldDPIX = 0;
+ tools::Long nOldDPIY = 0;
if ( pFirstFrame )
{
nOldDPIX = pFirstFrame->GetDPIX();
@@ -1064,9 +1064,9 @@ vcl::Window* Application::GetNextTopLevelWindow( vcl::Window const * pWindow )
return pWindow->mpWindowImpl->mpFrameData->mpNextFrame;
}
-long Application::GetTopWindowCount()
+tools::Long Application::GetTopWindowCount()
{
- long nRet = 0;
+ tools::Long nRet = 0;
ImplSVData* pSVData = ImplGetSVData();
vcl::Window *pWin = pSVData ? pSVData->maFrameData.mpFirstFrame.get() : nullptr;
while( pWin )
@@ -1078,9 +1078,9 @@ long Application::GetTopWindowCount()
return nRet;
}
-vcl::Window* Application::GetTopWindow( long nIndex )
+vcl::Window* Application::GetTopWindow( tools::Long nIndex )
{
- long nIdx = 0;
+ tools::Long nIdx = 0;
ImplSVData* pSVData = ImplGetSVData();
vcl::Window *pWin = pSVData ? pSVData->maFrameData.mpFirstFrame.get() : nullptr;
while( pWin )
@@ -1268,8 +1268,8 @@ unsigned long calcDistSquare( const Point& i_rPoint, const tools::Rectangle& i_r
{
const Point aRectCenter( (i_rRect.Left() + i_rRect.Right())/2,
(i_rRect.Top() + i_rRect.Bottom())/ 2 );
- const long nDX = aRectCenter.X() - i_rPoint.X();
- const long nDY = aRectCenter.Y() - i_rPoint.Y();
+ const tools::Long nDX = aRectCenter.X() - i_rPoint.X();
+ const tools::Long nDY = aRectCenter.Y() - i_rPoint.Y();
return nDX*nDX + nDY*nDY;
}
}
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index d16160ac307a..4c9fbbe06f48 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -437,9 +437,9 @@ void DeInitVCL()
#if OSL_DEBUG_LEVEL > 0
OStringBuffer aBuf( 256 );
aBuf.append( "DeInitVCL: some top Windows are still alive\n" );
- long nTopWindowCount = Application::GetTopWindowCount();
- long nBadTopWindows = nTopWindowCount;
- for( long i = 0; i < nTopWindowCount; i++ )
+ tools::Long nTopWindowCount = Application::GetTopWindowCount();
+ tools::Long nBadTopWindows = nTopWindowCount;
+ for( tools::Long i = 0; i < nTopWindowCount; i++ )
{
vcl::Window* pWin = Application::GetTopWindow( i );
// default window will be destroyed further down