diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2020-02-21 02:35:55 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-02-27 19:04:33 +0100 |
commit | 59ace23c367f83491a37e844d16f7d716eff6346 (patch) | |
tree | af47d9b808037e3af045678b60b73e47b6f1121f /include/xmloff/table | |
parent | 5352d45dd4a04f8f02cf7f6ad4169126d3b3586a (diff) |
tdf#101710 Fix invalid style:data-style-name attribute
There were two problems with this attribute:
1. It was written in style:table-cell-properties instead of
in style:style.
2. It was referencing a number format id, instead of a style
name. Moreover, the data style wasn't even exported as part
of office:styles (if at all).
Both import and export were affected. For export, it was easily
possible to reuse some related stuff from Calc, so that stuff
was moved into xmloff and used from there (there are no logic
changes for Calc). For import, loading of the invalid attribute
was kept for compat reasons. Although it's only useful for
automatic number formats, as the data styles weren't exported
properly anyway (e.g. see the document attached in bugzilla).
Change-Id: I8b70ad205972fada6f3845837d6ed5928d7d6406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89551
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'include/xmloff/table')
-rw-r--r-- | include/xmloff/table/XMLTableExport.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/xmloff/table/XMLTableExport.hxx b/include/xmloff/table/XMLTableExport.hxx index d8f037efe56a..f49a4236e2d0 100644 --- a/include/xmloff/table/XMLTableExport.hxx +++ b/include/xmloff/table/XMLTableExport.hxx @@ -38,6 +38,7 @@ #include <salhelper/simplereferenceobject.hxx> #include <xmloff/prhdlfac.hxx> #include <xmloff/xmlexppr.hxx> +#include <xmloff/styleexp.hxx> class SvXMLExport; class SvXMLExportPropertyMapper; @@ -92,6 +93,13 @@ private: }; +class XMLOFF_DLLPUBLIC XMLCellStyleExport final : public XMLStyleExport +{ + using XMLStyleExport::XMLStyleExport; + virtual void exportStyleAttributes(const css::uno::Reference<css::style::XStyle>& rStyle) override; + virtual void exportStyleContent(const css::uno::Reference<css::style::XStyle>& rStyle) override; +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |