diff options
author | Leonid Ryzhov <leoryzhov@gmail.com> | 2022-12-03 11:00:42 +0300 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-12-20 09:33:20 +0000 |
commit | 3cc818c38e11c0882bc3ad32ffd0019a9ad38643 (patch) | |
tree | d2f59fdfd099552a83393bfeceea6b29826a072b | |
parent | 50a08d1eb47f8faeb511cec43d1f8ba12b8f27f7 (diff) |
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>
-rw-r--r-- | sw/source/filter/html/parcss1.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/scroll.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 8 |
3 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index 50278e160483..db126e28d2bd 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -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 diff --git a/sw/source/uibase/uiview/scroll.cxx b/sw/source/uibase/uiview/scroll.cxx index c61b17b9e89a..28fbab182bd5 100644 --- a/sw/source/uibase/uiview/scroll.cxx +++ b/sw/source/uibase/uiview/scroll.cxx @@ -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. diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index d6577271cc3b..f688387046ad 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -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; } |