Bug 75280 - Convert inappropriate use of sal_uIntPtr to better integer types
Summary: Convert inappropriate use of sal_uIntPtr to better integer types
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.3.0 target:5.4....
Keywords: difficultyMedium, easyHack, skillCpp, topicCleanup
: 91527 (view as bug list)
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2014-02-20 20:53 UTC by Michael Stahl (allotropia)
Modified: 2024-10-20 20:34 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
changes in unqidx.hxx (2.72 KB, text/x-csrc)
2015-03-08 12:09 UTC, mridul
Details
sal_uintptr change for debug.hxx (3.82 KB, text/x-csrc)
2015-03-08 14:22 UTC, mridul
Details
zcodec.hxx fix (2.99 KB, text/x-csrc)
2015-03-08 14:33 UTC, mridul
Details
inetstrm.hxx (5.69 KB, text/plain)
2015-03-08 14:34 UTC, mridul
Details
inetmsg.hxx (15.26 KB, text/plain)
2015-03-08 14:38 UTC, mridul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2014-02-20 20:53:32 UTC
During the removal of the tools types, the ULONG type was initially
converted to sal_uIntPtr, before those doing that work switched to
using the stop-gap sal_uLong type instead.

sal_uIntPtr has a very special purpose, variables of this type
hold pointers that are converted to integers.

any use of the sal_uIntPtr type that is actually "just" an integer
should be replaced by an appropriate unsigned integer type,
depending on the situation sal_uInt32, sal_uInt64, size_t or
"unsigned int" are likely candidates.

as an example, take the UniqueIndexImpl class.
it stores sal_uInt32 internally but its public interfaces are
defined on sal_uIntPtr; it is obvious that sal_uIntPtr should
be replaced by sal_uInt32 here in UniqueIndexImpl and its clients.
Comment 1 Alexandre Vicenzi 2014-02-21 11:09:19 UTC
As I'm working in 63154, I will take a look in this bug.
Comment 2 Commit Notification 2014-03-28 19:14:01 UTC
Valentin Kettner committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75280 Started cleaning up of sal_uIntPtr usage.



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 3 Michael Stahl (allotropia) 2014-12-02 13:03:37 UTC
looks like Alexandre isn't actually working on this; un-assigning...

