LibreOffice Module oox (master)  1
objectformatter.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_DRAWINGML_CHART_OBJECTFORMATTER_HXX
21 #define INCLUDED_OOX_DRAWINGML_CHART_OBJECTFORMATTER_HXX
22 
26 
27 namespace com::sun::star {
28  namespace chart2 { class XChartDocument; }
29 }
30 
31 namespace oox::core { class XmlFilterBase; }
32 
33 namespace oox::drawingml::chart {
34 
37 {
64 };
65 
66 struct ChartSpaceModel;
67 struct ObjectFormatterData;
68 struct PictureOptionsModel;
69 
71 {
72 public:
73  explicit ObjectFormatter(
74  const ::oox::core::XmlFilterBase& rFilter,
75  const css::uno::Reference< css::chart2::XChartDocument >& rxChartDoc,
76  const ChartSpaceModel& rChartSpace );
78 
80  void setMaxSeriesIndex( sal_Int32 nMaxSeriesIdx );
82  sal_Int32 getMaxSeriesIndex() const;
83 
86  PropertySet& rPropSet,
87  const ModelRef< Shape >& rxShapeProp,
88  ObjectType eObjType,
89  sal_Int32 nSeriesIdx = -1 );
90 
93  PropertySet& rPropSet,
94  const ModelRef< Shape >& rxShapeProp,
95  const PictureOptionsModel& rPicOptions,
96  ObjectType eObjType,
97  sal_Int32 nSeriesIdx = -1 );
98 
101  PropertySet& rPropSet,
102  const ModelRef< TextBody >& rxTextProp,
103  ObjectType eObjType );
104 
106  void convertFormatting(
107  PropertySet& rPropSet,
108  const ModelRef< Shape >& rxShapeProp,
109  const ModelRef< TextBody >& rxTextProp,
110  ObjectType eObjType );
111 
114  PropertySet& rPropSet,
115  const TextCharacterProperties& rTextProps,
116  ObjectType eObjType );
117 
119  static void convertTextRotation(
120  PropertySet& rPropSet,
121  const ModelRef< TextBody >& rxTextProp,
122  bool bSupportsStacked, sal_Int32 nDefaultRotation = 0);
123 
125  static void convertTextWrap(
126  PropertySet& rPropSet,
127  const ModelRef< TextBody >& rxTextProp);
128 
130  void convertNumberFormat(
131  PropertySet& rPropSet,
132  const NumberFormat& rNumberFormat,
133  bool bAxis,
134  bool bShowPercent = false );
135 
138  PropertySet& rPropSet,
139  ObjectType eObjType,
140  sal_Int32 nSeriesIdx );
141 
143  static bool isAutomaticFill( const ModelRef< Shape >& rxShapeProp );
144 
145 private:
146  std::shared_ptr< ObjectFormatterData > mxData;
147 };
148 
149 } // namespace oox::drawingml::chart
150 
151 #endif
152 
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Plot area containing axes and data series in 2D charts.
void convertTextFormatting(PropertySet &rPropSet, const ModelRef< TextBody > &rxTextProp, ObjectType eObjType)
Sets text formatting properties to the passed property set.
void convertAutomaticFill(PropertySet &rPropSet, ObjectType eObjType, sal_Int32 nSeriesIdx)
Sets automatic fill properties to the passed property set.
void setMaxSeriesIndex(sal_Int32 nMaxSeriesIdx)
Sets the maximum series index used for color cycling/fading.
static bool isAutomaticFill(const ModelRef< Shape > &rxShapeProp)
Returns true, if the passed shape properties have automatic fill mode.
Data series error indicator line.
exports com.sun.star. chart2
ObjectType
Enumerates different object types for specific automatic formatting behaviour.
static void convertTextWrap(PropertySet &rPropSet, const ModelRef< TextBody > &rxTextProp)
Sets text wrap properties to the passed property set.
std::shared_ptr< ObjectFormatterData > mxData
void convertFrameFormatting(PropertySet &rPropSet, const ModelRef< Shape > &rxShapeProp, ObjectType eObjType, sal_Int32 nSeriesIdx=-1)
Sets frame formatting properties to the passed property set.
Plot area containing axes and data series in 3D charts.
void convertFormatting(PropertySet &rPropSet, const ModelRef< Shape > &rxShapeProp, const ModelRef< TextBody > &rxTextProp, ObjectType eObjType)
Sets frame/text formatting properties to the passed property set.
void convertNumberFormat(PropertySet &rPropSet, const NumberFormat &rNumberFormat, bool bAxis, bool bShowPercent=false)
Sets number format properties to the passed property set.
Linear series in 2D line/radarline/scatter charts.
A wrapper for a UNO property set.
Definition: propertyset.hxx:57
Drop lines between data points and X axis.
static void convertTextRotation(PropertySet &rPropSet, const ModelRef< TextBody > &rxTextProp, bool bSupportsStacked, sal_Int32 nDefaultRotation=0)
Sets text rotation properties to the passed property set.
ObjectFormatter(const ::oox::core::XmlFilterBase &rFilter, const css::uno::Reference< css::chart2::XChartDocument > &rxChartDoc, const ChartSpaceModel &rChartSpace)
sal_Int32 getMaxSeriesIndex() const
Returns the current maximum series index used for color cycling/fading.
Leader lines between pie slice and data label.
Filled series in 2D bar/area/radararea/bubble/pie/surface charts.
Background and side wall in 3D charts.
High/low lines in line/stock charts.