convert PropertyType to scoped enum
and drop unused enumerators Change-Id: I61d2a46ed84ce4163757a2da58162c72b1b0950f
This commit is contained in:
@@ -2356,15 +2356,15 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForSeries(
|
||||
LegendSymbolStyle eLegendSymbolStyle = this->getLegendSymbolStyle();
|
||||
uno::Any aExplicitSymbol( this->getExplicitSymbol( rSeries, -1 ) );
|
||||
|
||||
VLegendSymbolFactory::tPropertyType ePropType =
|
||||
VLegendSymbolFactory::PROP_TYPE_FILLED_SERIES;
|
||||
VLegendSymbolFactory::PropertyType ePropType =
|
||||
VLegendSymbolFactory::PropertyType::FilledSeries;
|
||||
|
||||
// todo: maybe the property-style does not solely depend on the
|
||||
// legend-symbol type
|
||||
switch( eLegendSymbolStyle )
|
||||
{
|
||||
case LegendSymbolStyle_LINE:
|
||||
ePropType = VLegendSymbolFactory::PROP_TYPE_LINE_SERIES;
|
||||
ePropType = VLegendSymbolFactory::PropertyType::LineSeries;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2387,15 +2387,15 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint(
|
||||
LegendSymbolStyle eLegendSymbolStyle = this->getLegendSymbolStyle();
|
||||
uno::Any aExplicitSymbol( this->getExplicitSymbol(rSeries,nPointIndex) );
|
||||
|
||||
VLegendSymbolFactory::tPropertyType ePropType =
|
||||
VLegendSymbolFactory::PROP_TYPE_FILLED_SERIES;
|
||||
VLegendSymbolFactory::PropertyType ePropType =
|
||||
VLegendSymbolFactory::PropertyType::FilledSeries;
|
||||
|
||||
// todo: maybe the property-style does not solely depend on the
|
||||
// legend-symbol type
|
||||
switch( eLegendSymbolStyle )
|
||||
{
|
||||
case LegendSymbolStyle_LINE:
|
||||
ePropType = VLegendSymbolFactory::PROP_TYPE_LINE_SERIES;
|
||||
ePropType = VLegendSymbolFactory::PropertyType::LineSeries;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2537,7 +2537,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
|
||||
Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
|
||||
xSymbolGroup, LegendSymbolStyle_LINE, xShapeFactory,
|
||||
Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ),
|
||||
VLegendSymbolFactory::PROP_TYPE_LINE, uno::Any() ));
|
||||
VLegendSymbolFactory::PropertyType::Line, uno::Any() ));
|
||||
|
||||
// set CID to symbol for selection
|
||||
if( xShape.is())
|
||||
|
@@ -29,13 +29,11 @@ namespace chart
|
||||
|
||||
namespace VLegendSymbolFactory
|
||||
{
|
||||
enum tPropertyType
|
||||
enum class PropertyType
|
||||
{
|
||||
PROP_TYPE_FILLED_SERIES,
|
||||
PROP_TYPE_LINE_SERIES,
|
||||
PROP_TYPE_FILL,
|
||||
PROP_TYPE_LINE,
|
||||
PROP_TYPE_FILL_AND_LINE
|
||||
FilledSeries,
|
||||
LineSeries,
|
||||
Line,
|
||||
};
|
||||
|
||||
css::uno::Reference< css::drawing::XShape >
|
||||
@@ -45,7 +43,7 @@ namespace VLegendSymbolFactory
|
||||
LegendSymbolStyle eStyle,
|
||||
const css::uno::Reference< css::lang::XMultiServiceFactory > & xShapeFactory,
|
||||
const css::uno::Reference< css::beans::XPropertySet > & xLegendEntryProperties,
|
||||
tPropertyType ePropertyType,
|
||||
PropertyType ePropertyType,
|
||||
const css::uno::Any& rExplicitSymbol /*should contain a css::chart2::Symbol without automatic symbol if the charttype does support symbols else empty*/);
|
||||
}
|
||||
|
||||
|
@@ -34,33 +34,25 @@ namespace
|
||||
void getPropNamesAndValues( const Reference< beans::XPropertySet >& xProp,
|
||||
::chart::tNameSequence& rNames,
|
||||
::chart::tAnySequence& rValues,
|
||||
::chart::VLegendSymbolFactory::tPropertyType ePropertyType,
|
||||
::chart::VLegendSymbolFactory::PropertyType ePropertyType,
|
||||
const awt::Size& aMaxSymbolExtent)
|
||||
{
|
||||
const ::chart::tPropertyNameMap & aFilledSeriesNameMap( ::chart::PropertyMapper::getPropertyNameMapForFilledSeriesProperties());
|
||||
const ::chart::tPropertyNameMap & aLineSeriesNameMap( ::chart::PropertyMapper::getPropertyNameMapForLineSeriesProperties());
|
||||
const ::chart::tPropertyNameMap & aLineNameMap( ::chart::PropertyMapper::getPropertyNameMapForLineProperties());
|
||||
const ::chart::tPropertyNameMap & aFillNameMap( ::chart::PropertyMapper::getPropertyNameMapForFillProperties());
|
||||
const ::chart::tPropertyNameMap & aFillLineNameMap( ::chart::PropertyMapper::getPropertyNameMapForFillAndLineProperties());
|
||||
|
||||
::chart::tPropertyNameValueMap aValueMap;
|
||||
switch( ePropertyType )
|
||||
{
|
||||
case ::chart::VLegendSymbolFactory::PROP_TYPE_FILLED_SERIES:
|
||||
case ::chart::VLegendSymbolFactory::PropertyType::FilledSeries:
|
||||
::chart::PropertyMapper::getValueMap( aValueMap, aFilledSeriesNameMap, xProp );
|
||||
break;
|
||||
case ::chart::VLegendSymbolFactory::PROP_TYPE_LINE_SERIES:
|
||||
case ::chart::VLegendSymbolFactory::PropertyType::LineSeries:
|
||||
::chart::PropertyMapper::getValueMap( aValueMap, aLineSeriesNameMap, xProp );
|
||||
break;
|
||||
case ::chart::VLegendSymbolFactory::PROP_TYPE_LINE:
|
||||
case ::chart::VLegendSymbolFactory::PropertyType::Line:
|
||||
::chart::PropertyMapper::getValueMap( aValueMap, aLineNameMap, xProp );
|
||||
break;
|
||||
case ::chart::VLegendSymbolFactory::PROP_TYPE_FILL:
|
||||
::chart::PropertyMapper::getValueMap( aValueMap, aFillNameMap, xProp );
|
||||
break;
|
||||
case ::chart::VLegendSymbolFactory::PROP_TYPE_FILL_AND_LINE:
|
||||
::chart::PropertyMapper::getValueMap( aValueMap, aFillLineNameMap, xProp );
|
||||
break;
|
||||
}
|
||||
|
||||
::chart::PropertyMapper::getMultiPropertyListsFromValueMap( rNames, rValues, aValueMap );
|
||||
@@ -79,7 +71,7 @@ void getPropNamesAndValues( const Reference< beans::XPropertySet >& xProp,
|
||||
void lcl_setPropertiesToShape(
|
||||
const Reference< beans::XPropertySet > & xProp,
|
||||
const Reference< drawing::XShape > & xShape,
|
||||
::chart::VLegendSymbolFactory::tPropertyType ePropertyType,
|
||||
::chart::VLegendSymbolFactory::PropertyType ePropertyType,
|
||||
const awt::Size& aMaxSymbolExtent)
|
||||
{
|
||||
::chart::tNameSequence aPropNames;
|
||||
@@ -102,7 +94,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol(
|
||||
LegendSymbolStyle eStyle,
|
||||
const Reference< lang::XMultiServiceFactory > & xShapeFactory,
|
||||
const Reference< beans::XPropertySet > & xLegendEntryProperties,
|
||||
tPropertyType ePropertyType, const uno::Any& rExplicitSymbol )
|
||||
PropertyType ePropertyType, const uno::Any& rExplicitSymbol )
|
||||
{
|
||||
Reference< drawing::XShape > xResult;
|
||||
|
||||
@@ -178,7 +170,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol(
|
||||
awt::Point( rEntryKeyAspectRatio.Width/2-nSize/2, rEntryKeyAspectRatio.Height/2-nSize/2 ));
|
||||
if( xShape.is() )
|
||||
{
|
||||
lcl_setPropertiesToShape( xLegendEntryProperties, xShape, ePropertyType, awt::Size(0,0) ); // PROP_TYPE_FILLED_SERIES );
|
||||
lcl_setPropertiesToShape( xLegendEntryProperties, xShape, ePropertyType, awt::Size(0,0) ); // PropertyType::FilledSeries );
|
||||
}
|
||||
}
|
||||
else // eStyle == LegendSymbolStyle_BOX
|
||||
@@ -187,7 +179,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol(
|
||||
tAnySequence aPropValues;
|
||||
|
||||
getPropNamesAndValues( xLegendEntryProperties, aPropNames, aPropValues,
|
||||
ePropertyType, awt::Size(0,0) );// PROP_TYPE_FILLED_SERIES
|
||||
ePropertyType, awt::Size(0,0) );// PropertyType::FilledSeries
|
||||
|
||||
Reference< drawing::XShape > xShape =
|
||||
pShapeFactory->createRectangle( xResultGroup,
|
||||
|
@@ -117,6 +117,7 @@ for d in definitionSet:
|
||||
"basic/source/inc/filefmt.hxx", # FileOffset
|
||||
"include/basic/sbxdef.hxx", # SbxDataType
|
||||
"connectivity/source/inc/dbase/DTable.hxx", # ODbaseTable::DBFType
|
||||
"codemaker/source/javamaker/classfile.hxx", # AccessFlags
|
||||
# unit test code
|
||||
"cppu/source/uno/check.cxx",
|
||||
# general weird nonsense going on
|
||||
@@ -177,7 +178,8 @@ for d in definitionSet:
|
||||
"cui/source/tabpages/tparea.cxx", # FillType (from UI)
|
||||
"include/editeng/svxenum.hxx", # css::style::NumberingType
|
||||
"include/editeng/bulletitem.hxx", # css::style::NumberingType
|
||||
":basic/source/sbx/sbxdec.hxx", # SbxDecimal::CmpResult, must match some Windows API
|
||||
"basic/source/sbx/sbxdec.hxx", # SbxDecimal::CmpResult, must match some Windows API
|
||||
"codemaker/source/javamaker/javatype.cxx", # TypeInfo::Flags, from UNO
|
||||
# represents constants from an external API
|
||||
"opencl/inc/opencl_device_selection.h",
|
||||
"vcl/inc/sft.hxx",
|
||||
|
Reference in New Issue
Block a user