actually the clean-up here should parallelize easily so multiple people can work on it anyway.
Comment 4 ababaaa 2015-02-13 17:28:45 UTC
I would like to work on this bug.Does this bug simply means to convert ALL the sal_uIntPtr to approtiate types like  sal_uInt32, sal_uInt64.
Comment 5 Stephan Bergmann 2015-02-16 08:43:58 UTC
(In reply to Lovekesh Garg from comment #4)
> I would like to work on this bug.Does this bug simply means to convert ALL
> the sal_uIntPtr to approtiate types like  sal_uInt32, sal_uInt64.

no; sal_uIntPtr should be used exactly in those places where its semantics are asked for---an (unsigned) integer large enough to hold a pointer
Comment 6 mridul 2015-03-08 12:09:46 UTC
Created attachment 113969 [details]
changes in unqidx.hxx
Comment 7 mridul 2015-03-08 12:11:26 UTC
please someone have a look at the attachment and let me know if its correct or not..thank you
Comment 8 mridul 2015-03-08 14:22:44 UTC
Created attachment 113970 [details]
sal_uintptr change for debug.hxx
Comment 9 mridul 2015-03-08 14:33:00 UTC
Created attachment 113971 [details]
zcodec.hxx fix
Comment 10 mridul 2015-03-08 14:34:24 UTC
Created attachment 113972 [details]
inetstrm.hxx
Comment 11 mridul 2015-03-08 14:38:30 UTC
Created attachment 113973 [details]
inetmsg.hxx
Comment 12 David Tardon 2015-03-08 15:43:12 UTC
dtardon->mridul: Please do not add complete source files as attachments. If you want to submit a patch, use gerrit.
Comment 13 Julien Nabet 2015-03-08 15:48:34 UTC
mridul: just for your information: https://wiki.documentfoundation.org/Development/gerrit
Comment 14 Huzaifa Iftikhar 2015-03-22 05:48:10 UTC
Hi,
I would like to work on this bug. Mark as assigned.
Comment 15 Thorsten Behrens (allotropia) 2015-05-23 13:44:29 UTC
*** Bug 91527 has been marked as a duplicate of this bug. ***
Comment 16 Thorsten Behrens (allotropia) 2015-05-23 13:52:21 UTC
To extract the relevant info from the duplicate bug into this one here - I think size_t would be a reasonably default type, given the fact the original type was ULONG.
Comment 17 Robinson Tryon (qubit) 2015-12-10 11:41:07 UTC Comment hidden (obsolete)
Comment 18 Robinson Tryon (qubit) 2016-02-18 14:52:20 UTC Comment hidden (obsolete)
Comment 19 Commit Notification 2016-03-08 22:26:50 UTC
Jaskaran committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Replace sal_uIntPtr to better types in /connectivity

It will be available in 5.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 20 jani 2016-05-16 05:47:30 UTC
Changing status to reflect this bug is being worked on.
Comment 21 jani 2016-06-16 06:03:20 UTC Comment hidden (obsolete)
Comment 22 Commit Notification 2016-06-27 10:20:10 UTC
tymyjan committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Cleaning up of sal_uIntPtr usage #1a

It will be available in 5.3.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 23 Commit Notification 2016-07-09 07:53:51 UTC
tymyjan committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Cleaning up of sal_uIntPtr usage #2

It will be available in 5.3.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 24 Commit Notification 2016-07-11 07:31:49 UTC
tymyjan committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Cleaning up of sal_uIntPtr usage #3

It will be available in 5.3.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 25 Commit Notification 2016-07-26 15:38:50 UTC
tymyjan committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Cleaning up of sal_uIntPtr usage #4a

It will be available in 5.3.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 26 Sudarshan K 2016-10-15 09:17:39 UTC
A general question,
1. How do I decide which one to replace sal_uIntPtr with ? That is, how do I decide to use 16/32/64 bit invariant of sal_uInt ? Any tests I should run etc ?
2. Also according to https://bugs.documentfoundation.org/show_bug.cgi?id=75280#c5, Comment 5, How do I decide where sal_uIntPtr and where sal_uInt variants are used ?

Cliffnotes: How to decide when to use sal_uInt and if it is to be used, which variant (16/32/64 etc) to be used ?

Thanks.
Comment 27 jani 2016-10-15 11:20:32 UTC
(In reply to Sudarshan K from comment #26)
> A general question,
> 1. How do I decide which one to replace sal_uIntPtr with ? That is, how do I
> decide to use 16/32/64 bit invariant of sal_uInt ? Any tests I should run
> etc ?
> 2. Also according to
> https://bugs.documentfoundation.org/show_bug.cgi?id=75280#c5, Comment 5, How
> do I decide where sal_uIntPtr and where sal_uInt variants are used ?
that is the challenge in this easyhack, read the first comment it explains it quite good.

also take a look at some of the commits already done.
> 
> Cliffnotes: How to decide when to use sal_uInt and if it is to be used,
> which variant (16/32/64 etc) to be used ?
look at the usage of the variable, some places are easy others are quite complicated.


> 

> Thanks.
Comment 28 Commit Notification 2016-10-24 15:50:08 UTC
Hieronymous committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Clean up usage of sal_uIntPtr.

It will be available in 5.3.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 29 Commit Notification 2016-12-07 15:57:20 UTC
Gaurav Dhingra committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 Convert few inappropriate use of sal_uIntPtr to better integer types

It will be available in 5.4.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 30 Commit Notification 2017-04-25 08:59:34 UTC
Chris Sherlock committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280: convert sal_uIntPtr to sal_uInt32 for ErrorInfo member

It will be available in 5.4.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 31 Commit Notification 2017-05-12 17:36:23 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 replace uses of sal_uLong

It will be available in 5.4.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 32 Commit Notification 2019-04-12 08:43:06 UTC
Regis committed a patch related to this issue.
It has been pushed to "master":

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

tdf#75280 -Convert inappropriate use of sal_uIntPtr to better integ 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 33 Commit Notification 2019-12-31 14:31:12 UTC
Kemal Ayhan committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9f7a4f14a310628d0649c31d22c8ba8493443511

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 34 Commit Notification 2020-01-01 06:41:30 UTC
Yusuf Keten committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b5b68303b17e88163ec6fc946c7908492b554498

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 35 Commit Notification 2020-01-07 16:51:21 UTC
Mesut Çifci committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/16f6a6e61fdcbb41b77a613d49959c0b9e3a8a32

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 36 Commit Notification 2020-01-07 17:25:42 UTC
Onur Yilmaz committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1a5832e8340a2502f24d7fea98c656e629887d2e

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 37 Commit Notification 2020-01-08 15:25:18 UTC
Yusuf Keten committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d66ddcffe61d90cb1472e74a040963086032bf9c

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 38 Commit Notification 2020-01-13 13:05:41 UTC
Yusuf Keten committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c7de89df5efc4b2af1f81c00befcc957a7e22ca6

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 39 Commit Notification 2020-01-14 14:14:50 UTC
Mesut Çifci committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/18b03440b4dca084274a02d16a8a1545d629a4c1

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 40 Commit Notification 2020-01-16 15:38:34 UTC
Onur Yilmaz committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5434688e5c38d438444dd8d088dff9d3de58214a

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 41 Commit Notification 2020-01-27 09:50:39 UTC
iakarsu committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d089b2adc1fc67a7621c3078b6b37c5e997789c

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 42 Commit Notification 2020-01-27 10:32:14 UTC
Pelin Kuran committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dd98cb655f243024260dd45c44b751e564c1c67e

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 43 Commit Notification 2020-01-27 12:49:02 UTC
Sarper Akdemir committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/09a2432c5939f20be49d9f7e2ee5c65d00c9433f

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 44 Commit Notification 2020-01-27 13:29:54 UTC
Batuhan Taskaya committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4efdf5e5145c96116d7ef76a0bbade57865447f7

tdf#75280: Use sal_uLong instead of sal_uIntPtr

It will be available in 6.5.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 45 Commit Notification 2020-01-27 13:32:46 UTC
Canberk TURAN committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0f78ec160d93c9765f3a27be54a4d986872e9a69

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 46 Commit Notification 2020-01-27 13:39:00 UTC
Efdal İncesu committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a27a8f0c03436916e20e3362e8b5ed2410da3b23

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 47 Commit Notification 2020-01-27 20:39:39 UTC
Mehmet Emin Başoğlu committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d23faf1d1ae526cc7af5470e60eb7dc7a46e74cc

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 48 Commit Notification 2020-01-28 07:39:22 UTC
Eda Nur Var committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2a37089bad8656271f0fde92ab7731f29a19c8df

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 49 Commit Notification 2020-01-28 13:47:23 UTC
Burak Bala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ca76204c89db32839259a67c52a140a5b7f1fceb

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 6.5.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 50 Commit Notification 2020-02-03 08:56:35 UTC
Eda Nur Var committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b16faa4dcd87b9c7203b230a9feaebbb05c5a9cb

tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 7.0.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 51 Commit Notification 2020-02-03 14:13:09 UTC
Sarper Akdemir committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/81f73ca9b9a61fcbba1533ac8b5d5be16025667b

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 7.0.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 52 Commit Notification 2020-02-21 09:28:41 UTC
Canberk TURAN committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9e0470da4a88a588a294856236d6adf1eefe22f6

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 7.0.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 53 Commit Notification 2020-04-09 09:22:29 UTC
shivammore committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f4dfbba277bcfc418cb49fdc94b153c15e1ac30b

tdf#75280 Clean up usage of sal_uIntPtr.

It will be available in 7.0.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 54 Commit Notification 2020-09-09 07:49:18 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63d4d3421fec5a4e9e88dcee2992cda38cc7452a

tdf#75280: Convert inappropriate use of sal_uIntPtr (sfx2)

It will be available in 7.1.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 55 Commit Notification 2020-09-10 11:37:37 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8cd8cdcfa54ca34dc6365a398e3c69cbfc685891

tdf#75280: Convert some inappropriate use of sal_uIntPtr (+sal_uLong) (vcl)

It will be available in 7.1.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 56 Commit Notification 2020-09-10 18:51:30 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7c38fa04c70401d84352e8ae7ca650dfcc74b3e0

tdf#75280: "nFormat" should be "sal_uLong" instead of sal_uIntPtr (svx/imapdlg)

It will be available in 7.1.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 57 Commit Notification 2021-02-01 11:44:48 UTC
Bayram Çiçek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c7d0f4452cd4eba2d180eb5bb9f8b0add048e5de

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 7.2.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 58 adityapratapsingh51 2021-02-05 17:45:37 UTC
Made a commit. Please review.
https://gerrit.libreoffice.org/c/core/+/110491
Comment 59 Commit Notification 2021-03-08 10:10:31 UTC
Aditya Pratap Singh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c056b630ef97aab139625d0a7c085825c8a9eb7f

tdf#75280 Convert some sal_uIntPtr in ucb to more appropriate types

It will be available in 7.2.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 60 Commit Notification 2022-10-21 06:40:21 UTC
OmkarAcharekar committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/77131a5277f52300319f7cc5f8c2cc8b4d600a7c

tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types

It will be available in 7.5.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 61 Devansh Varshney 2024-02-14 17:59:54 UTC
I tried to look into this and there are 151 files with sal_uIntPtr remain. As far my understanding goes after looking those I think there are no more of these changes required. So, maybe we can close this.
Comment 62 Michael Stahl (allotropia) 2024-02-15 11:03:35 UTC
have just reviewed the remaining usages, the situation is much improved...

these are inappropriate, although not in the way mentioned in the description:
here some value is extracted out of an uno::Any, and there are easier to use
functions such as uno::Any::get<sal_Int32>() to do this.

editeng/source/accessibility/AccessibleEditableTextPara.cxx:                Color crChar(ColorTransparency, static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved)));
editeng/source/accessibility/AccessibleEditableTextPara.cxx:                Color crCharUnderLine(ColorTransparency, static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved)));
sw/source/core/access/accpara.cxx:            sal_uInt32 crBack = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
sw/source/core/access/accpara.cxx:            sal_uInt32 crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
sw/source/core/access/accpara.cxx:            sal_uInt32 crUnderline = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));

