1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ChartItemPool.cxx,v $
10 * $Revision: 1.9.42.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_chart2.hxx"
34 #include "ChartItemPool.hxx"
37 #include "chartview/ChartSfxItemIds.hxx"
38 #include <svx/chrtitem.hxx>
39 #include <svtools/intitem.hxx>
40 #include <svx/brshitem.hxx>
41 #include <svx/sizeitem.hxx>
42 // header for class SfxStringItem
43 #include <svtools/stritem.hxx>
45 #include <svtools/ilstitem.hxx>
46 #define _SVSTDARR_ULONGS
47 #include <svtools/svstdarr.hxx>
52 ChartItemPool::ChartItemPool():
53 SfxItemPool( String( RTL_CONSTASCII_USTRINGPARAM( "ChartItemPool" )), SCHATTR_START
, SCHATTR_END
, NULL
, NULL
)
55 // OSL_TRACE( "SCH: CTOR: ChartItemPool" );
56 /**************************************************************************
58 **************************************************************************/
59 ppPoolDefaults
= new SfxPoolItem
*[SCHATTR_END
- SCHATTR_START
+ 1];
61 ppPoolDefaults
[SCHATTR_DATADESCR_SHOW_NUMBER
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_NUMBER
);
62 ppPoolDefaults
[SCHATTR_DATADESCR_SHOW_PERCENTAGE
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_PERCENTAGE
);
63 ppPoolDefaults
[SCHATTR_DATADESCR_SHOW_CATEGORY
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_CATEGORY
);
64 ppPoolDefaults
[SCHATTR_DATADESCR_SHOW_SYMBOL
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL
);
65 ppPoolDefaults
[SCHATTR_DATADESCR_SEPARATOR
- SCHATTR_START
] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR
,C2U(" "));
66 ppPoolDefaults
[SCHATTR_DATADESCR_PLACEMENT
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT
,0);
68 ppPoolDefaults
[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS
- SCHATTR_START
] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS
,aTmp
);
69 ppPoolDefaults
[SCHATTR_DATADESCR_NO_PERCENTVALUE
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE
);
71 ppPoolDefaults
[SCHATTR_LEGEND_POS
- SCHATTR_START
] = new SvxChartLegendPosItem( CHLEGEND_RIGHT
, SCHATTR_LEGEND_POS
);
72 // ppPoolDefaults[SCHATTR_TEXT_ORIENT - SCHATTR_START] = new SvxChartTextOrientItem;
73 ppPoolDefaults
[SCHATTR_TEXT_STACKED
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_TEXT_STACKED
,FALSE
);
74 ppPoolDefaults
[SCHATTR_TEXT_ORDER
- SCHATTR_START
] = new SvxChartTextOrderItem(CHTXTORDER_SIDEBYSIDE
, SCHATTR_TEXT_ORDER
);
76 ppPoolDefaults
[SCHATTR_Y_AXIS_AUTO_MIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Y_AXIS_AUTO_MIN
);
77 ppPoolDefaults
[SCHATTR_Y_AXIS_MIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Y_AXIS_MIN
);
78 ppPoolDefaults
[SCHATTR_Y_AXIS_AUTO_MAX
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Y_AXIS_AUTO_MAX
);
79 ppPoolDefaults
[SCHATTR_Y_AXIS_MAX
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Y_AXIS_MAX
);
80 ppPoolDefaults
[SCHATTR_Y_AXIS_AUTO_STEP_MAIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Y_AXIS_AUTO_STEP_MAIN
);
81 ppPoolDefaults
[SCHATTR_Y_AXIS_STEP_MAIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Y_AXIS_STEP_MAIN
);
82 ppPoolDefaults
[SCHATTR_Y_AXIS_AUTO_STEP_HELP
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Y_AXIS_AUTO_STEP_HELP
);
83 ppPoolDefaults
[SCHATTR_Y_AXIS_STEP_HELP
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Y_AXIS_STEP_HELP
);
84 ppPoolDefaults
[SCHATTR_Y_AXIS_LOGARITHM
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Y_AXIS_LOGARITHM
);
85 ppPoolDefaults
[SCHATTR_Y_AXIS_AUTO_ORIGIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Y_AXIS_AUTO_ORIGIN
);
86 ppPoolDefaults
[SCHATTR_Y_AXIS_ORIGIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Y_AXIS_ORIGIN
);
88 ppPoolDefaults
[SCHATTR_X_AXIS_AUTO_MIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_X_AXIS_AUTO_MIN
);
89 ppPoolDefaults
[SCHATTR_X_AXIS_MIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_X_AXIS_MIN
);
90 ppPoolDefaults
[SCHATTR_X_AXIS_AUTO_MAX
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_X_AXIS_AUTO_MAX
);
91 ppPoolDefaults
[SCHATTR_X_AXIS_MAX
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_X_AXIS_MAX
);
92 ppPoolDefaults
[SCHATTR_X_AXIS_AUTO_STEP_MAIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_X_AXIS_AUTO_STEP_MAIN
);
93 ppPoolDefaults
[SCHATTR_X_AXIS_STEP_MAIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_X_AXIS_STEP_MAIN
);
94 ppPoolDefaults
[SCHATTR_X_AXIS_AUTO_STEP_HELP
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_X_AXIS_AUTO_STEP_HELP
);
95 ppPoolDefaults
[SCHATTR_X_AXIS_STEP_HELP
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_X_AXIS_STEP_HELP
);
96 ppPoolDefaults
[SCHATTR_X_AXIS_LOGARITHM
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_X_AXIS_LOGARITHM
);
97 ppPoolDefaults
[SCHATTR_X_AXIS_AUTO_ORIGIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_X_AXIS_AUTO_ORIGIN
);
98 ppPoolDefaults
[SCHATTR_X_AXIS_ORIGIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_X_AXIS_ORIGIN
);
100 ppPoolDefaults
[SCHATTR_Z_AXIS_AUTO_MIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Z_AXIS_AUTO_MIN
);
101 ppPoolDefaults
[SCHATTR_Z_AXIS_MIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Z_AXIS_MIN
);
102 ppPoolDefaults
[SCHATTR_Z_AXIS_AUTO_MAX
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Z_AXIS_AUTO_MAX
);
103 ppPoolDefaults
[SCHATTR_Z_AXIS_MAX
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Z_AXIS_MAX
);
104 ppPoolDefaults
[SCHATTR_Z_AXIS_AUTO_STEP_MAIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Z_AXIS_AUTO_STEP_MAIN
);
105 ppPoolDefaults
[SCHATTR_Z_AXIS_STEP_MAIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Z_AXIS_STEP_MAIN
);
106 ppPoolDefaults
[SCHATTR_Z_AXIS_AUTO_STEP_HELP
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Z_AXIS_AUTO_STEP_HELP
);
107 ppPoolDefaults
[SCHATTR_Z_AXIS_STEP_HELP
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Z_AXIS_STEP_HELP
);
108 ppPoolDefaults
[SCHATTR_Z_AXIS_LOGARITHM
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Z_AXIS_LOGARITHM
);
109 ppPoolDefaults
[SCHATTR_Z_AXIS_AUTO_ORIGIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_Z_AXIS_AUTO_ORIGIN
);
110 ppPoolDefaults
[SCHATTR_Z_AXIS_ORIGIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_Z_AXIS_ORIGIN
);
112 ppPoolDefaults
[SCHATTR_AXISTYPE
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXISTYPE
, CHART_AXIS_X
);
113 ppPoolDefaults
[SCHATTR_PERCENT_NUMBERFORMAT_VALUE
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_PERCENT_NUMBERFORMAT_VALUE
, 0);
114 ppPoolDefaults
[SCHATTR_PERCENT_NUMBERFORMAT_SOURCE
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE
);
116 ppPoolDefaults
[SCHATTR_STAT_AVERAGE
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STAT_AVERAGE
);
117 ppPoolDefaults
[SCHATTR_STAT_KIND_ERROR
- SCHATTR_START
] = new SvxChartKindErrorItem (CHERROR_NONE
, SCHATTR_STAT_KIND_ERROR
);
118 ppPoolDefaults
[SCHATTR_STAT_PERCENT
- SCHATTR_START
] = new SvxDoubleItem (0.0, SCHATTR_STAT_PERCENT
);
119 ppPoolDefaults
[SCHATTR_STAT_BIGERROR
- SCHATTR_START
] = new SvxDoubleItem (0.0, SCHATTR_STAT_BIGERROR
);
120 ppPoolDefaults
[SCHATTR_STAT_CONSTPLUS
- SCHATTR_START
] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTPLUS
);
121 ppPoolDefaults
[SCHATTR_STAT_CONSTMINUS
- SCHATTR_START
] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTMINUS
);
122 ppPoolDefaults
[SCHATTR_STAT_INDICATE
- SCHATTR_START
] = new SvxChartIndicateItem (CHINDICATE_NONE
, SCHATTR_STAT_INDICATE
);
123 ppPoolDefaults
[SCHATTR_STAT_RANGE_POS
- SCHATTR_START
] = new SfxStringItem (SCHATTR_STAT_RANGE_POS
, String());
124 ppPoolDefaults
[SCHATTR_STAT_RANGE_NEG
- SCHATTR_START
] = new SfxStringItem (SCHATTR_STAT_RANGE_NEG
, String());
126 ppPoolDefaults
[SCHATTR_TEXT_DEGREES
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_TEXT_DEGREES
, 0);
127 ppPoolDefaults
[SCHATTR_TEXT_OVERLAP
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_TEXT_OVERLAP
,FALSE
);
129 ppPoolDefaults
[SCHATTR_STYLE_DEEP
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STYLE_DEEP
, 0);
130 ppPoolDefaults
[SCHATTR_STYLE_3D
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STYLE_3D
, 0);
131 ppPoolDefaults
[SCHATTR_STYLE_VERTICAL
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STYLE_VERTICAL
, 0);
132 ppPoolDefaults
[SCHATTR_STYLE_BASETYPE
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_STYLE_BASETYPE
, 0);
133 ppPoolDefaults
[SCHATTR_STYLE_LINES
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STYLE_LINES
, 0);
134 ppPoolDefaults
[SCHATTR_STYLE_PERCENT
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STYLE_PERCENT
, 0);
135 ppPoolDefaults
[SCHATTR_STYLE_STACKED
- SCHATTR_START
] = new SfxBoolItem (SCHATTR_STYLE_STACKED
, 0);
136 ppPoolDefaults
[SCHATTR_STYLE_SPLINES
- SCHATTR_START
] = new SfxInt32Item (SCHATTR_STYLE_SPLINES
, 0); //Bug: war Bool! ->Fileformat testen (betrifft nur 5er)
137 ppPoolDefaults
[SCHATTR_STYLE_SYMBOL
- SCHATTR_START
] = new SfxInt32Item (SCHATTR_STYLE_SYMBOL
, 0);
138 ppPoolDefaults
[SCHATTR_STYLE_SHAPE
- SCHATTR_START
] = new SfxInt32Item (SCHATTR_STYLE_SHAPE
, 0);
140 ppPoolDefaults
[SCHATTR_AXIS
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS
,2); //2 = Y-Achse!!!
142 ppPoolDefaults
[SCHATTR_AXIS_AUTO_MIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MIN
);
143 ppPoolDefaults
[SCHATTR_AXIS_MIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MIN
);
144 ppPoolDefaults
[SCHATTR_AXIS_AUTO_MAX
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MAX
);
145 ppPoolDefaults
[SCHATTR_AXIS_MAX
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MAX
);
146 ppPoolDefaults
[SCHATTR_AXIS_AUTO_STEP_MAIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN
);
147 ppPoolDefaults
[SCHATTR_AXIS_STEP_MAIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_AXIS_STEP_MAIN
);
148 ppPoolDefaults
[SCHATTR_AXIS_AUTO_STEP_HELP
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP
);
149 // ppPoolDefaults[SCHATTR_AXIS_STEP_HELP - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_STEP_HELP);
150 // type changed from double to sal_Int32
151 ppPoolDefaults
[SCHATTR_AXIS_STEP_HELP
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_STEP_HELP
,0);
152 ppPoolDefaults
[SCHATTR_AXIS_LOGARITHM
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_LOGARITHM
);
153 ppPoolDefaults
[SCHATTR_AXIS_AUTO_ORIGIN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN
);
154 ppPoolDefaults
[SCHATTR_AXIS_ORIGIN
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_AXIS_ORIGIN
);
156 ppPoolDefaults
[SCHATTR_AXIS_TICKS
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_TICKS
,CHAXIS_MARK_OUTER
);
157 ppPoolDefaults
[SCHATTR_AXIS_NUMFMT
- SCHATTR_START
] = new SfxUInt32Item(SCHATTR_AXIS_NUMFMT
,0);
158 ppPoolDefaults
[SCHATTR_AXIS_NUMFMTPERCENT
- SCHATTR_START
] = new SfxUInt32Item(SCHATTR_AXIS_NUMFMTPERCENT
,11);
159 ppPoolDefaults
[SCHATTR_AXIS_SHOWAXIS
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_SHOWAXIS
,0);
160 ppPoolDefaults
[SCHATTR_AXIS_SHOWDESCR
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_SHOWDESCR
,0);
161 ppPoolDefaults
[SCHATTR_AXIS_SHOWMAINGRID
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_SHOWMAINGRID
,0);
162 ppPoolDefaults
[SCHATTR_AXIS_SHOWHELPGRID
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_SHOWHELPGRID
,0);
163 ppPoolDefaults
[SCHATTR_AXIS_TOPDOWN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_TOPDOWN
,0);
164 ppPoolDefaults
[SCHATTR_AXIS_HELPTICKS
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_HELPTICKS
,0);
165 ppPoolDefaults
[SCHATTR_AXIS_REVERSE
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_AXIS_REVERSE
,0);
167 ppPoolDefaults
[SCHATTR_AXIS_POSITION
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_POSITION
,0);
168 ppPoolDefaults
[SCHATTR_AXIS_POSITION_VALUE
- SCHATTR_START
] = new SvxDoubleItem(0.0, SCHATTR_AXIS_POSITION_VALUE
);
169 ppPoolDefaults
[SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT
- SCHATTR_START
] = new SfxUInt32Item(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT
,0);
170 ppPoolDefaults
[SCHATTR_AXIS_LABEL_POSITION
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_LABEL_POSITION
,0);
171 ppPoolDefaults
[SCHATTR_AXIS_MARK_POSITION
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_MARK_POSITION
,0);
173 ppPoolDefaults
[SCHATTR_SYMBOL_BRUSH
- SCHATTR_START
] = new SvxBrushItem(SCHATTR_SYMBOL_BRUSH
);
174 ppPoolDefaults
[SCHATTR_STOCK_VOLUME
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_STOCK_VOLUME
,0);
175 ppPoolDefaults
[SCHATTR_STOCK_UPDOWN
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_STOCK_UPDOWN
,0);
176 ppPoolDefaults
[SCHATTR_SYMBOL_SIZE
- SCHATTR_START
] = new SvxSizeItem(SCHATTR_SYMBOL_SIZE
,Size(0,0));
179 ppPoolDefaults
[SCHATTR_BAR_OVERLAP
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_BAR_OVERLAP
,0);
180 ppPoolDefaults
[SCHATTR_BAR_GAPWIDTH
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_BAR_GAPWIDTH
,0);
181 ppPoolDefaults
[SCHATTR_BAR_CONNECT
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_BAR_CONNECT
, FALSE
);
182 ppPoolDefaults
[SCHATTR_NUM_OF_LINES_FOR_BAR
- SCHATTR_START
] = new SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR
, 0 );
183 ppPoolDefaults
[SCHATTR_SPLINE_ORDER
- SCHATTR_START
] = new SfxInt32Item( SCHATTR_SPLINE_ORDER
, 3 );
184 ppPoolDefaults
[SCHATTR_SPLINE_RESOLUTION
- SCHATTR_START
] = new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION
, 20 );
185 ppPoolDefaults
[SCHATTR_DIAGRAM_STYLE
- SCHATTR_START
] = new SvxChartStyleItem( CHSTYLE_2D_COLUMN
, SCHATTR_DIAGRAM_STYLE
);
186 ppPoolDefaults
[SCHATTR_TEXTBREAK
- SCHATTR_START
] = new SfxBoolItem( SCHATTR_TEXTBREAK
, FALSE
);
187 ppPoolDefaults
[SCHATTR_GROUP_BARS_PER_AXIS
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS
, FALSE
);
188 ppPoolDefaults
[SCHATTR_INCLUDE_HIDDEN_CELLS
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS
, TRUE
);
189 ppPoolDefaults
[SCHATTR_STARTING_ANGLE
- SCHATTR_START
] = new SfxInt32Item( SCHATTR_STARTING_ANGLE
, 90 );
190 ppPoolDefaults
[SCHATTR_CLOCKWISE
- SCHATTR_START
] = new SfxBoolItem( SCHATTR_CLOCKWISE
, FALSE
);
192 ppPoolDefaults
[SCHATTR_MISSING_VALUE_TREATMENT
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT
, 0);
193 ppPoolDefaults
[SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS
- SCHATTR_START
] = new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS
,aTmp
);
195 ppPoolDefaults
[SCHATTR_AXIS_FOR_ALL_SERIES
- SCHATTR_START
] = new SfxInt32Item(SCHATTR_AXIS_FOR_ALL_SERIES
, 0);
196 ppPoolDefaults
[SCHATTR_REGRESSION_TYPE
- SCHATTR_START
] = new SvxChartRegressItem (CHREGRESS_NONE
, SCHATTR_REGRESSION_TYPE
);
197 ppPoolDefaults
[SCHATTR_REGRESSION_SHOW_EQUATION
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_EQUATION
, 0);
198 ppPoolDefaults
[SCHATTR_REGRESSION_SHOW_COEFF
- SCHATTR_START
] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_COEFF
, 0);
200 /**************************************************************************
202 **************************************************************************/
203 pItemInfos
= new SfxItemInfo
[SCHATTR_END
- SCHATTR_START
+ 1];
206 for( i
= SCHATTR_START
; i
<= SCHATTR_END
; i
++ )
208 pItemInfos
[i
- SCHATTR_START
]._nSID
= 0;
209 pItemInfos
[i
- SCHATTR_START
]._nFlags
= SFX_ITEM_POOLABLE
;
212 // slot ids differing from which ids
213 pItemInfos
[SCHATTR_SYMBOL_BRUSH
- SCHATTR_START
]._nSID
= SID_ATTR_BRUSH
;
214 pItemInfos
[SCHATTR_STYLE_SYMBOL
- SCHATTR_START
]._nSID
= SID_ATTR_SYMBOLTYPE
;
215 pItemInfos
[SCHATTR_SYMBOL_SIZE
- SCHATTR_START
]._nSID
= SID_ATTR_SYMBOLSIZE
;
217 SetDefaults(ppPoolDefaults
);
218 SetItemInfos(pItemInfos
);
221 ChartItemPool::ChartItemPool(const ChartItemPool
& rPool
):
224 // OSL_TRACE( "SCH: CTOR: ChartItemPool" );
227 ChartItemPool::~ChartItemPool()
229 // OSL_TRACE( "SCH: DTOR: ChartItemPool" );
234 const USHORT nMax
= SCHATTR_END
- SCHATTR_START
+ 1;
235 for( USHORT i
=0; i
<nMax
; ++i
)
237 SetRefCount(*ppPoolDefaults
[i
], 0);
238 delete ppPoolDefaults
[i
];
241 delete[] ppPoolDefaults
;
244 SfxItemPool
* ChartItemPool::Clone() const
246 return new ChartItemPool(*this);
249 SfxMapUnit
ChartItemPool::GetMetric(USHORT
/* nWhich */) const
251 return SFX_MAPUNIT_100TH_MM
;
255 SfxItemPool
* ChartItemPool::CreateChartItemPool()
257 return new ChartItemPool();