diff options
29 files changed, 645 insertions, 635 deletions
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index acf180e0412f..09e8f5edd72d 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -43,123 +43,124 @@ ChartItemPool::ChartItemPool(): /************************************************************************** * PoolDefaults **************************************************************************/ - SfxPoolItem** ppPoolDefaults = new SfxPoolItem*[SCHATTR_END - SCHATTR_START + 1]; - ppPoolDefaults[SCHATTR_DATADESCR_SHOW_NUMBER - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_NUMBER); - ppPoolDefaults[SCHATTR_DATADESCR_SHOW_PERCENTAGE- SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_PERCENTAGE); - ppPoolDefaults[SCHATTR_DATADESCR_SHOW_CATEGORY - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_CATEGORY); - ppPoolDefaults[SCHATTR_DATADESCR_SHOW_SYMBOL - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL); - ppPoolDefaults[SCHATTR_DATADESCR_WRAP_TEXT - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_WRAP_TEXT); - ppPoolDefaults[SCHATTR_DATADESCR_SEPARATOR - SCHATTR_START] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR," "); - ppPoolDefaults[SCHATTR_DATADESCR_PLACEMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT,0); - ppPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, ::std::vector < sal_Int32 >() ); - ppPoolDefaults[SCHATTR_DATADESCR_NO_PERCENTVALUE - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE); - ppPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_VALUE - SCHATTR_START] = new SfxUInt32Item(SCHATTR_PERCENT_NUMBERFORMAT_VALUE, 0); - ppPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_SOURCE - SCHATTR_START] = new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE); + std::vector<SfxPoolItem*>* ppPoolDefaults = new std::vector<SfxPoolItem*>(SCHATTR_END - SCHATTR_START + 1); + std::vector<SfxPoolItem*>& rPoolDefaults = *ppPoolDefaults; + rPoolDefaults[SCHATTR_DATADESCR_SHOW_NUMBER - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_NUMBER); + rPoolDefaults[SCHATTR_DATADESCR_SHOW_PERCENTAGE- SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_PERCENTAGE); + rPoolDefaults[SCHATTR_DATADESCR_SHOW_CATEGORY - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_CATEGORY); + rPoolDefaults[SCHATTR_DATADESCR_SHOW_SYMBOL - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL); + rPoolDefaults[SCHATTR_DATADESCR_WRAP_TEXT - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_WRAP_TEXT); + rPoolDefaults[SCHATTR_DATADESCR_SEPARATOR - SCHATTR_START] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR," "); + rPoolDefaults[SCHATTR_DATADESCR_PLACEMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT,0); + rPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, ::std::vector < sal_Int32 >() ); + rPoolDefaults[SCHATTR_DATADESCR_NO_PERCENTVALUE - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE); + rPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_VALUE - SCHATTR_START] = new SfxUInt32Item(SCHATTR_PERCENT_NUMBERFORMAT_VALUE, 0); + rPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_SOURCE - SCHATTR_START] = new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE); //legend - ppPoolDefaults[SCHATTR_LEGEND_POS - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, css::chart2::LegendPosition_LINE_END ); - ppPoolDefaults[SCHATTR_LEGEND_SHOW - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, true); + rPoolDefaults[SCHATTR_LEGEND_POS - SCHATTR_START] = new SfxInt32Item(SCHATTR_LEGEND_POS, css::chart2::LegendPosition_LINE_END ); + rPoolDefaults[SCHATTR_LEGEND_SHOW - SCHATTR_START] = new SfxBoolItem(SCHATTR_LEGEND_SHOW, true); //text - ppPoolDefaults[SCHATTR_TEXT_DEGREES - SCHATTR_START] = new SfxInt32Item(SCHATTR_TEXT_DEGREES, 0); - ppPoolDefaults[SCHATTR_TEXT_STACKED - SCHATTR_START] = new SfxBoolItem(SCHATTR_TEXT_STACKED,false); + rPoolDefaults[SCHATTR_TEXT_DEGREES - SCHATTR_START] = new SfxInt32Item(SCHATTR_TEXT_DEGREES, 0); + rPoolDefaults[SCHATTR_TEXT_STACKED - SCHATTR_START] = new SfxBoolItem(SCHATTR_TEXT_STACKED,false); //statistic - ppPoolDefaults[SCHATTR_STAT_AVERAGE - SCHATTR_START] = new SfxBoolItem (SCHATTR_STAT_AVERAGE); - ppPoolDefaults[SCHATTR_STAT_KIND_ERROR - SCHATTR_START] = new SvxChartKindErrorItem (SvxChartKindError::NONE, SCHATTR_STAT_KIND_ERROR); - ppPoolDefaults[SCHATTR_STAT_PERCENT - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_PERCENT); - ppPoolDefaults[SCHATTR_STAT_BIGERROR - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_BIGERROR); - ppPoolDefaults[SCHATTR_STAT_CONSTPLUS - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTPLUS); - ppPoolDefaults[SCHATTR_STAT_CONSTMINUS - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTMINUS); - ppPoolDefaults[SCHATTR_STAT_INDICATE - SCHATTR_START] = new SvxChartIndicateItem (SvxChartIndicate::NONE, SCHATTR_STAT_INDICATE); - ppPoolDefaults[SCHATTR_STAT_RANGE_POS - SCHATTR_START] = new SfxStringItem (SCHATTR_STAT_RANGE_POS, OUString()); - ppPoolDefaults[SCHATTR_STAT_RANGE_NEG - SCHATTR_START] = new SfxStringItem (SCHATTR_STAT_RANGE_NEG, OUString()); - ppPoolDefaults[SCHATTR_STAT_ERRORBAR_TYPE - SCHATTR_START] = new SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE, true); - - ppPoolDefaults[SCHATTR_STYLE_DEEP - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_DEEP, false); - ppPoolDefaults[SCHATTR_STYLE_3D - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_3D, false); - ppPoolDefaults[SCHATTR_STYLE_VERTICAL - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_VERTICAL, false); - ppPoolDefaults[SCHATTR_STYLE_BASETYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_STYLE_BASETYPE, 0); - ppPoolDefaults[SCHATTR_STYLE_LINES - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_LINES, false); - ppPoolDefaults[SCHATTR_STYLE_PERCENT - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_PERCENT, false); - ppPoolDefaults[SCHATTR_STYLE_STACKED - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_STACKED, false); - ppPoolDefaults[SCHATTR_STYLE_SPLINES - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SPLINES, 0); //Bug: was Bool! test ->Fileformat (touches only 5's) - ppPoolDefaults[SCHATTR_STYLE_SYMBOL - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SYMBOL, 0); - ppPoolDefaults[SCHATTR_STYLE_SHAPE - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SHAPE, 0); - - ppPoolDefaults[SCHATTR_AXIS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS,2); //2 = Y-Axis!!! + rPoolDefaults[SCHATTR_STAT_AVERAGE - SCHATTR_START] = new SfxBoolItem (SCHATTR_STAT_AVERAGE); + rPoolDefaults[SCHATTR_STAT_KIND_ERROR - SCHATTR_START] = new SvxChartKindErrorItem (SvxChartKindError::NONE, SCHATTR_STAT_KIND_ERROR); + rPoolDefaults[SCHATTR_STAT_PERCENT - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_PERCENT); + rPoolDefaults[SCHATTR_STAT_BIGERROR - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_BIGERROR); + rPoolDefaults[SCHATTR_STAT_CONSTPLUS - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTPLUS); + rPoolDefaults[SCHATTR_STAT_CONSTMINUS - SCHATTR_START] = new SvxDoubleItem (0.0, SCHATTR_STAT_CONSTMINUS); + rPoolDefaults[SCHATTR_STAT_INDICATE - SCHATTR_START] = new SvxChartIndicateItem (SvxChartIndicate::NONE, SCHATTR_STAT_INDICATE); + rPoolDefaults[SCHATTR_STAT_RANGE_POS - SCHATTR_START] = new SfxStringItem (SCHATTR_STAT_RANGE_POS, OUString()); + rPoolDefaults[SCHATTR_STAT_RANGE_NEG - SCHATTR_START] = new SfxStringItem (SCHATTR_STAT_RANGE_NEG, OUString()); + rPoolDefaults[SCHATTR_STAT_ERRORBAR_TYPE - SCHATTR_START] = new SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE, true); + + rPoolDefaults[SCHATTR_STYLE_DEEP - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_DEEP, false); + rPoolDefaults[SCHATTR_STYLE_3D - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_3D, false); + rPoolDefaults[SCHATTR_STYLE_VERTICAL - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_VERTICAL, false); + rPoolDefaults[SCHATTR_STYLE_BASETYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_STYLE_BASETYPE, 0); + rPoolDefaults[SCHATTR_STYLE_LINES - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_LINES, false); + rPoolDefaults[SCHATTR_STYLE_PERCENT - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_PERCENT, false); + rPoolDefaults[SCHATTR_STYLE_STACKED - SCHATTR_START] = new SfxBoolItem (SCHATTR_STYLE_STACKED, false); + rPoolDefaults[SCHATTR_STYLE_SPLINES - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SPLINES, 0); //Bug: was Bool! test ->Fileformat (touches only 5's) + rPoolDefaults[SCHATTR_STYLE_SYMBOL - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SYMBOL, 0); + rPoolDefaults[SCHATTR_STYLE_SHAPE - SCHATTR_START] = new SfxInt32Item (SCHATTR_STYLE_SHAPE, 0); + + rPoolDefaults[SCHATTR_AXIS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS,2); //2 = Y-Axis!!! //axis scale - ppPoolDefaults[SCHATTR_AXISTYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXISTYPE, CHART_AXIS_REALNUMBER); - ppPoolDefaults[SCHATTR_AXIS_REVERSE - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_REVERSE,false); - ppPoolDefaults[SCHATTR_AXIS_AUTO_MIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MIN); - ppPoolDefaults[SCHATTR_AXIS_MIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MIN); - ppPoolDefaults[SCHATTR_AXIS_AUTO_MAX - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MAX); - ppPoolDefaults[SCHATTR_AXIS_MAX - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MAX); - ppPoolDefaults[SCHATTR_AXIS_AUTO_STEP_MAIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN); - ppPoolDefaults[SCHATTR_AXIS_STEP_MAIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_STEP_MAIN); - ppPoolDefaults[SCHATTR_AXIS_MAIN_TIME_UNIT - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_MAIN_TIME_UNIT,2); - ppPoolDefaults[SCHATTR_AXIS_AUTO_STEP_HELP - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP); - ppPoolDefaults[SCHATTR_AXIS_STEP_HELP - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_STEP_HELP,0); - ppPoolDefaults[SCHATTR_AXIS_HELP_TIME_UNIT - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_HELP_TIME_UNIT,2); - ppPoolDefaults[SCHATTR_AXIS_AUTO_TIME_RESOLUTION - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION); - ppPoolDefaults[SCHATTR_AXIS_TIME_RESOLUTION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_TIME_RESOLUTION,2); - ppPoolDefaults[SCHATTR_AXIS_LOGARITHM - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LOGARITHM); - ppPoolDefaults[SCHATTR_AXIS_AUTO_DATEAXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS); - ppPoolDefaults[SCHATTR_AXIS_ALLOW_DATEAXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_ALLOW_DATEAXIS); - ppPoolDefaults[SCHATTR_AXIS_AUTO_ORIGIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN); - ppPoolDefaults[SCHATTR_AXIS_ORIGIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_ORIGIN); + rPoolDefaults[SCHATTR_AXISTYPE - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXISTYPE, CHART_AXIS_REALNUMBER); + rPoolDefaults[SCHATTR_AXIS_REVERSE - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_REVERSE,false); + rPoolDefaults[SCHATTR_AXIS_AUTO_MIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MIN); + rPoolDefaults[SCHATTR_AXIS_MIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MIN); + rPoolDefaults[SCHATTR_AXIS_AUTO_MAX - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_MAX); + rPoolDefaults[SCHATTR_AXIS_MAX - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_MAX); + rPoolDefaults[SCHATTR_AXIS_AUTO_STEP_MAIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN); + rPoolDefaults[SCHATTR_AXIS_STEP_MAIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_STEP_MAIN); + rPoolDefaults[SCHATTR_AXIS_MAIN_TIME_UNIT - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_MAIN_TIME_UNIT,2); + rPoolDefaults[SCHATTR_AXIS_AUTO_STEP_HELP - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP); + rPoolDefaults[SCHATTR_AXIS_STEP_HELP - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_STEP_HELP,0); + rPoolDefaults[SCHATTR_AXIS_HELP_TIME_UNIT - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_HELP_TIME_UNIT,2); + rPoolDefaults[SCHATTR_AXIS_AUTO_TIME_RESOLUTION - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION); + rPoolDefaults[SCHATTR_AXIS_TIME_RESOLUTION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_TIME_RESOLUTION,2); + rPoolDefaults[SCHATTR_AXIS_LOGARITHM - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LOGARITHM); + rPoolDefaults[SCHATTR_AXIS_AUTO_DATEAXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS); + rPoolDefaults[SCHATTR_AXIS_ALLOW_DATEAXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_ALLOW_DATEAXIS); + rPoolDefaults[SCHATTR_AXIS_AUTO_ORIGIN - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN); + rPoolDefaults[SCHATTR_AXIS_ORIGIN - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_ORIGIN); //axis position - ppPoolDefaults[SCHATTR_AXIS_TICKS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_TICKS,CHAXIS_MARK_OUTER); - ppPoolDefaults[SCHATTR_AXIS_HELPTICKS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_HELPTICKS,0); - ppPoolDefaults[SCHATTR_AXIS_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_POSITION,0); - ppPoolDefaults[SCHATTR_AXIS_POSITION_VALUE - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_POSITION_VALUE); - ppPoolDefaults[SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT - SCHATTR_START] = new SfxUInt32Item(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT,0); - ppPoolDefaults[SCHATTR_AXIS_LABEL_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_LABEL_POSITION,0); - ppPoolDefaults[SCHATTR_AXIS_MARK_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_MARK_POSITION,0); + rPoolDefaults[SCHATTR_AXIS_TICKS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_TICKS,CHAXIS_MARK_OUTER); + rPoolDefaults[SCHATTR_AXIS_HELPTICKS - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_HELPTICKS,0); + rPoolDefaults[SCHATTR_AXIS_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_POSITION,0); + rPoolDefaults[SCHATTR_AXIS_POSITION_VALUE - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_AXIS_POSITION_VALUE); + rPoolDefaults[SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT - SCHATTR_START] = new SfxUInt32Item(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT,0); + rPoolDefaults[SCHATTR_AXIS_LABEL_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_LABEL_POSITION,0); + rPoolDefaults[SCHATTR_AXIS_MARK_POSITION - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_MARK_POSITION,0); //axis label - ppPoolDefaults[SCHATTR_AXIS_SHOWDESCR - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWDESCR,false); - ppPoolDefaults[SCHATTR_AXIS_LABEL_ORDER - SCHATTR_START] = new SvxChartTextOrderItem(SvxChartTextOrder::SideBySide, SCHATTR_AXIS_LABEL_ORDER); - ppPoolDefaults[SCHATTR_AXIS_LABEL_OVERLAP - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LABEL_OVERLAP,false); - ppPoolDefaults[SCHATTR_AXIS_LABEL_BREAK - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LABEL_BREAK, false ); + rPoolDefaults[SCHATTR_AXIS_SHOWDESCR - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_SHOWDESCR,false); + rPoolDefaults[SCHATTR_AXIS_LABEL_ORDER - SCHATTR_START] = new SvxChartTextOrderItem(SvxChartTextOrder::SideBySide, SCHATTR_AXIS_LABEL_ORDER); + rPoolDefaults[SCHATTR_AXIS_LABEL_OVERLAP - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LABEL_OVERLAP,false); + rPoolDefaults[SCHATTR_AXIS_LABEL_BREAK - SCHATTR_START] = new SfxBoolItem(SCHATTR_AXIS_LABEL_BREAK, false ); - ppPoolDefaults[SCHATTR_SYMBOL_BRUSH - SCHATTR_START] = new SvxBrushItem(SCHATTR_SYMBOL_BRUSH); - ppPoolDefaults[SCHATTR_STOCK_VOLUME - SCHATTR_START] = new SfxBoolItem(SCHATTR_STOCK_VOLUME,false); - ppPoolDefaults[SCHATTR_STOCK_UPDOWN - SCHATTR_START] = new SfxBoolItem(SCHATTR_STOCK_UPDOWN,false); - ppPoolDefaults[SCHATTR_SYMBOL_SIZE - SCHATTR_START] = new SvxSizeItem(SCHATTR_SYMBOL_SIZE,Size(0,0)); + rPoolDefaults[SCHATTR_SYMBOL_BRUSH - SCHATTR_START] = new SvxBrushItem(SCHATTR_SYMBOL_BRUSH); + rPoolDefaults[SCHATTR_STOCK_VOLUME - SCHATTR_START] = new SfxBoolItem(SCHATTR_STOCK_VOLUME,false); + rPoolDefaults[SCHATTR_STOCK_UPDOWN - SCHATTR_START] = new SfxBoolItem(SCHATTR_STOCK_UPDOWN,false); + rPoolDefaults[SCHATTR_SYMBOL_SIZE - SCHATTR_START] = new SvxSizeItem(SCHATTR_SYMBOL_SIZE,Size(0,0)); // new for New Chart - ppPoolDefaults[SCHATTR_BAR_OVERLAP - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_OVERLAP,0); - ppPoolDefaults[SCHATTR_BAR_GAPWIDTH - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_GAPWIDTH,0); - ppPoolDefaults[SCHATTR_BAR_CONNECT - SCHATTR_START] = new SfxBoolItem(SCHATTR_BAR_CONNECT, false); - ppPoolDefaults[SCHATTR_NUM_OF_LINES_FOR_BAR - SCHATTR_START] = new SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR, 0 ); - ppPoolDefaults[SCHATTR_SPLINE_ORDER - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_ORDER, 3 ); - ppPoolDefaults[SCHATTR_SPLINE_RESOLUTION - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, 20 ); - ppPoolDefaults[SCHATTR_DIAGRAM_STYLE - SCHATTR_START] = new SvxChartStyleItem( SvxChartStyle::Column2D, SCHATTR_DIAGRAM_STYLE ); - ppPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, false); - ppPoolDefaults[SCHATTR_STARTING_ANGLE - SCHATTR_START] = new SfxInt32Item( SCHATTR_STARTING_ANGLE, 90 ); - ppPoolDefaults[SCHATTR_CLOCKWISE - SCHATTR_START] = new SfxBoolItem( SCHATTR_CLOCKWISE, false ); - - ppPoolDefaults[SCHATTR_MISSING_VALUE_TREATMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT, 0); - ppPoolDefaults[SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, ::std::vector < sal_Int32 >() ); - ppPoolDefaults[SCHATTR_INCLUDE_HIDDEN_CELLS - SCHATTR_START] = new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, true); - - ppPoolDefaults[SCHATTR_AXIS_FOR_ALL_SERIES - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_FOR_ALL_SERIES, 0); - - ppPoolDefaults[SCHATTR_REGRESSION_TYPE - SCHATTR_START] = new SvxChartRegressItem (SvxChartRegress::NONE, SCHATTR_REGRESSION_TYPE); - ppPoolDefaults[SCHATTR_REGRESSION_SHOW_EQUATION - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_EQUATION, false); - ppPoolDefaults[SCHATTR_REGRESSION_SHOW_COEFF - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_COEFF, false); - ppPoolDefaults[SCHATTR_REGRESSION_DEGREE - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_DEGREE, 2); - ppPoolDefaults[SCHATTR_REGRESSION_PERIOD - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_PERIOD, 2); - ppPoolDefaults[SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD); - ppPoolDefaults[SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD); - ppPoolDefaults[SCHATTR_REGRESSION_SET_INTERCEPT - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SET_INTERCEPT, false); - ppPoolDefaults[SCHATTR_REGRESSION_INTERCEPT_VALUE - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_INTERCEPT_VALUE); - ppPoolDefaults[SCHATTR_REGRESSION_CURVE_NAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_CURVE_NAME, OUString()); - ppPoolDefaults[SCHATTR_REGRESSION_XNAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_XNAME, OUString("x")); - ppPoolDefaults[SCHATTR_REGRESSION_YNAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_YNAME, OUString("f(x)")); + rPoolDefaults[SCHATTR_BAR_OVERLAP - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_OVERLAP,0); + rPoolDefaults[SCHATTR_BAR_GAPWIDTH - SCHATTR_START] = new SfxInt32Item(SCHATTR_BAR_GAPWIDTH,0); + rPoolDefaults[SCHATTR_BAR_CONNECT - SCHATTR_START] = new SfxBoolItem(SCHATTR_BAR_CONNECT, false); + rPoolDefaults[SCHATTR_NUM_OF_LINES_FOR_BAR - SCHATTR_START] = new SfxInt32Item( SCHATTR_NUM_OF_LINES_FOR_BAR, 0 ); + rPoolDefaults[SCHATTR_SPLINE_ORDER - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_ORDER, 3 ); + rPoolDefaults[SCHATTR_SPLINE_RESOLUTION - SCHATTR_START] = new SfxInt32Item( SCHATTR_SPLINE_RESOLUTION, 20 ); + rPoolDefaults[SCHATTR_DIAGRAM_STYLE - SCHATTR_START] = new SvxChartStyleItem( SvxChartStyle::Column2D, SCHATTR_DIAGRAM_STYLE ); + rPoolDefaults[SCHATTR_GROUP_BARS_PER_AXIS - SCHATTR_START] = new SfxBoolItem(SCHATTR_GROUP_BARS_PER_AXIS, false); + rPoolDefaults[SCHATTR_STARTING_ANGLE - SCHATTR_START] = new SfxInt32Item( SCHATTR_STARTING_ANGLE, 90 ); + rPoolDefaults[SCHATTR_CLOCKWISE - SCHATTR_START] = new SfxBoolItem( SCHATTR_CLOCKWISE, false ); + + rPoolDefaults[SCHATTR_MISSING_VALUE_TREATMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT, 0); + rPoolDefaults[SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, ::std::vector < sal_Int32 >() ); + rPoolDefaults[SCHATTR_INCLUDE_HIDDEN_CELLS - SCHATTR_START] = new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, true); + + rPoolDefaults[SCHATTR_AXIS_FOR_ALL_SERIES - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_FOR_ALL_SERIES, 0); + + rPoolDefaults[SCHATTR_REGRESSION_TYPE - SCHATTR_START] = new SvxChartRegressItem (SvxChartRegress::NONE, SCHATTR_REGRESSION_TYPE); + rPoolDefaults[SCHATTR_REGRESSION_SHOW_EQUATION - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_EQUATION, false); + rPoolDefaults[SCHATTR_REGRESSION_SHOW_COEFF - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SHOW_COEFF, false); + rPoolDefaults[SCHATTR_REGRESSION_DEGREE - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_DEGREE, 2); + rPoolDefaults[SCHATTR_REGRESSION_PERIOD - SCHATTR_START] = new SfxInt32Item(SCHATTR_REGRESSION_PERIOD, 2); + rPoolDefaults[SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD); + rPoolDefaults[SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD); + rPoolDefaults[SCHATTR_REGRESSION_SET_INTERCEPT - SCHATTR_START] = new SfxBoolItem(SCHATTR_REGRESSION_SET_INTERCEPT, false); + rPoolDefaults[SCHATTR_REGRESSION_INTERCEPT_VALUE - SCHATTR_START] = new SvxDoubleItem(0.0, SCHATTR_REGRESSION_INTERCEPT_VALUE); + rPoolDefaults[SCHATTR_REGRESSION_CURVE_NAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_CURVE_NAME, OUString()); + rPoolDefaults[SCHATTR_REGRESSION_XNAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_XNAME, OUString("x")); + rPoolDefaults[SCHATTR_REGRESSION_YNAME - SCHATTR_START] = new SfxStringItem(SCHATTR_REGRESSION_YNAME, OUString("f(x)")); /************************************************************************** * ItemInfos diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 32abe730db98..b63b4d816e40 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -295,17 +295,17 @@ void ODbAdminDialog::clearPassword() m_pImpl->clearPassword(); } -SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection) +SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection) { // just to be sure .... _rpSet = nullptr; _rpPool = nullptr; - _rppDefaults = nullptr; + _rpDefaults = nullptr; const OUString sFilterAll( "%", 1, RTL_TEXTENCODING_ASCII_US ); // create and initialize the defaults - _rppDefaults = new SfxPoolItem*[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1]; - SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults + _rpDefaults = new std::vector<SfxPoolItem*>(DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1); + SfxPoolItem** pCounter = _rpDefaults->data(); // want to modify this without affecting the out param _rppDefaults *pCounter++ = new SfxStringItem(DSID_NAME, OUString()); *pCounter++ = new SfxStringItem(DSID_ORIGINALNAME, OUString()); *pCounter++ = new SfxStringItem(DSID_CONNECTURL, OUString()); @@ -436,7 +436,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp OSL_ENSURE(SAL_N_ELEMENTS(aItemInfos) == DSID_LAST_ITEM_ID,"Invalid Ids!"); _rpPool = new SfxItemPool(OUString("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID, - aItemInfos, _rppDefaults); + aItemInfos, _rpDefaults); _rpPool->FreezeIdRanges(); // and, finally, the set @@ -445,7 +445,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp return _rpSet; } -void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) +void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults) { // _first_ delete the set (referring the pool) if (_rpSet) @@ -464,7 +464,7 @@ void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, } // reset the defaults ptr - _rppDefaults = nullptr; + _rpDefaults = nullptr; // no need to explicitly delete the defaults, this has been done by the ReleaseDefaults } diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index eb92a0652205..64fe97afc2c1 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -72,10 +72,10 @@ public: @param _pTypeCollection pointer to an <type>ODatasourceMap</type>. May be NULL, in this case the pool will not contain a typecollection default. */ - static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection); + static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection); /** destroy and item set / item pool / pool defaults previously created by <method>createItemSet</method> */ - static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); + static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults); /** selects the DataSource @param _rName diff --git a/dbaccess/source/ui/inc/unoadmin.hxx b/dbaccess/source/ui/inc/unoadmin.hxx index 49271328e413..4629cb6419d0 100644 --- a/dbaccess/source/ui/inc/unoadmin.hxx +++ b/dbaccess/source/ui/inc/unoadmin.hxx @@ -41,7 +41,8 @@ class ODatabaseAdministrationDialog protected: SfxItemSet* m_pDatasourceItems; // item set for the dialog SfxItemPool* m_pItemPool; // item pool for the item set for the dialog - SfxPoolItem** m_pItemPoolDefaults; // pool defaults + std::vector<SfxPoolItem*>* + m_pItemPoolDefaults; // pool defaults ::dbaccess::ODsnTypeCollection* m_pCollection; // datasource type collection diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index b1788d888755..4c95c57feb74 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -809,7 +809,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent, 0 }; - SfxPoolItem* pDefaults[] = + std::vector<SfxPoolItem*> pDefaults { new SfxRangeItem(SBA_DEF_RANGEFORMAT, SBA_DEF_FMTVALUE, SBA_ATTR_ALIGN_HOR_JUSTIFY), new SfxUInt32Item(SBA_DEF_FMTVALUE), @@ -818,7 +818,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent, new SvxNumberInfoItem(SID_ATTR_NUMBERFORMAT_INFO) }; - SfxItemPool* pPool = new SfxItemPool(OUString("GridBrowserProperties"), SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, pDefaults); + SfxItemPool* pPool = new SfxItemPool(OUString("GridBrowserProperties"), SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, aItemInfos, &pDefaults); pPool->SetDefaultMetric( MapUnit::MapTwip ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 126a5dae8f2a..b93aa60e9930 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -3077,7 +3077,7 @@ EditEngineItemPool::EditEngineItemPool( bool bPersistenRefCounts ) SetVersionMap( 5, 3994, 4037, aV5Map ); SetVersionMap( 6, 3994, 4038, aV6Map ); - SfxPoolItem** ppDefItems = EE_DLL().GetGlobalData()->GetDefItems(); + std::vector<SfxPoolItem*>* ppDefItems = EE_DLL().GetGlobalData()->GetDefItems(); SetDefaults( ppDefItems ); } diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index f1bf58cd07c1..08d95aa7402b 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -93,83 +93,84 @@ GlobalEditData::~GlobalEditData() // Destroy DefItems... // Or simply keep them, since at end of execution?! if ( ppDefItems ) - SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, true ); + SfxItemPool::ReleaseDefaults( ppDefItems, true ); } -SfxPoolItem** GlobalEditData::GetDefItems() +std::vector<SfxPoolItem*>* GlobalEditData::GetDefItems() { if ( !ppDefItems ) { - ppDefItems = new SfxPoolItem*[EDITITEMCOUNT]; + ppDefItems = new std::vector<SfxPoolItem*>(EDITITEMCOUNT); + std::vector<SfxPoolItem*>& rDefItems = *ppDefItems; // Paragraph attributes: SvxNumRule aDefaultNumRule( SvxNumRuleFlags::NONE, 0, false ); - ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); - ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS ); - ppDefItems[2] = new SvxHangingPunctuationItem(false, EE_PARA_HANGINGPUNCTUATION); - ppDefItems[3] = new SvxForbiddenRuleItem(true, EE_PARA_FORBIDDENRULES); - ppDefItems[4] = new SvxScriptSpaceItem( true, EE_PARA_ASIANCJKSPACING ); - ppDefItems[5] = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET ); - ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, false ); - ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, true ); - ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); - ppDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 ); - ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); - ppDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE ); - ppDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE ); - ppDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL ); - ppDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ); - ppDefItems[15] = new SvxTabStopItem( 0, 0, SvxTabAdjust::Left, EE_PARA_TABS ); - ppDefItems[16] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, EE_PARA_JUST_METHOD ); - ppDefItems[17] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, EE_PARA_VER_JUST ); + rDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); + rDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS ); + rDefItems[2] = new SvxHangingPunctuationItem(false, EE_PARA_HANGINGPUNCTUATION); + rDefItems[3] = new SvxForbiddenRuleItem(true, EE_PARA_FORBIDDENRULES); + rDefItems[4] = new SvxScriptSpaceItem( true, EE_PARA_ASIANCJKSPACING ); + rDefItems[5] = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET ); + rDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, false ); + rDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, true ); + rDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); + rDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 ); + rDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); + rDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE ); + rDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE ); + rDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL ); + rDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ); + rDefItems[15] = new SvxTabStopItem( 0, 0, SvxTabAdjust::Left, EE_PARA_TABS ); + rDefItems[16] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, EE_PARA_JUST_METHOD ); + rDefItems[17] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, EE_PARA_VER_JUST ); // Character attributes: - ppDefItems[18] = new SvxColorItem( Color( COL_AUTO ), EE_CHAR_COLOR ); - ppDefItems[19] = new SvxFontItem( EE_CHAR_FONTINFO ); - ppDefItems[20] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ); - ppDefItems[21] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ); - ppDefItems[22] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ); - ppDefItems[23] = new SvxUnderlineItem( LINESTYLE_NONE, EE_CHAR_UNDERLINE ); - ppDefItems[24] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); - ppDefItems[25] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); - ppDefItems[26] = new SvxContourItem( false, EE_CHAR_OUTLINE ); - ppDefItems[27] = new SvxShadowedItem( false, EE_CHAR_SHADOW ); - ppDefItems[28] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT ); - ppDefItems[29] = new SvxAutoKernItem( false, EE_CHAR_PAIRKERNING ); - ppDefItems[30] = new SvxKerningItem( 0, EE_CHAR_KERNING ); - ppDefItems[31] = new SvxWordLineModeItem( false, EE_CHAR_WLM ); - ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE ); - ppDefItems[33] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK ); - ppDefItems[34] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL ); - ppDefItems[35] = new SvxFontItem( EE_CHAR_FONTINFO_CJK ); - ppDefItems[36] = new SvxFontItem( EE_CHAR_FONTINFO_CTL ); - ppDefItems[37] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CJK ); - ppDefItems[38] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CTL ); - ppDefItems[39] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ); - ppDefItems[40] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ); - ppDefItems[41] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ); - ppDefItems[42] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ); - ppDefItems[43] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ); - ppDefItems[44] = new SvxCharReliefItem( FontRelief::NONE, EE_CHAR_RELIEF ); - ppDefItems[45] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY ); - ppDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS ); - ppDefItems[47] = new SvxOverlineItem( LINESTYLE_NONE, EE_CHAR_OVERLINE ); - ppDefItems[48] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP ); - ppDefItems[49] = new SfxGrabBagItem( EE_CHAR_GRABBAG ); - ppDefItems[50] = new SvxBackgroundColorItem( Color( COL_AUTO ), EE_CHAR_BKGCOLOR ); + rDefItems[18] = new SvxColorItem( Color( COL_AUTO ), EE_CHAR_COLOR ); + rDefItems[19] = new SvxFontItem( EE_CHAR_FONTINFO ); + rDefItems[20] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ); + rDefItems[21] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ); + rDefItems[22] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ); + rDefItems[23] = new SvxUnderlineItem( LINESTYLE_NONE, EE_CHAR_UNDERLINE ); + rDefItems[24] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); + rDefItems[25] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); + rDefItems[26] = new SvxContourItem( false, EE_CHAR_OUTLINE ); + rDefItems[27] = new SvxShadowedItem( false, EE_CHAR_SHADOW ); + rDefItems[28] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT ); + rDefItems[29] = new SvxAutoKernItem( false, EE_CHAR_PAIRKERNING ); + rDefItems[30] = new SvxKerningItem( 0, EE_CHAR_KERNING ); + rDefItems[31] = new SvxWordLineModeItem( false, EE_CHAR_WLM ); + rDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE ); + rDefItems[33] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK ); + rDefItems[34] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL ); + rDefItems[35] = new SvxFontItem( EE_CHAR_FONTINFO_CJK ); + rDefItems[36] = new SvxFontItem( EE_CHAR_FONTINFO_CTL ); + rDefItems[37] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CJK ); + rDefItems[38] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CTL ); + rDefItems[39] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ); + rDefItems[40] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ); + rDefItems[41] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ); + rDefItems[42] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ); + rDefItems[43] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, EE_CHAR_EMPHASISMARK ); + rDefItems[44] = new SvxCharReliefItem( FontRelief::NONE, EE_CHAR_RELIEF ); + rDefItems[45] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY ); + rDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS ); + rDefItems[47] = new SvxOverlineItem( LINESTYLE_NONE, EE_CHAR_OVERLINE ); + rDefItems[48] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED, EE_CHAR_CASEMAP ); + rDefItems[49] = new SfxGrabBagItem( EE_CHAR_GRABBAG ); + rDefItems[50] = new SvxBackgroundColorItem( Color( COL_AUTO ), EE_CHAR_BKGCOLOR ); // Features - ppDefItems[51] = new SfxVoidItem( EE_FEATURE_TAB ); - ppDefItems[52] = new SfxVoidItem( EE_FEATURE_LINEBR ); - ppDefItems[53] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV ); - ppDefItems[54] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD ); + rDefItems[51] = new SfxVoidItem( EE_FEATURE_TAB ); + rDefItems[52] = new SfxVoidItem( EE_FEATURE_LINEBR ); + rDefItems[53] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV ); + rDefItems[54] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD ); assert(EDITITEMCOUNT == 55 && "ITEMCOUNT changed, adjust DefItems!"); // Init DefFonts: - GetDefaultFonts( *static_cast<SvxFontItem*>(ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START]), - *static_cast<SvxFontItem*>(ppDefItems[EE_CHAR_FONTINFO_CJK - EE_ITEMS_START]), - *static_cast<SvxFontItem*>(ppDefItems[EE_CHAR_FONTINFO_CTL - EE_ITEMS_START]) ); + GetDefaultFonts( *static_cast<SvxFontItem*>(rDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START]), + *static_cast<SvxFontItem*>(rDefItems[EE_CHAR_FONTINFO_CJK - EE_ITEMS_START]), + *static_cast<SvxFontItem*>(rDefItems[EE_CHAR_FONTINFO_CTL - EE_ITEMS_START]) ); } return ppDefItems; diff --git a/editeng/source/editeng/eerdll2.hxx b/editeng/source/editeng/eerdll2.hxx index ffb96fe0aa19..136b9cd3fd3d 100644 --- a/editeng/source/editeng/eerdll2.hxx +++ b/editeng/source/editeng/eerdll2.hxx @@ -30,7 +30,7 @@ class GlobalEditData { private: css::uno::Reference< css::linguistic2::XLanguageGuessing > xLanguageGuesser; - SfxPoolItem** ppDefItems; + std::vector<SfxPoolItem*>* ppDefItems; rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable; @@ -38,7 +38,7 @@ public: GlobalEditData(); ~GlobalEditData(); - SfxPoolItem** GetDefItems(); + std::vector<SfxPoolItem*>* GetDefItems(); rtl::Reference<SvxForbiddenCharactersTable> const & GetForbiddenCharsTable(); void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> const & xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; } diff --git a/extensions/source/propctrlr/controlfontdialog.hxx b/extensions/source/propctrlr/controlfontdialog.hxx index a7727a776d13..b2ee83a4c85c 100644 --- a/extensions/source/propctrlr/controlfontdialog.hxx +++ b/extensions/source/propctrlr/controlfontdialog.hxx @@ -47,7 +47,8 @@ namespace pcr SfxItemSet* m_pFontItems; // item set for the dialog SfxItemPool* m_pItemPool; // item pool for the item set for the dialog - SfxPoolItem** m_pItemPoolDefaults; // pool defaults + std::vector<SfxPoolItem*>* + m_pItemPoolDefaults; // pool defaults public: explicit OControlFontDialog(const css::uno::Reference< css::uno::XComponentContext >& _rxContext); diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index a268635985c2..e452cbba7343 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -474,19 +474,19 @@ namespace pcr } - SfxItemSet* ControlCharacterDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) + SfxItemSet* ControlCharacterDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults) { // just to be sure .... _rpSet = nullptr; _rpPool = nullptr; - _rppDefaults = nullptr; + _rpDefaults = nullptr; // create and initialize the defaults - _rppDefaults = new SfxPoolItem*[CFID_LAST_ITEM_ID - CFID_FIRST_ITEM_ID + 1]; + _rpDefaults = new std::vector<SfxPoolItem*>(CFID_LAST_ITEM_ID - CFID_FIRST_ITEM_ID + 1); vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); - SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults + SfxPoolItem** pCounter = _rpDefaults->data(); // want to modify this without affecting the out param _rppDefaults *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamilyType(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT); *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetFontHeight(), 100, CFID_HEIGHT); *pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT); @@ -537,7 +537,7 @@ namespace pcr }; _rpPool = new SfxItemPool(OUString("PCRControlFontItemPool"), CFID_FIRST_ITEM_ID, CFID_LAST_ITEM_ID, - aItemInfos, _rppDefaults); + aItemInfos, _rpDefaults); _rpPool->FreezeIdRanges(); // and, finally, the set @@ -547,7 +547,7 @@ namespace pcr } - void ControlCharacterDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) + void ControlCharacterDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults) { // from the pool, get and remember the font list (needs to be deleted) const SvxFontListItem& rFontListItem = static_cast<const SvxFontListItem&>(_rpPool->GetDefaultItem(CFID_FONTLIST)); @@ -567,7 +567,7 @@ namespace pcr _rpPool = nullptr; // reset the defaults ptr - _rppDefaults = nullptr; + _rpDefaults = nullptr; // no need to explicitly delete the defaults, this has been done by the ReleaseDefaults delete pFontList; diff --git a/extensions/source/propctrlr/fontdialog.hxx b/extensions/source/propctrlr/fontdialog.hxx index ca0b4380dce5..d014e376c074 100644 --- a/extensions/source/propctrlr/fontdialog.hxx +++ b/extensions/source/propctrlr/fontdialog.hxx @@ -38,10 +38,10 @@ namespace pcr virtual ~ControlCharacterDialog() override; /// creates an item set to be used with this dialog - static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); + static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults); /// destroys an item previously created with <method>createItemSet</method> - static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); + static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults); /// fills the given item set with values obtained from the given property set static void translatePropertiesToItems( diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 18420096a470..91781c8d5c3d 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2839,7 +2839,7 @@ namespace pcr // create an item set for use with the dialog SfxItemSet* pSet = nullptr; SfxItemPool* pPool = nullptr; - SfxPoolItem** pDefaults = nullptr; + std::vector<SfxPoolItem*>* pDefaults = nullptr; ControlCharacterDialog::createItemSet(pSet, pPool, pDefaults); ControlCharacterDialog::translatePropertiesToItems(m_xComponent, pSet); diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx index 7255bc7f1206..33449286c7da 100644 --- a/include/svl/itempool.hxx +++ b/include/svl/itempool.hxx @@ -25,6 +25,7 @@ #include <svl/svldllapi.h> #include <tools/solar.h> #include <memory> +#include <vector> class SvStream; class SfxBroadcaster; @@ -90,7 +91,7 @@ public: SfxItemPool( const OUString &rName, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxItemInfo *pItemInfos, - SfxPoolItem **pDefaults = nullptr, + std::vector<SfxPoolItem*> *pDefaults = nullptr, bool bLoadRefCounts = true ); protected: @@ -105,9 +106,9 @@ public: const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich ) const; void ResetPoolDefaultItem( sal_uInt16 nWhich ); - void SetDefaults( SfxPoolItem **pDefaults ); + void SetDefaults( std::vector<SfxPoolItem*>* pDefaults ); void ReleaseDefaults( bool bDelete = false ); - static void ReleaseDefaults( SfxPoolItem **pDefaults, sal_uInt16 nCount, bool bDelete = false ); + static void ReleaseDefaults( std::vector<SfxPoolItem*> *pDefaults, bool bDelete = false ); virtual MapUnit GetMetric( sal_uInt16 nWhich ) const; void SetDefaultMetric( MapUnit eNewMetric ); diff --git a/include/svx/xpool.hxx b/include/svx/xpool.hxx index 364b91db3e4c..5e6dd21efab3 100644 --- a/include/svx/xpool.hxx +++ b/include/svx/xpool.hxx @@ -33,8 +33,8 @@ class SVX_DLLPUBLIC XOutdevItemPool : public SfxItemPool { protected: - SfxPoolItem** mppLocalPoolDefaults; - SfxItemInfo* mpLocalItemInfos; + std::vector<SfxPoolItem*>* mpLocalPoolDefaults; + SfxItemInfo* mpLocalItemInfos; public: XOutdevItemPool( SfxItemPool* pMaster, bool bLoadRefCounts = true); diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 5fcc67c828c0..3456dcad6737 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -648,7 +648,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( _rxParentWindow ); ::std::unique_ptr<FontList> pFontList(new FontList( pParent )); XColorListRef pColorList( XColorList::CreateStdColorList() ); - SfxPoolItem* pDefaults[] = + std::vector<SfxPoolItem*> pDefaults { new SvxFontItem(ITEMID_FONT), new SvxFontHeightItem(240,100,ITEMID_FONTHEIGHT), @@ -694,7 +694,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep }; - OSL_ASSERT( SAL_N_ELEMENTS(pDefaults) == SAL_N_ELEMENTS(aItemInfos) ); + OSL_ASSERT( pDefaults.size() == SAL_N_ELEMENTS(aItemInfos) ); static const sal_uInt16 pRanges[] = { @@ -702,7 +702,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep 0 }; - SfxItemPool* pPool( new SfxItemPool(OUString("ReportCharProperties"), ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, pDefaults) ); + SfxItemPool* pPool( new SfxItemPool(OUString("ReportCharProperties"), ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults) ); // not needed for font height pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same bool bSuccess = false; diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 9eed05e7d07d..10db48c2f591 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2381,7 +2381,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE)); const XHatch aNullHatch(aNullLineCol); - SfxPoolItem* pDefaults[] = + std::vector<SfxPoolItem*> pDefaults { new SvxLRSpaceItem(RPTUI_ID_LRSPACE), new SvxULSpaceItem(RPTUI_ID_ULSPACE), @@ -2414,7 +2414,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric)) }; - pPool->SetDefaults(pDefaults); + pPool->SetDefaults(&pDefaults); pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why @@ -4197,7 +4197,7 @@ void OReportController::openZoomDialog() { { SID_ATTR_ZOOM, true } }; - SfxPoolItem* pDefaults[] = + std::vector<SfxPoolItem*> pDefaults { new SvxZoomItem() }; @@ -4206,7 +4206,7 @@ void OReportController::openZoomDialog() SID_ATTR_ZOOM,SID_ATTR_ZOOM, 0 }; - SfxItemPool* pPool( new SfxItemPool(OUString("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, pDefaults) ); + SfxItemPool* pPool( new SfxItemPool(OUString("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) ); pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same try diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx index 555d411effda..aacae2ce26a6 100644 --- a/sc/inc/docpool.hxx +++ b/sc/inc/docpool.hxx @@ -29,7 +29,7 @@ class ScDocument; class SC_DLLPUBLIC ScDocumentPool: public SfxItemPool { - SfxPoolItem** ppPoolDefaults; + std::vector<SfxPoolItem*>* mpPoolDefaults; static sal_uInt16* pVersionMap1; static sal_uInt16* pVersionMap2; static sal_uInt16* pVersionMap3; diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index d0677b17a9d6..037678b8f687 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -219,117 +219,118 @@ ScDocumentPool::ScDocumentPool() pGlobalBorderInnerAttr->SetDist(true); pGlobalBorderInnerAttr->SetMinDist(false); - ppPoolDefaults = new SfxPoolItem*[ATTR_ENDINDEX-ATTR_STARTINDEX+1]; - - ppPoolDefaults[ ATTR_FONT - ATTR_STARTINDEX ] = pStdFont; - ppPoolDefaults[ ATTR_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt; - ppPoolDefaults[ ATTR_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_FONT_WEIGHT ); - ppPoolDefaults[ ATTR_FONT_POSTURE - ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_FONT_POSTURE ); - ppPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( LINESTYLE_NONE, ATTR_FONT_UNDERLINE ); - ppPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( LINESTYLE_NONE, ATTR_FONT_OVERLINE ); - ppPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ); - ppPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR ); - ppPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED ); - ppPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( Color(COL_AUTO), ATTR_FONT_COLOR ); - ppPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), ATTR_FONT_LANGUAGE ); - ppPoolDefaults[ ATTR_CJK_FONT - ATTR_STARTINDEX ] = pCjkFont; - ppPoolDefaults[ ATTR_CJK_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CJK_FONT_HEIGHT ); - ppPoolDefaults[ ATTR_CJK_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_CJK_FONT_WEIGHT ); - ppPoolDefaults[ ATTR_CJK_FONT_POSTURE- ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_CJK_FONT_POSTURE ); - ppPoolDefaults[ ATTR_CJK_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), + mpPoolDefaults = new std::vector<SfxPoolItem*>(ATTR_ENDINDEX-ATTR_STARTINDEX+1); + std::vector<SfxPoolItem*>& rPoolDefaults = *mpPoolDefaults; + + rPoolDefaults[ ATTR_FONT - ATTR_STARTINDEX ] = pStdFont; + rPoolDefaults[ ATTR_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_FONT_HEIGHT ); // 10 pt; + rPoolDefaults[ ATTR_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_FONT_WEIGHT ); + rPoolDefaults[ ATTR_FONT_POSTURE - ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_FONT_POSTURE ); + rPoolDefaults[ ATTR_FONT_UNDERLINE - ATTR_STARTINDEX ] = new SvxUnderlineItem( LINESTYLE_NONE, ATTR_FONT_UNDERLINE ); + rPoolDefaults[ ATTR_FONT_OVERLINE - ATTR_STARTINDEX ] = new SvxOverlineItem( LINESTYLE_NONE, ATTR_FONT_OVERLINE ); + rPoolDefaults[ ATTR_FONT_CROSSEDOUT - ATTR_STARTINDEX ] = new SvxCrossedOutItem( STRIKEOUT_NONE, ATTR_FONT_CROSSEDOUT ); + rPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR ); + rPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED ); + rPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( Color(COL_AUTO), ATTR_FONT_COLOR ); + rPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), ATTR_FONT_LANGUAGE ); + rPoolDefaults[ ATTR_CJK_FONT - ATTR_STARTINDEX ] = pCjkFont; + rPoolDefaults[ ATTR_CJK_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CJK_FONT_HEIGHT ); + rPoolDefaults[ ATTR_CJK_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_CJK_FONT_WEIGHT ); + rPoolDefaults[ ATTR_CJK_FONT_POSTURE- ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_CJK_FONT_POSTURE ); + rPoolDefaults[ ATTR_CJK_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), ATTR_CJK_FONT_LANGUAGE ); - ppPoolDefaults[ ATTR_CTL_FONT - ATTR_STARTINDEX ] = pCtlFont; - ppPoolDefaults[ ATTR_CTL_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CTL_FONT_HEIGHT ); - ppPoolDefaults[ ATTR_CTL_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_CTL_FONT_WEIGHT ); - ppPoolDefaults[ ATTR_CTL_FONT_POSTURE- ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_CTL_FONT_POSTURE ); - ppPoolDefaults[ ATTR_CTL_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), + rPoolDefaults[ ATTR_CTL_FONT - ATTR_STARTINDEX ] = pCtlFont; + rPoolDefaults[ ATTR_CTL_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CTL_FONT_HEIGHT ); + rPoolDefaults[ ATTR_CTL_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_CTL_FONT_WEIGHT ); + rPoolDefaults[ ATTR_CTL_FONT_POSTURE- ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_CTL_FONT_POSTURE ); + rPoolDefaults[ ATTR_CTL_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), ATTR_CTL_FONT_LANGUAGE ); - ppPoolDefaults[ ATTR_FONT_EMPHASISMARK-ATTR_STARTINDEX ] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, ATTR_FONT_EMPHASISMARK ); - ppPoolDefaults[ ATTR_USERDEF - ATTR_STARTINDEX ] = new SvXMLAttrContainerItem( ATTR_USERDEF ); - ppPoolDefaults[ ATTR_FONT_WORDLINE - ATTR_STARTINDEX ] = new SvxWordLineModeItem(false, ATTR_FONT_WORDLINE ); - ppPoolDefaults[ ATTR_FONT_RELIEF - ATTR_STARTINDEX ] = new SvxCharReliefItem( FontRelief::NONE, ATTR_FONT_RELIEF ); - ppPoolDefaults[ ATTR_HYPHENATE - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HYPHENATE ); - ppPoolDefaults[ ATTR_SCRIPTSPACE - ATTR_STARTINDEX ] = new SvxScriptSpaceItem( false, ATTR_SCRIPTSPACE); - ppPoolDefaults[ ATTR_HANGPUNCTUATION - ATTR_STARTINDEX ] = new SvxHangingPunctuationItem( false, ATTR_HANGPUNCTUATION); - ppPoolDefaults[ ATTR_FORBIDDEN_RULES - ATTR_STARTINDEX ] = new SvxForbiddenRuleItem( false, ATTR_FORBIDDEN_RULES); - ppPoolDefaults[ ATTR_HOR_JUSTIFY - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY); - ppPoolDefaults[ ATTR_HOR_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, ATTR_HOR_JUSTIFY_METHOD); - ppPoolDefaults[ ATTR_INDENT - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_INDENT, 0 ); - ppPoolDefaults[ ATTR_VER_JUSTIFY - ATTR_STARTINDEX ] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY); - ppPoolDefaults[ ATTR_VER_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, ATTR_VER_JUSTIFY_METHOD); - ppPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, false ); - ppPoolDefaults[ ATTR_ROTATE_VALUE - ATTR_STARTINDEX ] = new SfxInt32Item( ATTR_ROTATE_VALUE, 0 ); - ppPoolDefaults[ ATTR_ROTATE_MODE - ATTR_STARTINDEX ] = new SvxRotateModeItem( SVX_ROTATE_MODE_BOTTOM, ATTR_ROTATE_MODE ); - ppPoolDefaults[ ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_VERTICAL_ASIAN ); + rPoolDefaults[ ATTR_FONT_EMPHASISMARK-ATTR_STARTINDEX ] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, ATTR_FONT_EMPHASISMARK ); + rPoolDefaults[ ATTR_USERDEF - ATTR_STARTINDEX ] = new SvXMLAttrContainerItem( ATTR_USERDEF ); + rPoolDefaults[ ATTR_FONT_WORDLINE - ATTR_STARTINDEX ] = new SvxWordLineModeItem(false, ATTR_FONT_WORDLINE ); + rPoolDefaults[ ATTR_FONT_RELIEF - ATTR_STARTINDEX ] = new SvxCharReliefItem( FontRelief::NONE, ATTR_FONT_RELIEF ); + rPoolDefaults[ ATTR_HYPHENATE - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HYPHENATE ); + rPoolDefaults[ ATTR_SCRIPTSPACE - ATTR_STARTINDEX ] = new SvxScriptSpaceItem( false, ATTR_SCRIPTSPACE); + rPoolDefaults[ ATTR_HANGPUNCTUATION - ATTR_STARTINDEX ] = new SvxHangingPunctuationItem( false, ATTR_HANGPUNCTUATION); + rPoolDefaults[ ATTR_FORBIDDEN_RULES - ATTR_STARTINDEX ] = new SvxForbiddenRuleItem( false, ATTR_FORBIDDEN_RULES); + rPoolDefaults[ ATTR_HOR_JUSTIFY - ATTR_STARTINDEX ] = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY); + rPoolDefaults[ ATTR_HOR_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, ATTR_HOR_JUSTIFY_METHOD); + rPoolDefaults[ ATTR_INDENT - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_INDENT, 0 ); + rPoolDefaults[ ATTR_VER_JUSTIFY - ATTR_STARTINDEX ] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY); + rPoolDefaults[ ATTR_VER_JUSTIFY_METHOD - ATTR_STARTINDEX ] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, ATTR_VER_JUSTIFY_METHOD); + rPoolDefaults[ ATTR_STACKED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_STACKED, false ); + rPoolDefaults[ ATTR_ROTATE_VALUE - ATTR_STARTINDEX ] = new SfxInt32Item( ATTR_ROTATE_VALUE, 0 ); + rPoolDefaults[ ATTR_ROTATE_MODE - ATTR_STARTINDEX ] = new SvxRotateModeItem( SVX_ROTATE_MODE_BOTTOM, ATTR_ROTATE_MODE ); + rPoolDefaults[ ATTR_VERTICAL_ASIAN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_VERTICAL_ASIAN ); // The default for the ATTR_WRITINGDIR cell attribute must by FRMDIR_ENVIRONMENT, // so that value is returned when asking for a default cell's attributes. // The value from the page style is set as DefaultHorizontalTextDirection for the EditEngine. - ppPoolDefaults[ ATTR_WRITINGDIR - ATTR_STARTINDEX ] = new SvxFrameDirectionItem( FRMDIR_ENVIRONMENT, ATTR_WRITINGDIR ); - ppPoolDefaults[ ATTR_LINEBREAK - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_LINEBREAK ); - ppPoolDefaults[ ATTR_SHRINKTOFIT - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_SHRINKTOFIT ); - ppPoolDefaults[ ATTR_BORDER_TLBR - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_TLBR ); - ppPoolDefaults[ ATTR_BORDER_BLTR - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_BLTR ); - ppPoolDefaults[ ATTR_MARGIN - ATTR_STARTINDEX ] = new SvxMarginItem( ATTR_MARGIN ); - ppPoolDefaults[ ATTR_MERGE - ATTR_STARTINDEX ] = new ScMergeAttr; - ppPoolDefaults[ ATTR_MERGE_FLAG - ATTR_STARTINDEX ] = new ScMergeFlagAttr; - ppPoolDefaults[ ATTR_VALUE_FORMAT - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALUE_FORMAT, 0 ); - ppPoolDefaults[ ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX ] = new SvxLanguageItem( ScGlobal::eLnge, ATTR_LANGUAGE_FORMAT ); - ppPoolDefaults[ ATTR_BACKGROUND - ATTR_STARTINDEX ] = new SvxBrushItem( Color(COL_TRANSPARENT), ATTR_BACKGROUND ); - ppPoolDefaults[ ATTR_PROTECTION - ATTR_STARTINDEX ] = new ScProtectionAttr; - ppPoolDefaults[ ATTR_BORDER - ATTR_STARTINDEX ] = new SvxBoxItem( ATTR_BORDER ); - ppPoolDefaults[ ATTR_BORDER_INNER - ATTR_STARTINDEX ] = pGlobalBorderInnerAttr; - ppPoolDefaults[ ATTR_SHADOW - ATTR_STARTINDEX ] = new SvxShadowItem( ATTR_SHADOW ); - ppPoolDefaults[ ATTR_VALIDDATA - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALIDDATA, 0 ); - ppPoolDefaults[ ATTR_CONDITIONAL - ATTR_STARTINDEX ] = new ScCondFormatItem; - ppPoolDefaults[ ATTR_HYPERLINK - ATTR_STARTINDEX ] = new SfxStringItem( ATTR_HYPERLINK, OUString() ) ; + rPoolDefaults[ ATTR_WRITINGDIR - ATTR_STARTINDEX ] = new SvxFrameDirectionItem( FRMDIR_ENVIRONMENT, ATTR_WRITINGDIR ); + rPoolDefaults[ ATTR_LINEBREAK - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_LINEBREAK ); + rPoolDefaults[ ATTR_SHRINKTOFIT - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_SHRINKTOFIT ); + rPoolDefaults[ ATTR_BORDER_TLBR - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_TLBR ); + rPoolDefaults[ ATTR_BORDER_BLTR - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_BLTR ); + rPoolDefaults[ ATTR_MARGIN - ATTR_STARTINDEX ] = new SvxMarginItem( ATTR_MARGIN ); + rPoolDefaults[ ATTR_MERGE - ATTR_STARTINDEX ] = new ScMergeAttr; + rPoolDefaults[ ATTR_MERGE_FLAG - ATTR_STARTINDEX ] = new ScMergeFlagAttr; + rPoolDefaults[ ATTR_VALUE_FORMAT - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALUE_FORMAT, 0 ); + rPoolDefaults[ ATTR_LANGUAGE_FORMAT - ATTR_STARTINDEX ] = new SvxLanguageItem( ScGlobal::eLnge, ATTR_LANGUAGE_FORMAT ); + rPoolDefaults[ ATTR_BACKGROUND - ATTR_STARTINDEX ] = new SvxBrushItem( Color(COL_TRANSPARENT), ATTR_BACKGROUND ); + rPoolDefaults[ ATTR_PROTECTION - ATTR_STARTINDEX ] = new ScProtectionAttr; + rPoolDefaults[ ATTR_BORDER - ATTR_STARTINDEX ] = new SvxBoxItem( ATTR_BORDER ); + rPoolDefaults[ ATTR_BORDER_INNER - ATTR_STARTINDEX ] = pGlobalBorderInnerAttr; + rPoolDefaults[ ATTR_SHADOW - ATTR_STARTINDEX ] = new SvxShadowItem( ATTR_SHADOW ); + rPoolDefaults[ ATTR_VALIDDATA - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALIDDATA, 0 ); + rPoolDefaults[ ATTR_CONDITIONAL - ATTR_STARTINDEX ] = new ScCondFormatItem; + rPoolDefaults[ ATTR_HYPERLINK - ATTR_STARTINDEX ] = new SfxStringItem( ATTR_HYPERLINK, OUString() ) ; // GetRscString only works after ScGlobal::Init (indicated by the EmptyBrushItem) // TODO: Write additional method ScGlobal::IsInit() or somesuch // or detect whether this is the Secondary Pool for a MessagePool if ( ScGlobal::GetEmptyBrushItem() ) - ppPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( pSet, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ); + rPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( pSet, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ); else - ppPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( pSet, + rPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( pSet, OUString(STRING_STANDARD) ); // FIXME: without name? - ppPoolDefaults[ ATTR_LRSPACE - ATTR_STARTINDEX ] = new SvxLRSpaceItem( ATTR_LRSPACE ); - ppPoolDefaults[ ATTR_ULSPACE - ATTR_STARTINDEX ] = new SvxULSpaceItem( ATTR_ULSPACE ); - ppPoolDefaults[ ATTR_PAGE - ATTR_STARTINDEX ] = new SvxPageItem( ATTR_PAGE ); - ppPoolDefaults[ ATTR_PAGE_PAPERTRAY - ATTR_STARTINDEX ] = new SfxAllEnumItem( ATTR_PAGE_PAPERTRAY ); - ppPoolDefaults[ ATTR_PAGE_PAPERBIN - ATTR_STARTINDEX ] = new SvxPaperBinItem( ATTR_PAGE_PAPERBIN ); - ppPoolDefaults[ ATTR_PAGE_SIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_SIZE ); - ppPoolDefaults[ ATTR_PAGE_MAXSIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_MAXSIZE ); - ppPoolDefaults[ ATTR_PAGE_HORCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HORCENTER ); - ppPoolDefaults[ ATTR_PAGE_VERCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_VERCENTER ); - ppPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, true ); - ppPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, true ); - ppPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, true ); - ppPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, false ); - ppPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, false ); - ppPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, false ); - ppPoolDefaults[ ATTR_PAGE_CHARTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_CHARTS ); - ppPoolDefaults[ ATTR_PAGE_OBJECTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_OBJECTS ); - ppPoolDefaults[ ATTR_PAGE_DRAWINGS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_DRAWINGS ); - ppPoolDefaults[ ATTR_PAGE_TOPDOWN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_TOPDOWN, true ); - ppPoolDefaults[ ATTR_PAGE_SCALE - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALE, 100 ); - ppPoolDefaults[ ATTR_PAGE_SCALETOPAGES-ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALETOPAGES, 1 ); - ppPoolDefaults[ ATTR_PAGE_FIRSTPAGENO- ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 ); - ppPoolDefaults[ ATTR_PAGE_PRINTAREA - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_PRINTAREA ); - ppPoolDefaults[ ATTR_PAGE_REPEATROW - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATROW ); - ppPoolDefaults[ ATTR_PAGE_REPEATCOL - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATCOL ); - ppPoolDefaults[ ATTR_PAGE_PRINTTABLES- ATTR_STARTINDEX ] = new ScTableListItem( ATTR_PAGE_PRINTTABLES ); - ppPoolDefaults[ ATTR_PAGE_HEADERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERLEFT ); - ppPoolDefaults[ ATTR_PAGE_FOOTERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERLEFT ); - ppPoolDefaults[ ATTR_PAGE_HEADERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ); - ppPoolDefaults[ ATTR_PAGE_FOOTERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT ); - ppPoolDefaults[ ATTR_PAGE_HEADERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_HEADERSET, aSetItemItemSet ); - ppPoolDefaults[ ATTR_PAGE_FOOTERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_FOOTERSET, aSetItemItemSet ); - ppPoolDefaults[ ATTR_PAGE_FORMULAS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_FORMULAS, false ); - ppPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, true ); - ppPoolDefaults[ ATTR_PAGE_SCALETO - ATTR_STARTINDEX ] = new ScPageScaleToItem( 1, 1 ); - ppPoolDefaults[ ATTR_HIDDEN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HIDDEN, false ); - - SetDefaults( ppPoolDefaults ); + rPoolDefaults[ ATTR_LRSPACE - ATTR_STARTINDEX ] = new SvxLRSpaceItem( ATTR_LRSPACE ); + rPoolDefaults[ ATTR_ULSPACE - ATTR_STARTINDEX ] = new SvxULSpaceItem( ATTR_ULSPACE ); + rPoolDefaults[ ATTR_PAGE - ATTR_STARTINDEX ] = new SvxPageItem( ATTR_PAGE ); + rPoolDefaults[ ATTR_PAGE_PAPERTRAY - ATTR_STARTINDEX ] = new SfxAllEnumItem( ATTR_PAGE_PAPERTRAY ); + rPoolDefaults[ ATTR_PAGE_PAPERBIN - ATTR_STARTINDEX ] = new SvxPaperBinItem( ATTR_PAGE_PAPERBIN ); + rPoolDefaults[ ATTR_PAGE_SIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_SIZE ); + rPoolDefaults[ ATTR_PAGE_MAXSIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_MAXSIZE ); + rPoolDefaults[ ATTR_PAGE_HORCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HORCENTER ); + rPoolDefaults[ ATTR_PAGE_VERCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_VERCENTER ); + rPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, true ); + rPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, true ); + rPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, true ); + rPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, false ); + rPoolDefaults[ ATTR_PAGE_GRID - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_GRID, false ); + rPoolDefaults[ ATTR_PAGE_HEADERS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HEADERS, false ); + rPoolDefaults[ ATTR_PAGE_CHARTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_CHARTS ); + rPoolDefaults[ ATTR_PAGE_OBJECTS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_OBJECTS ); + rPoolDefaults[ ATTR_PAGE_DRAWINGS - ATTR_STARTINDEX ] = new ScViewObjectModeItem( ATTR_PAGE_DRAWINGS ); + rPoolDefaults[ ATTR_PAGE_TOPDOWN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_TOPDOWN, true ); + rPoolDefaults[ ATTR_PAGE_SCALE - ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALE, 100 ); + rPoolDefaults[ ATTR_PAGE_SCALETOPAGES-ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_SCALETOPAGES, 1 ); + rPoolDefaults[ ATTR_PAGE_FIRSTPAGENO- ATTR_STARTINDEX ] = new SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 ); + rPoolDefaults[ ATTR_PAGE_PRINTAREA - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_PRINTAREA ); + rPoolDefaults[ ATTR_PAGE_REPEATROW - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATROW ); + rPoolDefaults[ ATTR_PAGE_REPEATCOL - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATCOL ); + rPoolDefaults[ ATTR_PAGE_PRINTTABLES- ATTR_STARTINDEX ] = new ScTableListItem( ATTR_PAGE_PRINTTABLES ); + rPoolDefaults[ ATTR_PAGE_HEADERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERLEFT ); + rPoolDefaults[ ATTR_PAGE_FOOTERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERLEFT ); + rPoolDefaults[ ATTR_PAGE_HEADERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ); + rPoolDefaults[ ATTR_PAGE_FOOTERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT ); + rPoolDefaults[ ATTR_PAGE_HEADERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_HEADERSET, aSetItemItemSet ); + rPoolDefaults[ ATTR_PAGE_FOOTERSET - ATTR_STARTINDEX ] = new SvxSetItem( ATTR_PAGE_FOOTERSET, aSetItemItemSet ); + rPoolDefaults[ ATTR_PAGE_FORMULAS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_FORMULAS, false ); + rPoolDefaults[ ATTR_PAGE_NULLVALS - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NULLVALS, true ); + rPoolDefaults[ ATTR_PAGE_SCALETO - ATTR_STARTINDEX ] = new ScPageScaleToItem( 1, 1 ); + rPoolDefaults[ ATTR_HIDDEN - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_HIDDEN, false ); + + SetDefaults( mpPoolDefaults ); // ATTR_LANGUAGE_FORMAT from sv329 inserted, VersionMap in _ScGlobal__Init SetVersionMap( 1, 100, 157, pVersionMap1 ); @@ -376,11 +377,11 @@ ScDocumentPool::~ScDocumentPool() for ( sal_uInt16 i=0; i < ATTR_ENDINDEX-ATTR_STARTINDEX+1; i++ ) { - SetRefCount( *ppPoolDefaults[i], 0 ); - delete ppPoolDefaults[i]; + SetRefCount( *(*mpPoolDefaults)[i], 0 ); + delete (*mpPoolDefaults)[i]; } - delete[] ppPoolDefaults; + delete mpPoolDefaults; } void ScDocumentPool::InitVersionMaps() @@ -594,7 +595,7 @@ const SfxPoolItem& ScDocumentPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWh return SfxItemPool::Put( rItem, nWhich ); // Don't copy the default pattern of this Pool - if (&rItem == ppPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ]) + if (&rItem == (*mpPoolDefaults)[ ATTR_PATTERN - ATTR_STARTINDEX ]) return rItem; // Else Put must always happen, because it could be another Pool diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx index 37d5d9c9e039..8555cc811af2 100644 --- a/sc/source/ui/app/msgpool.cxx +++ b/sc/source/ui/app/msgpool.cxx @@ -57,22 +57,23 @@ ScMessagePool::ScMessagePool() aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, false ) ), aCondFormatDlgItem ( ScCondFormatDlgItem ( nullptr, -1, false ) ), - ppPoolDefaults(new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1]), + mpPoolDefaults(new std::vector<SfxPoolItem*>(MSGPOOL_END - MSGPOOL_START + 1)), pDocPool(new ScDocumentPool) { - ppPoolDefaults[SCITEM_STRING - MSGPOOL_START] = &aGlobalStringItem; - ppPoolDefaults[SCITEM_SEARCHDATA - MSGPOOL_START] = &aGlobalSearchItem; - ppPoolDefaults[SCITEM_SORTDATA - MSGPOOL_START] = &aGlobalSortItem; - ppPoolDefaults[SCITEM_QUERYDATA - MSGPOOL_START] = &aGlobalQueryItem; - ppPoolDefaults[SCITEM_SUBTDATA - MSGPOOL_START] = &aGlobalSubTotalItem; - ppPoolDefaults[SCITEM_CONSOLIDATEDATA - MSGPOOL_START] = &aGlobalConsolidateItem; - ppPoolDefaults[SCITEM_PIVOTDATA - MSGPOOL_START] = &aGlobalPivotItem; - ppPoolDefaults[SCITEM_SOLVEDATA - MSGPOOL_START] = &aGlobalSolveItem; - ppPoolDefaults[SCITEM_USERLIST - MSGPOOL_START] = &aGlobalUserListItem; - ppPoolDefaults[SCITEM_PRINTWARN - MSGPOOL_START] = &aPrintWarnItem; - ppPoolDefaults[SCITEM_CONDFORMATDLGDATA - MSGPOOL_START] = &aCondFormatDlgItem; + std::vector<SfxPoolItem*>& rPoolDefaults = *mpPoolDefaults; + rPoolDefaults[SCITEM_STRING - MSGPOOL_START] = &aGlobalStringItem; + rPoolDefaults[SCITEM_SEARCHDATA - MSGPOOL_START] = &aGlobalSearchItem; + rPoolDefaults[SCITEM_SORTDATA - MSGPOOL_START] = &aGlobalSortItem; + rPoolDefaults[SCITEM_QUERYDATA - MSGPOOL_START] = &aGlobalQueryItem; + rPoolDefaults[SCITEM_SUBTDATA - MSGPOOL_START] = &aGlobalSubTotalItem; + rPoolDefaults[SCITEM_CONSOLIDATEDATA - MSGPOOL_START] = &aGlobalConsolidateItem; + rPoolDefaults[SCITEM_PIVOTDATA - MSGPOOL_START] = &aGlobalPivotItem; + rPoolDefaults[SCITEM_SOLVEDATA - MSGPOOL_START] = &aGlobalSolveItem; + rPoolDefaults[SCITEM_USERLIST - MSGPOOL_START] = &aGlobalUserListItem; + rPoolDefaults[SCITEM_PRINTWARN - MSGPOOL_START] = &aPrintWarnItem; + rPoolDefaults[SCITEM_CONDFORMATDLGDATA - MSGPOOL_START] = &aCondFormatDlgItem; - SetDefaults( ppPoolDefaults ); + SetDefaults( mpPoolDefaults ); SetSecondaryPool( pDocPool ); } @@ -83,9 +84,9 @@ ScMessagePool::~ScMessagePool() SetSecondaryPool( nullptr ); // before deleting defaults (accesses defaults) for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ ) - SetRefCount( *ppPoolDefaults[i], 0 ); + SetRefCount( *(*mpPoolDefaults)[i], 0 ); - delete[] ppPoolDefaults; + delete mpPoolDefaults; SfxItemPool::Free(pDocPool); } diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx index 83f3c591b10f..93f492c16823 100644 --- a/sc/source/ui/inc/msgpool.hxx +++ b/sc/source/ui/inc/msgpool.hxx @@ -47,8 +47,8 @@ class ScMessagePool: public SfxItemPool SfxBoolItem aPrintWarnItem; ScCondFormatDlgItem aCondFormatDlgItem; - SfxPoolItem** ppPoolDefaults; - ScDocumentPool* pDocPool; + std::vector<SfxPoolItem*>* mpPoolDefaults; + ScDocumentPool* pDocPool; public: ScMessagePool(); diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index 9141d049bd10..13e305b68b3f 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -36,7 +36,7 @@ class CntItemPool; class CntStaticPoolDefaults_Impl { static const sal_uInt32 m_nItems = 1; - SfxPoolItem** m_ppDefaults; + std::vector<SfxPoolItem*>* m_pDefaults; SfxItemInfo* m_pItemInfos; private: @@ -48,8 +48,8 @@ public: CntStaticPoolDefaults_Impl(const CntStaticPoolDefaults_Impl&) = delete; CntStaticPoolDefaults_Impl& operator=(const CntStaticPoolDefaults_Impl&) = delete; - SfxPoolItem** GetDefaults() const { return m_ppDefaults; } - const SfxItemInfo* GetItemInfos() const { return m_pItemInfos; } + std::vector<SfxPoolItem*>* GetDefaults() const { return m_pDefaults; } + const SfxItemInfo* GetItemInfos() const { return m_pItemInfos; } }; @@ -162,7 +162,7 @@ inline void CntStaticPoolDefaults_Impl::Insert( { sal_uInt16 nPos = pItem->Which() - WID_CHAOS_START; - m_ppDefaults[ nPos ] = pItem; + (*m_pDefaults)[ nPos ] = pItem; m_pItemInfos[ nPos ]._nSID = 0; m_pItemInfos[ nPos ]._bPoolable = true; } @@ -171,18 +171,17 @@ inline void CntStaticPoolDefaults_Impl::Insert( CntStaticPoolDefaults_Impl::~CntStaticPoolDefaults_Impl() { for ( sal_uInt32 n = 0; n < m_nItems; ++n ) - delete m_ppDefaults[ n ]; + delete (*m_pDefaults)[ n ]; - delete [] m_ppDefaults; + delete m_pDefaults; delete [] m_pItemInfos; } CntStaticPoolDefaults_Impl::CntStaticPoolDefaults_Impl( CntItemPool* /*pPool*/ ) -: m_ppDefaults( new SfxPoolItem* [ m_nItems ] ), +: m_pDefaults( new std::vector<SfxPoolItem*>( m_nItems, nullptr ) ), m_pItemInfos( new SfxItemInfo [ m_nItems ] ) { - memset( m_ppDefaults, 0, sizeof( SfxPoolItem* ) * m_nItems ); memset( m_pItemInfos, 0, sizeof( SfxItemInfo ) * m_nItems ); Insert( new SfxStringItem( WID_CHAOS_START, OUString() ) ); } diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index b1cf78f8e15b..cf2dc7fa5a5f 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -99,7 +99,7 @@ struct SfxItemPool_Impl std::vector<SfxItemPoolUser*> maSfxItemPoolUsers; /// ObjectUser section OUString aName; std::vector<SfxPoolItem*> maPoolDefaults; - SfxPoolItem** ppStaticDefaults; + std::vector<SfxPoolItem*>* mpStaticDefaults; SfxItemPool* mpMaster; SfxItemPool* mpSecondary; sal_uInt16* mpPoolRanges; @@ -122,7 +122,7 @@ struct SfxItemPool_Impl : maPoolItems(nEnd - nStart + 1) , aName(rName) , maPoolDefaults(nEnd - nStart + 1) - , ppStaticDefaults(nullptr) + , mpStaticDefaults(nullptr) , mpMaster(pMaster) , mpSecondary(nullptr) , mpPoolRanges(nullptr) diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 9f80d471cb88..679a097adf2f 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -155,10 +155,10 @@ SfxBroadcaster& SfxItemPool::BC() * * If the Pool is supposed to hold SfxSetItems, the ctor cannot yet contain * static Defaults. This needs to be done afterwards, using - * @see SfxItemPool::SetDefaults(SfxItemPool**). + * @see SfxItemPool::SetDefaults(std::vector<SfxPoolItem*>*). * - * @see SfxItemPool::SetDefaults(SfxItemPool**) - * @see SfxItemPool::ReleaseDefaults(SfxPoolItem**,sal_uInt16,sal_Bool) + * @see SfxItemPool::SetDefaults(std::vector<SfxPoolItem*>*) + * @see SfxItemPool::ReleaseDefaults(std::vector<SfxPoolItem*>*,sal_uInt16,sal_Bool) * @see SfxItemPool::ReldaseDefaults(sal_Bool) */ SfxItemPool::SfxItemPool @@ -166,8 +166,9 @@ SfxItemPool::SfxItemPool const OUString& rName, /* Pool name to identify in the file format */ sal_uInt16 nStartWhich, /* First WhichId of the Pool (must be > 0) */ sal_uInt16 nEndWhich, /* Last WhichId of the Pool */ - const SfxItemInfo* pInfo, /* SID Map and Item flags */ - SfxPoolItem** pDefaults, /* Pointer to static Defaults; + const SfxItemInfo* pInfo, /* SID Map and Item flags */ + std::vector<SfxPoolItem*>* + pDefaults, /* Pointer to static Defaults; is directly referenced by the Pool, but no transfer of ownership */ bool bLoadRefCounts /* Load RefCounts or set to 1? */ @@ -224,17 +225,17 @@ SfxItemPool::SfxItemPool // Take over static Defaults if ( bCloneStaticDefaults ) { - SfxPoolItem **ppDefaults = new SfxPoolItem*[pImpl->mnEnd-pImpl->mnStart+1]; + std::vector<SfxPoolItem *>* ppDefaults = new std::vector<SfxPoolItem*>(pImpl->mnEnd-pImpl->mnStart+1); for ( sal_uInt16 n = 0; n <= pImpl->mnEnd - pImpl->mnStart; ++n ) { - (*( ppDefaults + n )) = (*( rPool.pImpl->ppStaticDefaults + n ))->Clone(this); - (*( ppDefaults + n ))->SetKind(SfxItemKind::StaticDefault); + (*ppDefaults)[n] = (*rPool.pImpl->mpStaticDefaults)[n]->Clone(this); + (*ppDefaults)[n]->SetKind(SfxItemKind::StaticDefault); } SetDefaults( ppDefaults ); } else - SetDefaults( rPool.pImpl->ppStaticDefaults ); + SetDefaults( rPool.pImpl->mpStaticDefaults ); // Copy Pool Defaults for (size_t n = 0; n < pImpl->maPoolDefaults.size(); ++n ) @@ -257,23 +258,23 @@ SfxItemPool::SfxItemPool } -void SfxItemPool::SetDefaults( SfxPoolItem **pDefaults ) +void SfxItemPool::SetDefaults( std::vector<SfxPoolItem*>* pDefaults ) { DBG_ASSERT( pDefaults, "first we ask for it, and then we don't give back..." ); - DBG_ASSERT( !pImpl->ppStaticDefaults, "already have Defaults" ); + DBG_ASSERT( !pImpl->mpStaticDefaults, "already have Defaults" ); - pImpl->ppStaticDefaults = pDefaults; - //! if ((*ppStaticDefaults)->GetKind() != SfxItemKind::StaticDefault) + pImpl->mpStaticDefaults = pDefaults; + //! if ((*mpStaticDefaults)->GetKind() != SfxItemKind::StaticDefault) //! FIXME: Probably doesn't work with SetItems at the end { - DBG_ASSERT( (*pImpl->ppStaticDefaults)->GetRefCount() == 0 || - IsDefaultItem( (*pImpl->ppStaticDefaults) ), + DBG_ASSERT( (*pImpl->mpStaticDefaults)[0]->GetRefCount() == 0 || + IsDefaultItem( (*pImpl->mpStaticDefaults)[0] ), "these are not static" ); for ( sal_uInt16 n = 0; n <= pImpl->mnEnd - pImpl->mnStart; ++n ) { - assert(((*(pImpl->ppStaticDefaults + n))->Which() == n + pImpl->mnStart) + assert( ((*pImpl->mpStaticDefaults)[n]->Which() == n + pImpl->mnStart) && "static defaults not sorted" ); - (*( pImpl->ppStaticDefaults + n ))->SetKind(SfxItemKind::StaticDefault); + (*pImpl->mpStaticDefaults)[n]->SetKind(SfxItemKind::StaticDefault); DBG_ASSERT( !(pImpl->maPoolItems[n]), "defaults with setitems with items?!" ); } } @@ -298,12 +299,12 @@ void SfxItemPool::ReleaseDefaults { - DBG_ASSERT( pImpl->ppStaticDefaults, "requirements not met" ); - ReleaseDefaults( pImpl->ppStaticDefaults, pImpl->mnEnd - pImpl->mnStart + 1, bDelete ); + DBG_ASSERT( pImpl->mpStaticDefaults, "requirements not met" ); + ReleaseDefaults( pImpl->mpStaticDefaults, bDelete ); - // ppStaticDefaults points to deleted memory if bDelete == true. + // mpStaticDefaults points to deleted memory if bDelete == true. if ( bDelete ) - pImpl->ppStaticDefaults = nullptr; + pImpl->mpStaticDefaults = nullptr; } @@ -316,9 +317,8 @@ void SfxItemPool::ReleaseDefaults */ void SfxItemPool::ReleaseDefaults ( - SfxPoolItem** pDefaults, /* Static Defaults that are to be freed */ - - sal_uInt16 nCount, /* Count of static Defaults */ + std::vector<SfxPoolItem*>* + pDefaults, /* Static Defaults that are to be freed */ bool bDelete /* true Deletes the array as well as the specified @@ -331,16 +331,22 @@ void SfxItemPool::ReleaseDefaults { DBG_ASSERT( pDefaults, "we first ask for it and the return nothing ..." ); - for ( sal_uInt16 n = 0; n < nCount; ++n ) + for ( auto & rpItem : *pDefaults ) { - assert(IsStaticDefaultItem(pDefaults[n])); - pDefaults[n]->SetRefCount(0); + assert(IsStaticDefaultItem(rpItem)); + rpItem->SetRefCount(0); if ( bDelete ) - { delete pDefaults[n] ; pDefaults[n]= nullptr; } + { + delete rpItem; + rpItem = nullptr; + } } if ( bDelete ) - { delete[] pDefaults; pDefaults = nullptr; } + { + delete pDefaults; + pDefaults = nullptr; + } } @@ -390,14 +396,14 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool ) if ( pImpl->mpSecondary ) { #ifdef DBG_UTIL - if (pImpl->ppStaticDefaults != nullptr && !pImpl->maPoolItems.empty() + if (pImpl->mpStaticDefaults != nullptr && !pImpl->maPoolItems.empty() && !pImpl->mpSecondary->pImpl->maPoolItems.empty()) // Delete() did not yet run? { // Does the Master have SetItems? bool bHasSetItems = false; for ( sal_uInt16 i = 0; !bHasSetItems && i < pImpl->mnEnd - pImpl->mnStart; ++i ) - bHasSetItems = dynamic_cast<const SfxSetItem *>(pImpl->ppStaticDefaults[i]) != nullptr; + bHasSetItems = dynamic_cast<const SfxSetItem *>((*pImpl->mpStaticDefaults)[i]) != nullptr; // Detached Pools must be empty bool bOK = bHasSetItems; @@ -490,13 +496,13 @@ void SfxItemPool::Delete() pImpl->aBC.Broadcast( SfxHint( SfxHintId::Dying ) ); // Iterate through twice: first for the SetItems. - if (pImpl->ppStaticDefaults != nullptr) { + if (pImpl->mpStaticDefaults != nullptr) { for (size_t n = 0; n < GetSize_Impl(); ++n) { - // *ppStaticDefaultItem could've already been deleted in a class derived + // *mpStaticDefaultItem could've already been deleted in a class derived // from SfxItemPool // This causes chaos in Itempool! - const SfxPoolItem* pStaticDefaultItem = pImpl->ppStaticDefaults[n]; + const SfxPoolItem* pStaticDefaultItem = (*pImpl->mpStaticDefaults)[n]; if (pStaticDefaultItem && dynamic_cast<const SfxSetItem*>(pStaticDefaultItem) != nullptr) { // SfxSetItem found, remove PoolItems (and defaults) with same ID @@ -631,7 +637,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich return *pPoolItem; } - assert(!pImpl->ppStaticDefaults || + assert(!pImpl->mpStaticDefaults || typeid(rItem) == typeid(GetDefaultItem(nWhich))); const sal_uInt16 nIndex = GetIndex_Impl(nWhich); @@ -765,7 +771,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) const sal_uInt16 nIndex = GetIndex_Impl(nWhich); // Static Defaults are just there if ( IsStaticDefaultItem(&rItem) && - &rItem == pImpl->ppStaticDefaults[nIndex]) + &rItem == (*pImpl->mpStaticDefaults)[nIndex]) return; // Find Item in own Pool @@ -811,12 +817,12 @@ const SfxPoolItem& SfxItemPool::GetDefaultItem( sal_uInt16 nWhich ) const assert(!"unknown which - don't ask me for defaults"); } - DBG_ASSERT( pImpl->ppStaticDefaults, "no defaults known - don't ask me for defaults" ); + DBG_ASSERT( pImpl->mpStaticDefaults, "no defaults known - don't ask me for defaults" ); sal_uInt16 nPos = GetIndex_Impl(nWhich); SfxPoolItem* pDefault = pImpl->maPoolDefaults[nPos]; if ( pDefault ) return *pDefault; - return **(pImpl->ppStaticDefaults + nPos); + return *(*pImpl->mpStaticDefaults)[nPos]; } SfxItemPool* SfxItemPool::GetSecondaryPool() const @@ -884,7 +890,7 @@ const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) co // default attribute? if ( nOfst == SFX_ITEMS_DEFAULT ) - return *(pImpl->ppStaticDefaults + GetIndex_Impl(nWhich)); + return (*pImpl->mpStaticDefaults)[ GetIndex_Impl(nWhich) ]; SfxPoolItemArray_Impl* pItemArr = pImpl->maPoolItems[GetIndex_Impl(nWhich)]; if( pItemArr && nOfst < pItemArr->size() ) diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index e008f74b032e..24a18e1889a2 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -219,25 +219,25 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const pImpl->bInSetItem = ft != 0; std::vector<SfxPoolItemArray_Impl*>::const_iterator itrArr = pImpl->maPoolItems.begin(); - SfxPoolItem **ppDefItem = pImpl->ppStaticDefaults; + std::vector<SfxPoolItem*> & rStaticDefaults = *pImpl->mpStaticDefaults; const sal_uInt16 nSize = GetSize_Impl(); - for ( size_t i = 0; i < nSize && !rStream.GetError(); ++i, ++itrArr, ++ppDefItem ) + for ( size_t i = 0; i < nSize && !rStream.GetError(); ++i, ++itrArr ) { // Get version of the Item - sal_uInt16 nItemVersion = (*ppDefItem)->GetVersion( pImpl->mnFileFormatVersion ); + sal_uInt16 nItemVersion = rStaticDefaults[i]->GetVersion( pImpl->mnFileFormatVersion ); if ( USHRT_MAX == nItemVersion ) // => Was not present in the version that was supposed to be exported continue; // ! Poolable is not even saved in the Pool // And itemsets/plain-items depending on the round - if ( *itrArr && IsItemPoolable(**ppDefItem) && - pImpl->bInSetItem == (dynamic_cast< const SfxSetItem* >(*ppDefItem) != nullptr) ) + if ( *itrArr && IsItemPoolable(*rStaticDefaults[i]) && + pImpl->bInSetItem == (dynamic_cast< const SfxSetItem* >(rStaticDefaults[i]) != nullptr) ) { // Own signature, global WhichId and ItemVersion - sal_uInt16 nSlotId = GetSlotId( (*ppDefItem)->Which(), false ); + sal_uInt16 nSlotId = GetSlotId( rStaticDefaults[i]->Which(), false ); aWhichIdsRec.NewContent(nSlotId, 0); - rStream.WriteUInt16( (*ppDefItem)->Which() ); + rStream.WriteUInt16( rStaticDefaults[i]->Which() ); rStream.WriteUInt16( nItemVersion ); const sal_uInt32 nCount = ::std::min<size_t>( (*itrArr)->size(), SAL_MAX_UINT32 ); DBG_ASSERT(nCount, "ItemArr is empty"); @@ -483,7 +483,7 @@ void SfxItemPool_Impl::readTheItems ( SvStream &SfxItemPool::Load(SvStream &rStream) { - DBG_ASSERT(pImpl->ppStaticDefaults, "No DefaultArray"); + DBG_ASSERT(pImpl->mpStaticDefaults, "No DefaultArray"); // Protect items by increasing ref count if ( !pImpl->mbPersistentRefCounts ) @@ -661,7 +661,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream) SfxPoolItemArray_Impl **ppArr = &pImpl->maPoolItems[0] + nIndex; // SfxSetItems could contain Items from secondary Pools - SfxPoolItem *pDefItem = *(pImpl->ppStaticDefaults + nIndex); + SfxPoolItem *pDefItem = (*pImpl->mpStaticDefaults)[nIndex]; pImpl->bInSetItem = dynamic_cast<const SfxSetItem*>( pDefItem ) != nullptr; if ( !bSecondaryLoaded && pImpl->mpSecondary && pImpl->bInSetItem ) { @@ -708,11 +708,10 @@ SvStream &SfxItemPool::Load(SvStream &rStream) //! nWhich, "Slot/Which mismatch" ); // Load PoolDefaultItem - SfxPoolItem *pItem = - ( *( pImpl->ppStaticDefaults + GetIndex_Impl(nWhich) ) ) - ->Create( rStream, nVersion ); + sal_uInt16 nIndex = GetIndex_Impl(nWhich); + SfxPoolItem *pItem = (*pImpl->mpStaticDefaults)[ nIndex ]->Create( rStream, nVersion ); pItem->SetKind( SfxItemKind::PoolDefault ); - pImpl->maPoolDefaults[GetIndex_Impl(nWhich)] = pItem; + pImpl->maPoolDefaults[nIndex] = pItem; } } @@ -832,13 +831,12 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate // Found the right (Range-)Pool? if ( pTarget->IsInRange(rWhich) ) { + sal_uInt16 nIndex = pTarget->GetIndex_Impl(rWhich); // Default attribute? if ( SFX_ITEMS_DEFAULT == nSurrogat ) - return *(pTarget->pImpl->ppStaticDefaults + - pTarget->GetIndex_Impl(rWhich)); + return (*pTarget->pImpl->mpStaticDefaults)[ nIndex ]; - SfxPoolItemArray_Impl* pItemArr = - pTarget->pImpl->maPoolItems[pTarget->GetIndex_Impl(rWhich)]; + SfxPoolItemArray_Impl* pItemArr = pTarget->pImpl->maPoolItems[nIndex]; pItem = pItemArr && nSurrogat < pItemArr->size() ? (*pItemArr)[nSurrogat] : nullptr; @@ -1238,7 +1236,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, nWhich = pRefPool->GetNewWhich( nWhich ); // Map WhichId to new version DBG_ASSERT( !nWhich || !pImpl->bInSetItem || - dynamic_cast<const SfxSetItem*>( pRefPool->pImpl->ppStaticDefaults[pRefPool->GetIndex_Impl(nWhich)] ) == nullptr, + dynamic_cast<const SfxSetItem*>( (*pRefPool->pImpl->mpStaticDefaults)[pRefPool->GetIndex_Impl(nWhich)] ) == nullptr, "loading SetItem in ItemSet of SetItem" ); // Are we loading via surrogate? diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 196a344b6111..ca9259304cc9 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -120,195 +120,196 @@ SdrItemPool::SdrItemPool( } // init own PoolDefaults - mppLocalPoolDefaults[SDRATTR_SHADOW -SDRATTR_START]=new SdrOnOffItem(SDRATTR_SHADOW, false); - mppLocalPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new XColorItem(SDRATTR_SHADOWCOLOR, aNullCol); - mppLocalPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWXDIST, 0); - mppLocalPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWYDIST, 0); - mppLocalPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0); - mppLocalPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D ); - mppLocalPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP ); - mppLocalPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE, true); - mppLocalPoolDefaults[SDRATTR_CAPTIONANGLE -SDRATTR_START]=new SdrCaptionAngleItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONGAP -SDRATTR_START]=new SdrCaptionGapItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONESCDIR -SDRATTR_START]=new SdrCaptionEscDirItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONESCISREL -SDRATTR_START]=new SdrCaptionEscIsRelItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONESCREL -SDRATTR_START]=new SdrCaptionEscRelItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONESCABS -SDRATTR_START]=new SdrCaptionEscAbsItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONLINELEN -SDRATTR_START]=new SdrCaptionLineLenItem ; - mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem; - mppLocalPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrMetricItem(SDRATTR_ECKENRADIUS, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true); - mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem; - mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_UPPERDIST, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LOWERDIST, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_VERTADJUST -SDRATTR_START]=new SdrTextVertAdjustItem; - mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false); - mppLocalPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANISTARTINSIDE -SDRATTR_START]=new SdrTextAniStartInsideItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANISTOPINSIDE -SDRATTR_START]=new SdrTextAniStopInsideItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANICOUNT -SDRATTR_START]=new SdrTextAniCountItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANIDELAY -SDRATTR_START]=new SdrTextAniDelayItem; - mppLocalPoolDefaults[SDRATTR_TEXT_ANIAMOUNT -SDRATTR_START]=new SdrTextAniAmountItem; - mppLocalPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, false); - mppLocalPoolDefaults[SDRATTR_CUSTOMSHAPE_ADJUSTMENT -SDRATTR_START]=new SdrCustomShapeAdjustmentItem; - mppLocalPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES ); - mppLocalPoolDefaults[SDRATTR_TEXT_CHAINNEXTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, ""); - mppLocalPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem; - mppLocalPoolDefaults[SDRATTR_TEXT_WORDWRAP -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true); - mppLocalPoolDefaults[SDRATTR_EDGEKIND -SDRATTR_START]=new SdrEdgeKindItem; - mppLocalPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist); - mppLocalPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist); - mppLocalPoolDefaults[SDRATTR_EDGENODE2HORZDIST-SDRATTR_START]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist); - mppLocalPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new SdrEdgeNode2VertDistItem(nDefEdgeDist); - mppLocalPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem; - mppLocalPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem; - mppLocalPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new SdrEdgeLineDeltaCountItem; - mppLocalPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0); - mppLocalPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0); - mppLocalPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0); - mppLocalPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem; - mppLocalPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem; - mppLocalPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem; - mppLocalPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASURELINEDIST, 800); - mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, 200); - mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, 100); - mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, 0); - mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, 0); - mppLocalPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem; - mppLocalPoolDefaults[SDRATTR_MEASURETEXTROTA90 -SDRATTR_START]=new SdrMeasureTextRota90Item; - mppLocalPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN -SDRATTR_START]=new SdrMeasureTextUpsideDownItem; - mppLocalPoolDefaults[SDRATTR_MEASUREOVERHANG -SDRATTR_START]=new SdrMeasureOverhangItem(600); - mppLocalPoolDefaults[SDRATTR_MEASUREUNIT -SDRATTR_START]=new SdrMeasureUnitItem; - mppLocalPoolDefaults[SDRATTR_MEASURESCALE -SDRATTR_START]=new SdrMeasureScaleItem; - mppLocalPoolDefaults[SDRATTR_MEASURESHOWUNIT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, false); - mppLocalPoolDefaults[SDRATTR_MEASUREFORMATSTRING -SDRATTR_START]=new SdrMeasureFormatStringItem(); - mppLocalPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLE -SDRATTR_START]=new SdrMeasureTextAutoAngleItem(); - mppLocalPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLEVIEW-SDRATTR_START]=new SdrMeasureTextAutoAngleViewItem(); - mppLocalPoolDefaults[SDRATTR_MEASURETEXTISFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextIsFixedAngleItem(); - mppLocalPoolDefaults[SDRATTR_MEASURETEXTFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextFixedAngleItem(); - mppLocalPoolDefaults[SDRATTR_MEASUREDECIMALPLACES -SDRATTR_START]=new SdrMeasureDecimalPlacesItem(); - mppLocalPoolDefaults[SDRATTR_CIRCKIND -SDRATTR_START]=new SdrCircKindItem; - mppLocalPoolDefaults[SDRATTR_CIRCSTARTANGLE-SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCSTARTANGLE, 0); - mppLocalPoolDefaults[SDRATTR_CIRCENDANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCENDANGLE, 36000); - mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, false); - mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, false); - mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem; - mppLocalPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem; - mppLocalPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem; - mppLocalPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem; - mppLocalPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_OBJECTNAME); - mppLocalPoolDefaults[SDRATTR_ALLPOSITIONX -SDRATTR_START]=new SdrAllPositionXItem; - mppLocalPoolDefaults[SDRATTR_ALLPOSITIONY -SDRATTR_START]=new SdrAllPositionYItem; - mppLocalPoolDefaults[SDRATTR_ALLSIZEWIDTH -SDRATTR_START]=new SdrAllSizeWidthItem; - mppLocalPoolDefaults[SDRATTR_ALLSIZEHEIGHT -SDRATTR_START]=new SdrAllSizeHeightItem; - mppLocalPoolDefaults[SDRATTR_ONEPOSITIONX -SDRATTR_START]=new SdrOnePositionXItem; - mppLocalPoolDefaults[SDRATTR_ONEPOSITIONY -SDRATTR_START]=new SdrOnePositionYItem; - mppLocalPoolDefaults[SDRATTR_ONESIZEWIDTH -SDRATTR_START]=new SdrOneSizeWidthItem; - mppLocalPoolDefaults[SDRATTR_ONESIZEHEIGHT -SDRATTR_START]=new SdrOneSizeHeightItem; - mppLocalPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem; - mppLocalPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem; - mppLocalPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_ROTATEANGLE, 0); - mppLocalPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new SdrShearAngleItem; - mppLocalPoolDefaults[SDRATTR_MOVEX -SDRATTR_START]=new SdrMoveXItem; - mppLocalPoolDefaults[SDRATTR_MOVEY -SDRATTR_START]=new SdrMoveYItem; - mppLocalPoolDefaults[SDRATTR_RESIZEXONE -SDRATTR_START]=new SdrResizeXOneItem; - mppLocalPoolDefaults[SDRATTR_RESIZEYONE -SDRATTR_START]=new SdrResizeYOneItem; - mppLocalPoolDefaults[SDRATTR_ROTATEONE -SDRATTR_START]=new SdrRotateOneItem; - mppLocalPoolDefaults[SDRATTR_HORZSHEARONE -SDRATTR_START]=new SdrHorzShearOneItem; - mppLocalPoolDefaults[SDRATTR_VERTSHEARONE -SDRATTR_START]=new SdrVertShearOneItem; - mppLocalPoolDefaults[SDRATTR_RESIZEXALL -SDRATTR_START]=new SdrResizeXAllItem; - mppLocalPoolDefaults[SDRATTR_RESIZEYALL -SDRATTR_START]=new SdrResizeYAllItem; - mppLocalPoolDefaults[SDRATTR_ROTATEALL -SDRATTR_START]=new SdrRotateAllItem; - mppLocalPoolDefaults[SDRATTR_HORZSHEARALL -SDRATTR_START]=new SdrHorzShearAllItem; - mppLocalPoolDefaults[SDRATTR_VERTSHEARALL -SDRATTR_START]=new SdrVertShearAllItem; - mppLocalPoolDefaults[SDRATTR_TRANSFORMREF1X -SDRATTR_START]=new SdrTransformRef1XItem; - mppLocalPoolDefaults[SDRATTR_TRANSFORMREF1Y -SDRATTR_START]=new SdrTransformRef1YItem; - mppLocalPoolDefaults[SDRATTR_TRANSFORMREF2X -SDRATTR_START]=new SdrTransformRef2XItem; - mppLocalPoolDefaults[SDRATTR_TRANSFORMREF2Y -SDRATTR_START]=new SdrTransformRef2YItem; - mppLocalPoolDefaults[SDRATTR_TEXTDIRECTION -SDRATTR_START]=new SvxWritingModeItem(css::text::WritingMode_LR_TB, SDRATTR_TEXTDIRECTION); - mppLocalPoolDefaults[ SDRATTR_GRAFRED - SDRATTR_START] = new SdrGrafRedItem; - mppLocalPoolDefaults[ SDRATTR_GRAFGREEN - SDRATTR_START] = new SdrGrafGreenItem; - mppLocalPoolDefaults[ SDRATTR_GRAFBLUE - SDRATTR_START] = new SdrGrafBlueItem; - mppLocalPoolDefaults[ SDRATTR_GRAFLUMINANCE - SDRATTR_START] = new SdrGrafLuminanceItem; - mppLocalPoolDefaults[ SDRATTR_GRAFCONTRAST - SDRATTR_START] = new SdrGrafContrastItem; - mppLocalPoolDefaults[ SDRATTR_GRAFGAMMA - SDRATTR_START] = new SdrGrafGamma100Item; - mppLocalPoolDefaults[ SDRATTR_GRAFTRANSPARENCE - SDRATTR_START] = new SdrGrafTransparenceItem; - mppLocalPoolDefaults[ SDRATTR_GRAFINVERT - SDRATTR_START] = new SdrGrafInvertItem; - mppLocalPoolDefaults[ SDRATTR_GRAFMODE - SDRATTR_START] = new SdrGrafModeItem; - mppLocalPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, 10); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, 100); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, 3600); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, false); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, false); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, false); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, 15); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, false); - mppLocalPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_NORMALS - SDRATTR_START ] = new Svx3DSmoothNormalsItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_LIDS - SDRATTR_START ] = new Svx3DSmoothLidsItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_CHARACTER_MODE - SDRATTR_START ] = new Svx3DCharacterModeItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_FRONT - SDRATTR_START ] = new Svx3DCloseFrontItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY - SDRATTR_START ] = new Svx3DReducedLineGeometryItem; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, true); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_4 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_5 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, basegfx::B3DVector(0.0,0.0,1.0)); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem; - mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE, ""); - mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_DATA - SDRATTR_START ] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA, ""); - mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_GEOMETRY - SDRATTR_START ] = new SdrCustomShapeGeometryItem; - mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL - SDRATTR_START ] = new SdrCustomShapeReplacementURLItem; + std::vector<SfxPoolItem*>& rPoolDefaults = *mpLocalPoolDefaults; + rPoolDefaults[SDRATTR_SHADOW -SDRATTR_START]=new SdrOnOffItem(SDRATTR_SHADOW, false); + rPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new XColorItem(SDRATTR_SHADOWCOLOR, aNullCol); + rPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWXDIST, 0); + rPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWYDIST, 0); + rPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0); + rPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D ); + rPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP ); + rPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ; + rPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE, true); + rPoolDefaults[SDRATTR_CAPTIONANGLE -SDRATTR_START]=new SdrCaptionAngleItem ; + rPoolDefaults[SDRATTR_CAPTIONGAP -SDRATTR_START]=new SdrCaptionGapItem ; + rPoolDefaults[SDRATTR_CAPTIONESCDIR -SDRATTR_START]=new SdrCaptionEscDirItem ; + rPoolDefaults[SDRATTR_CAPTIONESCISREL -SDRATTR_START]=new SdrCaptionEscIsRelItem ; + rPoolDefaults[SDRATTR_CAPTIONESCREL -SDRATTR_START]=new SdrCaptionEscRelItem ; + rPoolDefaults[SDRATTR_CAPTIONESCABS -SDRATTR_START]=new SdrCaptionEscAbsItem ; + rPoolDefaults[SDRATTR_CAPTIONLINELEN -SDRATTR_START]=new SdrCaptionLineLenItem ; + rPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem; + rPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrMetricItem(SDRATTR_ECKENRADIUS, 0); + rPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0); + rPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true); + rPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem; + rPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0); + rPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0); + rPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_UPPERDIST, 0); + rPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LOWERDIST, 0); + rPoolDefaults[SDRATTR_TEXT_VERTADJUST -SDRATTR_START]=new SdrTextVertAdjustItem; + rPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0); + rPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0); + rPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0); + rPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false); + rPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem; + rPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem; + rPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem; + rPoolDefaults[SDRATTR_TEXT_ANISTARTINSIDE -SDRATTR_START]=new SdrTextAniStartInsideItem; + rPoolDefaults[SDRATTR_TEXT_ANISTOPINSIDE -SDRATTR_START]=new SdrTextAniStopInsideItem; + rPoolDefaults[SDRATTR_TEXT_ANICOUNT -SDRATTR_START]=new SdrTextAniCountItem; + rPoolDefaults[SDRATTR_TEXT_ANIDELAY -SDRATTR_START]=new SdrTextAniDelayItem; + rPoolDefaults[SDRATTR_TEXT_ANIAMOUNT -SDRATTR_START]=new SdrTextAniAmountItem; + rPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, false); + rPoolDefaults[SDRATTR_CUSTOMSHAPE_ADJUSTMENT -SDRATTR_START]=new SdrCustomShapeAdjustmentItem; + rPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES ); + rPoolDefaults[SDRATTR_TEXT_CHAINNEXTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, ""); + rPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem; + rPoolDefaults[SDRATTR_TEXT_WORDWRAP -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true); + rPoolDefaults[SDRATTR_EDGEKIND -SDRATTR_START]=new SdrEdgeKindItem; + rPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist); + rPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist); + rPoolDefaults[SDRATTR_EDGENODE2HORZDIST-SDRATTR_START]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist); + rPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new SdrEdgeNode2VertDistItem(nDefEdgeDist); + rPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem; + rPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem; + rPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new SdrEdgeLineDeltaCountItem; + rPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE1DELTA, 0); + rPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE2DELTA, 0); + rPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrMetricItem(SDRATTR_EDGELINE3DELTA, 0); + rPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem; + rPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem; + rPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem; + rPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASURELINEDIST, 800); + rPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, 200); + rPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, 100); + rPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, 0); + rPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, 0); + rPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem; + rPoolDefaults[SDRATTR_MEASURETEXTROTA90 -SDRATTR_START]=new SdrMeasureTextRota90Item; + rPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN -SDRATTR_START]=new SdrMeasureTextUpsideDownItem; + rPoolDefaults[SDRATTR_MEASUREOVERHANG -SDRATTR_START]=new SdrMeasureOverhangItem(600); + rPoolDefaults[SDRATTR_MEASUREUNIT -SDRATTR_START]=new SdrMeasureUnitItem; + rPoolDefaults[SDRATTR_MEASURESCALE -SDRATTR_START]=new SdrMeasureScaleItem; + rPoolDefaults[SDRATTR_MEASURESHOWUNIT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, false); + rPoolDefaults[SDRATTR_MEASUREFORMATSTRING -SDRATTR_START]=new SdrMeasureFormatStringItem(); + rPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLE -SDRATTR_START]=new SdrMeasureTextAutoAngleItem(); + rPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLEVIEW-SDRATTR_START]=new SdrMeasureTextAutoAngleViewItem(); + rPoolDefaults[SDRATTR_MEASURETEXTISFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextIsFixedAngleItem(); + rPoolDefaults[SDRATTR_MEASURETEXTFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextFixedAngleItem(); + rPoolDefaults[SDRATTR_MEASUREDECIMALPLACES -SDRATTR_START]=new SdrMeasureDecimalPlacesItem(); + rPoolDefaults[SDRATTR_CIRCKIND -SDRATTR_START]=new SdrCircKindItem; + rPoolDefaults[SDRATTR_CIRCSTARTANGLE-SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCSTARTANGLE, 0); + rPoolDefaults[SDRATTR_CIRCENDANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_CIRCENDANGLE, 36000); + rPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, false); + rPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, false); + rPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem; + rPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem; + rPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem; + rPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem; + rPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_OBJECTNAME); + rPoolDefaults[SDRATTR_ALLPOSITIONX -SDRATTR_START]=new SdrAllPositionXItem; + rPoolDefaults[SDRATTR_ALLPOSITIONY -SDRATTR_START]=new SdrAllPositionYItem; + rPoolDefaults[SDRATTR_ALLSIZEWIDTH -SDRATTR_START]=new SdrAllSizeWidthItem; + rPoolDefaults[SDRATTR_ALLSIZEHEIGHT -SDRATTR_START]=new SdrAllSizeHeightItem; + rPoolDefaults[SDRATTR_ONEPOSITIONX -SDRATTR_START]=new SdrOnePositionXItem; + rPoolDefaults[SDRATTR_ONEPOSITIONY -SDRATTR_START]=new SdrOnePositionYItem; + rPoolDefaults[SDRATTR_ONESIZEWIDTH -SDRATTR_START]=new SdrOneSizeWidthItem; + rPoolDefaults[SDRATTR_ONESIZEHEIGHT -SDRATTR_START]=new SdrOneSizeHeightItem; + rPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem; + rPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem; + rPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrAngleItem(SDRATTR_ROTATEANGLE, 0); + rPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new SdrShearAngleItem; + rPoolDefaults[SDRATTR_MOVEX -SDRATTR_START]=new SdrMoveXItem; + rPoolDefaults[SDRATTR_MOVEY -SDRATTR_START]=new SdrMoveYItem; + rPoolDefaults[SDRATTR_RESIZEXONE -SDRATTR_START]=new SdrResizeXOneItem; + rPoolDefaults[SDRATTR_RESIZEYONE -SDRATTR_START]=new SdrResizeYOneItem; + rPoolDefaults[SDRATTR_ROTATEONE -SDRATTR_START]=new SdrRotateOneItem; + rPoolDefaults[SDRATTR_HORZSHEARONE -SDRATTR_START]=new SdrHorzShearOneItem; + rPoolDefaults[SDRATTR_VERTSHEARONE -SDRATTR_START]=new SdrVertShearOneItem; + rPoolDefaults[SDRATTR_RESIZEXALL -SDRATTR_START]=new SdrResizeXAllItem; + rPoolDefaults[SDRATTR_RESIZEYALL -SDRATTR_START]=new SdrResizeYAllItem; + rPoolDefaults[SDRATTR_ROTATEALL -SDRATTR_START]=new SdrRotateAllItem; + rPoolDefaults[SDRATTR_HORZSHEARALL -SDRATTR_START]=new SdrHorzShearAllItem; + rPoolDefaults[SDRATTR_VERTSHEARALL -SDRATTR_START]=new SdrVertShearAllItem; + rPoolDefaults[SDRATTR_TRANSFORMREF1X -SDRATTR_START]=new SdrTransformRef1XItem; + rPoolDefaults[SDRATTR_TRANSFORMREF1Y -SDRATTR_START]=new SdrTransformRef1YItem; + rPoolDefaults[SDRATTR_TRANSFORMREF2X -SDRATTR_START]=new SdrTransformRef2XItem; + rPoolDefaults[SDRATTR_TRANSFORMREF2Y -SDRATTR_START]=new SdrTransformRef2YItem; + rPoolDefaults[SDRATTR_TEXTDIRECTION -SDRATTR_START]=new SvxWritingModeItem(css::text::WritingMode_LR_TB, SDRATTR_TEXTDIRECTION); + rPoolDefaults[ SDRATTR_GRAFRED - SDRATTR_START] = new SdrGrafRedItem; + rPoolDefaults[ SDRATTR_GRAFGREEN - SDRATTR_START] = new SdrGrafGreenItem; + rPoolDefaults[ SDRATTR_GRAFBLUE - SDRATTR_START] = new SdrGrafBlueItem; + rPoolDefaults[ SDRATTR_GRAFLUMINANCE - SDRATTR_START] = new SdrGrafLuminanceItem; + rPoolDefaults[ SDRATTR_GRAFCONTRAST - SDRATTR_START] = new SdrGrafContrastItem; + rPoolDefaults[ SDRATTR_GRAFGAMMA - SDRATTR_START] = new SdrGrafGamma100Item; + rPoolDefaults[ SDRATTR_GRAFTRANSPARENCE - SDRATTR_START] = new SdrGrafTransparenceItem; + rPoolDefaults[ SDRATTR_GRAFINVERT - SDRATTR_START] = new SdrGrafInvertItem; + rPoolDefaults[ SDRATTR_GRAFMODE - SDRATTR_START] = new SdrGrafModeItem; + rPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem; + rPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, 10); + rPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, 100); + rPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000); + rPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24); + rPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24); + rPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, 3600); + rPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, false); + rPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem; + rPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, false); + rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem; + rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem; + rPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, false); + rPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR); + rPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION); + rPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR); + rPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, 15); + rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem; + rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem; + rPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, false); + rPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_NORMALS - SDRATTR_START ] = new Svx3DSmoothNormalsItem; + rPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_LIDS - SDRATTR_START ] = new Svx3DSmoothLidsItem; + rPoolDefaults[ SDRATTR_3DOBJ_CHARACTER_MODE - SDRATTR_START ] = new Svx3DCharacterModeItem; + rPoolDefaults[ SDRATTR_3DOBJ_CLOSE_FRONT - SDRATTR_START ] = new Svx3DCloseFrontItem; + rPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem; + rPoolDefaults[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY - SDRATTR_START ] = new Svx3DReducedLineGeometryItem; + rPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem; + rPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100); + rPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100); + rPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8); + rPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, true); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_4 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_5 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, false); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, basegfx::B3DVector(0.0,0.0,1.0)); + rPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0); + rPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem; + rPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_ENGINE, ""); + rPoolDefaults[ SDRATTR_CUSTOMSHAPE_DATA - SDRATTR_START ] = new SfxStringItem(SDRATTR_CUSTOMSHAPE_DATA, ""); + rPoolDefaults[ SDRATTR_CUSTOMSHAPE_GEOMETRY - SDRATTR_START ] = new SdrCustomShapeGeometryItem; + rPoolDefaults[ SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL - SDRATTR_START ] = new SdrCustomShapeReplacementURLItem; SvxBoxItem* pboxItem = new SvxBoxItem( SDRATTR_TABLE_BORDER ); pboxItem->SetAllDistances( 100 ); - mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER - SDRATTR_START ] = pboxItem; + rPoolDefaults[ SDRATTR_TABLE_BORDER - SDRATTR_START ] = pboxItem; SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER ); @@ -316,9 +317,9 @@ SdrItemPool::SdrItemPool( pBoxInfoItem->SetDist( true); // always show margin field pBoxInfoItem->SetValid( SvxBoxInfoItemValidFlags::DISABLE ); // some lines may have DontCare state only in tables - mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem; - mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR ); - mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR ); + rPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem; + rPoolDefaults[ SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR ); + rPoolDefaults[ SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR ); // set own ItemInfos mpLocalItemInfos[SDRATTR_SHADOW-SDRATTR_START]._nSID=SID_ATTR_FILL_SHADOW; @@ -335,7 +336,7 @@ SdrItemPool::SdrItemPool( mpLocalItemInfos[SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_BLTR; // it's my own creation level, set Defaults and ItemInfos - SetDefaults(mppLocalPoolDefaults); + SetDefaults(mpLocalPoolDefaults); SetItemInfos(mpLocalItemInfos); } diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index a0bab6876ed8..d1dc85aed859 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -26,7 +26,7 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster, bool bLoadRefCounts) : SfxItemPool("XOutdevItemPool", SDRATTR_START, SDRATTR_END, nullptr, nullptr, bLoadRefCounts) - , mppLocalPoolDefaults(new SfxPoolItem*[SDRATTR_END - SDRATTR_START + 1]) + , mpLocalPoolDefaults(new std::vector<SfxPoolItem*>(SDRATTR_END - SDRATTR_START + 1)) , mpLocalItemInfos(new SfxItemInfo[SDRATTR_END - SDRATTR_START + 1]) { // prepare some defaults @@ -58,57 +58,58 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster, bool bLoadRefCounts) } // prepare PoolDefaults - mppLocalPoolDefaults[XATTR_LINESTYLE -XATTR_START] = new XLineStyleItem; - mppLocalPoolDefaults[XATTR_LINEDASH -XATTR_START] = new XLineDashItem(this,aNullDash); - mppLocalPoolDefaults[XATTR_LINEWIDTH -XATTR_START] = new XLineWidthItem; - mppLocalPoolDefaults[XATTR_LINECOLOR -XATTR_START] = new XLineColorItem(aNullStr,aNullLineCol); - mppLocalPoolDefaults[XATTR_LINESTART -XATTR_START] = new XLineStartItem(this,aNullPol); - mppLocalPoolDefaults[XATTR_LINEEND -XATTR_START] = new XLineEndItem (this,aNullPol); - mppLocalPoolDefaults[XATTR_LINESTARTWIDTH -XATTR_START] = new XLineStartWidthItem; - mppLocalPoolDefaults[XATTR_LINEENDWIDTH -XATTR_START] = new XLineEndWidthItem; - mppLocalPoolDefaults[XATTR_LINESTARTCENTER -XATTR_START] = new XLineStartCenterItem; - mppLocalPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem; - mppLocalPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem; - mppLocalPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem; - mppLocalPoolDefaults[XATTR_LINECAP -XATTR_START] = new XLineCapItem; - mppLocalPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem; - mppLocalPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol); - mppLocalPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(aNullGrad); - mppLocalPoolDefaults[XATTR_FILLHATCH -XATTR_START] = new XFillHatchItem (this,aNullHatch); - mppLocalPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (this, aNullGraphic); - mppLocalPoolDefaults[XATTR_FILLTRANSPARENCE -XATTR_START] = new XFillTransparenceItem; - mppLocalPoolDefaults[XATTR_GRADIENTSTEPCOUNT -XATTR_START] = new XGradientStepCountItem; - mppLocalPoolDefaults[XATTR_FILLBMP_TILE -XATTR_START] = new XFillBmpTileItem; - mppLocalPoolDefaults[XATTR_FILLBMP_POS -XATTR_START] = new XFillBmpPosItem; - mppLocalPoolDefaults[XATTR_FILLBMP_SIZEX -XATTR_START] = new XFillBmpSizeXItem; - mppLocalPoolDefaults[XATTR_FILLBMP_SIZEY -XATTR_START] = new XFillBmpSizeYItem; - mppLocalPoolDefaults[XATTR_FILLBMP_SIZELOG -XATTR_START] = new XFillBmpSizeLogItem; - mppLocalPoolDefaults[XATTR_FILLBMP_TILEOFFSETX -XATTR_START] = new XFillBmpTileOffsetXItem; - mppLocalPoolDefaults[XATTR_FILLBMP_TILEOFFSETY -XATTR_START] = new XFillBmpTileOffsetYItem; - mppLocalPoolDefaults[XATTR_FILLBMP_STRETCH -XATTR_START] = new XFillBmpStretchItem; - mppLocalPoolDefaults[XATTR_FILLBMP_POSOFFSETX -XATTR_START] = new XFillBmpPosOffsetXItem; - mppLocalPoolDefaults[XATTR_FILLBMP_POSOFFSETY -XATTR_START] = new XFillBmpPosOffsetYItem; - mppLocalPoolDefaults[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = new XFillFloatTransparenceItem( this, aNullGrad, false ); - mppLocalPoolDefaults[XATTR_SECONDARYFILLCOLOR -XATTR_START] = new XSecondaryFillColorItem(aNullStr, aNullFillCol); - mppLocalPoolDefaults[XATTR_FILLBACKGROUND -XATTR_START] = new XFillBackgroundItem; - mppLocalPoolDefaults[XATTR_FORMTXTSTYLE -XATTR_START] = new XFormTextStyleItem; - mppLocalPoolDefaults[XATTR_FORMTXTADJUST -XATTR_START] = new XFormTextAdjustItem; - mppLocalPoolDefaults[XATTR_FORMTXTDISTANCE -XATTR_START] = new XFormTextDistanceItem; - mppLocalPoolDefaults[XATTR_FORMTXTSTART -XATTR_START] = new XFormTextStartItem; - mppLocalPoolDefaults[XATTR_FORMTXTMIRROR -XATTR_START] = new XFormTextMirrorItem; - mppLocalPoolDefaults[XATTR_FORMTXTOUTLINE -XATTR_START] = new XFormTextOutlineItem; - mppLocalPoolDefaults[XATTR_FORMTXTSHADOW -XATTR_START] = new XFormTextShadowItem; - mppLocalPoolDefaults[XATTR_FORMTXTSHDWCOLOR -XATTR_START] = new XFormTextShadowColorItem(aNullStr,aNullShadowCol); - mppLocalPoolDefaults[XATTR_FORMTXTSHDWXVAL -XATTR_START] = new XFormTextShadowXValItem; - mppLocalPoolDefaults[XATTR_FORMTXTSHDWYVAL -XATTR_START] = new XFormTextShadowYValItem; - mppLocalPoolDefaults[XATTR_FORMTXTHIDEFORM -XATTR_START] = new XFormTextHideFormItem; - mppLocalPoolDefaults[XATTR_FORMTXTSHDWTRANSP -XATTR_START] = new XFormTextShadowTranspItem; + std::vector<SfxPoolItem*>& rPoolDefaults = *mpLocalPoolDefaults; + rPoolDefaults[XATTR_LINESTYLE -XATTR_START] = new XLineStyleItem; + rPoolDefaults[XATTR_LINEDASH -XATTR_START] = new XLineDashItem(this,aNullDash); + rPoolDefaults[XATTR_LINEWIDTH -XATTR_START] = new XLineWidthItem; + rPoolDefaults[XATTR_LINECOLOR -XATTR_START] = new XLineColorItem(aNullStr,aNullLineCol); + rPoolDefaults[XATTR_LINESTART -XATTR_START] = new XLineStartItem(this,aNullPol); + rPoolDefaults[XATTR_LINEEND -XATTR_START] = new XLineEndItem (this,aNullPol); + rPoolDefaults[XATTR_LINESTARTWIDTH -XATTR_START] = new XLineStartWidthItem; + rPoolDefaults[XATTR_LINEENDWIDTH -XATTR_START] = new XLineEndWidthItem; + rPoolDefaults[XATTR_LINESTARTCENTER -XATTR_START] = new XLineStartCenterItem; + rPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem; + rPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem; + rPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem; + rPoolDefaults[XATTR_LINECAP -XATTR_START] = new XLineCapItem; + rPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem; + rPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol); + rPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(aNullGrad); + rPoolDefaults[XATTR_FILLHATCH -XATTR_START] = new XFillHatchItem (this,aNullHatch); + rPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (this, aNullGraphic); + rPoolDefaults[XATTR_FILLTRANSPARENCE -XATTR_START] = new XFillTransparenceItem; + rPoolDefaults[XATTR_GRADIENTSTEPCOUNT -XATTR_START] = new XGradientStepCountItem; + rPoolDefaults[XATTR_FILLBMP_TILE -XATTR_START] = new XFillBmpTileItem; + rPoolDefaults[XATTR_FILLBMP_POS -XATTR_START] = new XFillBmpPosItem; + rPoolDefaults[XATTR_FILLBMP_SIZEX -XATTR_START] = new XFillBmpSizeXItem; + rPoolDefaults[XATTR_FILLBMP_SIZEY -XATTR_START] = new XFillBmpSizeYItem; + rPoolDefaults[XATTR_FILLBMP_SIZELOG -XATTR_START] = new XFillBmpSizeLogItem; + rPoolDefaults[XATTR_FILLBMP_TILEOFFSETX -XATTR_START] = new XFillBmpTileOffsetXItem; + rPoolDefaults[XATTR_FILLBMP_TILEOFFSETY -XATTR_START] = new XFillBmpTileOffsetYItem; + rPoolDefaults[XATTR_FILLBMP_STRETCH -XATTR_START] = new XFillBmpStretchItem; + rPoolDefaults[XATTR_FILLBMP_POSOFFSETX -XATTR_START] = new XFillBmpPosOffsetXItem; + rPoolDefaults[XATTR_FILLBMP_POSOFFSETY -XATTR_START] = new XFillBmpPosOffsetYItem; + rPoolDefaults[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = new XFillFloatTransparenceItem( this, aNullGrad, false ); + rPoolDefaults[XATTR_SECONDARYFILLCOLOR -XATTR_START] = new XSecondaryFillColorItem(aNullStr, aNullFillCol); + rPoolDefaults[XATTR_FILLBACKGROUND -XATTR_START] = new XFillBackgroundItem; + rPoolDefaults[XATTR_FORMTXTSTYLE -XATTR_START] = new XFormTextStyleItem; + rPoolDefaults[XATTR_FORMTXTADJUST -XATTR_START] = new XFormTextAdjustItem; + rPoolDefaults[XATTR_FORMTXTDISTANCE -XATTR_START] = new XFormTextDistanceItem; + rPoolDefaults[XATTR_FORMTXTSTART -XATTR_START] = new XFormTextStartItem; + rPoolDefaults[XATTR_FORMTXTMIRROR -XATTR_START] = new XFormTextMirrorItem; + rPoolDefaults[XATTR_FORMTXTOUTLINE -XATTR_START] = new XFormTextOutlineItem; + rPoolDefaults[XATTR_FORMTXTSHADOW -XATTR_START] = new XFormTextShadowItem; + rPoolDefaults[XATTR_FORMTXTSHDWCOLOR -XATTR_START] = new XFormTextShadowColorItem(aNullStr,aNullShadowCol); + rPoolDefaults[XATTR_FORMTXTSHDWXVAL -XATTR_START] = new XFormTextShadowXValItem; + rPoolDefaults[XATTR_FORMTXTSHDWYVAL -XATTR_START] = new XFormTextShadowYValItem; + rPoolDefaults[XATTR_FORMTXTHIDEFORM -XATTR_START] = new XFormTextHideFormItem; + rPoolDefaults[XATTR_FORMTXTSHDWTRANSP -XATTR_START] = new XFormTextShadowTranspItem; // create SetItems SfxItemSet* pSet=new SfxItemSet(*_pMaster, XATTR_LINE_FIRST, XATTR_LINE_LAST); - mppLocalPoolDefaults[XATTRSET_LINE - XATTR_START] = new XLineAttrSetItem(pSet); + rPoolDefaults[XATTRSET_LINE - XATTR_START] = new XLineAttrSetItem(pSet); pSet=new SfxItemSet(*_pMaster, XATTR_FILL_FIRST, XATTR_FILL_LAST); - mppLocalPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem(pSet); + rPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem(pSet); // create ItemInfos for(sal_uInt16 i(GetFirstWhich()); i <= GetLastWhich(); i++) @@ -154,7 +155,7 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster, bool bLoadRefCounts) // if it's my own creation level, set Defaults and ItemInfos if(XATTR_START == GetFirstWhich() && XATTR_END == GetLastWhich()) { - SetDefaults(mppLocalPoolDefaults); + SetDefaults(mpLocalPoolDefaults); SetItemInfos(mpLocalItemInfos); } } @@ -162,7 +163,7 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster, bool bLoadRefCounts) // copy ctor, clones all static defaults XOutdevItemPool::XOutdevItemPool(const XOutdevItemPool& rPool) : SfxItemPool(rPool, true), - mppLocalPoolDefaults(nullptr), + mpLocalPoolDefaults(nullptr), mpLocalItemInfos(nullptr) { } diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index 6b628d6d4300..ea578f4a7077 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -23,6 +23,7 @@ #include <sal/types.h> #include <svx/xdef.hxx> #include "swdllapi.h" +#include <vector> // For SwTextHints without end index the following char is added: @@ -420,7 +421,7 @@ inline bool isUNKNOWNATR(const sal_uInt16 nWhich) // Inline in PRODUCT. class SfxPoolItem; struct SfxItemInfo; -typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ]; +typedef std::vector<SfxPoolItem*> SwDfltAttrTab; extern SwDfltAttrTab aAttrTab; extern SfxItemInfo aSlotTab[]; diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 2b8ab0f94b36..065b305257cd 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -48,7 +48,7 @@ SwAttrPool::SwAttrPool( SwDoc* pD ) : SfxItemPool( OUString("SWG"), POOLATTR_BEGIN, POOLATTR_END-1, - aSlotTab, aAttrTab ), + aSlotTab, &aAttrTab ), m_pDoc( pD ) { SetVersionMap( 1, 1, 60, pVersionMap1 ); diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index d655412e67b3..09768730a6de 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -260,7 +260,7 @@ sal_uInt16 aPgFrameFormatSetRange[] = { }; // create table for accessing default format attributes -SwDfltAttrTab aAttrTab; +SwDfltAttrTab aAttrTab( POOLATTR_END - POOLATTR_BEGIN, nullptr ); SfxItemInfo aSlotTab[] = { @@ -460,9 +460,6 @@ void InitCore() { SfxPoolItem* pItem; - // first initialize all attribute pointers with 0 - memset( aAttrTab, 0, (POOLATTR_END - POOLATTR_BEGIN) * sizeof( SfxPoolItem* ) ); - aAttrTab[ RES_CHRATR_CASEMAP- POOLATTR_BEGIN ] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED, RES_CHRATR_CASEMAP); aAttrTab[ RES_CHRATR_CHARSETCOLOR- POOLATTR_BEGIN ] = new SvxCharSetColorItem(RES_CHRATR_CHARSETCOLOR); aAttrTab[ RES_CHRATR_COLOR- POOLATTR_BEGIN ] = new SvxColorItem(RES_CHRATR_COLOR); @@ -774,7 +771,7 @@ void FinitCore() #if OSL_DEBUG_LEVEL > 0 // free defaults to prevent assertions if ( aAttrTab[0]->GetRefCount() ) - SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN); + SfxItemPool::ReleaseDefaults( &aAttrTab ); #endif delete SwDoc::mpACmpltWords; |