these are probably inappropriate sal_uIntPtr that should be other integer types:

include/svx/svdoedge.hxx:        sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const;
svx/source/gallery2/codec.cxx:        sal_uIntPtr   nIndex = 0, nCountByte, nRunByte;
svx/source/svdraw/svdhdl.cxx:    sal_uIntPtr nNewHdlNum(nNewHdl);
svx/source/svdraw/svdoedge.cxx:    sal_uIntPtr nBestQual=0xFFFFFFFF;
svx/source/svdraw/svdoedge.cxx:                        sal_uIntPtr nQual=0;
svx/source/svdraw/svdoedge.cxx:    sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const
svx/source/svdraw/svdoedge.cxx:        sal_uIntPtr nQual=0;
svx/source/svdraw/svdoedge.cxx:        sal_uIntPtr nQual0=nQual; // prevent overruns
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr n1=std::abs(aXP1[1].X()-aXP1[0].X())+std::abs(aXP1[1].Y()-aXP1[0].Y());
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr n2=std::abs(aXP1[2].X()-aXP1[1].X())+std::abs(aXP1[2].Y()-aXP1[1].Y());
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr n3=std::abs(aXP1[3].X()-aXP1[2].X())+std::abs(aXP1[3].Y()-aXP1[2].Y());
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr nBesser=0;
svx/source/svdraw/svdoedge.cxx:            nQual+=static_cast<sal_uIntPtr>(nTmp)*0x01000000;
svx/source/svdraw/svdoedge.cxx:        nQual+=static_cast<sal_uIntPtr>(nIntersections)*0x10000000;
svx/source/svdraw/svdoedge.cxx:                sal_uIntPtr nBestDist=0xFFFFFFFF;
svx/source/svdraw/svdoedge.cxx:                        sal_uIntPtr nDist=static_cast<sal_uIntPtr>(std::abs(aConPos.X()-rPt.X()))+static_cast<sal_uIntPtr>(std::abs(aConPos.Y()-rPt.Y()));

