SmartArt: store diagram data model in SdrObject

Desktop / LibreOffice - Grzegorz Araminowicz [collabora.com] - 5 August 2019 07:52 EDT

It will allow modifying loaded diagram and exporting it. This data is used for regenerating diagram instead of parsing xml fragment every time. Also provided an interface for UI that can be extended to show, add and remove nodes from data model.

It is stored as SdrObject field because diagram top-level shape is group shape. Item set doesn't exist for them and storing data in child shapes is not possible here because children are removed and recreated on every diagram reload.

Change-Id: I84e5ec955f638b254fef9ef9d1731ca7938982b7 Reviewed-on: https://gerrit.libreoffice.org/76121

8a029e4a39d9 SmartArt: store diagram data model in SdrObject
include/oox/drawingml/diagram/diagram.hxx | 10 ++--
include/oox/drawingml/shape.hxx | 5 ++
include/svx/DiagramDataInterface.hxx | 38 +++++++++++++++
include/svx/svdobj.hxx | 4 ++
oox/source/drawingml/diagram/diagram.cxx | 79 +++++++++++++++----------------
oox/source/drawingml/diagram/diagram.hxx | 8 +++-
oox/source/drawingml/shape.cxx | 9 ++++
sd/source/ui/view/drviews3.cxx | 3 +-
svx/source/svdraw/svdobj.cxx | 12 +++++
9 files changed, 118 insertions(+), 50 deletions(-)

Upstream: cgit.freedesktop.org


  • Share