Bug 73536 - OOXMLFastTokenHandler::getIdentifier cannot be used
Summary: OOXMLFastTokenHandler::getIdentifier cannot be used
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.1 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-13 08:17 UTC by Chris Sherlock
Modified: 2014-01-15 13:39 UTC (History)
1 user (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 Chris Sherlock 2014-01-13 08:17:43 UTC
OOXMLFastTokenHandler::getIdentifier tries to lookup a key by an integer based token, however as per the comments in the source code, Boost.TokenMap doesn't index via an integer!

Should we just remove the code, or throw an exception? Does the interface XFastTokenHandler even use getIdentier via an integer based token for any other classes?
Comment 2 Commit Notification 2014-01-15 13:32:09 UTC
Chris Sherlock committed a patch related to this issue.
It has been pushed to "master":

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

fdo#73536 getIdentifier cannot be used



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 Chris Sherlock 2014-01-15 13:39:45 UTC
The commit message reads:

"OOXMLFastTokenHandler uses a Boost tokenmap, but tokenmaps cannot be indexed by an integer. I've removed the #if 0 code and generate a RuntimeException as nobody should use the functions getIdentier or getUTF8Identifier!"

Actually, I decided on an assert as a better course of events. 

Oops!