[Libreoffice-bugs] [Bug 139281] Unexpected content inserted into XML element in ScDocShell when adding Default style to sc/res/xml/styles.xml

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jan 25 20:29:44 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=139281

--- Comment #2 from Eike Rathke <erack at redhat.com> ---
First, the Default cell style is NOT SUPPOSED to be present in styles.xml as it
is internally generated and all other cell styles inherit from that as parent
and I guess that redefining it in styles.xml probably will not work as intended
and wreak havoc sooner or later (I'd say it's completely untested at least).

I also think that setting the Default style's font to a fixed 10pt size is not
the proper approach. If the problem is that font size is not written to file
then the export should check for it and add it to the document's default style
instead. I'm not sure at the moment where this internally used 10pt actually
originates and why export omits it, but the Default standard style never
defined a hard 10pt font size.

For your debug problem, I don't quite get what the "cell contents" should be at
the ScDocShell::m_aDocument. The mpCellStringPool is the pool of all shared
strings in the document, yes, and then? What are you looking for? Really cell
content, i.e. a string contained or displayed in a specific cell? You'd have to
obtain that from the document via ScDocument::GetString(), so you could call
m_aDocument.GetString(0,0,0) to obtain the OUString for the top left cell on
the first sheet.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210125/686cce6c/attachment.htm>


More information about the Libreoffice-bugs mailing list