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 /include/svx/DiagramDataInterface.hxx | |
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 'include/svx/DiagramDataInterface.hxx')
-rw-r--r-- | include/svx/DiagramDataInterface.hxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/svx/DiagramDataInterface.hxx b/include/svx/DiagramDataInterface.hxx new file mode 100644 index 000000000000..439f2efeefdb --- /dev/null +++ b/include/svx/DiagramDataInterface.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_DIAGRAMDATAINTERFACE_HXX +#define INCLUDED_SVX_DIAGRAMDATAINTERFACE_HXX + +#include <rtl/ustring.h> +#include <sal/types.h> + +/// Interface class to access diagram data for UI +class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI DiagramDataInterface +{ +public: + // get text representation of data tree + virtual OUString getString() const = 0; + +protected: + ~DiagramDataInterface() throw() {} +}; + +#endif // INCLUDED_SVX_DIAGRAMDATAINTERFACE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |