LibreOffice Module oox (master) 1
datamodel.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODEL_HXX
21#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DATAMODEL_HXX
22
23#include <map>
24#include <memory>
25#include <vector>
26
27#include <rtl/ustring.hxx>
28
31#include <oox/helper/helper.hxx>
32#include <oox/token/tokens.hxx>
33
34namespace oox::drawingml {
35
37{
38public:
39 typedef std::map< OUString, ShapePtr > PointShapeMap;
40
42 virtual ~DiagramData();
43
44 // creates temporary processing data from model data
45 virtual void buildDiagramDataModel(bool bClearOoxShapes);
46
48 virtual void dump() const;
49
50 Shape* getOrCreateAssociatedShape(const svx::diagram::Point& rPoint, bool bCreateOnDemand = false) const;
51
52 // get/set data between Diagram DataModel and oox::drawingml::Shape
55 static void restoreDataFromModelToShapeAfterReCreation(const svx::diagram::Point& rPoint, Shape& rNewShape);
56
57protected:
60
61private:
62 // The model definition, the parts *only* available in oox. Also look for already
63 // defined ModelData in svx::diagram::DiagramData
64
65 // - FillStyle for Diagram Background (empty constructed, may stay empty)
67
68 // temporary processing data, deleted when using build(). Association
69 // map between oox::drawingml::Shape and svx::diagram::Point ModelData
71};
72
73// Oox-local definition of DiagramData. Doing and using this on Oox
74// allows to do much less static_cast(s) - if at all from svx::diagram::DiagramData
75typedef std::shared_ptr< DiagramData > OoxDiagramDataPtr;
76
77}
78
79#endif
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void dump() const
Definition: datamodel.cxx:430
void secureDataFromShapeToModelAfterDiagramImport(::oox::drawingml::Shape &rRootShape)
Definition: datamodel.cxx:273
FillPropertiesPtr & getBackgroundShapeFillProperties()
Definition: datamodel.hxx:47
void restoreDataFromShapeToModelAfterDiagramImport(::oox::drawingml::Shape &rRootShape)
Definition: datamodel.cxx:392
static void restoreDataFromModelToShapeAfterReCreation(const svx::diagram::Point &rPoint, Shape &rNewShape)
Definition: datamodel.cxx:61
std::map< OUString, ShapePtr > PointShapeMap
Definition: datamodel.hxx:39
void restoreStyleDataFromShapeToModel(::oox::drawingml::Shape &rShape)
Definition: datamodel.cxx:326
PointShapeMap maPointShapeMap
Definition: datamodel.hxx:70
Shape * getOrCreateAssociatedShape(const svx::diagram::Point &rPoint, bool bCreateOnDemand=false) const
Definition: datamodel.cxx:40
virtual void buildDiagramDataModel(bool bClearOoxShapes)
Definition: datamodel.cxx:441
FillPropertiesPtr mpBackgroundShapeFillProperties
Definition: datamodel.hxx:66
void secureStyleDataFromShapeToModel(::oox::drawingml::Shape &rShape)
Definition: datamodel.cxx:98
std::shared_ptr< DiagramData > OoxDiagramDataPtr
Definition: datamodel.hxx:75
std::shared_ptr< FillProperties > FillPropertiesPtr