Bug Hunting Session
Bug 114441 - Convert use of sal_uLong to better integer types
Summary: Convert use of sal_uLong to better integer types
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:6.2.0 target:6.3....
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2017-12-13 13:38 UTC by Michael Stahl (CIB)
Modified: 2019-10-09 14:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (CIB) 2017-12-13 13:38:12 UTC
During the removal of the tools types, the ULONG type was
converted to the sal_uLong type.

This is just a stop-gap, and every use of sal_uLong should
be reviewed and replaced by an appropriate unsigned integer type,
depending on the situation sal_uInt32, sal_uInt64, size_t or
"unsigned int" are likely candidates.

for an example see this commit, where positions of a SvStream
are converted, so sal_uInt64 is the correct type because
files can be larger than 4GB.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=05d3a1899eb50202fd3929b702bae1003b5610be
Comment 1 Shobitha M 2017-12-20 10:40:47 UTC
Hello, I am a newbie and wish to work on this bug,
Comment 2 Shobitha M 2017-12-20 10:51:12 UTC
Hey Michael, can you tell me in  which file "sal_uLong" is used and has to be reviewed and replaced with appropriate integer types?
Comment 3 Michael Meeks 2017-12-21 14:10:58 UTC
Hi Shobitha:

 $ git grep sal_uLong

is a great tool here. In which files ? I guess any files - but I would start with a small commit to somewhere where there are no virtual methods or overrides to confused the picture.

HTH.
Comment 4 Michael Stahl (CIB) 2018-01-03 14:22:29 UTC
> git grep sal_uLong | wc -l
4988

it doesn't make sense to have this bug assigned to only one developer, lots of people can work in parallel without stepping on each other's toes.
Comment 5 Shubham Verma 2018-02-22 18:16:01 UTC
May you please tell how to review which data type is needed . It is very difficult to find the function calls etc to get an idea.
Comment 6 Xisco Faulí 2018-02-26 11:40:43 UTC
@Sourabh, as Michael said in comment 4, no need to assign it to yourself...
Comment 7 Commit Notification 2018-02-27 16:52:16 UTC
Shubham Verma committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0b49701fa5c22abba6b9b4a60ddd2720973dd858

tdf#114441 sal_uLong to better integer types

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2018-08-30 08:29:01 UTC
Bijan Tabatabai committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5857555e129a5913352cd7e8c7e825dd6892d808

tdf#114441 Convert  sal_uLong to other types in ./sc/source/ui/app

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-09-18 10:04:48 UTC
Caio B. Silva committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a93c71a97975c0b3f8fceae86fa2bd598a9eae59

tdf#114441 Replacing sal_uLong with most appropriate integer types

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Komal 2018-12-29 16:23:05 UTC
 Hi Michael, I am Komal. I am novice to open source. But really interested to learn and contribute for this organization. I went through this issue description and I made changes to one of the file ./sw/inc/pvprtdat.hxx. 
But I was confused about how to commit the changes. I have committed it on libreoffice/core repository on github. Is that valid? I'm sorry if I have done anything wrong.
Thank you!
Comment 11 himajin100000 2018-12-29 19:11:22 UTC
(In reply to Komal from comment #10)

https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch
Comment 12 Komal 2018-12-31 13:35:16 UTC
(In reply to himajin100000 from comment #11)
> (In reply to Komal from comment #10)
> 
> https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch

Thank You! I will check that out
Is the github repository obsolete now?
Comment 13 Tomaz Vajngerl 2018-12-31 16:20:01 UTC
on github libreoffice/core repository it clearly says "Read-only LibreOffice core repo - no pull request".

We never used github for LibreOffice development, it's just a mirror.
Comment 14 Komal 2018-12-31 17:26:39 UTC
(In reply to Tomaz Vajngerl from comment #13)
> on github libreoffice/core repository it clearly says "Read-only LibreOffice
> core repo - no pull request".
> 
> We never used github for LibreOffice development, it's just a mirror.

I am so sorry for creating this nuissance! Its very silly of me! Thanks!
Comment 15 Commit Notification 2019-01-11 17:01:24 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0515ffdb2e4c975f1d19257dfed2a24ff3cbfdb4%5E%21

tdf#114441 Convert use of sal_uLong to sal_uInt32

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2019-02-12 09:43:51 UTC
Komal committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/de1a23288ff6e4d7228fd8d7920b37b570df8f9a%5E%21

tdf#114441,Change in the data type to sal_Int32

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2019-02-12 13:36:12 UTC
Salih Sariyar committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/006734562be1fec6b8fa4ff291c51b6043265653%5E%21

tdf#114441: Convert use of sal_uLong to better integer types

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2019-04-15 12:13:12 UTC
Muzaffer Kadir YILMAZ committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b9e75051807b807a6c9b96433390e09abaf38c24%5E%21

tdf#114441 - Convert variables use Tell() function sal_uLong to sal_uInt64

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2019-10-09 14:26:24 UTC
Christian Barth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/261fa8cdf4626c9785e0ca4776e44eab4b9222e0

tdf#114441 changed some sal_uLong to better fitting types

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.