summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2011-12-30 16:09:42 +0530
committerMuthu Subramanian <sumuthu@suse.com>2011-12-30 16:13:06 +0530
commit60b7f09ed5980248c8f3088adf80380d02d66358 (patch)
tree27bdb33cbea5af19ab4720862fe62adb5dd8f04d
parent18692cc1412bd7eca37d80d4345c0ae775d94ac5 (diff)
n#655408: Importing extLst of drawings in diagrams.
data*.xml contains the list of drawings which can be imported instead. These are easier to import now that we support better smartart.
-rw-r--r--oox/Library_oox.mk1
-rw-r--r--oox/inc/oox/drawingml/diagram/diagram.hxx2
-rw-r--r--oox/inc/oox/drawingml/shape.hxx5
-rw-r--r--oox/inc/oox/ppt/pptshapegroupcontext.hxx3
-rw-r--r--oox/source/core/xmlfilterbase.cxx6
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.cxx9
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx9
-rw-r--r--oox/source/drawingml/diagram/diagram.hxx3
-rw-r--r--oox/source/drawingml/shape.cxx7
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.cxx95
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.hxx71
-rw-r--r--oox/source/ppt/pptshapecontext.cxx2
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx28
-rw-r--r--oox/source/token/namespaces.hxx.tail1
-rw-r--r--oox/source/token/namespaces.txt1
-rw-r--r--oox/source/token/tokens.txt2
16 files changed, 236 insertions, 9 deletions
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 0b54125d72c8..098d7472d08a 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -266,6 +266,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
oox/source/ppt/timenode \
oox/source/ppt/timenodelistcontext \
oox/source/ppt/timetargetelementcontext \
+ oox/source/ppt/extdrawingfragmenthandler \
oox/source/shape/ShapeContextHandler \
oox/source/shape/ShapeFilterBase \
oox/source/token/namespacemap \
diff --git a/oox/inc/oox/drawingml/diagram/diagram.hxx b/oox/inc/oox/drawingml/diagram/diagram.hxx
index 9b75667f631a..4c0a40d857f3 100644
--- a/oox/inc/oox/drawingml/diagram/diagram.hxx
+++ b/oox/inc/oox/drawingml/diagram/diagram.hxx
@@ -43,7 +43,7 @@ namespace oox { namespace drawingml {
generate and layout the shapes, and push it as children into the
referenced shape.
*/
-void loadDiagram( const ShapePtr& pShape,
+void loadDiagram( ShapePtr& pShape,
core::XmlFilterBase& rFilter,
const ::rtl::OUString& rDataModelPath,
const ::rtl::OUString& rLayoutPath,
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index ab7637ad543d..772f6993289d 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -107,6 +107,7 @@ public:
void setChildPosition( com::sun::star::awt::Point nPosition ){ maChPosition = nPosition; }
void setChildSize( com::sun::star::awt::Size aSize ){ maChSize = aSize; }
+ void moveAllToPosition( const com::sun::star::awt::Point &rPoint );
void setPosition( com::sun::star::awt::Point nPosition ){ maPosition = nPosition; }
const com::sun::star::awt::Point& getPosition() const { return maPosition; }
@@ -173,6 +174,9 @@ public:
getXShape() const { return mxShape; }
virtual void applyShapeReference( const Shape& rReferencedShape );
+ const ::std::vector<rtl::OUString>&
+ getExtDrawings() { return maExtDrawings; }
+ void addExtDrawingRelId( const ::rtl::OUString &rRelId ) { maExtDrawings.push_back( rRelId ); }
protected:
@@ -233,6 +237,7 @@ protected:
com::sun::star::awt::Size maSize;
com::sun::star::awt::Point maPosition;
+ ::std::vector<rtl::OUString> maExtDrawings;
private:
enum FrameType
diff --git a/oox/inc/oox/ppt/pptshapegroupcontext.hxx b/oox/inc/oox/ppt/pptshapegroupcontext.hxx
index 948ee7961224..7e2a6d3b5f67 100644
--- a/oox/inc/oox/ppt/pptshapegroupcontext.hxx
+++ b/oox/inc/oox/ppt/pptshapegroupcontext.hxx
@@ -38,6 +38,7 @@ class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext
{
SlidePersistPtr mpSlidePersistPtr;
ShapeLocation meShapeLocation;
+ oox::drawingml::ShapePtr pGraphicShape;
public:
PPTShapeGroupContext(
@@ -50,6 +51,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
protected:
};
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index b0486f6b5f3d..cf93e14aafd9 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -148,7 +148,8 @@ namespace
"http://schemas.microsoft.com/office/excel/2006/main",
"http://schemas.openxmlformats.org/presentationml/2006/main",
"http://schemas.openxmlformats.org/markup-compatibility/2006",
- "http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2"
+ "http://schemas.openxmlformats.org/spreadsheetml/2006/main/v2",
+ "http://schemas.microsoft.com/office/drawing/2008/diagram"
};
static const sal_Int32 namespaceIds[] = {
@@ -170,7 +171,8 @@ namespace
NMSP_ax,
NMSP_xm,
NMSP_mce,
- NMSP_mceTest
+ NMSP_mceTest,
+ NMSP_dsp
};
Sequence< Pair< OUString, sal_Int32 > > aRet(STATIC_ARRAY_SIZE(namespaceIds));
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
index 63065a85b701..e22fe505e544 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -399,10 +399,9 @@ DataModelContext::~DataModelContext()
mpDataModel->dump();
}
-
Reference< XFastContextHandler > SAL_CALL
DataModelContext::createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& /*xAttribs*/ )
+ const Reference< XFastAttributeList >& xAttribs )
throw ( SAXException, RuntimeException)
{
Reference< XFastContextHandler > xRet;
@@ -426,7 +425,11 @@ DataModelContext::createFastChildContext( ::sal_Int32 aElement,
// TODO
return xRet;
case DGM_TOKEN( extLst ):
- return xRet;
+ case A_TOKEN( ext ):
+ break;
+ case DSP_TOKEN( dataModelExt ):
+ mpDataModel->getExtDrawings().push_back( xAttribs->getOptionalValue( XML_relId ) );
+ break;
default:
break;
}
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 5c0e079ba456..ad53443ac6cb 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -40,6 +40,8 @@
#include "oox/drawingml/textrun.hxx"
#include "oox/drawingml/diagram/diagram.hxx"
#include "oox/drawingml/fillproperties.hxx"
+#include "oox/ppt/pptshapegroupcontext.hxx"
+#include "oox/ppt/pptshape.hxx"
#include "diagramlayoutatoms.hxx"
#include "diagramfragmenthandler.hxx"
@@ -54,7 +56,6 @@ namespace oox { namespace drawingml {
namespace dgm {
-
void Connection::dump()
{
OSL_TRACE("dgm: cnx modelId %s, srcId %s, dstId %s, parTransId %s, presId %s, sibTransId %s, srcOrd %d, dstOrd %d",
@@ -374,7 +375,7 @@ void importFragment( core::XmlFilterBase& rFilter,
rFilter.importFragment( rxHandler, xSerializer );
}
-void loadDiagram( const ShapePtr& pShape,
+void loadDiagram( ShapePtr& pShape,
core::XmlFilterBase& rFilter,
const ::rtl::OUString& rDataModelPath,
const ::rtl::OUString& rLayoutPath,
@@ -400,6 +401,10 @@ void loadDiagram( const ShapePtr& pShape,
"DiagramData",
pShape,
xRef);
+ // Pass the info to pShape
+ for( ::std::vector<OUString>::const_iterator aIt = pData->getExtDrawings().begin(), aEnd = pData->getExtDrawings().end();
+ aIt != aEnd; ++aIt )
+ pShape->addExtDrawingRelId( *aIt );
}
// layout
diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx
index 217b80381594..6dc9c6108d71 100644
--- a/oox/source/drawingml/diagram/diagram.hxx
+++ b/oox/source/drawingml/diagram/diagram.hxx
@@ -166,6 +166,7 @@ typedef boost::shared_ptr< LayoutNode > LayoutNodePtr;
class DiagramData
{
public:
+ ::std::vector<rtl::OUString> maExtDrawings;
typedef std::map< rtl::OUString, dgm::Point* > PointNameMap;
typedef std::map< rtl::OUString,
std::vector<dgm::Point*> > PointsNameMap;
@@ -188,6 +189,8 @@ public:
{ return maPointNameMap; }
PointsNameMap & getPointsPresNameMap()
{ return maPointsPresNameMap; }
+ ::std::vector<rtl::OUString> &getExtDrawings()
+ { return maExtDrawings; }
void dump();
private:
FillPropertiesPtr mpFillProperties;
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index a261eb915f4c..f551b85ce757 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -591,6 +591,13 @@ TextBodyPtr Shape::getTextBody()
return mpTextBody;
}
+void Shape::moveAllToPosition( const Point &rPoint )
+{
+ setPosition( Point( rPoint.X + maPosition.X, rPoint.Y + maPosition.Y ) );
+ for( ::std::vector<ShapePtr>::const_iterator aIt = maChildren.begin(), aEnd = maChildren.end();aIt != aEnd; ++aIt )
+ (*aIt)->moveAllToPosition( rPoint );
+}
+
void Shape::setMasterTextListStyle( const TextListStylePtr& pMasterTextListStyle )
{
OSL_TRACE("set master text list style to shape id: %s", rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr());
diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx b/oox/source/ppt/extdrawingfragmenthandler.cxx
new file mode 100644
index 000000000000..f0654151b6be
--- /dev/null
+++ b/oox/source/ppt/extdrawingfragmenthandler.cxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell, Inc.
+ *
+ * Portions created by the Initial Developer are Copyright (C) 2011 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Muthu Subramanian <sumuthu@suse.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "extdrawingfragmenthandler.hxx"
+
+using namespace ::oox::core;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
+
+namespace oox { namespace ppt {
+
+ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ const oox::ppt::SlidePersistPtr pSlidePersistPtr,
+ const oox::ppt::ShapeLocation eShapeLocation,
+ oox::drawingml::ShapePtr pMasterShapePtr,
+ oox::drawingml::ShapePtr pGroupShapePtr,
+ oox::drawingml::ShapePtr pShapePtr)
+ throw( )
+ : FragmentHandler( rFilter, rFragmentPath ),
+ mpSlidePersistPtr (pSlidePersistPtr ),
+ meShapeLocation( eShapeLocation ),
+ mpMasterShapePtr( pMasterShapePtr ),
+ mpGroupShapePtr( pGroupShapePtr ),
+ mpOrgShapePtr( pShapePtr )
+{
+}
+
+ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) throw ()
+{
+
+}
+
+Reference< XFastContextHandler > SAL_CALL
+ExtDrawingFragmentHandler::createFastChildContext( ::sal_Int32 aElement,
+ const Reference< XFastAttributeList >& )
+ throw ( SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xRet;
+
+ switch( aElement )
+ {
+ case DSP_TOKEN( drawing ):
+ break;
+ case DSP_TOKEN( spTree ):
+ mpShapePtr = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
+ xRet.set( new PPTShapeGroupContext(
+ *this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
+ mpShapePtr ) );
+ break;
+ default:
+ break;
+ }
+
+ if( !xRet.is() )
+ xRet = getFastContextHandler();
+
+ return xRet;
+}
+void SAL_CALL ExtDrawingFragmentHandler::endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException)
+{
+ mpShapePtr->moveAllToPosition( mpOrgShapePtr->getPosition() );
+ mpShapePtr->setName( mpOrgShapePtr->getName() );
+}
+
+} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/extdrawingfragmenthandler.hxx b/oox/source/ppt/extdrawingfragmenthandler.hxx
new file mode 100644
index 000000000000..3751e4dc0083
--- /dev/null
+++ b/oox/source/ppt/extdrawingfragmenthandler.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell, Inc.
+ *
+ * Portions created by the Initial Developer are Copyright (C) 2011 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Muthu Subramanian <sumuthu@suse.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef OOX_PPT_EXTDRAWINGFRAGMENTHANDLER
+#define OOX_PPT_EXTDRAWINGFRAGMENTHANDLER
+
+#include "oox/core/fragmenthandler.hxx"
+#include "oox/core/fragmenthandler2.hxx"
+#include "oox/drawingml/shapegroupcontext.hxx"
+#include "oox/ppt/slidepersist.hxx"
+#include "oox/ppt/pptshapegroupcontext.hxx"
+#include "oox/ppt/pptshape.hxx"
+
+namespace oox { namespace ppt {
+
+
+class ExtDrawingFragmentHandler : public ::oox::core::FragmentHandler
+{
+public:
+ ExtDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath,
+ const oox::ppt::SlidePersistPtr pSlidePersistPtr,
+ const oox::ppt::ShapeLocation eShapeLocation,
+ oox::drawingml::ShapePtr pMasterShapePtr,
+ oox::drawingml::ShapePtr pGroupShapePtr,
+ oox::drawingml::ShapePtr pShapePtr ) throw();
+ virtual ~ExtDrawingFragmentHandler() throw();
+
+ virtual void SAL_CALL endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+private:
+ const oox::ppt::SlidePersistPtr mpSlidePersistPtr;
+ const oox::ppt::ShapeLocation meShapeLocation;
+ oox::drawingml::ShapePtr mpMasterShapePtr;
+ oox::drawingml::ShapePtr mpGroupShapePtr;
+ oox::drawingml::ShapePtr mpOrgShapePtr; // Original Shape data, if any
+ oox::drawingml::ShapePtr mpShapePtr;
+};
+
+} }
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index cde75734b258..dce07b8cc744 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -96,6 +96,8 @@ oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32
Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
{
Reference< XFastContextHandler > xRet;
+ if( getNamespace( aElementToken ) == NMSP_dsp )
+ aElementToken = NMSP_ppt | getBaseToken( aElementToken );
switch( aElementToken )
{
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index 0a03e44f03f8..cf982cf1b50d 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -41,6 +41,7 @@
#include "oox/drawingml/customshapegeometry.hxx"
#include "oox/drawingml/textbodycontext.hxx"
#include "oox/drawingml/connectorshapecontext.hxx"
+#include "extdrawingfragmenthandler.hxx"
using rtl::OUString;
using namespace oox::core;
@@ -62,12 +63,15 @@ PPTShapeGroupContext::PPTShapeGroupContext(
: ShapeGroupContext( rParent, pMasterShapePtr, pGroupShapePtr )
, mpSlidePersistPtr( pSlidePersistPtr )
, meShapeLocation( eShapeLocation )
+, pGraphicShape( (PPTShape *)NULL )
{
}
Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
{
Reference< XFastContextHandler > xRet;
+ if( getNamespace( aElementToken ) == NMSP_dsp )
+ aElementToken = NMSP_ppt | getBaseToken( aElementToken );
switch( aElementToken )
{
@@ -110,7 +114,10 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
xRet.set( new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ) );
break;
case PPT_TOKEN( graphicFrame ): // CT_GraphicalObjectFrame
- xRet.set( new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) ), true ) );
+ {
+ pGraphicShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) );
+ xRet.set( new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, pGraphicShape, true ) );
+ }
break;
}
@@ -121,6 +128,25 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
return xRet;
}
+void PPTShapeGroupContext::endFastElement( sal_Int32 nElement ) throw (SAXException, RuntimeException)
+{
+ if( nElement == PPT_TOKEN( spTree ) && pGraphicShape )
+ {
+ for( ::std::vector<OUString>::const_iterator aIt = pGraphicShape->getExtDrawings().begin(), aEnd = pGraphicShape->getExtDrawings().end();
+ aIt != aEnd; ++aIt )
+ {
+ getFilter().importFragment( new ExtDrawingFragmentHandler( getFilter(), getFragmentPathFromRelId( *aIt ),
+ mpSlidePersistPtr,
+ meShapeLocation,
+ mpMasterShapePtr,
+ mpGroupShapePtr,
+ pGraphicShape ) );
+
+ }
+ pGraphicShape = oox::drawingml::ShapePtr( (PPTShape *)NULL );
+ }
+}
+
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail
index b8eaae972074..945ebbd1b4d9 100644
--- a/oox/source/token/namespaces.hxx.tail
+++ b/oox/source/token/namespaces.hxx.tail
@@ -32,6 +32,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; }
#define XM_TOKEN( token ) OOX_TOKEN( xm, token )
#define XML_TOKEN( token ) OOX_TOKEN( xml, token )
#define VMLPPT_TOKEN( token ) OOX_TOKEN( vmlPowerpoint, token )
+#define DSP_TOKEN( token ) OOX_TOKEN( dsp, token )
// ============================================================================
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index 9251fe053111..57d5905a6ad8 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -28,6 +28,7 @@ ppt http://schemas.openxmlformats.org/presentationml/2006/ma
# drawing ---------------------------------------------------------------------
dml http://schemas.openxmlformats.org/drawingml/2006/main
+dsp http://schemas.microsoft.com/office/drawing/2008/diagram
dmlChart http://schemas.openxmlformats.org/drawingml/2006/chart
dmlChartDr http://schemas.openxmlformats.org/drawingml/2006/chartDrawing
dmlDiagram http://schemas.openxmlformats.org/drawingml/2006/diagram
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 4f86a03b8f8a..594468e56606 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -1592,6 +1592,7 @@ dataExtractLoad
dataField
dataFields
dataModel
+dataModelExt
dataOnRows
dataOnly
dataPosition
@@ -4168,6 +4169,7 @@ regroupid
regrouptable
regular
rel
+relId
relIds
relOff
relSizeAnchor