diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-04-08 10:48:08 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-04-08 10:48:08 -0430 |
commit | 1bdc495cccaa7bc3be4718515082c70e42cdadc4 (patch) | |
tree | 8e52ffc408a1797c9c7647d050a6183645aed4ef /chart2 | |
parent | 561a2d63eae07ced7f7f1822e8e5a0de0b989f76 (diff) |
Cleanup of C2U macro in chart2.
Diffstat (limited to 'chart2')
24 files changed, 401 insertions, 425 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 0000196ee94e..0e29dfe88a35 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -152,7 +152,7 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "AttributedDataPoints" ), + Property( "AttributedDataPoints", PROP_DIAGRAM_ATTRIBUTED_DATA_POINTS, ::getCppuType( reinterpret_cast< const uno::Sequence< uno::Sequence< sal_Int32 > > * >(0)), beans::PropertyAttribute::BOUND @@ -160,20 +160,20 @@ void lcl_AddPropertiesToVector( // see com.sun.star.chart.StackableDiagram rOutProperties.push_back( - Property( C2U( "Percent" ), + Property( "Percent", PROP_DIAGRAM_PERCENT_STACKED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Stacked" ), + Property( "Stacked", PROP_DIAGRAM_STACKED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Dim3D" ), + Property( "Dim3D", PROP_DIAGRAM_THREE_D, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -181,7 +181,7 @@ void lcl_AddPropertiesToVector( // see com.sun.star.chart.Chart3DBarProperties rOutProperties.push_back( - Property( C2U( "SolidType" ), + Property( "SolidType", PROP_DIAGRAM_SOLIDTYPE, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -189,46 +189,46 @@ void lcl_AddPropertiesToVector( // see com.sun.star.chart.BarDiagram rOutProperties.push_back( - Property( C2U( "Deep" ), + Property( "Deep", PROP_DIAGRAM_DEEP, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Vertical" ), + Property( "Vertical", PROP_DIAGRAM_VERTICAL, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "NumberOfLines" ), + Property( "NumberOfLines", PROP_DIAGRAM_NUMBER_OF_LINES, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "StackedBarsConnected" ), + Property( "StackedBarsConnected", PROP_DIAGRAM_STACKED_BARS_CONNECTED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "DataRowSource" ), + Property( "DataRowSource", PROP_DIAGRAM_DATAROW_SOURCE, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartDataRowSource * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "GroupBarsPerAxis" ), + Property( "GroupBarsPerAxis", PROP_DIAGRAM_GROUP_BARS_PER_AXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "IncludeHiddenCells" ), + Property( "IncludeHiddenCells", PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -236,7 +236,7 @@ void lcl_AddPropertiesToVector( //new for XY charts rOutProperties.push_back( - Property( C2U( "SortByXValues" ), + Property( "SortByXValues", PROP_DIAGRAM_SORT_BY_X_VALUES, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -244,7 +244,7 @@ void lcl_AddPropertiesToVector( //for pie and donut charts rOutProperties.push_back( - Property( C2U( "StartingAngle" ), + Property( "StartingAngle", PROP_DIAGRAM_STARTING_ANGLE, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0) ), beans::PropertyAttribute::BOUND @@ -252,57 +252,57 @@ void lcl_AddPropertiesToVector( //new for 3D charts rOutProperties.push_back( - Property( C2U("RightAngledAxes"), + Property( "RightAngledAxes", PROP_DIAGRAM_RIGHT_ANGLED_AXES, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U("Perspective"), + Property( "Perspective", PROP_DIAGRAM_PERSPECTIVE, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U("RotationHorizontal"), + Property( "RotationHorizontal", PROP_DIAGRAM_ROTATION_HORIZONTAL, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U("RotationVertical"), + Property( "RotationVertical", PROP_DIAGRAM_ROTATION_VERTICAL, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::MAYBEVOID )); // XAxisXSupplier rOutProperties.push_back( - Property( C2U( "HasXAxis" ), + Property( "HasXAxis", PROP_DIAGRAM_HAS_X_AXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasXAxisDescription" ), + Property( "HasXAxisDescription", PROP_DIAGRAM_HAS_X_AXIS_DESCR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasXAxisTitle" ), + Property( "HasXAxisTitle", PROP_DIAGRAM_HAS_X_AXIS_TITLE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasXAxisGrid" ), + Property( "HasXAxisGrid", PROP_DIAGRAM_HAS_X_AXIS_GRID, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasXAxisHelpGrid" ), + Property( "HasXAxisHelpGrid", PROP_DIAGRAM_HAS_X_AXIS_HELP_GRID, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -310,31 +310,31 @@ void lcl_AddPropertiesToVector( // XAxisYSupplier rOutProperties.push_back( - Property( C2U( "HasYAxis" ), + Property( "HasYAxis", PROP_DIAGRAM_HAS_Y_AXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasYAxisDescription" ), + Property( "HasYAxisDescription", PROP_DIAGRAM_HAS_Y_AXIS_DESCR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasYAxisTitle" ), + Property( "HasYAxisTitle", PROP_DIAGRAM_HAS_Y_AXIS_TITLE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasYAxisGrid" ), + Property( "HasYAxisGrid", PROP_DIAGRAM_HAS_Y_AXIS_GRID, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasYAxisHelpGrid" ), + Property( "HasYAxisHelpGrid", PROP_DIAGRAM_HAS_Y_AXIS_HELP_GRID, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -342,31 +342,31 @@ void lcl_AddPropertiesToVector( // XAxisZSupplier rOutProperties.push_back( - Property( C2U( "HasZAxis" ), + Property( "HasZAxis", PROP_DIAGRAM_HAS_Z_AXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasZAxisDescription" ), + Property( "HasZAxisDescription", PROP_DIAGRAM_HAS_Z_AXIS_DESCR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasZAxisTitle" ), + Property( "HasZAxisTitle", PROP_DIAGRAM_HAS_Z_AXIS_TITLE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasZAxisGrid" ), + Property( "HasZAxisGrid", PROP_DIAGRAM_HAS_Z_AXIS_GRID, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasZAxisHelpGrid" ), + Property( "HasZAxisHelpGrid", PROP_DIAGRAM_HAS_Z_AXIS_HELP_GRID, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -374,13 +374,13 @@ void lcl_AddPropertiesToVector( // XTwoAxisXSupplier rOutProperties.push_back( - Property( C2U( "HasSecondaryXAxis" ), + Property( "HasSecondaryXAxis", PROP_DIAGRAM_HAS_SECOND_X_AXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasSecondaryXAxisDescription" ), + Property( "HasSecondaryXAxisDescription", PROP_DIAGRAM_HAS_SECOND_X_AXIS_DESCR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -388,13 +388,13 @@ void lcl_AddPropertiesToVector( // XTwoAxisYSupplier rOutProperties.push_back( - Property( C2U( "HasSecondaryYAxis" ), + Property( "HasSecondaryYAxis", PROP_DIAGRAM_HAS_SECOND_Y_AXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasSecondaryYAxisDescription" ), + Property( "HasSecondaryYAxisDescription", PROP_DIAGRAM_HAS_SECOND_Y_AXIS_DESCR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -402,27 +402,27 @@ void lcl_AddPropertiesToVector( // XSecondAxisTitleSupplier rOutProperties.push_back( - Property( C2U( "HasSecondaryXAxisTitle" ), + Property( "HasSecondaryXAxisTitle", PROP_DIAGRAM_HAS_SECOND_X_AXIS_TITLE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "HasSecondaryYAxisTitle" ), + Property( "HasSecondaryYAxisTitle", PROP_DIAGRAM_HAS_SECOND_Y_AXIS_TITLE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "MissingValueTreatment" ), + Property( "MissingValueTreatment", PROP_DIAGRAM_MISSING_VALUE_TREATMENT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "AutomaticSize" ), + Property( "AutomaticSize", PROP_DIAGRAM_AUTOMATIC_SIZE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -501,7 +501,7 @@ typedef ::std::map< OUString, OUString > tChartTypeMap; OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) { - const OUString aPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.template.")); + const OUString aPrefix("com.sun.star.chart2.template."); if( rTemplateServiceName.match( aPrefix )) { @@ -509,12 +509,12 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) // "Area" "StackedArea" "PercentStackedArea" "ThreeDArea" // "StackedThreeDArea" "PercentStackedThreeDArea" - if( aName.indexOf( C2U("Area") ) != -1 ) - return C2U( "com.sun.star.chart.AreaDiagram" ); + if( aName.indexOf( rtl::OUString("Area") ) != -1 ) + return rtl::OUString("com.sun.star.chart.AreaDiagram"); // "Pie" "PieAllExploded" "ThreeDPie" "ThreeDPieAllExploded" - if( aName.indexOf( C2U("Pie") ) != -1 ) - return C2U( "com.sun.star.chart.PieDiagram" ); + if( aName.indexOf( rtl::OUString("Pie") ) != -1 ) + return rtl::OUString("com.sun.star.chart.PieDiagram"); // "Column" "StackedColumn" "PercentStackedColumn" "ThreeDColumnDeep" // "ThreeDColumnFlat" "StackedThreeDColumnFlat" @@ -522,34 +522,34 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) // "PercentStackedBar" "ThreeDBarDeep" "ThreeDBarFlat" // "StackedThreeDBarFlat" "PercentStackedThreeDBarFlat" "ColumnWithLine" // "StackedColumnWithLine" - if( aName.indexOf( C2U("Column") ) != -1 || aName.indexOf( C2U("Bar") ) != -1 ) - return C2U( "com.sun.star.chart.BarDiagram" ); + if( aName.indexOf( rtl::OUString("Column") ) != -1 || aName.indexOf( rtl::OUString("Bar") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.BarDiagram" ); // "Donut" "DonutAllExploded" "ThreeDDonut" "ThreeDDonutAllExploded" - if( aName.indexOf( C2U("Donut") ) != -1 ) - return C2U( "com.sun.star.chart.DonutDiagram" ); + if( aName.indexOf( rtl::OUString("Donut") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.DonutDiagram" ); // "ScatterLineSymbol" "ScatterLine" "ScatterSymbol" "ThreeDScatter" - if( aName.indexOf( C2U("Scatter") ) != -1 ) - return C2U( "com.sun.star.chart.XYDiagram" ); + if( aName.indexOf( rtl::OUString("Scatter") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.XYDiagram" ); // "FilledNet" "StackedFilledNet" "PercentStackedFilledNet" - if( aName.indexOf( C2U("FilledNet") ) != -1 ) - return C2U( "com.sun.star.chart.FilledNetDiagram" ); + if( aName.indexOf( rtl::OUString("FilledNet") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.FilledNetDiagram" ); // "Net" "NetSymbol" "NetLine" "StackedNet" "StackedNetSymbol" // "StackedNetLine" "PercentStackedNet" "PercentStackedNetSymbol" // "PercentStackedNetLine" - if( aName.indexOf( C2U("Net") ) != -1 ) - return C2U( "com.sun.star.chart.NetDiagram" ); + if( aName.indexOf( rtl::OUString("Net") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.NetDiagram" ); // "StockLowHighClose" "StockOpenLowHighClose" "StockVolumeLowHighClose" // "StockVolumeOpenLowHighClose" - if( aName.indexOf( C2U("Stock") ) != -1 ) - return C2U( "com.sun.star.chart.StockDiagram" ); + if( aName.indexOf( rtl::OUString("Stock") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.StockDiagram" ); - if( aName.indexOf( C2U("Bubble") ) != -1 ) - return C2U( "com.sun.star.chart.BubbleDiagram" ); + if( aName.indexOf( rtl::OUString("Bubble") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.BubbleDiagram" ); // Note: this must be checked after Bar, Net and Scatter @@ -557,8 +557,8 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) // "PercentStackedLine" "LineSymbol" "StackedLineSymbol" // "PercentStackedLineSymbol" "ThreeDLine" "StackedThreeDLine" // "PercentStackedThreeDLine" "ThreeDLineDeep" - if( aName.indexOf( C2U("Line") ) != -1 || aName.indexOf( C2U("Symbol") ) != -1 ) - return C2U( "com.sun.star.chart.LineDiagram" ); + if( aName.indexOf( rtl::OUString("Line") ) != -1 || aName.indexOf( rtl::OUString("Symbol") ) != -1 ) + return rtl::OUString( "com.sun.star.chart.LineDiagram" ); OSL_FAIL( "unknown template" ); } @@ -572,36 +572,16 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap() { static tMakeStringStringMap g_aChartTypeNameMap = tMakeStringStringMap - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.LineChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.LineDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.AreaChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.AreaDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ColumnChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.BarDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.PieChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.PieDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.DonutChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.DonutDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.ScatterChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.XYDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.FilledNetChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.FilledNetDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.NetChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.NetDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.CandleStickChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.StockDiagram" ) ) ) - - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.BubbleChartType" ) ) - , rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.BubbleDiagram" ) ) ) - + ( "com.sun.star.chart2.LineChartType", "com.sun.star.chart.LineDiagram" ) + ( "com.sun.star.chart2.AreaChartType", "com.sun.star.chart.AreaDiagram" ) + ( "com.sun.star.chart2.ColumnChartType", "com.sun.star.chart.BarDiagram" ) + ( "com.sun.star.chart2.PieChartType", "com.sun.star.chart.PieDiagram" ) + ( "com.sun.star.chart2.DonutChartType", "com.sun.star.chart.DonutDiagram" ) + ( "com.sun.star.chart2.ScatterChartType", "com.sun.star.chart.XYDiagram" ) + ( "com.sun.star.chart2.FilledNetChartType", "com.sun.star.chart.FilledNetDiagram" ) + ( "com.sun.star.chart2.NetChartType", "com.sun.star.chart.NetDiagram" ) + ( "com.sun.star.chart2.CandleStickChartType", "com.sun.star.chart.StockDiagram" ) + ( "com.sun.star.chart2.BubbleChartType", "com.sun.star.chart.BubbleDiagram" ) ; return g_aChartTypeNameMap; } @@ -653,7 +633,7 @@ OUString SAL_CALL DiagramWrapper::getDiagramType() if( xChartDocProp.is() ) { uno::Reference< util::XRefreshable > xAddIn; - if( xChartDocProp->getPropertyValue( C2U( "AddIn" ) ) >>= xAddIn ) + if( xChartDocProp->getPropertyValue( "AddIn" ) >>= xAddIn ) { uno::Reference< lang::XServiceName > xServiceName( xAddIn, uno::UNO_QUERY ); if( xServiceName.is()) @@ -680,7 +660,7 @@ OUString SAL_CALL DiagramWrapper::getDiagramType() aRet = lcl_getOldChartTypeName( aRet ); } if( aRet.isEmpty()) - aRet = C2U( "com.sun.star.chart.BarDiagram" ); + aRet = "com.sun.star.chart.BarDiagram"; } return aRet; @@ -692,15 +672,15 @@ Reference< uno::RuntimeException) { if( nRow < 0 ) - throw lang::IndexOutOfBoundsException( - C2U( "DataSeries index invalid" ), static_cast< ::cppu::OWeakObject * >( this )); + throw lang::IndexOutOfBoundsException("DataSeries index invalid", + static_cast< ::cppu::OWeakObject * >( this )); Reference< chart2::XDataSeries > xSeries; sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getChart2Diagram() ); if( nNewAPIIndex < 0 ) - throw lang::IndexOutOfBoundsException( - C2U( "DataSeries index invalid" ), static_cast< ::cppu::OWeakObject * >( this )); + throw lang::IndexOutOfBoundsException("DataSeries index invalid", + static_cast< ::cppu::OWeakObject * >( this )); Reference< beans::XPropertySet > xRet( new DataSeriesPointWrapper( DataSeriesPointWrapper::DATA_SERIES, nNewAPIIndex, 0, m_spChart2ModelContact ) ); @@ -713,15 +693,15 @@ Reference< uno::RuntimeException) { if( nCol < 0 || nRow < 0 ) - throw lang::IndexOutOfBoundsException( - C2U( "DataSeries index invalid" ), static_cast< ::cppu::OWeakObject * >( this )); + throw lang::IndexOutOfBoundsException("DataSeries index invalid", + static_cast< ::cppu::OWeakObject * >( this )); Reference< chart2::XDataSeries > xSeries; sal_Int32 nNewAPIIndex = lcl_getNewAPIIndexForOldAPIIndex( nRow, m_spChart2ModelContact->getChart2Diagram() ); if( nNewAPIIndex < 0 ) - throw lang::IndexOutOfBoundsException( - C2U( "DataSeries index invalid" ), static_cast< ::cppu::OWeakObject * >( this )); + throw lang::IndexOutOfBoundsException("DataSeries index invalid", + static_cast< ::cppu::OWeakObject * >( this )); //todo: check borders of point index @@ -756,11 +736,11 @@ void SAL_CALL DiagramWrapper::setPosition( const awt::Point& aPosition ) { OSL_FAIL("DiagramWrapper::setPosition called with a position out of range -> automatic values are taken instead" ); uno::Any aEmpty; - xProp->setPropertyValue( C2U( "RelativePosition" ), aEmpty ); + xProp->setPropertyValue( "RelativePosition", aEmpty ); return; } - xProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); - xProp->setPropertyValue( C2U( "PosSizeExcludeAxes" ), uno::makeAny(false) ); + xProp->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); + xProp->setPropertyValue( "PosSizeExcludeAxes", uno::makeAny(false) ); } } @@ -789,12 +769,12 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) { OSL_FAIL("DiagramWrapper::setSize called with sizes bigger than page -> automatic values are taken instead" ); uno::Any aEmpty; - xProp->setPropertyValue( C2U( "RelativeSize" ), aEmpty ); + xProp->setPropertyValue( "RelativeSize", aEmpty ); return; } - xProp->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aRelativeSize) ); - xProp->setPropertyValue( C2U( "PosSizeExcludeAxes" ), uno::makeAny(false) ); + xProp->setPropertyValue( "RelativeSize", uno::makeAny(aRelativeSize) ); + xProp->setPropertyValue( "PosSizeExcludeAxes", uno::makeAny(false) ); } } @@ -802,7 +782,7 @@ void SAL_CALL DiagramWrapper::setSize( const awt::Size& aSize ) OUString SAL_CALL DiagramWrapper::getShapeType() throw (uno::RuntimeException) { - return C2U( "com.sun.star.chart.Diagram" ); + return rtl::OUString( "com.sun.star.chart.Diagram" ); } // ____ XDiagramPositioning ____ @@ -813,8 +793,8 @@ void SAL_CALL DiagramWrapper::setAutomaticDiagramPositioning() throw (uno::Runti uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { - xDiaProps->setPropertyValue( C2U( "RelativeSize" ), Any() ); - xDiaProps->setPropertyValue( C2U( "RelativePosition" ), Any() ); + xDiaProps->setPropertyValue( "RelativeSize", Any() ); + xDiaProps->setPropertyValue( "RelativePosition", Any() ); } } ::sal_Bool SAL_CALL DiagramWrapper::isAutomaticDiagramPositioning( ) throw (uno::RuntimeException) @@ -822,8 +802,8 @@ void SAL_CALL DiagramWrapper::setAutomaticDiagramPositioning() throw (uno::Runti uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { - Any aRelativeSize( xDiaProps->getPropertyValue( C2U( "RelativeSize" ) ) ); - Any aRelativePosition( xDiaProps->getPropertyValue( C2U( "RelativePosition" ) ) ); + Any aRelativeSize( xDiaProps->getPropertyValue( "RelativeSize" ) ); + Any aRelativePosition( xDiaProps->getPropertyValue( "RelativePosition" ) ); if( aRelativeSize.hasValue() && aRelativePosition.hasValue() ) return false; } @@ -835,19 +815,19 @@ void SAL_CALL DiagramWrapper::setDiagramPositionExcludingAxes( const awt::Rectan DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getChartModel(), rPositionRect ); uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) - xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(true) ); + xDiaProps->setPropertyValue("PosSizeExcludeAxes", uno::makeAny(true) ); } ::sal_Bool SAL_CALL DiagramWrapper::isExcludingDiagramPositioning() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) { - Any aRelativeSize( xDiaProps->getPropertyValue( C2U( "RelativeSize" ) ) ); - Any aRelativePosition( xDiaProps->getPropertyValue( C2U( "RelativePosition" ) ) ); + Any aRelativeSize( xDiaProps->getPropertyValue( "RelativeSize" ) ); + Any aRelativePosition( xDiaProps->getPropertyValue( "RelativePosition" ) ); if( aRelativeSize.hasValue() && aRelativePosition.hasValue() ) { sal_Bool bPosSizeExcludeAxes = false; - xDiaProps->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; + xDiaProps->getPropertyValue( "PosSizeExcludeAxes" ) >>= bPosSizeExcludeAxes; return bPosSizeExcludeAxes; } } @@ -863,7 +843,7 @@ void SAL_CALL DiagramWrapper::setDiagramPositionIncludingAxes( const awt::Rectan DiagramHelper::setDiagramPositioning( m_spChart2ModelContact->getChartModel(), rPositionRect ); uno::Reference< beans::XPropertySet > xDiaProps( this->getDiagram(), uno::UNO_QUERY ); if( xDiaProps.is() ) - xDiaProps->setPropertyValue(C2U("PosSizeExcludeAxes"), uno::makeAny(false) ); + xDiaProps->setPropertyValue("PosSizeExcludeAxes", uno::makeAny(false) ); } awt::Rectangle SAL_CALL DiagramWrapper::calculateDiagramPositionIncludingAxes( ) throw (uno::RuntimeException) { @@ -1226,7 +1206,7 @@ private: //member }; WrappedDataRowSourceProperty::WrappedDataRowSourceProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("DataRowSource"),OUString()) + : WrappedProperty("DataRowSource",OUString()) , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { @@ -1245,7 +1225,7 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con { sal_Int32 nNew = ::com::sun::star::chart::ChartDataRowSource_ROWS; if( !(rOuterValue >>= nNew) ) - throw lang::IllegalArgumentException( C2U("Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value"), 0, 0 ); + throw lang::IllegalArgumentException( "Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value", 0, 0 ); else eChartDataRowSource = ::com::sun::star::chart::ChartDataRowSource(nNew); } @@ -1342,13 +1322,13 @@ WrappedStackingProperty::WrappedStackingProperty( StackMode eStackMode, ::boost: switch( m_eStackMode ) { case StackMode_Y_STACKED: - m_aOuterName = C2U( "Stacked" ); + m_aOuterName = "Stacked"; break; case StackMode_Y_STACKED_PERCENT: - m_aOuterName = C2U( "Percent" ); + m_aOuterName = "Percent"; break; case StackMode_Z_STACKED: - m_aOuterName = C2U( "Deep" ); + m_aOuterName = "Deep"; break; default: OSL_FAIL( "unexpected stack mode" ); @@ -1374,7 +1354,7 @@ void WrappedStackingProperty::setPropertyValue( const Any& rOuterValue, const Re { sal_Bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Stacking Properties require boolean values"), 0, 0 ); + throw lang::IllegalArgumentException( "Stacking Properties require boolean values", 0, 0 ); StackMode eInnerStackMode; bool bHasDetectableInnerValue = detectInnerValue( eInnerStackMode ); @@ -1444,7 +1424,7 @@ private: //member }; WrappedDim3DProperty::WrappedDim3DProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("Dim3D"),OUString()) + : WrappedProperty("Dim3D",OUString()) , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { @@ -1460,7 +1440,7 @@ void WrappedDim3DProperty::setPropertyValue( const Any& rOuterValue, const Refer { sal_Bool bNew3D = false; if( ! (rOuterValue >>= bNew3D) ) - throw lang::IllegalArgumentException( C2U("Property Dim3D requires boolean value"), 0, 0 ); + throw lang::IllegalArgumentException( "Property Dim3D requires boolean value", 0, 0 ); m_aOuterValue = rOuterValue; @@ -1517,7 +1497,7 @@ private: //member }; WrappedVerticalProperty::WrappedVerticalProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("Vertical"),OUString()) + : WrappedProperty("Vertical",OUString()) , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { @@ -1533,7 +1513,7 @@ void WrappedVerticalProperty::setPropertyValue( const Any& rOuterValue, const Re { sal_Bool bNewVertical = false; if( ! (rOuterValue >>= bNewVertical) ) - throw lang::IllegalArgumentException( C2U("Property Vertical requires boolean value"), 0, 0 ); + throw lang::IllegalArgumentException( "Property Vertical requires boolean value", 0, 0 ); m_aOuterValue = rOuterValue; @@ -1598,7 +1578,7 @@ private: //member }; WrappedNumberOfLinesProperty::WrappedNumberOfLinesProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("NumberOfLines"),OUString()) + : WrappedProperty("NumberOfLines",OUString()) , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue( this->getPropertyDefault(0) ) { @@ -1623,7 +1603,7 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( uno::Any& rInnerValue ) con Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY ); DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( xDiagram, xFact ); - if( aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.ColumnWithLine" ) ) ) + if( aTemplateAndService.second == "com.sun.star.chart2.template.ColumnWithLine" ) { try { @@ -1648,7 +1628,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con { sal_Int32 nNewValue; if( ! (rOuterValue >>= nNewValue) ) - throw lang::IllegalArgumentException( C2U("property NumberOfLines requires sal_Int32 value"), 0, 0 ); + throw lang::IllegalArgumentException( "property NumberOfLines requires sal_Int32 value", 0, 0 ); m_aOuterValue = rOuterValue; @@ -1662,7 +1642,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con DiagramHelper::getTemplateForDiagram( xDiagram, xFact ); uno::Reference< chart2::XChartTypeTemplate > xTemplate(0); - if( aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.ColumnWithLine" ) ) ) + if( aTemplateAndService.second == "com.sun.star.chart2.template.ColumnWithLine" ) { if( nNewValue != 0 ) { @@ -1682,14 +1662,14 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con } else { - xTemplate.set( xFact->createInstance( C2U( "com.sun.star.chart2.template.Column" ) ), uno::UNO_QUERY ); + xTemplate.set( xFact->createInstance("com.sun.star.chart2.template.Column"), uno::UNO_QUERY ); } } - else if( aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.Column" ) ) ) + else if( aTemplateAndService.second == "com.sun.star.chart2.template.Column" ) { if( nNewValue == 0 ) return; - xTemplate.set( xFact->createInstance( C2U( "com.sun.star.chart2.template.ColumnWithLine" ) ), uno::UNO_QUERY ); + xTemplate.set( xFact->createInstance( "com.sun.star.chart2.template.ColumnWithLine" ), uno::UNO_QUERY ); } if(xTemplate.is()) @@ -1699,7 +1679,7 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con // locked controllers ControllerLockGuard aCtrlLockGuard( m_spChart2ModelContact->getChartModel() ); uno::Reference< beans::XPropertySet > xProp( xTemplate, uno::UNO_QUERY ); - xProp->setPropertyValue( C2U( "NumberOfLines" ), uno::makeAny(nNewValue) ); + xProp->setPropertyValue( "NumberOfLines", uno::makeAny(nNewValue) ); xTemplate->changeDiagram( xDiagram ); } catch( const uno::Exception & ex ) @@ -1751,7 +1731,7 @@ private: //member }; WrappedAttributedDataPointsProperty::WrappedAttributedDataPointsProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("AttributedDataPoints"),OUString()) + : WrappedProperty("AttributedDataPoints",OUString()) , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { @@ -1767,7 +1747,7 @@ void WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal { uno::Sequence< uno::Sequence< sal_Int32 > > aNewValue; if( ! (rOuterValue >>= aNewValue) ) - throw lang::IllegalArgumentException( C2U("Property AttributedDataPoints requires value of type uno::Sequence< uno::Sequence< sal_Int32 > >"), 0, 0 ); + throw lang::IllegalArgumentException( "Property AttributedDataPoints requires value of type uno::Sequence< uno::Sequence< sal_Int32 > >", 0, 0 ); m_aOuterValue = rOuterValue; @@ -1798,7 +1778,7 @@ void WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal uno::Sequence< sal_Int32 > aSeq; aVal <<= aSeq; } - xProp->setPropertyValue( C2U( "AttributedDataPoints" ), aVal ); + xProp->setPropertyValue( "AttributedDataPoints", aVal ); } } } @@ -1826,7 +1806,7 @@ Any WrappedAttributedDataPointsProperty::getPropertyValue( const Reference< bean if( xProp.is()) { uno::Any aVal( - xProp->getPropertyValue( C2U( "AttributedDataPoints" ))); + xProp->getPropertyValue("AttributedDataPoints")); uno::Sequence< sal_Int32 > aSeq; if( aVal >>= aSeq ) aResult[ i ] = aSeq; @@ -1870,7 +1850,7 @@ private: //member }; WrappedSolidTypeProperty::WrappedSolidTypeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty( C2U( "SolidType" ), OUString() ) + : WrappedProperty( "SolidType", OUString() ) , m_spChart2ModelContact( spChart2ModelContact ) , m_aOuterValue() { @@ -1886,7 +1866,7 @@ void WrappedSolidTypeProperty::setPropertyValue( const Any& rOuterValue, const R { sal_Int32 nNewSolidType = ::com::sun::star::chart::ChartSolidType::RECTANGULAR_SOLID; if( ! (rOuterValue >>= nNewSolidType) ) - throw lang::IllegalArgumentException( C2U("Property SolidType requires integer value"), 0, 0 ); + throw lang::IllegalArgumentException( "Property SolidType requires integer value", 0, 0 ); m_aOuterValue = rOuterValue; @@ -1941,7 +1921,7 @@ public: }; WrappedAutomaticSizeProperty::WrappedAutomaticSizeProperty() - : WrappedProperty( C2U( "AutomaticSize" ), OUString() ) + : WrappedProperty( "AutomaticSize", OUString() ) { } @@ -1956,15 +1936,15 @@ void WrappedAutomaticSizeProperty::setPropertyValue( const Any& rOuterValue, con { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Property AutomaticSize requires value of type boolean"), 0, 0 ); + throw lang::IllegalArgumentException( "Property AutomaticSize requires value of type boolean", 0, 0 ); try { if( bNewValue ) { - Any aRelativeSize( xInnerPropertySet->getPropertyValue( C2U( "RelativeSize" ) ) ); + Any aRelativeSize( xInnerPropertySet->getPropertyValue( "RelativeSize" ) ); if( aRelativeSize.hasValue() ) - xInnerPropertySet->setPropertyValue( C2U( "RelativeSize" ), Any() ); + xInnerPropertySet->setPropertyValue( "RelativeSize", Any() ); } } catch( const uno::Exception & ex ) @@ -1980,7 +1960,7 @@ Any WrappedAutomaticSizeProperty::getPropertyValue( const Reference< beans::XPro Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) { - Any aRelativeSize( xInnerPropertySet->getPropertyValue( C2U( "RelativeSize" ) ) ); + Any aRelativeSize( xInnerPropertySet->getPropertyValue( "RelativeSize" ) ); if( !aRelativeSize.hasValue() ) aRet <<= true; } @@ -2012,7 +1992,7 @@ private: //member }; WrappedIncludeHiddenCellsProperty::WrappedIncludeHiddenCellsProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("IncludeHiddenCells"),C2U("IncludeHiddenCells")) + : WrappedProperty("IncludeHiddenCells","IncludeHiddenCells") , m_spChart2ModelContact( spChart2ModelContact ) { } @@ -2026,7 +2006,7 @@ void WrappedIncludeHiddenCellsProperty::setPropertyValue( const Any& rOuterValue { sal_Bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Property Dim3D requires boolean value"), 0, 0 ); + throw lang::IllegalArgumentException( "Property Dim3D requires boolean value", 0, 0 ); ChartModelHelper::setIncludeHiddenCells( bNewValue, m_spChart2ModelContact->getChartModel() ); } @@ -2085,7 +2065,7 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties() aWrappedProperties.push_back( new WrappedVerticalProperty( m_spChart2ModelContact ) ); aWrappedProperties.push_back( new WrappedNumberOfLinesProperty( m_spChart2ModelContact ) ); aWrappedProperties.push_back( new WrappedAttributedDataPointsProperty( m_spChart2ModelContact ) ); - aWrappedProperties.push_back( new WrappedProperty( C2U( "StackedBarsConnected" ), C2U( "ConnectBars" ) ) ); + aWrappedProperties.push_back( new WrappedProperty( "StackedBarsConnected", "ConnectBars" ) ); aWrappedProperties.push_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) ); aWrappedProperties.push_back( new WrappedAutomaticSizeProperty() ); aWrappedProperties.push_back( new WrappedIncludeHiddenCellsProperty( m_spChart2ModelContact ) ); @@ -2098,14 +2078,14 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties() uno::Sequence< OUString > DiagramWrapper::getSupportedServiceNames_Static() { uno::Sequence< OUString > aServices( 8 ); - aServices[ 0 ] = C2U( "com.sun.star.chart.Diagram" ); - aServices[ 1 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); - aServices[ 2 ] = C2U( "com.sun.star.chart.StackableDiagram" ); - aServices[ 3 ] = C2U( "com.sun.star.chart.ChartAxisXSupplier" ); - aServices[ 4 ] = C2U( "com.sun.star.chart.ChartAxisYSupplier" ); - aServices[ 5 ] = C2U( "com.sun.star.chart.ChartAxisZSupplier" ); - aServices[ 6 ] = C2U( "com.sun.star.chart.ChartTwoAxisXSupplier" ); - aServices[ 7 ] = C2U( "com.sun.star.chart.ChartTwoAxisYSupplier" ); + aServices[ 0 ] = "com.sun.star.chart.Diagram"; + aServices[ 1 ] = "com.sun.star.xml.UserDefinedAttributeSupplier"; + aServices[ 2 ] = "com.sun.star.chart.StackableDiagram"; + aServices[ 3 ] = "com.sun.star.chart.ChartAxisXSupplier"; + aServices[ 4 ] = "com.sun.star.chart.ChartAxisYSupplier"; + aServices[ 5 ] = "com.sun.star.chart.ChartAxisZSupplier"; + aServices[ 6 ] = "com.sun.star.chart.ChartTwoAxisXSupplier"; + aServices[ 7 ] = "com.sun.star.chart.ChartTwoAxisYSupplier"; return aServices; } diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx index 4a757df7e4a1..c324592948a1 100644 --- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx @@ -184,7 +184,7 @@ const std::vector< WrappedProperty* > GridWrapper::createWrappedProperties() { ::std::vector< ::chart::WrappedProperty* > aWrappedProperties; - aWrappedProperties.push_back( new WrappedDefaultProperty( C2U("LineColor"), C2U("LineColor"), uno::makeAny( sal_Int32( 0x000000) ) ) ); // black + aWrappedProperties.push_back( new WrappedDefaultProperty( "LineColor", "LineColor", uno::makeAny( sal_Int32( 0x000000) ) ) ); // black return aWrappedProperties; } @@ -194,10 +194,10 @@ const std::vector< WrappedProperty* > GridWrapper::createWrappedProperties() Sequence< OUString > GridWrapper::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "com.sun.star.chart.ChartGrid" ); - aServices[ 1 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); - aServices[ 2 ] = C2U( "com.sun.star.drawing.LineProperties" ); - aServices[ 3 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart.ChartGrid"; + aServices[ 1 ] = "com.sun.star.xml.UserDefinedAttributeSupplier"; + aServices[ 2 ] = "com.sun.star.drawing.LineProperties"; + aServices[ 3 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index cb95591a02cd..b5e0a7b0d6ae 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -81,7 +81,7 @@ protected: }; WrappedLegendAlignmentProperty::WrappedLegendAlignmentProperty() - : ::chart::WrappedProperty( C2U( "Alignment" ), C2U( "AnchorPosition" ) ) + : ::chart::WrappedProperty( "Alignment", "AnchorPosition" ) { } WrappedLegendAlignmentProperty::~WrappedLegendAlignmentProperty() @@ -95,7 +95,7 @@ Any WrappedLegendAlignmentProperty::getPropertyValue( const Reference< beans::XP if( xInnerPropertySet.is() ) { sal_Bool bShowLegend = sal_True; - xInnerPropertySet->getPropertyValue( C2U( "Show" ) ) >>= bShowLegend; + xInnerPropertySet->getPropertyValue( "Show" ) >>= bShowLegend; if(!bShowLegend) { aRet = uno::makeAny( ::com::sun::star::chart::ChartLegendPosition_NONE ); @@ -120,11 +120,11 @@ void WrappedLegendAlignmentProperty::setPropertyValue( const Any& rOuterValue, c ::com::sun::star::chart::ChartLegendPosition eOuterPos(::com::sun::star::chart::ChartLegendPosition_NONE); if( (rOuterValue >>= eOuterPos) && eOuterPos == ::com::sun::star::chart::ChartLegendPosition_NONE ) bNewShowLegend = sal_False; - xInnerPropertySet->getPropertyValue( C2U( "Show" ) ) >>= bOldShowLegend; + xInnerPropertySet->getPropertyValue( "Show" ) >>= bOldShowLegend; } if(bNewShowLegend!=bOldShowLegend) { - xInnerPropertySet->setPropertyValue( C2U( "Show" ), uno::makeAny(bNewShowLegend) ); + xInnerPropertySet->setPropertyValue( "Show", uno::makeAny(bNewShowLegend) ); } if(!bNewShowLegend) return; @@ -145,17 +145,17 @@ void WrappedLegendAlignmentProperty::setPropertyValue( const Any& rOuterValue, c ::com::sun::star::chart::ChartLegendExpansion eOldExpansion( ::com::sun::star::chart::ChartLegendExpansion_HIGH ); bool bExpansionWasSet( - xInnerPropertySet->getPropertyValue( C2U( "Expansion" ) ) >>= eOldExpansion ); + xInnerPropertySet->getPropertyValue( "Expansion" ) >>= eOldExpansion ); if( !bExpansionWasSet || (eOldExpansion != eNewExpansion)) - xInnerPropertySet->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eNewExpansion )); + xInnerPropertySet->setPropertyValue( "Expansion", uno::makeAny( eNewExpansion )); } //correct RelativePosition - Any aRelativePosition( xInnerPropertySet->getPropertyValue( C2U( "RelativePosition" ) ) ); + Any aRelativePosition( xInnerPropertySet->getPropertyValue("RelativePosition") ); if(aRelativePosition.hasValue()) { - xInnerPropertySet->setPropertyValue( C2U( "RelativePosition" ), Any() ); + xInnerPropertySet->setPropertyValue( "RelativePosition", Any() ); } } } @@ -222,8 +222,7 @@ Any WrappedLegendAlignmentProperty::convertOuterToInnerValue( const Any& rOuterV namespace { -static const ::rtl::OUString lcl_aServiceName( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Legend" )); +static const ::rtl::OUString lcl_aServiceName("com.sun.star.comp.chart.Legend"); enum { @@ -235,14 +234,14 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Alignment" ), + Property( "Alignment", PROP_LEGEND_ALIGNMENT, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartLegendPosition * >(0)), //#i111967# no PropertyChangeEvent is fired on change so far beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Expansion" ), + Property( "Expansion", PROP_LEGEND_EXPANSION, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartLegendExpansion * >(0)), //#i111967# no PropertyChangeEvent is fired on change so far @@ -318,7 +317,7 @@ void SAL_CALL LegendWrapper::setPosition( const awt::Point& aPosition ) aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT; aRelativePosition.Primary = double(aPosition.X)/double(aPageSize.Width); aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height); - xProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xProp->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); } } @@ -350,7 +349,7 @@ void SAL_CALL LegendWrapper::setSize( const awt::Size& aSize ) ::rtl::OUString SAL_CALL LegendWrapper::getShapeType() throw (uno::RuntimeException) { - return C2U( "com.sun.star.chart.ChartLegend" ); + return rtl::OUString( "com.sun.star.chart.ChartLegend" ); } // ____ XComponent ____ @@ -386,8 +385,8 @@ void LegendWrapper::updateReferenceSize() Reference< beans::XPropertySet > xProp( this->getInnerPropertySet(), uno::UNO_QUERY ); if( xProp.is() ) { - if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() ) - xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny( + if( xProp->getPropertyValue( "ReferencePageSize" ).hasValue() ) + xProp->setPropertyValue( "ReferencePageSize", uno::makeAny( m_spChart2ModelContact->GetPageSize() )); } } @@ -396,7 +395,7 @@ Any LegendWrapper::getReferenceSize() Any aRet; Reference< beans::XPropertySet > xProp( this->getInnerPropertySet(), uno::UNO_QUERY ); if( xProp.is() ) - aRet = xProp->getPropertyValue( C2U("ReferencePageSize") ); + aRet = xProp->getPropertyValue( "ReferencePageSize" ); return aRet; } @@ -428,11 +427,11 @@ const std::vector< WrappedProperty* > LegendWrapper::createWrappedProperties() ::std::vector< ::chart::WrappedProperty* > aWrappedProperties; aWrappedProperties.push_back( new WrappedLegendAlignmentProperty() ); - aWrappedProperties.push_back( new WrappedProperty( C2U("Expansion"), C2U("Expansion") )); + aWrappedProperties.push_back( new WrappedProperty( "Expansion", "Expansion")); WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this ); //same problem as for wall: thje defaults ion the old chart are different for different charttypes, so we need to export explicitly - aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("FillStyle"), C2U("FillStyle") ) ); - aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("FillColor"), C2U("FillColor") )); + aWrappedProperties.push_back( new WrappedDirectStateProperty("FillStyle", "FillStyle")); + aWrappedProperties.push_back( new WrappedDirectStateProperty("FillColor", "FillColor")); WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties ); WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact ); @@ -444,10 +443,10 @@ const std::vector< WrappedProperty* > LegendWrapper::createWrappedProperties() Sequence< ::rtl::OUString > LegendWrapper::getSupportedServiceNames_Static() { Sequence< ::rtl::OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "com.sun.star.chart.ChartLegend" ); - aServices[ 1 ] = C2U( "com.sun.star.drawing.Shape" ); - aServices[ 2 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); - aServices[ 3 ] = C2U( "com.sun.star.style.CharacterProperties" ); + aServices[ 0 ] = "com.sun.star.chart.ChartLegend"; + aServices[ 1 ] = "com.sun.star.drawing.Shape"; + aServices[ 2 ] = "com.sun.star.xml.UserDefinedAttributeSupplier"; + aServices[ 3 ] = "com.sun.star.style.CharacterProperties"; return aServices; } diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index f81f2ebb8046..2c955581c7e1 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -140,7 +140,7 @@ namespace wrapper MinMaxLineWrapper::MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) : m_spChart2ModelContact( spChart2ModelContact ) , m_aEventListenerContainer( m_aMutex ) - , m_aWrappedLineJointProperty( C2U("LineJoint"), uno::makeAny( drawing::LineJoint_NONE )) + , m_aWrappedLineJointProperty( "LineJoint", uno::makeAny( drawing::LineJoint_NONE )) { } @@ -204,10 +204,10 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const ::rtl::OUString& rPrope xPropSet = Reference< beans::XPropertySet >(aSeriesSeq[0],uno::UNO_QUERY); if(xPropSet.is()) { - if( rPropertyName.equals( C2U("LineColor")) ) - xPropSet->setPropertyValue( C2U("Color"), rValue ); - else if( rPropertyName.equals( C2U("LineTransparence")) ) - xPropSet->setPropertyValue( C2U("Transparency"), rValue ); + if( rPropertyName == "LineColor" ) + xPropSet->setPropertyValue( "Color", rValue ); + else if( rPropertyName == "LineTransparence" ) + xPropSet->setPropertyValue( "Transparency", rValue ); else if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) ) m_aWrappedLineJointProperty.setPropertyValue( rValue, xPropSet ); else @@ -248,10 +248,10 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const ::rtl::OUString& rP } if(xPropSet.is()) { - if( rPropertyName.equals( C2U("LineColor")) ) - aRet = xPropSet->getPropertyValue( C2U("Color") ); - else if( rPropertyName.equals( C2U("LineTransparence")) ) - aRet = xPropSet->getPropertyValue( C2U("Transparency") ); + if( rPropertyName == "LineColor" ) + aRet = xPropSet->getPropertyValue( "Color" ); + else if( rPropertyName == "LineTransparence" ) + aRet = xPropSet->getPropertyValue( "Transparency" ); else if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) ) aRet = m_aWrappedLineJointProperty.getPropertyValue( xPropSet ); else @@ -427,9 +427,9 @@ uno::Sequence< uno::Any > SAL_CALL MinMaxLineWrapper::getPropertyDefaults( const Sequence< OUString > MinMaxLineWrapper::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "com.sun.star.chart.ChartLine" ); - aServices[ 1 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); - aServices[ 2 ] = C2U( "com.sun.star.drawing.LineProperties" ); + aServices[ 0 ] = "com.sun.star.chart.ChartLine"; + aServices[ 1 ] = "com.sun.star.xml.UserDefinedAttributeSupplier"; + aServices[ 2 ] = "com.sun.star.drawing.LineProperties"; return aServices; } diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index abc376d03689..4d3cb66a4ff7 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -76,7 +76,7 @@ protected: }; WrappedTitleStringProperty::WrappedTitleStringProperty( const Reference< uno::XComponentContext >& xContext ) - : ::chart::WrappedProperty( C2U( "String" ), OUString() ) + : ::chart::WrappedProperty( "String", OUString() ) , m_xContext( xContext ) { } @@ -129,7 +129,7 @@ public: }; WrappedStackedTextProperty::WrappedStackedTextProperty() - : ::chart::WrappedProperty( C2U( "StackedText" ), C2U( "StackCharacters" ) ) + : ::chart::WrappedProperty( "StackedText", "StackCharacters" ) { } WrappedStackedTextProperty::~WrappedStackedTextProperty() @@ -142,8 +142,7 @@ WrappedStackedTextProperty::~WrappedStackedTextProperty() namespace { -static const OUString lcl_aServiceName( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Title" )); +static const OUString lcl_aServiceName("com.sun.star.comp.chart.Title"); enum { @@ -156,20 +155,20 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "String" ), + Property( "String", PROP_TITLE_STRING, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "TextRotation" ), + Property( "TextRotation", PROP_TITLE_TEXT_ROTATION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "StackedText" ), + Property( "StackedText", PROP_TITLE_TEXT_STACKED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -250,7 +249,7 @@ void SAL_CALL TitleWrapper::setPosition( const awt::Point& aPosition ) aRelativePosition.Anchor = drawing::Alignment_TOP_LEFT; aRelativePosition.Primary = double(aPosition.X)/double(aPageSize.Width); aRelativePosition.Secondary = double(aPosition.Y)/double(aPageSize.Height); - xPropertySet->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xPropertySet->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); } } @@ -271,7 +270,7 @@ void SAL_CALL TitleWrapper::setSize( const awt::Size& /*aSize*/ ) OUString SAL_CALL TitleWrapper::getShapeType() throw (uno::RuntimeException) { - return C2U( "com.sun.star.chart.ChartTitle" ); + return rtl::OUString( "com.sun.star.chart.ChartTitle" ); } // ____ XComponent ____ @@ -484,8 +483,8 @@ void TitleWrapper::updateReferenceSize() Reference< beans::XPropertySet > xProp( this->getTitleObject(), uno::UNO_QUERY ); if( xProp.is() ) { - if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() ) - xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny( + if( xProp->getPropertyValue( "ReferencePageSize" ).hasValue() ) + xProp->setPropertyValue( "ReferencePageSize", uno::makeAny( m_spChart2ModelContact->GetPageSize() )); } } @@ -494,7 +493,7 @@ Any TitleWrapper::getReferenceSize() Any aRet; Reference< beans::XPropertySet > xProp( this->getTitleObject(), uno::UNO_QUERY ); if( xProp.is() ) - aRet = xProp->getPropertyValue( C2U("ReferencePageSize") ); + aRet = xProp->getPropertyValue( "ReferencePageSize" ); return aRet; } @@ -541,10 +540,10 @@ const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties() Sequence< OUString > TitleWrapper::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "com.sun.star.chart.ChartTitle" ); - aServices[ 1 ] = C2U( "com.sun.star.drawing.Shape" ); - aServices[ 2 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); - aServices[ 3 ] = C2U( "com.sun.star.style.CharacterProperties" ); + aServices[ 0 ] = "com.sun.star.chart.ChartTitle"; + aServices[ 1 ] = "com.sun.star.drawing.Shape"; + aServices[ 2 ] = "com.sun.star.xml.UserDefinedAttributeSupplier"; + aServices[ 3 ] = "com.sun.star.style.CharacterProperties"; return aServices; } diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index 04b78adc921f..1fe743d8defb 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -52,8 +52,7 @@ using ::rtl::OUString; namespace { -static const OUString lcl_aServiceName( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.ChartArea" )); +static const OUString lcl_aServiceName("com.sun.star.comp.chart.ChartArea"); struct StaticUpDownBarWrapperPropertyArray_Initializer { @@ -143,7 +142,7 @@ UpDownBarWrapper::UpDownBarWrapper( bool bUp, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) : m_spChart2ModelContact( spChart2ModelContact ) , m_aEventListenerContainer( m_aMutex ) - , m_aPropertySetName( bUp ? C2U("WhiteDay") : C2U("BlackDay") ) + , m_aPropertySetName( bUp ? "WhiteDay" : "BlackDay" ) { } diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx index 8da33da65924..51a520cc5ed6 100644 --- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx @@ -164,8 +164,8 @@ const std::vector< WrappedProperty* > WallFloorWrapper::createWrappedProperties( // exported. Because in the old chart the defaults is as follows: // Floor: SOLID (new and old model default), Wall: NONE, except for some chart types (line, scatter) if( m_bWall ) - aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("FillStyle"), C2U("FillStyle") )); - aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("FillColor"), C2U("FillColor") )); + aWrappedProperties.push_back( new WrappedDirectStateProperty( "FillStyle", "FillStyle" )); + aWrappedProperties.push_back( new WrappedDirectStateProperty( "FillColor", "FillColor" )); return aWrappedProperties; } @@ -175,10 +175,10 @@ const std::vector< WrappedProperty* > WallFloorWrapper::createWrappedProperties( Sequence< OUString > WallFloorWrapper::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "com.sun.star.xml.UserDefinedAttributeSupplier" ); - aServices[ 1 ] = C2U( "com.sun.star.drawing.FillProperties" ); - aServices[ 2 ] = C2U( "com.sun.star.drawing.LineProperties" ); - aServices[ 3 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.xml.UserDefinedAttributeSupplier"; + aServices[ 1 ] = "com.sun.star.drawing.FillProperties"; + aServices[ 2 ] = "com.sun.star.drawing.LineProperties"; + aServices[ 3 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx index b1bfaaf7f047..f74c9037374e 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx @@ -43,7 +43,7 @@ namespace wrapper { WrappedAddInProperty::WrappedAddInProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( C2U( "AddIn" ), OUString() ) + : ::chart::WrappedProperty( "AddIn", OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -56,7 +56,7 @@ void WrappedAddInProperty::setPropertyValue( const Any& rOuterValue, const Refer { Reference< util::XRefreshable > xAddIn; if( ! (rOuterValue >>= xAddIn) ) - throw lang::IllegalArgumentException( C2U("AddIn properties require type XRefreshable"), 0, 0 ); + throw lang::IllegalArgumentException( "AddIn properties require type XRefreshable", 0, 0 ); m_rChartDocumentWrapper.setAddIn( xAddIn ); } @@ -70,7 +70,7 @@ Any WrappedAddInProperty::getPropertyValue( const Reference< beans::XPropertySet //............................................................................. WrappedBaseDiagramProperty::WrappedBaseDiagramProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( C2U( "BaseDiagram" ), OUString() ) + : ::chart::WrappedProperty( "BaseDiagram" , OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -83,7 +83,7 @@ void WrappedBaseDiagramProperty::setPropertyValue( const Any& rOuterValue, const { rtl::OUString aBaseDiagram; if( ! (rOuterValue >>= aBaseDiagram) ) - throw lang::IllegalArgumentException( C2U("BaseDiagram properties require type OUString"), 0, 0 ); + throw lang::IllegalArgumentException( "BaseDiagram properties require type OUString", 0, 0 ); m_rChartDocumentWrapper.setBaseDiagram( aBaseDiagram ); } @@ -97,7 +97,7 @@ Any WrappedBaseDiagramProperty::getPropertyValue( const Reference< beans::XPrope //............................................................................. WrappedAdditionalShapesProperty::WrappedAdditionalShapesProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( C2U( "AdditionalShapes" ), OUString() ) + : ::chart::WrappedProperty( "AdditionalShapes" , OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -108,7 +108,7 @@ WrappedAdditionalShapesProperty::~WrappedAdditionalShapesProperty() void WrappedAdditionalShapesProperty::setPropertyValue( const Any& /*rOuterValue*/, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - throw lang::IllegalArgumentException( C2U("AdditionalShapes is a read only property"), 0, 0 ); + throw lang::IllegalArgumentException( "AdditionalShapes is a read only property", 0, 0 ); } Any WrappedAdditionalShapesProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const @@ -120,7 +120,7 @@ Any WrappedAdditionalShapesProperty::getPropertyValue( const Reference< beans::X //............................................................................. WrappedRefreshAddInAllowedProperty::WrappedRefreshAddInAllowedProperty( ChartDocumentWrapper& rChartDocumentWrapper ) - : ::chart::WrappedProperty( C2U( "RefreshAddInAllowed" ), OUString() ) + : ::chart::WrappedProperty( "RefreshAddInAllowed" , OUString() ) , m_rChartDocumentWrapper( rChartDocumentWrapper ) { } @@ -133,7 +133,7 @@ void WrappedRefreshAddInAllowedProperty::setPropertyValue( const Any& rOuterValu { sal_Bool bUpdateAddIn = sal_True; if( ! (rOuterValue >>= bUpdateAddIn) ) - throw lang::IllegalArgumentException( C2U("The property RefreshAddInAllowed requires type boolean"), 0, 0 ); + throw lang::IllegalArgumentException( "The property RefreshAddInAllowed requires type boolean", 0, 0 ); m_rChartDocumentWrapper.setUpdateAddIn( bUpdateAddIn ); } diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx index c08412fe3bb9..27a794cb3c21 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx @@ -61,7 +61,7 @@ public: }; WrappedAutomaticPositionProperty::WrappedAutomaticPositionProperty() - : ::chart::WrappedProperty( C2U( "AutomaticPosition" ), rtl::OUString() ) + : ::chart::WrappedProperty( "AutomaticPosition" , rtl::OUString() ) { } WrappedAutomaticPositionProperty::~WrappedAutomaticPositionProperty() @@ -75,15 +75,15 @@ void WrappedAutomaticPositionProperty::setPropertyValue( const Any& rOuterValue, { bool bNewValue = true; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Property AutomaticPosition requires value of type boolean"), 0, 0 ); + throw lang::IllegalArgumentException( "Property AutomaticPosition requires value of type boolean", 0, 0 ); try { if( bNewValue ) { - Any aRelativePosition( xInnerPropertySet->getPropertyValue( C2U( "RelativePosition" ) ) ); + Any aRelativePosition( xInnerPropertySet->getPropertyValue( "RelativePosition" ) ); if( aRelativePosition.hasValue() ) - xInnerPropertySet->setPropertyValue( C2U( "RelativePosition" ), Any() ); + xInnerPropertySet->setPropertyValue( "RelativePosition", Any() ); } } catch( const uno::Exception & ex ) @@ -99,7 +99,7 @@ Any WrappedAutomaticPositionProperty::getPropertyValue( const Reference< beans:: Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) { - Any aRelativePosition( xInnerPropertySet->getPropertyValue( C2U( "RelativePosition" ) ) ); + Any aRelativePosition( xInnerPropertySet->getPropertyValue( "RelativePosition" ) ); if( !aRelativePosition.hasValue() ) aRet <<= true; } @@ -133,7 +133,7 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList ) void WrappedAutomaticPositionProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "AutomaticPosition" ), + Property( "AutomaticPosition", PROP_CHART_AUTOMATIC_POSITION, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx index 076e87caabc7..648d8bf18960 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx @@ -101,16 +101,16 @@ WrappedAxisAndGridExistenceProperty::WrappedAxisAndGridExistenceProperty( bool b if( m_bAxis ) { if( m_bMain ) - m_aOuterName = C2U( "HasXAxis" ); + m_aOuterName = "HasXAxis"; else - m_aOuterName = C2U( "HasSecondaryXAxis" ); + m_aOuterName = "HasSecondaryXAxis"; } else { if( m_bMain ) - m_aOuterName = C2U( "HasXAxisGrid" ); + m_aOuterName = "HasXAxisGrid"; else - m_aOuterName = C2U( "HasXAxisHelpGrid" ); + m_aOuterName = "HasXAxisHelpGrid"; } } break; @@ -120,14 +120,14 @@ WrappedAxisAndGridExistenceProperty::WrappedAxisAndGridExistenceProperty( bool b { OSL_ENSURE(m_bMain == true,"there is no secondary z axis at the old api"); m_bMain = true; - m_aOuterName = C2U( "HasZAxis" ); + m_aOuterName = "HasZAxis"; } else { if( m_bMain ) - m_aOuterName = C2U( "HasZAxisGrid" ); + m_aOuterName = "HasZAxisGrid"; else - m_aOuterName = C2U( "HasZAxisHelpGrid" ); + m_aOuterName = "HasZAxisHelpGrid"; } } break; @@ -136,16 +136,16 @@ WrappedAxisAndGridExistenceProperty::WrappedAxisAndGridExistenceProperty( bool b if( m_bAxis ) { if( m_bMain ) - m_aOuterName = C2U( "HasYAxis" ); + m_aOuterName = "HasYAxis"; else - m_aOuterName = C2U( "HasSecondaryYAxis" ); + m_aOuterName = "HasSecondaryYAxis"; } else { if( m_bMain ) - m_aOuterName = C2U( "HasYAxisGrid" ); + m_aOuterName = "HasYAxisGrid"; else - m_aOuterName = C2U( "HasYAxisHelpGrid" ); + m_aOuterName = "HasYAxisHelpGrid"; } } break; @@ -161,7 +161,7 @@ void WrappedAxisAndGridExistenceProperty::setPropertyValue( const Any& rOuterVal { sal_Bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Has axis or grid properties require boolean values"), 0, 0 ); + throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 ); sal_Bool bOldValue = sal_False; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -254,23 +254,23 @@ WrappedAxisTitleExistenceProperty::WrappedAxisTitleExistenceProperty( sal_Int32 switch( nTitleIndex ) { case 0: - m_aOuterName = C2U( "HasXAxisTitle" ); + m_aOuterName = "HasXAxisTitle"; m_eTitleType = TitleHelper::X_AXIS_TITLE; break; case 2: - m_aOuterName = C2U( "HasZAxisTitle" ); + m_aOuterName = "HasZAxisTitle"; m_eTitleType = TitleHelper::Z_AXIS_TITLE; break; case 3: - m_aOuterName = C2U( "HasSecondaryXAxisTitle" ); + m_aOuterName = "HasSecondaryXAxisTitle"; m_eTitleType = TitleHelper::SECONDARY_X_AXIS_TITLE; break; case 4: - m_aOuterName = C2U( "HasSecondaryYAxisTitle" ); + m_aOuterName = "HasSecondaryYAxisTitle"; m_eTitleType = TitleHelper::SECONDARY_Y_AXIS_TITLE; break; default: - m_aOuterName = C2U( "HasYAxisTitle" ); + m_aOuterName = "HasYAxisTitle"; m_eTitleType = TitleHelper::Y_AXIS_TITLE; break; } @@ -285,7 +285,7 @@ void WrappedAxisTitleExistenceProperty::setPropertyValue( const Any& rOuterValue { sal_Bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Has axis or grid properties require boolean values"), 0, 0 ); + throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 ); sal_Bool bOldValue = sal_False; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -372,14 +372,14 @@ WrappedAxisLabelExistenceProperty::WrappedAxisLabelExistenceProperty( bool bMain switch( m_nDimensionIndex ) { case 0: - m_aOuterName = m_bMain ? C2U( "HasXAxisDescription" ) : C2U( "HasSecondaryXAxisDescription" ); + m_bMain ? m_aOuterName = "HasXAxisDescription" : m_aOuterName = "HasSecondaryXAxisDescription"; break; case 2: OSL_ENSURE(m_bMain,"there is no description available for a secondary z axis"); - m_aOuterName = C2U( "HasZAxisDescription" ); + m_aOuterName = "HasZAxisDescription"; break; default: - m_aOuterName = m_bMain ? C2U( "HasYAxisDescription" ) : C2U( "HasSecondaryYAxisDescription" ); + m_bMain ? m_aOuterName = "HasYAxisDescription" : m_aOuterName = "HasSecondaryYAxisDescription"; break; } } @@ -393,7 +393,7 @@ void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue { sal_Bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("Has axis or grid properties require boolean values"), 0, 0 ); + throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 ); sal_Bool bOldValue = sal_False; getPropertyValue( xInnerPropertySet ) >>= bOldValue; @@ -408,10 +408,10 @@ void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue //create axis if needed xProp.set( AxisHelper::createAxis( m_nDimensionIndex, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext ), uno::UNO_QUERY ); if( xProp.is() ) - xProp->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_False ) ); + xProp->setPropertyValue( "Show", uno::makeAny( sal_False ) ); } if( xProp.is() ) - xProp->setPropertyValue( C2U( "DisplayLabels" ), rOuterValue ); + xProp->setPropertyValue( "DisplayLabels", rOuterValue ); } Any WrappedAxisLabelExistenceProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const @@ -421,7 +421,7 @@ Any WrappedAxisLabelExistenceProperty::getPropertyValue( const Reference< beans: Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() ); Reference< beans::XPropertySet > xProp( AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram ), uno::UNO_QUERY ); if( xProp.is() ) - aRet = xProp->getPropertyValue( C2U( "DisplayLabels" )); + aRet = xProp->getPropertyValue( "DisplayLabels" ); else aRet <<= sal_False; return aRet; diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx index e41d8c86492e..9c2da0a6302e 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx @@ -129,7 +129,7 @@ Any WrappedCharacterHeightProperty_Base::convertOuterToInnerValue( const Any& rO //----------------------------------------------------------------------------- WrappedCharacterHeightProperty::WrappedCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider ) - : WrappedCharacterHeightProperty_Base( C2U( "CharHeight" ), pRefSizePropProvider ) + : WrappedCharacterHeightProperty_Base( "CharHeight", pRefSizePropProvider ) { } WrappedCharacterHeightProperty::~WrappedCharacterHeightProperty() @@ -139,7 +139,7 @@ WrappedCharacterHeightProperty::~WrappedCharacterHeightProperty() //----------------------------------------------------------------------------- WrappedAsianCharacterHeightProperty::WrappedAsianCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider ) - : WrappedCharacterHeightProperty_Base( C2U( "CharHeightAsian" ), pRefSizePropProvider ) + : WrappedCharacterHeightProperty_Base( "CharHeightAsian", pRefSizePropProvider ) { } WrappedAsianCharacterHeightProperty::~WrappedAsianCharacterHeightProperty() @@ -149,7 +149,7 @@ WrappedAsianCharacterHeightProperty::~WrappedAsianCharacterHeightProperty() //----------------------------------------------------------------------------- WrappedComplexCharacterHeightProperty::WrappedComplexCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider ) - : WrappedCharacterHeightProperty_Base( C2U( "CharHeightComplex" ), pRefSizePropProvider ) + : WrappedCharacterHeightProperty_Base( "CharHeightComplex", pRefSizePropProvider ) { } WrappedComplexCharacterHeightProperty::~WrappedComplexCharacterHeightProperty() diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx index b28c5cffba27..4dbd360873be 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx @@ -118,7 +118,7 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList void WrappedDataCaptionProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "DataCaption" ), + Property( "DataCaption", PROP_CHART_DATAPOINT_DATA_CAPTION, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -146,7 +146,7 @@ void WrappedDataCaptionProperties::addWrappedPropertiesForDiagram( std::vector< WrappedDataCaptionProperty::WrappedDataCaptionProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact , tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< sal_Int32 >( C2U("DataCaption") + : WrappedSeriesOrDiagramProperty< sal_Int32 >( "DataCaption" , uno::makeAny( sal_Int32(0) ), spChart2ModelContact, ePropertyType ) { } @@ -159,7 +159,7 @@ sal_Int32 WrappedDataCaptionProperty::getValueFromSeries( const Reference< beans sal_Int32 aRet = 0; m_aDefaultValue >>= aRet; chart2::DataPointLabel aLabel; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Label")) >>= aLabel ) ) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Label") >>= aLabel ) ) aRet = lcl_LabelToCaption( aLabel ); return aRet; } @@ -170,7 +170,7 @@ void WrappedDataCaptionProperty::setValueToSeries( const Reference< beans::XProp return; chart2::DataPointLabel aLabel = lcl_CaptionToLabel( nCaption ); - xSeriesPropertySet->setPropertyValue( C2U("Label"), uno::makeAny( aLabel ) ); + xSeriesPropertySet->setPropertyValue( "Label", uno::makeAny( aLabel ) ); } //----------------------------------------------------------------------------- diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx index 4242a3e2a7e8..5edfe0725eac 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx @@ -78,7 +78,7 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const Any& rOuterValue, { sal_Int32 nNewValue = 0; if( ! (rOuterValue >>= nNewValue) ) - throw lang::IllegalArgumentException( C2U("GapWidth and Overlap property require value of type sal_Int32"), 0, 0 ); + throw lang::IllegalArgumentException( "GapWidth and Overlap property require value of type sal_Int32", 0, 0 ); m_aOuterValue = rOuterValue; @@ -171,7 +171,7 @@ Any WrappedBarPositionProperty_Base::getPropertyValue( const Reference< beans::X WrappedGapwidthProperty::WrappedGapwidthProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedBarPositionProperty_Base( C2U("GapWidth"), C2U("GapwidthSequence"), DEFAULT_GAPWIDTH, spChart2ModelContact ) + : WrappedBarPositionProperty_Base( "GapWidth", "GapwidthSequence", DEFAULT_GAPWIDTH, spChart2ModelContact ) { } WrappedGapwidthProperty::~WrappedGapwidthProperty() @@ -182,7 +182,7 @@ WrappedGapwidthProperty::~WrappedGapwidthProperty() WrappedBarOverlapProperty::WrappedBarOverlapProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedBarPositionProperty_Base( C2U("Overlap"), C2U("OverlapSequence"), DEFAULT_OVERLAP, spChart2ModelContact ) + : WrappedBarPositionProperty_Base( "Overlap", "OverlapSequence", DEFAULT_OVERLAP, spChart2ModelContact ) { } WrappedBarOverlapProperty::~WrappedBarOverlapProperty() diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx index c4e48a473a8d..8e762199ff47 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx @@ -43,7 +43,7 @@ namespace wrapper //............................................................................. WrappedNumberFormatProperty::WrappedNumberFormatProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedDirectStateProperty( C2U("NumberFormat"), C2U("NumberFormat") ) + : WrappedDirectStateProperty( "NumberFormat", "NumberFormat" ) , m_spChart2ModelContact(spChart2ModelContact) { m_aOuterValue = getPropertyDefault( 0 ); @@ -63,12 +63,12 @@ void WrappedNumberFormatProperty::setPropertyValue( const Any& rOuterValue, cons { sal_Int32 nFormat = 0; if( ! (rOuterValue >>= nFormat) ) - throw lang::IllegalArgumentException( C2U("Property 'NumberFormat' requires value of type sal_Int32"), 0, 0 ); + throw lang::IllegalArgumentException( "Property 'NumberFormat' requires value of type sal_Int32", 0, 0 ); m_aOuterValue = rOuterValue; if(xInnerPropertySet.is()) { - bool bUseSourceFormat = !xInnerPropertySet->getPropertyValue( C2U("NumberFormat" )).hasValue(); + bool bUseSourceFormat = !xInnerPropertySet->getPropertyValue( "NumberFormat" ).hasValue(); if( bUseSourceFormat ) { uno::Reference< chart2::XChartDocument > xChartDoc( m_spChart2ModelContact->getChart2Document() ); @@ -114,7 +114,7 @@ Any WrappedNumberFormatProperty::getPropertyDefault( const Reference< beans::XPr //----------------------------------------------------------------------------- WrappedLinkNumberFormatProperty::WrappedLinkNumberFormatProperty( WrappedNumberFormatProperty* pWrappedNumberFormatProperty ) - : WrappedProperty( C2U("LinkNumberFormatToSource"), C2U("") ) + : WrappedProperty( "LinkNumberFormatToSource", rtl::OUString() ) , m_pWrappedNumberFormatProperty( pWrappedNumberFormatProperty ) { if( m_pWrappedNumberFormatProperty ) @@ -164,7 +164,7 @@ void WrappedLinkNumberFormatProperty::setPropertyValue( const Any& rOuterValue, aValue <<= sal_Int32( 0 ); } - xInnerPropertySet->setPropertyValue( C2U("NumberFormat"), aValue ); + xInnerPropertySet->setPropertyValue( "NumberFormat", aValue ); } } @@ -176,7 +176,7 @@ Any WrappedLinkNumberFormatProperty::getPropertyValue( const Reference< beans::X OSL_FAIL("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue"); return getPropertyDefault(0); } - bool bLink = ! xInnerPropertySet->getPropertyValue( C2U("NumberFormat" )).hasValue(); + bool bLink = ! xInnerPropertySet->getPropertyValue( "NumberFormat" ).hasValue(); return uno::makeAny( bLink ); } diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx index ee5c3e981db3..f6503929a66a 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx @@ -58,52 +58,52 @@ WrappedScaleProperty::WrappedScaleProperty( tScaleProperty eScaleProperty switch( m_eScaleProperty ) { case SCALE_PROP_MAX: - m_aOuterName = C2U("Max"); + m_aOuterName = "Max"; break; case SCALE_PROP_MIN: - m_aOuterName = C2U("Min"); + m_aOuterName = "Min"; break; case SCALE_PROP_ORIGIN: - m_aOuterName = C2U("Origin"); + m_aOuterName = "Origin"; break; case SCALE_PROP_STEPMAIN: - m_aOuterName = C2U("StepMain"); + m_aOuterName = "StepMain"; break; case SCALE_PROP_STEPHELP: - m_aOuterName = C2U("StepHelp"); + m_aOuterName = "StepHelp"; break; case SCALE_PROP_STEPHELP_COUNT: - m_aOuterName = C2U("StepHelpCount"); + m_aOuterName = "StepHelpCount"; break; case SCALE_PROP_AUTO_MAX: - m_aOuterName = C2U("AutoMax"); + m_aOuterName = "AutoMax"; break; case SCALE_PROP_AUTO_MIN: - m_aOuterName = C2U("AutoMin"); + m_aOuterName = "AutoMin"; break; case SCALE_PROP_AUTO_ORIGIN: - m_aOuterName = C2U("AutoOrigin"); + m_aOuterName = "AutoOrigin"; break; case SCALE_PROP_AUTO_STEPMAIN: - m_aOuterName = C2U("AutoStepMain"); + m_aOuterName = "AutoStepMain"; break; case SCALE_PROP_AUTO_STEPHELP: - m_aOuterName = C2U("AutoStepHelp"); + m_aOuterName = "AutoStepHelp"; break; case SCALE_PROP_AXIS_TYPE: - m_aOuterName = C2U("AxisType"); + m_aOuterName = "AxisType"; break; case SCALE_PROP_DATE_INCREMENT: - m_aOuterName = C2U("TimeIncrement"); + m_aOuterName = "TimeIncrement"; break; case SCALE_PROP_EXPLICIT_DATE_INCREMENT: - m_aOuterName = C2U("ExplicitTimeIncrement"); + m_aOuterName = "ExplicitTimeIncrement"; break; case SCALE_PROP_LOGARITHMIC: - m_aOuterName = C2U("Logarithmic"); + m_aOuterName = "Logarithmic"; break; case SCALE_PROP_REVERSEDIRECTION: - m_aOuterName = C2U("ReverseDirection"); + m_aOuterName = "ReverseDirection"; break; default: OSL_FAIL("unknown scale property"); diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx index 7dc3da1210ab..a3d8eb000848 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx @@ -64,7 +64,7 @@ private: }; WrappedScaleTextProperty::WrappedScaleTextProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : ::chart::WrappedProperty( C2U( "ScaleText" ), rtl::OUString() ) + : ::chart::WrappedProperty( "ScaleText" , rtl::OUString() ) , m_spChart2ModelContact( spChart2ModelContact ) { } @@ -76,7 +76,7 @@ WrappedScaleTextProperty::~WrappedScaleTextProperty() void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - static const OUString aRefSizeName( RTL_CONSTASCII_USTRINGPARAM("ReferencePageSize") ); + static const OUString aRefSizeName( "ReferencePageSize" ); if( xInnerPropertySet.is() ) { @@ -84,7 +84,7 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R if( ! (rOuterValue >>= bNewValue) ) { if( rOuterValue.hasValue() ) - throw lang::IllegalArgumentException( C2U("Property ScaleText requires value of type boolean"), 0, 0 ); + throw lang::IllegalArgumentException( "Property ScaleText requires value of type boolean", 0, 0 ); } try @@ -107,7 +107,7 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R Any WrappedScaleTextProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - static const OUString aRefSizeName( RTL_CONSTASCII_USTRINGPARAM("ReferencePageSize") ); + static const OUString aRefSizeName( "ReferencePageSize" ); Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) @@ -142,7 +142,7 @@ enum void WrappedScaleTextProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "ScaleText" ), + Property( "ScaleText", PROP_CHART_SCALE_TEXT, ::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx index d18a322a75e1..8a395fd37694 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx @@ -55,7 +55,7 @@ void WrappedSceneProperty::addWrappedProperties( std::vector< WrappedProperty* > WrappedD3DTransformMatrixProperty::WrappedD3DTransformMatrixProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedProperty(C2U("D3DTransformMatrix"),C2U("D3DTransformMatrix")) + : WrappedProperty("D3DTransformMatrix","D3DTransformMatrix") , m_spChart2ModelContact( spChart2ModelContact ) { } diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx index 00a1bf7b2406..9a5602f0db9b 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx @@ -46,7 +46,7 @@ WrappedSeriesAreaOrLineProperty::WrappedSeriesAreaOrLineProperty( , const rtl::OUString& rInnerAreaTypeName , const rtl::OUString& rInnerLineTypeName , DataSeriesPointWrapper* pDataSeriesPointWrapper ) - : WrappedProperty( rOuterName, C2U( "" ) ) + : WrappedProperty( rOuterName, rtl::OUString() ) , m_pDataSeriesPointWrapper( pDataSeriesPointWrapper ) , m_aInnerAreaTypeName( rInnerAreaTypeName ) , m_aInnerLineTypeName( rInnerLineTypeName ) diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx index 81a01226fb47..0d83714f31e9 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx @@ -125,7 +125,7 @@ public: { PROPERTYTYPE aNewValue = PROPERTYTYPE(); if( ! (rOuterValue >>= aNewValue) ) - throw ::com::sun::star::lang::IllegalArgumentException( C2U("statistic property requires different type"), 0, 0 ); + throw ::com::sun::star::lang::IllegalArgumentException( "statistic property requires different type", 0, 0 ); if( m_ePropertyType == DIAGRAM ) { diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx index a649ba823eb9..bfa83ad90ee7 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx @@ -109,7 +109,7 @@ public: { PROPERTYTYPE aNewValue; if( ! (rOuterValue >>= aNewValue) ) - throw ::com::sun::star::lang::IllegalArgumentException( C2U("spline property requires different type"), 0, 0 ); + throw ::com::sun::star::lang::IllegalArgumentException( "spline property requires different type", 0, 0 ); m_aOuterValue = rOuterValue; @@ -194,21 +194,21 @@ enum void WrappedSplineProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "SplineType" ), + Property( "SplineType", PROP_CHART_SPLINE_TYPE, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "SplineOrder" ), + Property( "SplineOrder", PROP_CHART_SPLINE_ORDER, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "SplineResolution" ), + Property( "SplineResolution", PROP_CHART_SPLINE_RESOLUTION, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -221,14 +221,14 @@ void WrappedSplineProperties::addWrappedProperties( std::vector< WrappedProperty , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) { rList.push_back( new WrappedSplineTypeProperty( spChart2ModelContact ) ); - rList.push_back( new WrappedSplineProperty<sal_Int32>( C2U("SplineOrder"), C2U("SplineOrder"), uno::makeAny(sal_Int32(3)), spChart2ModelContact ) ); - rList.push_back( new WrappedSplineProperty<sal_Int32>( C2U("SplineResolution"), C2U("CurveResolution"), uno::makeAny(sal_Int32(20)), spChart2ModelContact ) ); + rList.push_back( new WrappedSplineProperty<sal_Int32>( "SplineOrder", "SplineOrder", uno::makeAny(sal_Int32(3)), spChart2ModelContact ) ); + rList.push_back( new WrappedSplineProperty<sal_Int32>( "SplineResolution", "CurveResolution", uno::makeAny(sal_Int32(20)), spChart2ModelContact ) ); } //----------------------------------------------------------------------------- WrappedSplineTypeProperty::WrappedSplineTypeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedSplineProperty<sal_Int32>( C2U("SplineType"), C2U("CurveStyle"), uno::makeAny(sal_Int32(0)), spChart2ModelContact ) + : WrappedSplineProperty<sal_Int32>( "SplineType", "CurveStyle", uno::makeAny(sal_Int32(0)), spChart2ModelContact ) { } WrappedSplineTypeProperty::~WrappedSplineTypeProperty() diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index 75ac24569a7d..772723c22885 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -124,7 +124,7 @@ sal_Int32 lcl_getErrorBarStyle( const uno::Reference< beans::XPropertySet >& xEr { sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; if(xErrorBarProperties.is()) - xErrorBarProperties->getPropertyValue( C2U( "ErrorBarStyle" )) >>= nStyle; + xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nStyle; return nStyle; } @@ -196,16 +196,16 @@ protected: if(!xSeriesPropertySet.is()) return 0; uno::Reference< beans::XPropertySet > xErrorBarProperties; - xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties; + xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties; if( !xErrorBarProperties.is() ) { // todo: use a valid context xErrorBarProperties = ::chart::createErrorBar( uno::Reference< uno::XComponentContext >() ); //default in new and old api are different - xErrorBarProperties->setPropertyValue( C2U( "ShowPositiveError" ), uno::makeAny(sal_Bool(sal_False)) ); - xErrorBarProperties->setPropertyValue( C2U( "ShowNegativeError" ), uno::makeAny(sal_Bool(sal_False)) ); - xErrorBarProperties->setPropertyValue( C2U( "ErrorBarStyle" ), uno::makeAny(::com::sun::star::chart::ErrorBarStyle::NONE) ); - xSeriesPropertySet->setPropertyValue( C2U( "ErrorBarY" ), uno::makeAny( xErrorBarProperties ) ); + xErrorBarProperties->setPropertyValue( "ShowPositiveError" , uno::makeAny(sal_Bool(sal_False)) ); + xErrorBarProperties->setPropertyValue( "ShowNegativeError" , uno::makeAny(sal_Bool(sal_False)) ); + xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::makeAny(::com::sun::star::chart::ErrorBarStyle::NONE) ); + xSeriesPropertySet->setPropertyValue( "ErrorBarY" , uno::makeAny( xErrorBarProperties ) ); } return xErrorBarProperties; } @@ -231,7 +231,7 @@ private: WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( C2U("ConstantErrorLow") + : WrappedStatisticProperty< double >( "ConstantErrorLow" , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType ) { } @@ -244,10 +244,10 @@ double WrappedConstantErrorLowProperty::getValueFromSeries( const Reference< bea double aRet = 0.0; m_aDefaultValue >>= aRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) ) - xErrorBarProperties->getPropertyValue( C2U( "NegativeError" )) >>= aRet; + xErrorBarProperties->getPropertyValue( "NegativeError" ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -262,7 +262,7 @@ void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans:: m_aOuterValue = uno::makeAny( aNewValue ); if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) ) { - xErrorBarProperties->setPropertyValue( C2U( "NegativeError" ), m_aOuterValue ); + xErrorBarProperties->setPropertyValue( "NegativeError", m_aOuterValue ); } } } @@ -286,7 +286,7 @@ private: WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( C2U("ConstantErrorHigh") + : WrappedStatisticProperty< double >( "ConstantErrorHigh" , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType ) { } @@ -299,10 +299,10 @@ double WrappedConstantErrorHighProperty::getValueFromSeries( const Reference< be double aRet = 0.0; m_aDefaultValue >>= aRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) ) - xErrorBarProperties->getPropertyValue( C2U( "PositiveError" )) >>= aRet; + xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -317,7 +317,7 @@ void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans: m_aOuterValue = uno::makeAny( aNewValue ); if( ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) ) { - xErrorBarProperties->setPropertyValue( C2U( "PositiveError" ), m_aOuterValue ); + xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue ); } } } @@ -338,7 +338,7 @@ public: WrappedMeanValueProperty::WrappedMeanValueProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< sal_Bool >( C2U("MeanValue"), uno::makeAny( sal_False ), spChart2ModelContact, ePropertyType ) + : WrappedStatisticProperty< sal_Bool >( "MeanValue", uno::makeAny( sal_False ), spChart2ModelContact, ePropertyType ) { } WrappedMeanValueProperty::~WrappedMeanValueProperty() @@ -383,7 +383,7 @@ public: WrappedErrorCategoryProperty::WrappedErrorCategoryProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorCategory >( C2U("ErrorCategory") + : WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorCategory >( "ErrorCategory" , uno::makeAny( ::com::sun::star::chart::ChartErrorCategory_NONE ), spChart2ModelContact, ePropertyType ) { } @@ -396,10 +396,10 @@ WrappedErrorCategoryProperty::~WrappedErrorCategoryProperty() ::com::sun::star::chart::ChartErrorCategory aRet = ::com::sun::star::chart::ChartErrorCategory_NONE; m_aDefaultValue >>= aRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; - xErrorBarProperties->getPropertyValue( C2U( "ErrorBarStyle" )) >>= nStyle; + xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nStyle; switch(nStyle) { case ::com::sun::star::chart::ErrorBarStyle::NONE: @@ -462,7 +462,7 @@ void WrappedErrorCategoryProperty::setValueToSeries( const Reference< beans::XPr default: break; } - xErrorBarProperties->setPropertyValue( C2U( "ErrorBarStyle" ), uno::makeAny(nNewStyle) ); + xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::makeAny(nNewStyle) ); } } @@ -485,7 +485,7 @@ private: WrappedPercentageErrorProperty::WrappedPercentageErrorProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( C2U("PercentageError") + : WrappedStatisticProperty< double >( "PercentageError" , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType ) { } @@ -498,10 +498,10 @@ double WrappedPercentageErrorProperty::getValueFromSeries( const Reference< bean double aRet = 0.0; m_aDefaultValue >>= aRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( ::com::sun::star::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) ) - xErrorBarProperties->getPropertyValue( C2U( "PositiveError" )) >>= aRet; + xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -515,8 +515,8 @@ void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::X m_aOuterValue = uno::makeAny( aNewValue ); if( ::com::sun::star::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) ) { - xErrorBarProperties->setPropertyValue( C2U( "PositiveError" ), m_aOuterValue ); - xErrorBarProperties->setPropertyValue( C2U( "NegativeError" ), m_aOuterValue ); + xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue ); } } } @@ -540,7 +540,7 @@ private: WrappedErrorMarginProperty::WrappedErrorMarginProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< double >( C2U("ErrorMargin") + : WrappedStatisticProperty< double >( "ErrorMargin" , uno::makeAny( double(0.0) ), spChart2ModelContact, ePropertyType ) { } @@ -553,10 +553,10 @@ double WrappedErrorMarginProperty::getValueFromSeries( const Reference< beans::X double aRet = 0.0; m_aDefaultValue >>= aRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { if( ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) ) - xErrorBarProperties->getPropertyValue( C2U( "PositiveError" )) >>= aRet; + xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet; else m_aOuterValue >>= aRet; } @@ -570,8 +570,8 @@ void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XProp m_aOuterValue = uno::makeAny( aNewValue ); if( ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) ) { - xErrorBarProperties->setPropertyValue( C2U( "PositiveError" ), m_aOuterValue ); - xErrorBarProperties->setPropertyValue( C2U( "NegativeError" ), m_aOuterValue ); + xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue ); + xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue ); } } } @@ -592,7 +592,7 @@ public: WrappedErrorIndicatorProperty::WrappedErrorIndicatorProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorIndicatorType >( C2U("ErrorIndicator") + : WrappedStatisticProperty< ::com::sun::star::chart::ChartErrorIndicatorType >( "ErrorIndicator" , uno::makeAny( ::com::sun::star::chart::ChartErrorIndicatorType_NONE ), spChart2ModelContact, ePropertyType ) { } @@ -605,12 +605,12 @@ WrappedErrorIndicatorProperty::~WrappedErrorIndicatorProperty() ::com::sun::star::chart::ChartErrorIndicatorType aRet = ::com::sun::star::chart::ChartErrorIndicatorType_NONE; m_aDefaultValue >>= aRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { sal_Bool bPositive = sal_False; sal_Bool bNegative = sal_False; - xErrorBarProperties->getPropertyValue( C2U( "ShowPositiveError" )) >>= bPositive; - xErrorBarProperties->getPropertyValue( C2U( "ShowNegativeError" )) >>= bNegative; + xErrorBarProperties->getPropertyValue( "ShowPositiveError" ) >>= bPositive; + xErrorBarProperties->getPropertyValue( "ShowNegativeError" ) >>= bNegative; if( bPositive && bNegative ) aRet = ::com::sun::star::chart::ChartErrorIndicatorType_TOP_AND_BOTTOM; @@ -644,8 +644,8 @@ void WrappedErrorIndicatorProperty::setValueToSeries( const Reference< beans::XP break; } - xErrorBarProperties->setPropertyValue( C2U( "ShowPositiveError" ), uno::makeAny(bPositive) ); - xErrorBarProperties->setPropertyValue( C2U( "ShowNegativeError" ), uno::makeAny(bNegative) ); + xErrorBarProperties->setPropertyValue( "ShowPositiveError" , uno::makeAny(bPositive) ); + xErrorBarProperties->setPropertyValue( "ShowNegativeError" , uno::makeAny(bNegative) ); } } @@ -667,7 +667,7 @@ public: WrappedErrorBarStyleProperty::WrappedErrorBarStyleProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< sal_Int32 >( C2U("ErrorBarStyle") + : WrappedStatisticProperty< sal_Int32 >( "ErrorBarStyle" , uno::makeAny( ::com::sun::star::chart::ErrorBarStyle::NONE ), spChart2ModelContact, ePropertyType ) { } @@ -680,9 +680,9 @@ sal_Int32 WrappedErrorBarStyleProperty::getValueFromSeries( const Reference< bea sal_Int32 nRet = ::com::sun::star::chart::ErrorBarStyle::NONE; m_aDefaultValue >>= nRet; uno::Reference< beans::XPropertySet > xErrorBarProperties; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarProperties ) && xErrorBarProperties.is()) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarProperties ) && xErrorBarProperties.is()) { - xErrorBarProperties->getPropertyValue( C2U( "ErrorBarStyle" )) >>= nRet; + xErrorBarProperties->getPropertyValue( "ErrorBarStyle" ) >>= nRet; } return nRet; } @@ -694,7 +694,7 @@ void WrappedErrorBarStyleProperty::setValueToSeries( const Reference< beans::XPr uno::Reference< beans::XPropertySet > xErrorBarProperties( getOrCreateErrorBarProperties(xSeriesPropertySet) ); if( xErrorBarProperties.is() ) { - xErrorBarProperties->setPropertyValue( C2U( "ErrorBarStyle" ), uno::makeAny( nNewValue )); + xErrorBarProperties->setPropertyValue( "ErrorBarStyle" , uno::makeAny( nNewValue )); } } @@ -717,7 +717,7 @@ private: WrappedErrorBarRangePositiveProperty::WrappedErrorBarRangePositiveProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< OUString >( C2U("ErrorBarRangePositive") + : WrappedStatisticProperty< OUString >( "ErrorBarRangePositive" , uno::makeAny( OUString() ), spChart2ModelContact, ePropertyType ) { } @@ -731,7 +731,7 @@ OUString WrappedErrorBarRangePositiveProperty::getValueFromSeries( const Referen m_aDefaultValue >>= aRet; uno::Reference< chart2::data::XDataSource > xErrorBarDataSource; if( xSeriesPropertySet.is() && - ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarDataSource ) && + ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarDataSource ) && xErrorBarDataSource.is()) { uno::Reference< chart2::data::XDataSequence > xSeq( @@ -784,7 +784,7 @@ private: WrappedErrorBarRangeNegativeProperty::WrappedErrorBarRangeNegativeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< OUString >( C2U("ErrorBarRangeNegative") + : WrappedStatisticProperty< OUString >( "ErrorBarRangeNegative" , uno::makeAny( OUString() ), spChart2ModelContact, ePropertyType ) { } @@ -798,7 +798,7 @@ OUString WrappedErrorBarRangeNegativeProperty::getValueFromSeries( const Referen m_aDefaultValue >>= aRet; uno::Reference< chart2::data::XDataSource > xErrorBarDataSource; if( xSeriesPropertySet.is() && - ( xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xErrorBarDataSource ) && + ( xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xErrorBarDataSource ) && xErrorBarDataSource.is()) { uno::Reference< chart2::data::XDataSequence > xSeq( @@ -848,7 +848,7 @@ public: WrappedRegressionCurvesProperty::WrappedRegressionCurvesProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< ::com::sun::star::chart::ChartRegressionCurveType >( C2U("RegressionCurves") + : WrappedStatisticProperty< ::com::sun::star::chart::ChartRegressionCurveType >( "RegressionCurves" , lcl_getRegressionDefault(), spChart2ModelContact, ePropertyType ) { } @@ -913,10 +913,10 @@ WrappedStatisticPropertySetProperty::WrappedStatisticPropertySetProperty( , tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< Reference< beans::XPropertySet > >( (ePropertySetType == PROPERTY_SET_TYPE_REGRESSION) - ? C2U("DataRegressionProperties") + ? rtl::OUString("DataRegressionProperties") : (ePropertySetType == PROPERTY_SET_TYPE_ERROR_BAR) - ? C2U("DataErrorProperties") - : C2U("DataMeanValueProperties") + ? rtl::OUString("DataErrorProperties") + : rtl::OUString("DataMeanValueProperties") , uno::Any(), spChart2ModelContact, ePropertyType ) , m_eType( ePropertySetType ) { @@ -938,7 +938,7 @@ Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFr break; case PROPERTY_SET_TYPE_ERROR_BAR: if( xSeriesPropertySet.is()) - xSeriesPropertySet->getPropertyValue( C2U( "ErrorBarY" )) >>= xResult; + xSeriesPropertySet->getPropertyValue( "ErrorBarY" ) >>= xResult; break; case PROPERTY_SET_TYPE_MEAN_VALUE: if( xRegCnt.is() ) @@ -1010,88 +1010,88 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList void WrappedStatisticProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "ConstantErrorLow" ), + Property( "ConstantErrorLow", PROP_CHART_STATISTIC_CONST_ERROR_LOW, ::getCppuType( reinterpret_cast< double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ConstantErrorHigh" ), + Property( "ConstantErrorHigh", PROP_CHART_STATISTIC_CONST_ERROR_HIGH, ::getCppuType( reinterpret_cast< double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "MeanValue" ), + Property( "MeanValue", PROP_CHART_STATISTIC_MEAN_VALUE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ErrorCategory" ), + Property( "ErrorCategory", PROP_CHART_STATISTIC_ERROR_CATEGORY, ::getCppuType( reinterpret_cast< ::com::sun::star::chart::ChartErrorCategory * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ErrorBarStyle" ), + Property( "ErrorBarStyle", PROP_CHART_STATISTIC_ERROR_BAR_STYLE, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "PercentageError" ), + Property( "PercentageError", PROP_CHART_STATISTIC_PERCENT_ERROR, ::getCppuType( reinterpret_cast< double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ErrorMargin" ), + Property( "ErrorMargin", PROP_CHART_STATISTIC_ERROR_MARGIN, ::getCppuType( reinterpret_cast< double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ErrorIndicator" ), + Property( "ErrorIndicator", PROP_CHART_STATISTIC_ERROR_INDICATOR, ::getCppuType( reinterpret_cast< ::com::sun::star::chart::ChartErrorIndicatorType * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ErrorBarRangePositive" ), + Property( "ErrorBarRangePositive", PROP_CHART_STATISTIC_ERROR_RANGE_POSITIVE, ::getCppuType( reinterpret_cast< OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ErrorBarRangeNegative" ), + Property( "ErrorBarRangeNegative", PROP_CHART_STATISTIC_ERROR_RANGE_NEGATIVE, ::getCppuType( reinterpret_cast< OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "RegressionCurves" ), + Property( "RegressionCurves", PROP_CHART_STATISTIC_REGRESSION_CURVES, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartRegressionCurveType * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "DataRegressionProperties" ), + Property( "DataRegressionProperties", PROP_CHART_STATISTIC_REGRESSION_PROPERTIES, ::getCppuType( reinterpret_cast< const Reference< beans::XPropertySet > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "DataErrorProperties" ), + Property( "DataErrorProperties", PROP_CHART_STATISTIC_ERROR_PROPERTIES, ::getCppuType( reinterpret_cast< const Reference< beans::XPropertySet > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "DataMeanValueProperties" ), + Property( "DataMeanValueProperties", PROP_CHART_STATISTIC_MEAN_VALUE_PROPERTIES, ::getCppuType( reinterpret_cast< const Reference< beans::XPropertySet > * >(0)), beans::PropertyAttribute::BOUND diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx index c01fc8ef10d4..8b57ca09fdbb 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx @@ -91,7 +91,7 @@ void WrappedStockProperty::setPropertyValue( const ::com::sun::star::uno::Any& r { sal_Bool bNewValue = false; if( ! (rOuterValue >>= bNewValue) ) - throw lang::IllegalArgumentException( C2U("stock properties require type sal_Bool"), 0, 0 ); + throw lang::IllegalArgumentException( "stock properties require type sal_Bool", 0, 0 ); m_aOuterValue = rOuterValue; @@ -144,7 +144,7 @@ public: }; WrappedVolumeProperty::WrappedVolumeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedStockProperty( C2U("Volume"), uno::makeAny(sal_False) , spChart2ModelContact ) + : WrappedStockProperty( "Volume", uno::makeAny(sal_False) , spChart2ModelContact ) { } WrappedVolumeProperty::~WrappedVolumeProperty() @@ -166,8 +166,8 @@ WrappedVolumeProperty::~WrappedVolumeProperty() DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( xDiagram, xFact ); - if( aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ) ) - || aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ) ) + if( aTemplateAndService.second == "com.sun.star.chart2.template.StockVolumeLowHighClose" + || aTemplateAndService.second == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) m_aOuterValue <<= sal_Bool(sal_True); else if( !aTemplateAndService.second.isEmpty() || !m_aOuterValue.hasValue() ) m_aOuterValue <<= sal_Bool(sal_False); @@ -187,17 +187,17 @@ uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTempla if( bNewValue ) //add volume { - if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ) ), uno::UNO_QUERY ); - else if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ), uno::UNO_QUERY ); + if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY ); + else if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY ); } else //remove volume { - if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockLowHighClose" ) ), uno::UNO_QUERY ); - else if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ) ), uno::UNO_QUERY ); + if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY ); + else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY ); } return xTemplate; } @@ -216,7 +216,7 @@ public: uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( sal_Bool bNewValue, const rtl::OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const; }; WrappedUpDownProperty::WrappedUpDownProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ) - : WrappedStockProperty( C2U("UpDown"), uno::makeAny(sal_False) , spChart2ModelContact ) + : WrappedStockProperty( "UpDown", uno::makeAny(sal_False) , spChart2ModelContact ) { } WrappedUpDownProperty::~WrappedUpDownProperty() @@ -237,8 +237,8 @@ WrappedUpDownProperty::~WrappedUpDownProperty() DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( xDiagram, xFact ); - if( aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ) ) - || aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ) ) + if( aTemplateAndService.second == "com.sun.star.chart2.template.StockOpenLowHighClose" + || aTemplateAndService.second == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) m_aOuterValue <<= sal_Bool(sal_True); else if( !aTemplateAndService.second.isEmpty() || !m_aOuterValue.hasValue() ) m_aOuterValue <<= sal_Bool(sal_False); @@ -253,17 +253,17 @@ uno::Reference< chart2::XChartTypeTemplate > WrappedUpDownProperty::getNewTempla uno::Reference< chart2::XChartTypeTemplate > xTemplate(0); if( bNewValue ) //add open series { - if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ) ), uno::UNO_QUERY ); - else if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ), uno::UNO_QUERY ); + if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY ); + else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY ); } else //remove open series { - if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockLowHighClose" ) ), uno::UNO_QUERY ); - else if( rCurrentTemplate.equals( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ) ) - xTemplate.set( xFactory->createInstance( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ) ), uno::UNO_QUERY ); + if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY ); + else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) + xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY ); } return xTemplate; } @@ -283,14 +283,14 @@ enum void WrappedStockProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Volume" ), + Property( "Volume", PROP_CHART_STOCK_VOLUME, ::getCppuType( reinterpret_cast< sal_Bool * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "UpDown" ), + Property( "UpDown", PROP_CHART_STOCK_UPDOWN, ::getCppuType( reinterpret_cast< sal_Bool * >(0)), beans::PropertyAttribute::BOUND diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx index d14aeb704630..5d65387bda59 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx @@ -204,28 +204,28 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList void WrappedSymbolProperties::addProperties( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "SymbolType" ), + Property( "SymbolType", PROP_CHART_SYMBOL_TYPE, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SymbolBitmapURL" ), + Property( "SymbolBitmapURL", PROP_CHART_SYMBOL_BITMAP_URL, ::getCppuType( reinterpret_cast< ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SymbolSize" ), + Property( "SymbolSize", PROP_CHART_SYMBOL_SIZE, ::getCppuType( reinterpret_cast< awt::Size * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Lines" ), + Property( "Lines", PROP_CHART_SYMBOL_AND_LINES, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -251,7 +251,7 @@ void WrappedSymbolProperties::addWrappedPropertiesForDiagram( std::vector< Wrapp WrappedSymbolTypeProperty::WrappedSymbolTypeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< sal_Int32 >( C2U("SymbolType") + : WrappedSeriesOrDiagramProperty< sal_Int32 >( "SymbolType" , uno::makeAny( ::com::sun::star::chart::ChartSymbolType::NONE ) , spChart2ModelContact , ePropertyType ) @@ -266,7 +266,7 @@ sal_Int32 WrappedSymbolTypeProperty::getValueFromSeries( const Reference< beans: sal_Int32 aRet = 0; m_aDefaultValue >>= aRet; chart2::Symbol aSymbol; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ) ) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ) ) aRet = lcl_getSymbolType( aSymbol ); return aRet; } @@ -277,10 +277,10 @@ void WrappedSymbolTypeProperty::setValueToSeries( const Reference< beans::XPrope return; chart2::Symbol aSymbol; - xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol; + xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol; lcl_setSymbolTypeToSymbol( nSymbolType, aSymbol ); - xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) ); + xSeriesPropertySet->setPropertyValue( "Symbol", uno::makeAny( aSymbol ) ); } Any WrappedSymbolTypeProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const @@ -339,7 +339,7 @@ beans::PropertyState WrappedSymbolTypeProperty::getPropertyState( const Referenc WrappedSymbolBitmapURLProperty::WrappedSymbolBitmapURLProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< OUString >( C2U("SymbolBitmapURL") + : WrappedSeriesOrDiagramProperty< OUString >( "SymbolBitmapURL" , uno::makeAny( OUString() ), spChart2ModelContact, ePropertyType ) { } @@ -353,7 +353,7 @@ OUString WrappedSymbolBitmapURLProperty::getValueFromSeries( const Reference< be OUString aRet; m_aDefaultValue >>= aRet; chart2::Symbol aSymbol; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ) && aSymbol.Graphic.is()) { GraphicObject aGrObj( Graphic( aSymbol.Graphic )); @@ -373,7 +373,7 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( return; chart2::Symbol aSymbol; - if( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ) + if( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ) { bool bMatchesPrefix = aNewGraphicURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_GRAPHOBJ_URLPREFIX )); @@ -382,7 +382,7 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( GraphicObject aGrObj = GraphicObject( rtl::OUStringToOString(aNewGraphicURL.copy( RTL_CONSTASCII_LENGTH(UNO_NAME_GRAPHOBJ_URLPREFIX) ), RTL_TEXTENCODING_ASCII_US)); aSymbol.Graphic.set( aGrObj.GetGraphic().GetXGraphic()); - xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) ); + xSeriesPropertySet->setPropertyValue( "Symbol", uno::makeAny( aSymbol ) ); } else { @@ -391,14 +391,13 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( // @todo: get factory from some context? Reference< lang::XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); Reference< graphic::XGraphicProvider > xGraphProv( - xFact->createInstance( C2U("com.sun.star.graphic.GraphicProvider")), uno::UNO_QUERY_THROW ); + xFact->createInstance( "com.sun.star.graphic.GraphicProvider"), uno::UNO_QUERY_THROW ); Sequence< beans::PropertyValue > aArgs(1); - aArgs[0] = beans::PropertyValue( - C2U("URL"), -1, uno::makeAny( aNewGraphicURL ), + aArgs[0] = beans::PropertyValue( "URL", -1, uno::makeAny( aNewGraphicURL ), beans::PropertyState_DIRECT_VALUE ); aSymbol.Graphic.set( xGraphProv->queryGraphic( aArgs )); OSL_ENSURE( aSymbol.Graphic.is(), "Invalid URL for Symbol Bitmap" ); - xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) ); + xSeriesPropertySet->setPropertyValue( "Symbol", uno::makeAny( aSymbol ) ); } catch( const uno::Exception & ex ) { @@ -434,7 +433,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) bool bFoundSize = false; try { - if( (xProp->getPropertyValue( C2U( "Size100thMM" ) ) >>= aSize) ) + if( (xProp->getPropertyValue( "Size100thMM" ) >>= aSize) ) { if( aSize.Width == 0 && aSize.Height == 0 ) aSize = aDefaultSize; @@ -450,7 +449,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) if(!bFoundSize) { awt::Size aAWTPixelSize(10,10); - if( (xProp->getPropertyValue( C2U( "SizePixel" ) ) >>= aAWTPixelSize) ) + if( (xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize) ) { Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height); Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MAP_PIXEL, MAP_100TH_MM )); @@ -474,7 +473,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) WrappedSymbolSizeProperty::WrappedSymbolSizeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< awt::Size >( C2U("SymbolSize") + : WrappedSeriesOrDiagramProperty< awt::Size >( "SymbolSize" , uno::makeAny( awt::Size(250,250) ), spChart2ModelContact, ePropertyType ) { } @@ -488,7 +487,7 @@ awt::Size WrappedSymbolSizeProperty::getValueFromSeries( const Reference< beans: awt::Size aRet; m_aDefaultValue >>= aRet; chart2::Symbol aSymbol; - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol )) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol )) aRet = aSymbol.Size; return aRet; } @@ -501,11 +500,11 @@ void WrappedSymbolSizeProperty::setValueToSeries( return; chart2::Symbol aSymbol; - if( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol ) + if( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ) { aSymbol.Size = aNewSize; lcl_correctSymbolSizeForBitmaps(aSymbol); - xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) ); + xSeriesPropertySet->setPropertyValue( "Symbol", uno::makeAny( aSymbol ) ); } } @@ -520,7 +519,7 @@ beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Referenc { chart2::Symbol aSymbol; Reference< beans::XPropertySet > xSeriesPropertySet( xInnerPropertyState, uno::UNO_QUERY ); - if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue(C2U("Symbol")) >>= aSymbol )) + if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol )) { if( chart2::SymbolStyle_NONE != aSymbol.Style ) return beans::PropertyState_DIRECT_VALUE; @@ -538,7 +537,7 @@ beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Referenc WrappedSymbolAndLinesProperty::WrappedSymbolAndLinesProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< sal_Bool >( C2U("Lines") + : WrappedSeriesOrDiagramProperty< sal_Bool >( "Lines" , uno::makeAny( sal_True ), spChart2ModelContact, ePropertyType ) { } @@ -561,17 +560,17 @@ void WrappedSymbolAndLinesProperty::setValueToSeries( return; drawing::LineStyle eOldLineStyle( drawing::LineStyle_SOLID ); - xSeriesPropertySet->getPropertyValue( C2U("LineStyle") ) >>= eOldLineStyle; + xSeriesPropertySet->getPropertyValue( "LineStyle" ) >>= eOldLineStyle; if( bDrawLines ) { //#i114298# don't overwrite dashed lines with solid lines here if( eOldLineStyle == drawing::LineStyle_NONE ) - xSeriesPropertySet->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_SOLID ) ); + xSeriesPropertySet->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_SOLID ) ); } else { if( eOldLineStyle != drawing::LineStyle_NONE ) - xSeriesPropertySet->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_NONE ) ); + xSeriesPropertySet->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } } diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx index 0769b05851db..cd7a7dfe734d 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx @@ -41,7 +41,7 @@ namespace chart { WrappedTextRotationProperty::WrappedTextRotationProperty( bool bDirectState ) - : ::chart::WrappedProperty( C2U( "TextRotation" ), C2U( "TextRotation" ) ) + : ::chart::WrappedProperty( "TextRotation" , "TextRotation" ) , m_bDirectState( bDirectState ) { } |