Revert "tdf#114441 Convert use of sal_uLong to better integer types"

This partially reverts 3cc818c38e. In this
patch sal_uLong was converted to better data types. In part of the patch
the order of the calls, GetVisibleSize() ~> SetLineSize ~> SetPageSize()
was changed so that the GetVisibleSize() is invoked inside the parameter
passing to SetPageSize() to avoid creating a temporary variable.

As sberg mentioned, it was needed that the call to SetLineSize() did
not have side effects that changes the result of the GetVisibleSize().
But it was hard to prove so, even if it seemed logically sound. Thus,
I am reverting the above commit partially.

In the revert, I've used tools::Long for nVisSize instead of sal_uLong.

Change-Id: Iba8d2da2675c237e9ab1c30918defce13ea71d7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144617
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Hossein
2022-12-28 16:17:54 +00:00
committed by Stephan Bergmann
parent 028aa10583
commit 196930bae2
+2 -1
View File
@@ -40,8 +40,9 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
{
m_aDocSz = rSize;
SetRange( Range( 0, m_bHori ? rSize.Width() : rSize.Height()) );
const tools::Long nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
SetPageSize( GetVisibleSize() * 77 / 100 );
SetPageSize( nVisSize * 77 / 100 );
}
// Will be called after a change of the visible view section.