diff options
author | Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com> | 2019-07-22 15:04:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-08-05 09:52:00 +0200 |
commit | 8a029e4a39d9afda5334bc546338645241f656d6 (patch) | |
tree | a6b1770cb1c5a2ec5a36dc5e33f3bfd71a418b4f /sd | |
parent | f0390929d3e71ab434f9ce8d88c2dc2f4cc0ea6e (diff) |
SmartArt: store diagram data model in SdrObject
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
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index a240890ab6f8..851e8997055c 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -491,7 +491,6 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) if (oox::drawingml::DrawingML::IsDiagram(xShape)) { mpDrawView->UnmarkAll(); - pObj->getChildrenOfSdrObject()->ClearSdrObjList(); css::uno::Reference<css::uno::XComponentContext> xContext = comphelper::getProcessComponentContext(); @@ -499,7 +498,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) new oox::shape::ShapeFilterBase(xContext)); xFilter->setTargetDocument(GetDocSh()->GetModel()); xFilter->importTheme(); - oox::drawingml::reloadDiagram(xShape, *xFilter); + oox::drawingml::reloadDiagram(pObj, *xFilter); mpDrawView->MarkObj(pObj, mpDrawView->GetSdrPageView()); } |