summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorBayram Çiçek <bayram.cicek@collabora.com>2024-03-02 16:41:54 +0300
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-09 10:17:16 +0200
commit045ebdb369ab21a3be7a32dc1c85ad2243eb9129 (patch)
tree755b6ac7d2913a4af15710510257259bf8a7e6c7 /oox
parent4e606c5b38139c4424fe9334aed32515c7547418 (diff)
tdf#158857: [Power Query] export connections.xml
- import&export connections stream - insert xl/connections.xml reference to [Content_Types].xml - add Relationship::CONNECTIONS - add support for xr16 namespace - add ../customXml/item1.xml relationship to xl/_rels/workbook.xml.rels - add import&export support for following xml elements in xl/connections.xml: <connections> <connection> <dbPr /> <olapPr /> <webPr> (Web Query Properties) <tables> <m /> <s /> <x /> </tables> </webPr> <textPr> <textFields> <textField /> </textFields> </textPr> <parameters> <parameter /> </parameters> <extLst> <ext> (Any element in any namespace) <- TODO/LATER </ext> </extLst> </connection> </connections> Change-Id: I1d1c10675b3fe5ffd6a35f1b91d4b83401be2cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164290 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/token/namespaces-strict.txt1
-rw-r--r--oox/source/token/namespaces.hxx.tail1
-rw-r--r--oox/source/token/namespaces.txt1
-rw-r--r--oox/source/token/relationship.cxx2
-rw-r--r--oox/source/token/relationship.inc1
-rw-r--r--oox/source/token/tokens.txt1
7 files changed, 8 insertions, 1 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index ccee129ae076..ac00c12d2b8f 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -148,6 +148,8 @@ const Sequence< beans::Pair< OUString, sal_Int32 > >& NamespaceIds()
NMSP_c15},
{u"http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"_ustr,
NMSP_xr2},
+ {u"http://schemas.microsoft.com/office/spreadsheetml/2017/revision16"_ustr,
+ NMSP_xr16},
{u"http://schemas.microsoft.com/office/drawing/2017/decorative"_ustr, NMSP_adec},
{u"http://schemas.microsoft.com/office/drawing/2016/SVG/main"_ustr, NMSP_asvg},
};
diff --git a/oox/source/token/namespaces-strict.txt b/oox/source/token/namespaces-strict.txt
index 2b6c53807377..9d9d311f6ce8 100644
--- a/oox/source/token/namespaces-strict.txt
+++ b/oox/source/token/namespaces-strict.txt
@@ -90,6 +90,7 @@ p15 http://schemas.microsoft.com/office/powerpoint/2012/main
x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
c15 http://schemas.microsoft.com/office/drawing/2012/chart
xr2 http://schemas.microsoft.com/office/spreadsheetml/2015/revision2
+xr16 http://schemas.microsoft.com/office/spreadsheetml/2017/revision16
# extlst namespaces
diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail
index 34513e850fe5..1e96938c5217 100644
--- a/oox/source/token/namespaces.hxx.tail
+++ b/oox/source/token/namespaces.hxx.tail
@@ -63,6 +63,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; }
#define LOEXT_TOKEN( token ) OOX_TOKEN( loext, token )
#define M_TOKEN(token) OOX_TOKEN(officeMath, token)
#define XR2_TOKEN(token) OOX_TOKEN(xr2, token)
+#define XR16_TOKEN(token) OOX_TOKEN(xr16, token)
#define WPC_TOKEN(token) OOX_TOKEN(wpc, token)
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index c2e30e0f8421..fe0aa9ce9482 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -90,6 +90,7 @@ p15 http://schemas.microsoft.com/office/powerpoint/2012/main
x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
c15 http://schemas.microsoft.com/office/drawing/2012/chart
xr2 http://schemas.microsoft.com/office/spreadsheetml/2015/revision2
+xr16 http://schemas.microsoft.com/office/spreadsheetml/2017/revision16
# extlst namespaces
diff --git a/oox/source/token/relationship.cxx b/oox/source/token/relationship.cxx
index 602793ba7424..c146a7e0b8c0 100644
--- a/oox/source/token/relationship.cxx
+++ b/oox/source/token/relationship.cxx
@@ -20,7 +20,7 @@ namespace oox
namespace
{
-constexpr frozen::unordered_map<Relationship, std::u16string_view, 48> constRelationshipMap
+constexpr frozen::unordered_map<Relationship, std::u16string_view, 49> constRelationshipMap
{
#include "relationship.inc"
};
diff --git a/oox/source/token/relationship.inc b/oox/source/token/relationship.inc
index 5b2f16b9264c..11898133eb06 100644
--- a/oox/source/token/relationship.inc
+++ b/oox/source/token/relationship.inc
@@ -4,6 +4,7 @@
{Relationship::COMMENTS, u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"},
{Relationship::COMMENTAUTHORS, u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"},
{Relationship::COMMENTSEXTENDED, u"http://schemas.microsoft.com/office/2011/relationships/commentsExtended"},
+{Relationship::CONNECTIONS, u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections"},
{Relationship::CONTROL, u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/control"},
{Relationship::CTRLPROP, u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp"},
{Relationship::CUSTOMXML, u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"},
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 47d6b07f2470..a6a656b161b6 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -5857,6 +5857,7 @@ xmlPr
xmlns
xpath
xr2
+xr16
xrange
xsc
xscale