tdf#114441 Convert use of sal_uLong to better integer types

sw/source/filter/html/parcss1.cxx: all variables are temporary storage for values of type sal_uInt32;
sw/source/uibase/uiview/scroll.cxx: nVisSize removed, GetVisibleSize() used as parameter in the setPageSize();
sw/source/uibase/utlui/glbltree.cxx:int is used for nSelCount; int is used for nSource, nDest and nEntryCount;

Change-Id: Ifdf4de276306bc3b89f6e1198fe03ec94aefd18e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143746
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
This commit is contained in:
Leonid Ryzhov
2022-12-20 09:33:20 +00:00
committed by Hossein
parent 50a08d1eb4
commit 3cc818c38e
3 changed files with 9 additions and 10 deletions
+4 -4
View File
@@ -374,8 +374,8 @@ CSS1Token CSS1Parser::GetNextToken()
// save current position
sal_Int32 nInPosOld = m_nInPos;
sal_Unicode cNextChOld = m_cNextCh;
sal_uLong nlLineNrOld = m_nlLineNr;
sal_uLong nlLinePosOld = m_nlLinePos;
sal_uInt32 nlLineNrOld = m_nlLineNr;
sal_uInt32 nlLinePosOld = m_nlLinePos;
bool bEOFOld = m_bEOF;
// parse the next identifier
@@ -525,8 +525,8 @@ CSS1Token CSS1Parser::GetNextToken()
// save current position
sal_Int32 nInPosSave = m_nInPos;
sal_Unicode cNextChSave = m_cNextCh;
sal_uLong nlLineNrSave = m_nlLineNr;
sal_uLong nlLinePosSave = m_nlLinePos;
sal_uInt32 nlLineNrSave = m_nlLineNr;
sal_uInt32 nlLinePosSave = m_nlLinePos;
bool bEOFSave = m_bEOF;
// first try to parse a hex digit
+1 -2
View File
@@ -40,9 +40,8 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
{
m_aDocSz = rSize;
SetRange( Range( 0, m_bHori ? rSize.Width() : rSize.Height()) );
const sal_uLong nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
SetPageSize( nVisSize * 77 / 100 );
SetPageSize( GetVisibleSize() * 77 / 100 );
}
// Will be called after a change of the visible view section.
+4 -4
View File
@@ -317,7 +317,7 @@ MenuEnableFlags SwGlobalTree::GetEnableFlags() const
std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
bool bEntry = m_xTreeView->get_selected(xEntry.get());
sal_uLong nSelCount = m_xTreeView->count_selected_rows();
int nSelCount = m_xTreeView->count_selected_rows();
size_t nEntryCount = m_xTreeView->n_children();
std::unique_ptr<weld::TreeIter> xPrevEntry;
bool bPrevEntry = false;
@@ -852,11 +852,11 @@ void SwGlobalTree::ExecCommand(std::string_view rCmd)
if (m_xTreeView->count_selected_rows() == 1)
{
bool bMove = false;
sal_uLong nSource = nEntry;
sal_uLong nDest = nSource;
int nSource = nEntry;
int nDest = nSource;
if (rCmd == "movedown")
{
size_t nEntryCount = m_xTreeView->n_children();
int nEntryCount = m_xTreeView->n_children();
bMove = nEntryCount > nSource + 1;
nDest+= 2;
}