there is also the sal_IntPtr type (signed) with similar problem.
these are probably inappropriate sal_IntPtr that should be other integer types:

include/vcl/toolkit/treelistbox.hxx:    sal_IntPtr      GetTabPos(const SvTreeListEntry*, const SvLBoxTab*) const;
svx/source/sidebar/line/LineWidthPopup.cxx:        sal_IntPtr nVal = OutputDevice::LogicToLogic(
svx/source/sidebar/line/LineWidthPopup.cxx:            reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData(iPos)), MapUnit::MapPoint,
sw/inc/authfld.hxx:    mutable sal_IntPtr  m_nTempSequencePos;
sw/inc/authfld.hxx:    mutable sal_IntPtr  m_nTempSequencePosRLHidden; ///< hidden redlines
sw/source/core/fields/authfld.cxx:        sal_IntPtr & rnTempSequencePos(pLayout && pLayout->IsHideRedlines()
sw/source/core/fields/authfld.cxx:        sal_IntPtr & rnTempSequencePos(pLayout && pLayout->IsHideRedlines()
sw/source/uibase/utlui/uitool.cxx:            sal_IntPtr nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), SwGetPoolIdFromName::ChrFmt );
ucb/source/sorter/sortdynres.cxx:void EventList::AddEvent( sal_IntPtr nType, sal_Int32 nPos )
ucb/source/sorter/sortresult.cxx:    sal_IntPtr  mnCurPos;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr  mnOldPos;
ucb/source/sorter/sortresult.cxx:    explicit SortListData( sal_IntPtr nPos );
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nCompare = 0;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr  nCompare = 0;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nIndexOne;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nIndexTwo;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nCompare;
ucb/source/sorter/sortresult.cxx:                               sal_IntPtr _nStart, sal_IntPtr _nEnd )
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nStart = _nStart;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nEnd   = _nEnd;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nMid = 0, nCompare = 0;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr i, nCount;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nIndex = 1;
ucb/source/sorter/sortresult.cxx:            sal_IntPtr nPos   = FindPos( pData.get(), 1, nIndex-1 );
ucb/source/sorter/sortresult.cxx:    sal_IntPtr      i, nEnd;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr        nOldLastSort;
ucb/source/sorter/sortresult.cxx:    for ( sal_IntPtr i=0; i < nCount; i++ )
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nSortPos = m_O2S[nPos];
ucb/source/sorter/sortresult.cxx:            sal_IntPtr nVal = m_O2S[j];
ucb/source/sorter/sortresult.cxx:    sal_IntPtr i, nSortPos, nTo;
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nStart = nPos + nCount;
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nEnd = nStart + nOffset;
ucb/source/sorter/sortresult.cxx:    std::unique_ptr<sal_IntPtr[]> pTmpArr(new sal_IntPtr[ nCount ]);
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nFrom = nPos - 1;
ucb/source/sorter/sortresult.cxx:            sal_IntPtr const nVal = m_O2S[nFrom + i];
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nStart = nPos + nCount;
ucb/source/sorter/sortresult.cxx:            sal_IntPtr const nVal = m_O2S[nStart + i];
ucb/source/sorter/sortresult.cxx:    for ( sal_IntPtr i=0; i<nCount; i++ )
ucb/source/sorter/sortresult.cxx:        sal_IntPtr const nSortPos = m_O2S[nPos];
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nCompare, nCurPos, nNewPos;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nStart, nEnd, nOffset, nVal;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr            i, nNewPos, nVal;
ucb/source/sorter/sortresult.cxx:        for ( i = mnLastSort; i<static_cast<sal_IntPtr>(maS2O.Count()); i++ )
ucb/source/sorter/sortresult.cxx:SortListData::SortListData( sal_IntPtr nPos )
ucb/source/sorter/sortresult.cxx:    if ( nPos < static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.cxx:    if ( nPos < static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.cxx:    if ( nPos < static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.cxx:    if ( nPos < static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.hxx:    void            AddEvent( sal_IntPtr nType, sal_Int32 nPos );
ucb/source/sorter/sortresult.hxx:    std::deque<sal_IntPtr> m_O2S;       /// maps the original Entries to the sorted ones
ucb/source/sorter/sortresult.hxx:    sal_Int32          FindPos( SortListData const *pEntry, sal_IntPtr nStart, sal_IntPtr nEnd );
vcl/source/treelist/treelistbox.cxx:sal_IntPtr SvTreeListBox::GetTabPos(const SvTreeListEntry* pEntry, const SvLBoxTab* pTab) const
vcl/source/treelist/treelistbox.cxx:    sal_IntPtr nPos = pTab->GetPos();
vcl/source/treelist/treelistbox.cxx:        nPos += static_cast<sal_IntPtr>(nDepth);
Comment 63 Commit Notification 2024-10-20 20:34:53 UTC
Chizoba ODINAKA committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e1a882e82331e3ee301332e3d10b36b5620073f9

tdf#75280 Convert sal_uIntPtr to size_t a more appropriate integer type

It will be available in 25.2.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.