Bug Hunting Session
Bug 97667 - add xml dump methods for calc pool items
Summary: add xml dump methods for calc pool items
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:5.2.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Reported: 2016-02-08 23:32 UTC by Markus Mohrhard
Modified: 2017-05-14 07:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Markus Mohrhard 2016-02-08 23:32:26 UTC
We have a way to dump our complex attribute storage inside of SfxItemSet (a container for different properties) and the many subclasses of SfxPoolItem. This is currently mainly used by writer but we should add that also for calc.

This task involves two parts:
1.) Adding a way to dump the cell properties similar to the dump* calls in ScGridWindow::KeyInput. Instead of these functions place it outside of the DBG_UTIL part to make it available in normal builds (I might move it to dbgutil builds later)
The position of the current cell can be gotten through ScGridWindow::pViewData, ScViewData::GetTabNo, ScViewData::GetCurX, ScViewData::GetCurY.

The SfxItemSet for dumping through ScDocument::GetPattern and ScPatternAttr::GetItemSet.

2.) Add dumpAsXml methods to the SfxPoolItem subclasses inside of sc/inc/attrib.hxx
Comment 1 Robinson Tryon (qubit) 2016-02-18 14:52:35 UTC Comment hidden (obsolete)
Comment 2 Commit Notification 2016-02-28 13:44:31 UTC
Jaskaran committed a patch related to this issue.
It has been pushed to "master":


tdf#97667 Added a dump method for SfxItemSet in gridwin.cxx

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:

Affected users are encouraged to test the fix and report feedback.
Comment 3 Markus Mohrhard 2016-04-18 07:59:02 UTC
Only part 1 is implemented.
Comment 4 blendergeek 2017-05-06 19:57:07 UTC
I am going to attempt to complete part 2.

If I understand correctly, I need to implement a dumpAsXML method to every subclass of SfxPoolItem in sc/inc/attrib.hxx

And these dumpAsXML methods will call the dump method in SfxItemSet referenced in Comment 2.