After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658490 - Unnecessarily many formats are being stored.
Unnecessarily many formats are being stored.
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-09-07 17:03 UTC by Andreas J. Guelzow
Modified: 2011-09-08 19:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.35 KB, patch)
2011-09-08 17:50 UTC, Andreas J. Guelzow
none Details | Review

Description Andreas J. Guelzow 2011-09-07 17:03:30 UTC
Apply the patch of bug #658472.
in A1 type =today()
select A1
Format->Cells->Format
go to custom page and in the format code entry type (not paste): mmmm mmm mm m 
okay
after resizing column A you see that the format has been aplied
select A1
Format->Cells->Format
go to custom page

note that "mmmm mmm mm m" is selected.

There are also formats:
"mmmm mmm mm "
"mmmm mmm mm"
"mmmm mmm m"
"mmmm mmm "
"mmmm mmm"
"mmmm mm"

and so on. These were added to the hash while the format was typed and the preview rendered. Apparently we never remove them from the hash.
Comment 1 Andreas J. Guelzow 2011-09-07 17:32:14 UTC
With a slightly different patch for bug #658472 now already applied, this can be made visible by commenting out the ref_count check in go_format_refcount_cb.
Comment 2 Andreas J. Guelzow 2011-09-08 17:50:12 UTC
Created attachment 196018 [details] [review]
proposed patch

The patch has 2 parts:

1) deletion of code related to avoiding ref_count==1 formats in go_format_for_each

2) check in go_format_unref for formats with only a reference in the hash
Comment 3 Andreas J. Guelzow 2011-09-08 19:14:46 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.