1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAM_HXX
21 #define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_DIAGRAM_HXX
26 #include <rtl/ustring.hxx>
28 #include "datamodel.hxx"
29 #include <oox/drawingml/shape.hxx>
31 namespace com
{ namespace sun
{ namespace star
{
32 namespace xml
{ namespace dom
{ class XDocument
; } }
35 namespace oox
{ namespace drawingml
{
39 typedef std::shared_ptr
< LayoutNode
> LayoutNodePtr
;
41 typedef std::shared_ptr
<LayoutAtom
> LayoutAtomPtr
;
43 typedef std::map
< OUString
, css::uno::Reference
<css::xml::dom::XDocument
> > DiagramDomMap
;
45 typedef std::map
<OUString
, LayoutAtomPtr
> LayoutAtomMap
;
46 typedef std::map
<const dgm::Point
*, ShapePtr
> PresPointShapeMap
;
51 DiagramLayout(const Diagram
& rDgm
) : mrDgm(rDgm
) {}
52 void setDefStyle( const OUString
& sDefStyle
)
53 { msDefStyle
= sDefStyle
; }
54 void setMinVer( const OUString
& sMinVer
)
55 { msMinVer
= sMinVer
; }
56 void setUniqueId( const OUString
& sUniqueId
)
57 { msUniqueId
= sUniqueId
; }
58 void setTitle( const OUString
& sTitle
)
60 void setDesc( const OUString
& sDesc
)
62 const Diagram
& getDiagram() const
64 LayoutNodePtr
& getNode()
66 const LayoutNodePtr
& getNode() const
68 DiagramDataPtr
& getSampData()
69 { return mpSampData
; }
70 const DiagramDataPtr
& getSampData() const
71 { return mpSampData
; }
72 DiagramDataPtr
& getStyleData()
73 { return mpStyleData
; }
74 const DiagramDataPtr
& getStyleData() const
75 { return mpStyleData
; }
76 LayoutAtomMap
& getLayoutAtomMap()
77 { return maLayoutAtomMap
; }
78 PresPointShapeMap
& getPresPointShapeMap()
79 { return maPresPointShapeMap
; }
90 DiagramDataPtr mpSampData
;
91 DiagramDataPtr mpStyleData
;
96 LayoutAtomMap maLayoutAtomMap
;
97 PresPointShapeMap maPresPointShapeMap
;
100 typedef std::shared_ptr
< DiagramLayout
> DiagramLayoutPtr
;
104 ShapeStyleRef maFillStyle
;
105 ShapeStyleRef maLineStyle
;
106 ShapeStyleRef maEffectStyle
;
107 ShapeStyleRef maTextStyle
;
110 typedef std::map
<OUString
,DiagramStyle
> DiagramQStyleMap
;
114 oox::drawingml::Color maFillColor
;
115 oox::drawingml::Color maLineColor
;
116 oox::drawingml::Color maEffectColor
;
117 oox::drawingml::Color maTextFillColor
;
118 oox::drawingml::Color maTextLineColor
;
119 oox::drawingml::Color maTextEffectColor
;
122 typedef std::map
<OUString
,DiagramColor
> DiagramColorMap
;
127 void setData( const DiagramDataPtr
& pData
)
129 const DiagramDataPtr
& getData() const
131 void setLayout( const DiagramLayoutPtr
& pLayout
)
132 { mpLayout
= pLayout
; }
133 const DiagramLayoutPtr
& getLayout() const
136 DiagramQStyleMap
& getStyles() { return maStyles
; }
137 const DiagramQStyleMap
& getStyles() const { return maStyles
; }
138 DiagramColorMap
& getColors() { return maColors
; }
139 const DiagramColorMap
& getColors() const { return maColors
; }
140 DiagramDomMap
& getDomMap() { return maMainDomMap
; }
141 css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> > & getDataRelsMap() { return maDataRelsMap
; }
142 void addTo( const ShapePtr
& pShape
);
144 css::uno::Sequence
<css::beans::PropertyValue
> getDomsAsPropertyValues() const;
146 DiagramDataPtr mpData
;
147 DiagramLayoutPtr mpLayout
;
148 DiagramQStyleMap maStyles
;
149 DiagramColorMap maColors
;
150 DiagramDomMap maMainDomMap
;
151 css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> > maDataRelsMap
;
154 typedef std::shared_ptr
< Diagram
> DiagramPtr
;
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */