summaryrefslogtreecommitdiff
path: root/include/xmloff/table
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2022-11-22 14:07:12 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2022-11-29 09:39:22 +0100
commitdaab698b346e5e40b67f1e15c796c4e399ccaf8a (patch)
tree7483cd08e13613e9ff27086cf17d94bbb658e8d1 /include/xmloff/table
parent7830ecc2e4e5dd264517c6554078fa807ff1fceb (diff)
sd: replace hardcoded table styles with xml file
Including a new set of default styles, provided by Rafael Lima. Some ui tests had to be modified, because the new borders are thicker. If you intend to edit the xml file, please keep in mind the following requirements: 1) There should be a table template called "default". It's applied to newly inserted tables. 2) There should be a cell style called "default". It's used for new table styles. 3) Please make all cell styles inherit from "default" (directly or indirectly), unless you intend to specify font names in them. "default" has its font names filled programmatically based on officecfg/registry/data/org/openoffice/VCL.xcu. 4) Whenever possible please use <style:table-cell-properties> for cell properties, instead of the incorrect <style:paragraph-properties> and <loext:graphic-properties> we currently use for export. See tdf#72238 and tdf#72239. Change-Id: I73dd4492fefb65b1870238aec7dc64f8076f6e95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141825 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'include/xmloff/table')
-rw-r--r--include/xmloff/table/XMLTableImport.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/xmloff/table/XMLTableImport.hxx b/include/xmloff/table/XMLTableImport.hxx
index c0f702b5caaa..0889637f2e23 100644
--- a/include/xmloff/table/XMLTableImport.hxx
+++ b/include/xmloff/table/XMLTableImport.hxx
@@ -36,7 +36,10 @@
class SvXMLStyleContext;
typedef std::map< OUString, OUString > XMLTableTemplate;
-typedef std::map < OUString, std::shared_ptr< XMLTableTemplate > > XMLTableTemplateMap;
+// Not using a map here, as we want the templates to be
+// inserted in the same order they were defined in the
+// xml (at least for sd built in templates):
+typedef std::vector< std::pair< OUString, std::shared_ptr< XMLTableTemplate > > > XMLTableTemplateMap;
class XMLOFF_DLLPUBLIC XMLTableImport final : public salhelper::SimpleReferenceObject
{