diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-01-30 11:44:23 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-30 12:54:40 +0000 |
commit | 97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 (patch) | |
tree | a1a95b8249052d846a997ad1729758168d6a3b24 /chart2 | |
parent | UNO constants cannot be of CHAR type (diff) | |
download | core-97eb8a6e0eb830f37dcba64a51d725aab4c5ff53.tar.gz core-97eb8a6e0eb830f37dcba64a51d725aab4c5ff53.zip |
Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'chart2')
126 files changed, 1694 insertions, 1698 deletions
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index d51b5a561ead..13d5316f5c67 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -68,7 +68,6 @@ void Chart2ModelContact::setModel( const ::com::sun::star::uno::Reference< uno::Reference< container::XNameContainer > xHatchTable( xTableFactory->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY ); uno::Reference< container::XNameContainer > xBitmapTable( xTableFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY ); uno::Reference< container::XNameContainer > xTransparencyGradientTable( xTableFactory->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY ); - //C2U( "com.sun.star.drawing.MarkerTable" ) m_aTableMap["LineDashName"] = xDashTable; m_aTableMap["FillGradientName"] = xGradientTable; m_aTableMap["FillHatchName"] = xHatchTable; diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx index f10fb417ffaf..f813eb2598e5 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx @@ -65,7 +65,7 @@ RegressionEquationItemConverter::RegressionEquationItemConverter( GraphicPropertyItemConverter::LINE_AND_FILL_PROPERTIES )); m_aConverters.push_back( new CharacterPropertyItemConverter( - rPropertySet, rItemPool, pRefSize, C2U("ReferencePageSize"))); + rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); } SAL_WNODEPRECATED_DECLARATIONS_POP @@ -126,9 +126,9 @@ bool RegressionEquationItemConverter::ApplySpecialItem( uno::Any aValue( static_cast< sal_Int32 >( static_cast< const SfxUInt32Item & >( rItemSet.Get( nWhichId )).GetValue())); - if( GetPropertySet()->getPropertyValue( C2U( "NumberFormat" )) != aValue ) + if( GetPropertySet()->getPropertyValue( "NumberFormat" ) != aValue ) { - GetPropertySet()->setPropertyValue( C2U( "NumberFormat" ), aValue ); + GetPropertySet()->setPropertyValue( "NumberFormat", aValue ); bChanged = true; } } @@ -147,7 +147,7 @@ void RegressionEquationItemConverter::FillSpecialItem( case SID_ATTR_NUMBERFORMAT_VALUE: { sal_Int32 nFormatKey = 0; - if( GetPropertySet()->getPropertyValue( C2U( "NumberFormat" )) >>= nFormatKey ) + if( GetPropertySet()->getPropertyValue( "NumberFormat" ) >>= nFormatKey ) { rOutItemSet.Put( SfxUInt32Item( nWhichId, nFormatKey )); } diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index d257a7d76254..cd42430c3c73 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -281,9 +281,8 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() // add labels DataSeriesHelper::insertDataLabelsToSeriesAndAllPoints( xSeries ); - rtl::OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) ); - aChildParticle+=(C2U("=")); - rtl::OUString aObjectCID = ObjectIdentifier::createClassifiedIdentifierForParticles( + OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) + "=" ); + OUString aObjectCID = ObjectIdentifier::createClassifiedIdentifierForParticles( ObjectIdentifier::getSeriesParticleFromCID(m_aSelection.getSelectedCID()), aChildParticle ); bool bSuccess = ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, true ); @@ -585,8 +584,8 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 ) ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, String( SchResId( STR_OBJECT_CURVE_EQUATION ))), m_xUndoManager ); - xEqProp->setPropertyValue( C2U("ShowEquation"), uno::makeAny( true )); - xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( bInsertR2 )); + xEqProp->setPropertyValue( "ShowEquation", uno::makeAny( true )); + xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( bInsertR2 )); aUndoGuard.commit(); } } @@ -602,7 +601,7 @@ void ChartController::executeDispatch_InsertR2Value() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, String( SchResId( STR_OBJECT_CURVE_EQUATION ))), m_xUndoManager ); - xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( true )); + xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( true )); aUndoGuard.commit(); } } @@ -617,7 +616,7 @@ void ChartController::executeDispatch_DeleteR2Value() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, String( SchResId( STR_OBJECT_CURVE_EQUATION ))), m_xUndoManager ); - xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false )); + xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( false )); aUndoGuard.commit(); } } diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 0f3172027cd4..d78a5d719ae1 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -97,7 +97,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH } rtl::OUString aParticleID = ObjectIdentifier::getParticleID( aObjectCID ); - bool bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS")); + bool bAffectsMultipleObjects = aParticleID == "ALLELEMENTS"; //------------------------------------------------------------- if( !bAffectsMultipleObjects ) { @@ -211,7 +211,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY ); bool bVaryColorsByPoint = false; if( xSeriesProp.is() && - (xSeriesProp->getPropertyValue(C2U("VaryColorsByPoint")) >>= bVaryColorsByPoint) && + (xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint) && bVaryColorsByPoint ) { if( !ColorPerPointHelper::hasPointOwnColor( xSeriesProp, nPointIndex, xObjectProperties ) ) @@ -320,7 +320,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP rtl::OUString lcl_getTitleCIDForCommand( const ::rtl::OString& rDispatchCommand, const uno::Reference< frame::XModel > & xChartModel ) { if( rDispatchCommand.equals("AllTitles")) - return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_TITLE, C2U("ALLELEMENTS") ); + return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_TITLE, "ALLELEMENTS" ); TitleHelper::eTitleType nTitleType( TitleHelper::MAIN_TITLE ); if( rDispatchCommand.equals("SubTitle") ) @@ -343,7 +343,7 @@ rtl::OUString lcl_getTitleCIDForCommand( const ::rtl::OString& rDispatchCommand, rtl::OUString lcl_getAxisCIDForCommand( const ::rtl::OString& rDispatchCommand, const uno::Reference< frame::XModel >& xChartModel ) { if( rDispatchCommand.equals("DiagramAxisAll")) - return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_AXIS, C2U("ALLELEMENTS") ); + return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_AXIS, "ALLELEMENTS" ); sal_Int32 nDimensionIndex=0; bool bMainAxis=true; @@ -378,7 +378,7 @@ rtl::OUString lcl_getGridCIDForCommand( const ::rtl::OString& rDispatchCommand, uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) ); if( rDispatchCommand.equals("DiagramGridAll")) - return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_GRID, C2U("ALLELEMENTS") ); + return ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_GRID, "ALLELEMENTS" ); sal_Int32 nDimensionIndex=0; bool bMainGrid=true; @@ -537,8 +537,7 @@ rtl::OUString lcl_getObjectCIDForCommand( const ::rtl::OString& rDispatchCommand if( nPointIndex>=0 ) { OUString aSeriesParticle = ObjectIdentifier::getSeriesParticleFromCID( rSelectedCID ); - OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) ); - aChildParticle+=(C2U("=")); + OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) + "=" ); OUString aLabelsCID = ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ); OUString aLabelCID_Stub = ObjectIdentifier::createClassifiedIdentifierWithParent( OBJECTTYPE_DATA_LABEL, ::rtl::OUString(), aLabelsCID ); diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index c57a5544dc11..80056ac468b8 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -79,7 +79,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel ) //#i77362 change notification for changes on additional shapes are missing uno::Reference< beans::XPropertySet > xChartViewProps( m_xChartView, uno::UNO_QUERY ); if( xChartViewProps.is() ) - xChartViewProps->setPropertyValue( C2U("SdrViewIsInEditMode"), uno::makeAny(sal_True) ); + xChartViewProps->setPropertyValue( "SdrViewIsInEditMode", uno::makeAny(sal_True) ); sal_Bool bEdit = m_pDrawViewWrapper->SdrBeginTextEdit( pTextObj , m_pDrawViewWrapper->GetPageView() @@ -119,7 +119,7 @@ bool ChartController::EndTextEdit() //#i77362 change notification for changes on additional shapes are missing uno::Reference< beans::XPropertySet > xChartViewProps( m_xChartView, uno::UNO_QUERY ); if( xChartViewProps.is() ) - xChartViewProps->setPropertyValue( C2U("SdrViewIsInEditMode"), uno::makeAny(sal_False) ); + xChartViewProps->setPropertyValue( "SdrViewIsInEditMode", uno::makeAny(sal_False) ); SdrObject* pTextObject = m_pDrawViewWrapper->getTextEditObject(); if(!pTextObject) diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 8edd6271f6b9..17581e3b06ab 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -190,9 +190,9 @@ void ChartController::executeDispatch_NewArrangement() // diagram Reference< beans::XPropertyState > xState( xDiagram, uno::UNO_QUERY_THROW ); - xState->setPropertyToDefault( C2U("RelativeSize")); - xState->setPropertyToDefault( C2U("RelativePosition")); - xState->setPropertyToDefault( C2U("PosSizeExcludeAxes")); + xState->setPropertyToDefault( "RelativeSize"); + xState->setPropertyToDefault( "RelativePosition"); + xState->setPropertyToDefault( "PosSizeExcludeAxes"); // 3d rotation ThreeDHelper::set3DSettingsToDefault( uno::Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY ) ); @@ -201,9 +201,9 @@ void ChartController::executeDispatch_NewArrangement() Reference< beans::XPropertyState > xLegendState( xDiagram->getLegend(), uno::UNO_QUERY ); if( xLegendState.is()) { - xLegendState->setPropertyToDefault( C2U("RelativePosition")); - xLegendState->setPropertyToDefault( C2U("RelativeSize")); - xLegendState->setPropertyToDefault( C2U("AnchorPosition")); + xLegendState->setPropertyToDefault( "RelativePosition"); + xLegendState->setPropertyToDefault( "RelativeSize"); + xLegendState->setPropertyToDefault( "AnchorPosition"); } // titles @@ -215,7 +215,7 @@ void ChartController::executeDispatch_NewArrangement() TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( eType ), xModel ), uno::UNO_QUERY ); if( xTitleState.is()) - xTitleState->setPropertyToDefault( C2U("RelativePosition")); + xTitleState->setPropertyToDefault( "RelativePosition"); } // regression curve equations @@ -341,7 +341,7 @@ void ChartController::impl_PasteGraphic( return; uno::Reference< lang::XMultiServiceFactory > xFact( pDrawModelWrapper->getShapeFactory()); uno::Reference< drawing::XShape > xGraphicShape( - xFact->createInstance( C2U( "com.sun.star.drawing.GraphicObjectShape" )), uno::UNO_QUERY ); + xFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xGraphicShapeProp( xGraphicShape, uno::UNO_QUERY ); if( xGraphicShapeProp.is() && xGraphicShape.is()) { @@ -359,13 +359,13 @@ void ChartController::impl_PasteGraphic( m_aSelection.setSelection( xGraphicShape ); m_aSelection.applySelection( m_pDrawViewWrapper ); } - xGraphicShapeProp->setPropertyValue( C2U("Graphic"), uno::makeAny( xGraphic )); + xGraphicShapeProp->setPropertyValue( "Graphic", uno::makeAny( xGraphic )); uno::Reference< beans::XPropertySet > xGraphicProp( xGraphic, uno::UNO_QUERY ); awt::Size aGraphicSize( 1000, 1000 ); // first try size in 100th mm, then pixel size - if( ! ( xGraphicProp->getPropertyValue( C2U("Size100thMM")) >>= aGraphicSize ) && - ( ( xGraphicProp->getPropertyValue( C2U("SizePixel")) >>= aGraphicSize ) && m_pChartWindow )) + if( ! ( xGraphicProp->getPropertyValue( "Size100thMM") >>= aGraphicSize ) && + ( ( xGraphicProp->getPropertyValue( "SizePixel") >>= aGraphicSize ) && m_pChartWindow )) { ::Size aVCLSize( m_pChartWindow->PixelToLogic( Size( aGraphicSize.Width, aGraphicSize.Height ))); aGraphicSize.Width = aVCLSize.getWidth(); @@ -446,7 +446,7 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons try { Reference< drawing::XShape > xTextShape( - xShapeFactory->createInstance( C2U( "com.sun.star.drawing.TextShape" ) ), uno::UNO_QUERY_THROW ); + xShapeFactory->createInstance( "com.sun.star.drawing.TextShape" ), uno::UNO_QUERY_THROW ); xDrawPage->add( xTextShape ); Reference< text::XTextRange > xRange( xTextShape, uno::UNO_QUERY_THROW ); @@ -454,14 +454,14 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons float fCharHeight = 10.0; Reference< beans::XPropertySet > xProperties( xTextShape, uno::UNO_QUERY_THROW ); - xProperties->setPropertyValue( C2U( "TextAutoGrowHeight" ), uno::makeAny( true ) ); - xProperties->setPropertyValue( C2U( "TextAutoGrowWidth" ), uno::makeAny( true ) ); - xProperties->setPropertyValue( C2U( "CharHeight" ), uno::makeAny( fCharHeight ) ); - xProperties->setPropertyValue( C2U( "CharHeightAsian" ), uno::makeAny( fCharHeight ) ); - xProperties->setPropertyValue( C2U( "CharHeightComplex" ), uno::makeAny( fCharHeight ) ); - xProperties->setPropertyValue( C2U( "TextVerticalAdjust" ), uno::makeAny( drawing::TextVerticalAdjust_CENTER ) ); - xProperties->setPropertyValue( C2U( "TextHorizontalAdjust" ), uno::makeAny( drawing::TextHorizontalAdjust_CENTER ) ); - xProperties->setPropertyValue( C2U( "CharFontName" ), uno::makeAny( C2U( "Albany" ) ) ); + xProperties->setPropertyValue( "TextAutoGrowHeight", uno::makeAny( true ) ); + xProperties->setPropertyValue( "TextAutoGrowWidth", uno::makeAny( true ) ); + xProperties->setPropertyValue( "CharHeight", uno::makeAny( fCharHeight ) ); + xProperties->setPropertyValue( "CharHeightAsian", uno::makeAny( fCharHeight ) ); + xProperties->setPropertyValue( "CharHeightComplex", uno::makeAny( fCharHeight ) ); + xProperties->setPropertyValue( "TextVerticalAdjust", uno::makeAny( drawing::TextVerticalAdjust_CENTER ) ); + xProperties->setPropertyValue( "TextHorizontalAdjust", uno::makeAny( drawing::TextHorizontalAdjust_CENTER ) ); + xProperties->setPropertyValue( "CharFontName", uno::makeAny( OUString("Albany") ) ); xTextShape->setPosition( rPosition ); @@ -641,7 +641,7 @@ bool ChartController::executeDispatch_Delete() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, String( SchResId( STR_OBJECT_LEGEND ))), m_xUndoManager ); - xLegendProp->setPropertyValue( C2U("Show"), uno::makeAny( false )); + xLegendProp->setPropertyValue( "Show", uno::makeAny( false )); bReturn = true; aUndoGuard.commit(); } @@ -706,8 +706,8 @@ bool ChartController::executeDispatch_Delete() m_xUndoManager ); { ControllerLockGuard aCtlLockGuard( xModel ); - xEqProp->setPropertyValue( C2U("ShowEquation"), uno::makeAny( false )); - xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false )); + xEqProp->setPropertyValue( "ShowEquation", uno::makeAny( false )); + xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( false )); } bReturn = true; aUndoGuard.commit(); @@ -741,7 +741,7 @@ bool ChartController::executeDispatch_Delete() { ControllerLockGuard aCtlLockGuard( xModel ); xErrorBarProp->setPropertyValue( - C2U("ErrorBarStyle"), + "ErrorBarStyle", uno::makeAny( ::com::sun::star::chart::ErrorBarStyle::NONE )); } bReturn = true; @@ -763,7 +763,7 @@ bool ChartController::executeDispatch_Delete() SchResId( aObjectType == OBJECTTYPE_DATA_LABEL ? STR_OBJECT_LABEL : STR_OBJECT_DATALABELS )))), m_xUndoManager ); chart2::DataPointLabel aLabel; - xObjectProperties->getPropertyValue( C2U( "Label" ) ) >>= aLabel; + xObjectProperties->getPropertyValue( "Label" ) >>= aLabel; aLabel.ShowNumber = false; aLabel.ShowNumberInPercent = false; aLabel.ShowCategoryName = false; @@ -771,10 +771,10 @@ bool ChartController::executeDispatch_Delete() if( aObjectType == OBJECTTYPE_DATA_LABELS ) { uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, getModel() )); - ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "Label" ), uno::makeAny(aLabel) ); + ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "Label", uno::makeAny(aLabel) ); } else - xObjectProperties->setPropertyValue( C2U( "Label" ), uno::makeAny(aLabel) ); + xObjectProperties->setPropertyValue( "Label", uno::makeAny(aLabel) ); bReturn = true; aUndoGuard.commit(); } @@ -833,9 +833,9 @@ void ChartController::executeDispatch_ToggleLegend() try { bool bShow = false; - if( xLegendProp->getPropertyValue( C2U("Show")) >>= bShow ) + if( xLegendProp->getPropertyValue( "Show") >>= bShow ) { - xLegendProp->setPropertyValue( C2U("Show"), uno::makeAny( ! bShow )); + xLegendProp->setPropertyValue( "Show", uno::makeAny( ! bShow )); bChanged = true; } } diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 7f66efbc628b..193f80a2ceec 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -143,7 +143,7 @@ void lcl_insertMenuCommand( OUString lcl_getFormatCommandForObjectCID( const OUString& rCID ) { - OUString aDispatchCommand( C2U(".uno:FormatSelection") ); + OUString aDispatchCommand( ".uno:FormatSelection" ); ObjectType eObjectType = ObjectIdentifier::getObjectType( rCID ); @@ -151,71 +151,71 @@ OUString lcl_getFormatCommandForObjectCID( const OUString& rCID ) { case OBJECTTYPE_DIAGRAM: case OBJECTTYPE_DIAGRAM_WALL: - aDispatchCommand = C2U(".uno:FormatWall"); + aDispatchCommand = ".uno:FormatWall"; break; case OBJECTTYPE_DIAGRAM_FLOOR: - aDispatchCommand = C2U(".uno:FormatFloor"); + aDispatchCommand = ".uno:FormatFloor"; break; case OBJECTTYPE_PAGE: - aDispatchCommand = C2U(".uno:FormatChartArea"); + aDispatchCommand = ".uno:FormatChartArea"; break; case OBJECTTYPE_LEGEND: - aDispatchCommand = C2U(".uno:FormatLegend"); + aDispatchCommand = ".uno:FormatLegend"; break; case OBJECTTYPE_TITLE: - aDispatchCommand = C2U(".uno:FormatTitle"); + aDispatchCommand = ".uno:FormatTitle"; break; case OBJECTTYPE_LEGEND_ENTRY: - aDispatchCommand = C2U(".uno:FormatDataSeries"); + aDispatchCommand = ".uno:FormatDataSeries"; break; case OBJECTTYPE_AXIS: case OBJECTTYPE_AXIS_UNITLABEL: - aDispatchCommand = C2U(".uno:FormatAxis"); + aDispatchCommand = ".uno:FormatAxis"; break; case OBJECTTYPE_GRID: - aDispatchCommand = C2U(".uno:FormatMajorGrid"); + aDispatchCommand = ".uno:FormatMajorGrid"; break; case OBJECTTYPE_SUBGRID: - aDispatchCommand = C2U(".uno:FormatMinorGrid"); + aDispatchCommand = ".uno:FormatMinorGrid"; break; case OBJECTTYPE_DATA_LABELS: - aDispatchCommand = C2U(".uno:FormatDataLabels"); + aDispatchCommand = ".uno:FormatDataLabels"; break; case OBJECTTYPE_DATA_SERIES: - aDispatchCommand = C2U(".uno:FormatDataSeries"); + aDispatchCommand = ".uno:FormatDataSeries"; break; case OBJECTTYPE_DATA_LABEL: - aDispatchCommand = C2U(".uno:FormatDataLabel"); + aDispatchCommand = ".uno:FormatDataLabel"; break; case OBJECTTYPE_DATA_POINT: - aDispatchCommand = C2U(".uno:FormatDataPoint"); + aDispatchCommand = ".uno:FormatDataPoint"; break; case OBJECTTYPE_DATA_AVERAGE_LINE: - aDispatchCommand = C2U(".uno:FormatMeanValue"); + aDispatchCommand = ".uno:FormatMeanValue"; break; case OBJECTTYPE_DATA_ERRORS_X: - aDispatchCommand = C2U(".uno:FormatXErrorBars"); + aDispatchCommand = ".uno:FormatXErrorBars"; break; case OBJECTTYPE_DATA_ERRORS_Y: - aDispatchCommand = C2U(".uno:FormatYErrorBars"); + aDispatchCommand = ".uno:FormatYErrorBars"; break; case OBJECTTYPE_DATA_ERRORS_Z: - aDispatchCommand = C2U(".uno:FormatZErrorBars"); + aDispatchCommand = ".uno:FormatZErrorBars"; break; case OBJECTTYPE_DATA_CURVE: - aDispatchCommand = C2U(".uno:FormatTrendline"); + aDispatchCommand = ".uno:FormatTrendline"; break; case OBJECTTYPE_DATA_CURVE_EQUATION: - aDispatchCommand = C2U(".uno:FormatTrendlineEquation"); + aDispatchCommand = ".uno:FormatTrendlineEquation"; break; case OBJECTTYPE_DATA_STOCK_RANGE: - aDispatchCommand = C2U(".uno:FormatSelection"); + aDispatchCommand = ".uno:FormatSelection"; break; case OBJECTTYPE_DATA_STOCK_LOSS: - aDispatchCommand = C2U(".uno:FormatStockLoss"); + aDispatchCommand = ".uno:FormatStockLoss"; break; case OBJECTTYPE_DATA_STOCK_GAIN: - aDispatchCommand = C2U(".uno:FormatStockGain"); + aDispatchCommand = ".uno:FormatStockGain"; break; default: //OBJECTTYPE_UNKNOWN break; @@ -263,15 +263,15 @@ const short HITPIX=2; //hit-tolerance in pixel if( xProp.is() ) { uno::Sequence< beans::PropertyValue > aZoomFactors(4); - aZoomFactors[0].Name = C2U("ScaleXNumerator"); + aZoomFactors[0].Name = "ScaleXNumerator"; aZoomFactors[0].Value = uno::makeAny( nScaleXNumerator ); - aZoomFactors[1].Name = C2U("ScaleXDenominator"); + aZoomFactors[1].Name = "ScaleXDenominator"; aZoomFactors[1].Value = uno::makeAny( nScaleXDenominator ); - aZoomFactors[2].Name = C2U("ScaleYNumerator"); + aZoomFactors[2].Name = "ScaleYNumerator"; aZoomFactors[2].Value = uno::makeAny( nScaleYNumerator ); - aZoomFactors[3].Name = C2U("ScaleYDenominator"); + aZoomFactors[3].Name = "ScaleYDenominator"; aZoomFactors[3].Value = uno::makeAny( nScaleYDenominator ); - xProp->setPropertyValue( C2U("ZoomFactors"), uno::makeAny( aZoomFactors )); + xProp->setPropertyValue( "ZoomFactors", uno::makeAny( aZoomFactors )); } //a correct work area is at least necessary for correct values in the position and size dialog and for dragging area @@ -517,7 +517,7 @@ void ChartController::execute_Paint( const Rectangle& rRect ) aResolution.Height = m_pChartWindow->GetSizePixel().Height(); } } - xProp->setPropertyValue( C2U("Resolution"), uno::makeAny( aResolution )); + xProp->setPropertyValue( "Resolution", uno::makeAny( aResolution )); } // @@ -1034,7 +1034,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) // todo: the context menu should be specified by an xml file in uiconfig uno::Reference< awt::XPopupMenu > xPopupMenu( m_xCC->getServiceManager()->createInstanceWithContext( - C2U("com.sun.star.awt.PopupMenu"), m_xCC ), uno::UNO_QUERY ); + "com.sun.star.awt.PopupMenu", m_xCC ), uno::UNO_QUERY ); uno::Reference< awt::XMenuExtended > xMenuEx( xPopupMenu, uno::UNO_QUERY ); if( xPopupMenu.is() && xMenuEx.is()) { @@ -1073,7 +1073,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( xSeriesProperties.is() ) { uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { if( aAttributedDataPointIndexList.hasElements() ) { @@ -1095,17 +1095,17 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( bIsPoint ) { if( bHasDataLabelAtPoint ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataLabel") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatDataLabel" ); if( !bHasDataLabelAtPoint ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabel") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertDataLabel" ); else - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabel") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteDataLabel" ); if( bSelectedPointIsFormatted ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetDataPoint")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:ResetDataPoint" ); xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataSeries") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatDataSeries" ); } Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) ); @@ -1117,12 +1117,12 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( xChartTypeProp.is() ) { bool bJapaneseStyle = false; - xChartTypeProp->getPropertyValue( C2U( "Japanese" ) ) >>= bJapaneseStyle; + xChartTypeProp->getPropertyValue( "Japanese" ) >>= bJapaneseStyle; if( bJapaneseStyle ) { - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockLoss") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockGain") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatStockLoss" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatStockGain" ); } } } @@ -1133,62 +1133,62 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) } if( bHasDataLabelsAtSeries ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatDataLabels") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatDataLabels" ); if( xTrendline.is() ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendline") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatTrendline" ); if( bHasEquation ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendlineEquation") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatTrendlineEquation" ); if( xMeanValue.is() ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMeanValue") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatMeanValue" ); if( bHasXErrorBars ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatXErrorBars") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatXErrorBars" ); if( bHasYErrorBars ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatYErrorBars") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatYErrorBars" ); xPopupMenu->insertSeparator( -1 ); if( !bHasDataLabelsAtSeries ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabels") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertDataLabels" ); if( !xTrendline.is() ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendline") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertTrendline" ); else if( !bHasEquation ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquation") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertTrendlineEquation" ); if( !xMeanValue.is() ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMeanValue") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertMeanValue" ); if( !bHasXErrorBars ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertXErrorBars")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertXErrorBars" ); if( !bHasYErrorBars ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertYErrorBars") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertYErrorBars" ); if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabels") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteDataLabels" ); if( xTrendline.is() ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendline") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteTrendline" ); if( bHasEquation ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendlineEquation") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteTrendlineEquation" ); if( xMeanValue.is() ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMeanValue") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteMeanValue" ); if( bHasXErrorBars ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteXErrorBars")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteXErrorBars" ); if( bHasYErrorBars ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteYErrorBars") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteYErrorBars" ); if( bHasFormattedDataPointsOtherThanSelected ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetAllDataPoints")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:ResetAllDataPoints" ); xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId, C2U(".uno:ArrangeRow")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId, ".uno:ArrangeRow" ); uno::Reference< awt::XPopupMenu > xArrangePopupMenu( m_xCC->getServiceManager()->createInstanceWithContext( - C2U("com.sun.star.awt.PopupMenu"), m_xCC ), uno::UNO_QUERY ); + "com.sun.star.awt.PopupMenu", m_xCC ), uno::UNO_QUERY ); uno::Reference< awt::XMenuExtended > xArrangeMenuEx( xArrangePopupMenu, uno::UNO_QUERY ); if( xArrangePopupMenu.is() && xArrangeMenuEx.is()) { sal_Int16 nSubId = nUniqueId + 1; - lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId++, C2U(".uno:Forward") ); - lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId, C2U(".uno:Backward") ); + lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId++, ".uno:Forward" ); + lcl_insertMenuCommand( xArrangePopupMenu, xArrangeMenuEx, nSubId, ".uno:Backward" ); xPopupMenu->setPopupMenu( nUniqueId, xArrangePopupMenu ); nUniqueId = nSubId; } @@ -1196,17 +1196,17 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) } else if( OBJECTTYPE_DATA_CURVE == eObjectType ) { - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatTrendlineEquation") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquation") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTrendlineEquationAndR2") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertR2Value") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteTrendlineEquation") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteR2Value") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatTrendlineEquation" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertTrendlineEquation" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertTrendlineEquationAndR2" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertR2Value" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteTrendlineEquation" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteR2Value" ); } else if( OBJECTTYPE_DATA_CURVE_EQUATION == eObjectType ) { - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertR2Value") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteR2Value") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertR2Value" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteR2Value" ); } //some commands for axes: and grids @@ -1230,38 +1230,38 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) bHasTitle = !TitleHelper::getCompleteString( xTitled->getTitleObject() ).isEmpty(); if( OBJECTTYPE_AXIS != eObjectType && bIsAxisVisible ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatAxis") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatAxis" ); if( OBJECTTYPE_GRID != eObjectType && bIsMajorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMajorGrid") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatMajorGrid" ); if( OBJECTTYPE_SUBGRID != eObjectType && bIsMinorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatMinorGrid") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatMinorGrid" ); xPopupMenu->insertSeparator( -1 ); if( OBJECTTYPE_AXIS != eObjectType && !bIsAxisVisible ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertAxis") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertAxis" ); if( OBJECTTYPE_GRID != eObjectType && !bIsMajorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMajorGrid") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertMajorGrid" ); if( OBJECTTYPE_SUBGRID != eObjectType && !bIsMinorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertMinorGrid") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertMinorGrid" ); if( !bHasTitle ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertAxisTitle") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertAxisTitle" ); if( bIsAxisVisible ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteAxis") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteAxis" ); if( bIsMajorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMajorGrid") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteMajorGrid" ); if( bIsMinorGridVisible && !bIsSecondaryAxis ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteMinorGrid") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteMinorGrid" ); } } if( OBJECTTYPE_DATA_STOCK_LOSS == eObjectType ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockGain") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatStockGain" ); else if( OBJECTTYPE_DATA_STOCK_GAIN == eObjectType ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatStockLoss") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:FormatStockLoss" ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:TransformDialog")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:TransformDialog" ); if( OBJECTTYPE_PAGE == eObjectType || OBJECTTYPE_DIAGRAM == eObjectType || OBJECTTYPE_DIAGRAM_WALL == eObjectType @@ -1271,24 +1271,24 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( OBJECTTYPE_UNKNOWN != eObjectType ) xPopupMenu->insertSeparator( -1 ); bool bHasLegend = LegendHelper::hasLegend( xDiagram ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertTitles") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertTitles" ); if( !bHasLegend ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertLegend") ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertRemoveAxes") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertLegend" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:InsertRemoveAxes" ); if( bHasLegend ) - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteLegend") ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DeleteLegend" ); } //----- xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DiagramType")); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DataRanges")); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DiagramData")); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:View3D")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DiagramType" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DataRanges" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:DiagramData" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:View3D" ); xPopupMenu->insertSeparator( -1 ); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Cut")); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Copy")); - lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:Paste")); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:Cut" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:Copy" ); + lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, ".uno:Paste" ); ::svt::ContextMenuHelper aContextMenuHelper( m_xFrame ); Point aPos( rCEvt.GetMousePosPixel() ); @@ -1553,8 +1553,8 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) uno::Sequence< beans::PropertyValue > aArgs; xDispatchHelper->executeDispatch( uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), - C2U(".uno:TerminateInplaceActivation"), - C2U("_parent"), + ".uno:TerminateInplaceActivation", + "_parent", frame::FrameSearchFlag::PARENT, aArgs ); bReturn = true; @@ -1764,8 +1764,8 @@ bool ChartController::impl_moveOrResizeObject( chart2::RelativePosition aRelPos; chart2::RelativeSize aRelSize; - bool bDeterminePos = !(xObjProp->getPropertyValue( C2U("RelativePosition")) >>= aRelPos); - bool bDetermineSize = !bNeedResize || !(xObjProp->getPropertyValue( C2U("RelativeSize")) >>= aRelSize); + bool bDeterminePos = !(xObjProp->getPropertyValue( "RelativePosition") >>= aRelPos); + bool bDetermineSize = !bNeedResize || !(xObjProp->getPropertyValue( "RelativeSize") >>= aRelSize); if( ( bDeterminePos || bDetermineSize ) && ( aRefSize.Width > 0 && aRefSize.Height > 0 ) ) @@ -1819,9 +1819,9 @@ bool ChartController::impl_moveOrResizeObject( { ControllerLockGuard aCLGuard( xChartModel ); if( bNeedShift ) - xObjProp->setPropertyValue( C2U("RelativePosition"), uno::makeAny( aRelPos )); + xObjProp->setPropertyValue( "RelativePosition", uno::makeAny( aRelPos )); if( bNeedResize || (eObjectType == OBJECTTYPE_DIAGRAM) )//Also set an explicat size at the diagram when an explicit position is set - xObjProp->setPropertyValue( C2U("RelativeSize"), uno::makeAny( aRelSize )); + xObjProp->setPropertyValue( "RelativeSize", uno::makeAny( aRelSize )); } aUndoGuard.commit(); } @@ -1845,7 +1845,7 @@ bool ChartController::impl_DragDataPoint( const ::rtl::OUString & rCID, double f uno::Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex( nDataPointIndex )); double fOffset = 0.0; if( xPointProp.is() && - (xPointProp->getPropertyValue( C2U("Offset" )) >>= fOffset ) && + (xPointProp->getPropertyValue( "Offset" ) >>= fOffset ) && (( fAdditionalOffset > 0.0 && fOffset < 1.0 ) || (fOffset > 0.0)) ) { fOffset += fAdditionalOffset; @@ -1853,7 +1853,7 @@ bool ChartController::impl_DragDataPoint( const ::rtl::OUString & rCID, double f fOffset = 1.0; else if( fOffset < 0.0 ) fOffset = 0.0; - xPointProp->setPropertyValue( C2U("Offset"), uno::makeAny( fOffset )); + xPointProp->setPropertyValue( "Offset", uno::makeAny( fOffset )); bResult = true; } } diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index f2cf139d487c..5ca460b0be5f 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -167,7 +167,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartFrameLoader,CHART_FRAMELOADER_SERVICE_IMPLEMENT xLoadable->load( aCompleteMediaDescriptor ); //resize standalone files to get correct size: - if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName.equals( C2U("StarChart 5.0")) ) + if( xComponentWindow.is() && aMDHelper.ISSET_FilterName && aMDHelper.FilterName.equals( "StarChart 5.0") ) { awt::Rectangle aRect( xComponentWindow->getPosSize() ); sal_Int16 nFlags=0; diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx index 2c17bc5cdaef..2c02b0261291 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.cxx +++ b/chart2/source/controller/main/CommandDispatchContainer.cxx @@ -49,9 +49,9 @@ CommandDispatchContainer::CommandDispatchContainer( { m_aContainerDocumentCommands = ::comphelper::MakeSet< OUString > - ( C2U("AddDirect")) ( C2U("NewDoc")) ( C2U("Open")) - ( C2U("Save")) ( C2U("SaveAs")) ( C2U("SendMail")) - ( C2U("EditDoc")) ( C2U("ExportDirectToPDF")) ( C2U("PrintDefault")) + ("AddDirect") ("NewDoc") ("Open") + ("Save") ("SaveAs") ("SendMail") + ("EditDoc") ("ExportDirectToPDF") ("PrintDefault") ; } @@ -93,8 +93,8 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL( CommandDispatch * pDispatch = new UndoCommandDispatch( m_xContext, xModel ); xResult.set( pDispatch ); pDispatch->initialize(); - m_aCachedDispatches[ C2U(".uno:Undo") ].set( xResult ); - m_aCachedDispatches[ C2U(".uno:Redo") ].set( xResult ); + m_aCachedDispatches[ ".uno:Undo" ].set( xResult ); + m_aCachedDispatches[ ".uno:Redo" ].set( xResult ); m_aToBeDisposedDispatches.push_back( xResult ); } else if( xModel.is() && ( rURL.Path == "Context" || rURL.Path == "ModifiedStatus" ) ) @@ -103,8 +103,8 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL( CommandDispatch * pDispatch = new StatusBarCommandDispatch( m_xContext, xModel, xSelSupp ); xResult.set( pDispatch ); pDispatch->initialize(); - m_aCachedDispatches[ C2U(".uno:Context") ].set( xResult ); - m_aCachedDispatches[ C2U(".uno:ModifiedStatus") ].set( xResult ); + m_aCachedDispatches[ ".uno:Context" ].set( xResult ); + m_aCachedDispatches[ ".uno:ModifiedStatus" ].set( xResult ); m_aToBeDisposedDispatches.push_back( xResult ); } else if( xModel.is() && @@ -177,7 +177,7 @@ Reference< frame::XDispatch > CommandDispatchContainer::getContainerDispatchForU { Reference< frame::XDispatchProvider > xDispProv( xFrame->getCreator(), uno::UNO_QUERY ); if( xDispProv.is()) - xResult.set( xDispProv->queryDispatch( rURL, C2U("_self"), 0 )); + xResult.set( xDispProv->queryDispatch( rURL, "_self", 0 )); } } return xResult; diff --git a/chart2/source/controller/main/ConfigurationAccess.cxx b/chart2/source/controller/main/ConfigurationAccess.cxx index 995da901b41f..621e918a8e97 100644 --- a/chart2/source/controller/main/ConfigurationAccess.cxx +++ b/chart2/source/controller/main/ConfigurationAccess.cxx @@ -61,7 +61,7 @@ public: }; CalcConfigItem::CalcConfigItem() - : ConfigItem( ::rtl::OUString( C2U( "Office.Calc/Layout" ))) + : ConfigItem( ::rtl::OUString( "Office.Calc/Layout" )) { } @@ -78,9 +78,9 @@ FieldUnit CalcConfigItem::getFieldUnit() uno::Sequence< ::rtl::OUString > aNames( 1 ); if( lcl_IsMetric() ) - aNames[ 0 ] = ::rtl::OUString( C2U( "Other/MeasureUnit/Metric" )); + aNames[ 0 ] = ::rtl::OUString( "Other/MeasureUnit/Metric" ); else - aNames[ 0 ] = ::rtl::OUString( C2U( "Other/MeasureUnit/NonMetric" )); + aNames[ 0 ] = ::rtl::OUString( "Other/MeasureUnit/NonMetric" ); uno::Sequence< uno::Any > aResult( GetProperties( aNames )); sal_Int32 nValue = 0; diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 14a74c3a0d59..bcde205f12e4 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -63,9 +63,9 @@ bool lcl_isStatusBarVisible( const Reference< frame::XController > & xController if( xPropSet.is() ) { uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; - xPropSet->getPropertyValue( C2U( "LayoutManager" ) ) >>= xLayoutManager; + xPropSet->getPropertyValue( "LayoutManager" ) >>= xLayoutManager; if ( xLayoutManager.is() ) - bIsStatusBarVisible = xLayoutManager->isElementVisible( C2U("private:resource/statusbar/statusbar")); + bIsStatusBarVisible = xLayoutManager->isElementVisible( "private:resource/statusbar/statusbar" ); } } return bIsStatusBarVisible; @@ -290,7 +290,7 @@ void ControllerState::update( uno::Reference< beans::XPropertySet > xEqProp( ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel ), uno::UNO_QUERY ); if( xEqProp.is()) - xEqProp->getPropertyValue( C2U("ShowCorrelationCoefficient") ) >>= bHasR2Value; + xEqProp->getPropertyValue( "ShowCorrelationCoefficient" ) >>= bHasR2Value; } catch(const uno::RuntimeException& e) { @@ -540,7 +540,7 @@ void ControllerCommandDispatch::updateCommandAvailability() { try { - xProps->getPropertyValue( C2U( "DisableDataTableDialog" ) ) >>= bDisableDataTableDialog; + xProps->getPropertyValue( "DisableDataTableDialog" ) >>= bDisableDataTableDialog; } catch( const uno::Exception& e ) { @@ -550,146 +550,146 @@ void ControllerCommandDispatch::updateCommandAvailability() } // edit commands - m_aCommandAvailability[ C2U(".uno:Cut")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsDeleteableObjectSelected; - m_aCommandAvailability[ C2U(".uno:Copy")] = bControllerStateIsValid && m_apControllerState->bHasSelectedObject; - m_aCommandAvailability[ C2U(".uno:Paste")] = bIsWritable && bHasSuitableClipboardContent; + m_aCommandAvailability[ ".uno:Cut" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsDeleteableObjectSelected; + m_aCommandAvailability[ ".uno:Copy" ] = bControllerStateIsValid && m_apControllerState->bHasSelectedObject; + m_aCommandAvailability[ ".uno:Paste" ] = bIsWritable && bHasSuitableClipboardContent; // toolbar commands - m_aCommandAvailability[ C2U(".uno:ToggleGridHorizontal")] = bIsWritable; - m_aCommandArguments[ C2U(".uno:ToggleGridHorizontal")] = uno::makeAny( m_apModelState->bHasMainYGrid ); - - m_aCommandAvailability[ C2U(".uno:ToggleLegend")] = bIsWritable; - m_aCommandArguments[ C2U(".uno:ToggleLegend")] = uno::makeAny( m_apModelState->bHasLegend ); - - m_aCommandAvailability[ C2U(".uno:NewArrangement")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:Update")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DefaultColors")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:BarWidth")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:NumberOfLines")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:ArrangeRow")] = + m_aCommandAvailability[ ".uno:ToggleGridHorizontal" ] = bIsWritable; + m_aCommandArguments[ ".uno:ToggleGridHorizontal" ] = uno::makeAny( m_apModelState->bHasMainYGrid ); + + m_aCommandAvailability[ ".uno:ToggleLegend" ] = bIsWritable; + m_aCommandArguments[ ".uno:ToggleLegend" ] = uno::makeAny( m_apModelState->bHasLegend ); + + m_aCommandAvailability[ ".uno:NewArrangement" ] = bIsWritable; + m_aCommandAvailability[ ".uno:Update" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DefaultColors" ] = bIsWritable; + m_aCommandAvailability[ ".uno:BarWidth" ] = bIsWritable; + m_aCommandAvailability[ ".uno:NumberOfLines" ] = bIsWritable; + m_aCommandAvailability[ ".uno:ArrangeRow" ] = bShapeContext || ( bIsWritable && bControllerStateIsValid && ( m_apControllerState->bMayMoveSeriesForward || m_apControllerState->bMayMoveSeriesBackward ) ); // insert objects - m_aCommandAvailability[ C2U(".uno:InsertTitles")] = m_aCommandAvailability[ C2U(".uno:InsertMenuTitles")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertLegend")] = m_aCommandAvailability[ C2U(".uno:InsertMenuLegend")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DeleteLegend")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertMenuDataLabels")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertRemoveAxes")] = m_aCommandAvailability[ C2U(".uno:InsertMenuAxes")] = bIsWritable && m_apModelState->bSupportsAxes; - m_aCommandAvailability[ C2U(".uno:InsertMenuGrids")] = bIsWritable && m_apModelState->bSupportsAxes; - m_aCommandAvailability[ C2U(".uno:InsertMenuTrendlines")] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ C2U(".uno:InsertMenuMeanValues")] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ C2U(".uno:InsertMenuXErrorBars")] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ C2U(".uno:InsertMenuYErrorBars")] = bIsWritable && m_apModelState->bSupportsStatistics; - m_aCommandAvailability[ C2U(".uno:InsertSymbol")] = bIsWritable && m_apControllerState->bIsTextObject; + m_aCommandAvailability[ ".uno:InsertTitles" ] = m_aCommandAvailability[ ".uno:InsertMenuTitles" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertLegend" ] = m_aCommandAvailability[ ".uno:InsertMenuLegend" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DeleteLegend" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertMenuDataLabels" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertRemoveAxes" ] = m_aCommandAvailability[ ".uno:InsertMenuAxes" ] = bIsWritable && m_apModelState->bSupportsAxes; + m_aCommandAvailability[ ".uno:InsertMenuGrids" ] = bIsWritable && m_apModelState->bSupportsAxes; + m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ ".uno:InsertMenuMeanValues" ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ ".uno:InsertMenuXErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ ".uno:InsertMenuYErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ ".uno:InsertSymbol" ] = bIsWritable && m_apControllerState->bIsTextObject; // format objects bool bFormatObjectAvailable = bIsWritable && bControllerStateIsValid && m_apControllerState->bIsFormateableObjectSelected; - m_aCommandAvailability[ C2U(".uno:FormatSelection")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatAxis")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatTitle")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatDataSeries")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatDataPoint")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatDataLabels")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatDataLabel")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatXErrorBars")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatXErrorBars; - m_aCommandAvailability[ C2U(".uno:FormatYErrorBars")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatYErrorBars; - m_aCommandAvailability[ C2U(".uno:FormatMeanValue")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatMeanValue; - m_aCommandAvailability[ C2U(".uno:FormatTrendline")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendline; - m_aCommandAvailability[ C2U(".uno:FormatTrendlineEquation")] = bFormatObjectAvailable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendlineEquation; - m_aCommandAvailability[ C2U(".uno:FormatStockLoss")] = bFormatObjectAvailable; - m_aCommandAvailability[ C2U(".uno:FormatStockGain")] = bFormatObjectAvailable; - - m_aCommandAvailability[ C2U(".uno:DiagramType")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:Legend")] = bIsWritable && m_apModelState->bHasLegend; - m_aCommandAvailability[ C2U(".uno:DiagramWall")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasWall; - m_aCommandAvailability[ C2U(".uno:DiagramArea")] = bIsWritable; - - m_aCommandAvailability[ C2U(".uno:TransformDialog")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bHasSelectedObject && m_apControllerState->bIsPositionableObject; + m_aCommandAvailability[ ".uno:FormatSelection" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatAxis" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatTitle" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatDataSeries" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatDataPoint" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatDataLabels" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatDataLabel" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatXErrorBars; + m_aCommandAvailability[ ".uno:FormatYErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatYErrorBars; + m_aCommandAvailability[ ".uno:FormatMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatMeanValue; + m_aCommandAvailability[ ".uno:FormatTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendline; + m_aCommandAvailability[ ".uno:FormatTrendlineEquation" ] = bFormatObjectAvailable && bControllerStateIsValid && m_apControllerState->bMayFormatTrendlineEquation; + m_aCommandAvailability[ ".uno:FormatStockLoss" ] = bFormatObjectAvailable; + m_aCommandAvailability[ ".uno:FormatStockGain" ] = bFormatObjectAvailable; + + m_aCommandAvailability[ ".uno:DiagramType" ] = bIsWritable; + m_aCommandAvailability[ ".uno:Legend" ] = bIsWritable && m_apModelState->bHasLegend; + m_aCommandAvailability[ ".uno:DiagramWall" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasWall; + m_aCommandAvailability[ ".uno:DiagramArea" ] = bIsWritable; + + m_aCommandAvailability[ ".uno:TransformDialog" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bHasSelectedObject && m_apControllerState->bIsPositionableObject; // 3d commands - m_aCommandAvailability[ C2U(".uno:View3D")] = bIsWritable && bModelStateIsValid && m_apModelState->bIsThreeD; - m_aCommandAvailability[ C2U(".uno:DiagramFloor")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasFloor; + m_aCommandAvailability[ ".uno:View3D" ] = bIsWritable && bModelStateIsValid && m_apModelState->bIsThreeD; + m_aCommandAvailability[ ".uno:DiagramFloor" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasFloor; //some mor format commands with different ui text - m_aCommandAvailability[ C2U(".uno:FormatWall")] = m_aCommandAvailability[ C2U(".uno:DiagramWall")]; - m_aCommandAvailability[ C2U(".uno:FormatFloor")] = m_aCommandAvailability[ C2U(".uno:DiagramFloor")]; - m_aCommandAvailability[ C2U(".uno:FormatChartArea")] = m_aCommandAvailability[ C2U(".uno:DiagramArea")]; - m_aCommandAvailability[ C2U(".uno:FormatLegend")] = m_aCommandAvailability[ C2U(".uno:Legend")]; + m_aCommandAvailability[ ".uno:FormatWall" ] = m_aCommandAvailability[ ".uno:DiagramWall" ]; + m_aCommandAvailability[ ".uno:FormatFloor" ] = m_aCommandAvailability[ ".uno:DiagramFloor" ]; + m_aCommandAvailability[ ".uno:FormatChartArea" ] = m_aCommandAvailability[ ".uno:DiagramArea" ]; + m_aCommandAvailability[ ".uno:FormatLegend" ] = m_aCommandAvailability[ ".uno:Legend" ]; // depending on own data - m_aCommandAvailability[ C2U(".uno:DataRanges")] = bIsWritable && bModelStateIsValid && (! m_apModelState->bHasOwnData); - m_aCommandAvailability[ C2U(".uno:DiagramData")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasOwnData && !bDisableDataTableDialog; + m_aCommandAvailability[ ".uno:DataRanges" ] = bIsWritable && bModelStateIsValid && (! m_apModelState->bHasOwnData); + m_aCommandAvailability[ ".uno:DiagramData" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasOwnData && !bDisableDataTableDialog; // titles - m_aCommandAvailability[ C2U(".uno:MainTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainTitle; - m_aCommandAvailability[ C2U(".uno:SubTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSubTitle; - m_aCommandAvailability[ C2U(".uno:XTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxisTitle; - m_aCommandAvailability[ C2U(".uno:YTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxisTitle; - m_aCommandAvailability[ C2U(".uno:ZTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxisTitle; - m_aCommandAvailability[ C2U(".uno:SecondaryXTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryXAxisTitle; - m_aCommandAvailability[ C2U(".uno:SecondaryYTitle")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryYAxisTitle; - m_aCommandAvailability[ C2U(".uno:AllTitles")] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyTitle(); + m_aCommandAvailability[ ".uno:MainTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainTitle; + m_aCommandAvailability[ ".uno:SubTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSubTitle; + m_aCommandAvailability[ ".uno:XTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxisTitle; + m_aCommandAvailability[ ".uno:YTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxisTitle; + m_aCommandAvailability[ ".uno:ZTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxisTitle; + m_aCommandAvailability[ ".uno:SecondaryXTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryXAxisTitle; + m_aCommandAvailability[ ".uno:SecondaryYTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasSecondaryYAxisTitle; + m_aCommandAvailability[ ".uno:AllTitles" ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyTitle(); // text - m_aCommandAvailability[ C2U(".uno:ScaleText")] = bIsWritable && bModelStateIsValid ; - m_aCommandArguments[ C2U(".uno:ScaleText")] = uno::makeAny( m_apModelState->bHasAutoScaledText ); + m_aCommandAvailability[ ".uno:ScaleText" ] = bIsWritable && bModelStateIsValid ; + m_aCommandArguments[ ".uno:ScaleText" ] = uno::makeAny( m_apModelState->bHasAutoScaledText ); // axes - m_aCommandAvailability[ C2U(".uno:DiagramAxisX")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxis; - m_aCommandAvailability[ C2U(".uno:DiagramAxisY")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxis; - m_aCommandAvailability[ C2U(".uno:DiagramAxisZ")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxis; - m_aCommandAvailability[ C2U(".uno:DiagramAxisA")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasAAxis; - m_aCommandAvailability[ C2U(".uno:DiagramAxisB")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasBAxis; - m_aCommandAvailability[ C2U(".uno:DiagramAxisAll")] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyAxis(); + m_aCommandAvailability[ ".uno:DiagramAxisX" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasXAxis; + m_aCommandAvailability[ ".uno:DiagramAxisY" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasYAxis; + m_aCommandAvailability[ ".uno:DiagramAxisZ" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasZAxis; + m_aCommandAvailability[ ".uno:DiagramAxisA" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasAAxis; + m_aCommandAvailability[ ".uno:DiagramAxisB" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasBAxis; + m_aCommandAvailability[ ".uno:DiagramAxisAll" ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyAxis(); // grids // note: x and y are swapped in the commands! - m_aCommandAvailability[ C2U(".uno:DiagramGridYMain")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainXGrid; - m_aCommandAvailability[ C2U(".uno:DiagramGridXMain")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainYGrid; - m_aCommandAvailability[ C2U(".uno:DiagramGridZMain")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainZGrid; - m_aCommandAvailability[ C2U(".uno:DiagramGridYHelp")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpXGrid; - m_aCommandAvailability[ C2U(".uno:DiagramGridXHelp")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpYGrid; - m_aCommandAvailability[ C2U(".uno:DiagramGridZHelp")] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpZGrid; - m_aCommandAvailability[ C2U(".uno:DiagramGridAll")] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyGrid(); + m_aCommandAvailability[ ".uno:DiagramGridYMain" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainXGrid; + m_aCommandAvailability[ ".uno:DiagramGridXMain" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainYGrid; + m_aCommandAvailability[ ".uno:DiagramGridZMain" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainZGrid; + m_aCommandAvailability[ ".uno:DiagramGridYHelp" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpXGrid; + m_aCommandAvailability[ ".uno:DiagramGridXHelp" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpYGrid; + m_aCommandAvailability[ ".uno:DiagramGridZHelp" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasHelpZGrid; + m_aCommandAvailability[ ".uno:DiagramGridAll" ] = bIsWritable && bModelStateIsValid && m_apModelState->HasAnyGrid(); // series arrangement - m_aCommandAvailability[ C2U(".uno:Forward")] = ( bShapeContext ? isShapeControllerCommandAvailable( C2U( ".uno:Forward" ) ) : + m_aCommandAvailability[ ".uno:Forward" ] = ( bShapeContext ? isShapeControllerCommandAvailable( ".uno:Forward" ) : ( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesForward && !bDisableDataTableDialog ) ); - m_aCommandAvailability[ C2U(".uno:Backward")] = ( bShapeContext ? isShapeControllerCommandAvailable( C2U( ".uno:Backward" ) ) : + m_aCommandAvailability[ ".uno:Backward" ] = ( bShapeContext ? isShapeControllerCommandAvailable( ".uno:Backward" ) : ( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesBackward && !bDisableDataTableDialog ) ); - m_aCommandAvailability[ C2U(".uno:InsertDataLabels")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertDataLabel")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertMeanValue")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddMeanValue; - m_aCommandAvailability[ C2U(".uno:InsertTrendline")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendline; - m_aCommandAvailability[ C2U(".uno:InsertTrendlineEquation")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation; - m_aCommandAvailability[ C2U(".uno:InsertTrendlineEquationAndR2")] = m_aCommandAvailability[ C2U(".uno:InsertTrendlineEquation")]; - m_aCommandAvailability[ C2U(".uno:InsertR2Value")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value; - m_aCommandAvailability[ C2U(".uno:DeleteR2Value")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value; - - m_aCommandAvailability[ C2U(".uno:InsertXErrorBars")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars; - m_aCommandAvailability[ C2U(".uno:InsertYErrorBars")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddYErrorBars; - - m_aCommandAvailability[ C2U(".uno:DeleteDataLabels")] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DeleteDataLabel") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DeleteTrendline") ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendline; - m_aCommandAvailability[ C2U(".uno:DeleteTrendlineEquation") ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendlineEquation; - m_aCommandAvailability[ C2U(".uno:DeleteMeanValue") ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteMeanValue; - m_aCommandAvailability[ C2U(".uno:DeleteXErrorBars")] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteXErrorBars; - m_aCommandAvailability[ C2U(".uno:DeleteYErrorBars") ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteYErrorBars; - - m_aCommandAvailability[ C2U(".uno:ResetDataPoint") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:ResetAllDataPoints") ] = bIsWritable; - - m_aCommandAvailability[ C2U(".uno:InsertAxis") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DeleteAxis") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertAxisTitle") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:FormatMajorGrid") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertMajorGrid") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DeleteMajorGrid") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:FormatMinorGrid") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:InsertMinorGrid") ] = bIsWritable; - m_aCommandAvailability[ C2U(".uno:DeleteMinorGrid") ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertDataLabels" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertDataLabel" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddMeanValue; + m_aCommandAvailability[ ".uno:InsertTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendline; + m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation; + m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ]; + m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value; + m_aCommandAvailability[ ".uno:DeleteR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value; + + m_aCommandAvailability[ ".uno:InsertXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddXErrorBars; + m_aCommandAvailability[ ".uno:InsertYErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddYErrorBars; + + m_aCommandAvailability[ ".uno:DeleteDataLabels" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DeleteDataLabel" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DeleteTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendline; + m_aCommandAvailability[ ".uno:DeleteTrendlineEquation" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteTrendlineEquation; + m_aCommandAvailability[ ".uno:DeleteMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteMeanValue; + m_aCommandAvailability[ ".uno:DeleteXErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteXErrorBars; + m_aCommandAvailability[ ".uno:DeleteYErrorBars" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteYErrorBars; + + m_aCommandAvailability[ ".uno:ResetDataPoint" ] = bIsWritable; + m_aCommandAvailability[ ".uno:ResetAllDataPoints" ] = bIsWritable; + + m_aCommandAvailability[ ".uno:InsertAxis" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DeleteAxis" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertAxisTitle" ] = bIsWritable; + m_aCommandAvailability[ ".uno:FormatMajorGrid" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertMajorGrid" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DeleteMajorGrid" ] = bIsWritable; + m_aCommandAvailability[ ".uno:FormatMinorGrid" ] = bIsWritable; + m_aCommandAvailability[ ".uno:InsertMinorGrid" ] = bIsWritable; + m_aCommandAvailability[ ".uno:DeleteMinorGrid" ] = bIsWritable; } bool ControllerCommandDispatch::commandAvailable( const OUString & rCommand ) @@ -721,7 +721,7 @@ void ControllerCommandDispatch::fireStatusEvent( { uno::Any aArg; aArg <<= m_xController; - fireStatusEventForURL( C2U(".uno:ChartElementSelector"), aArg, true, xSingleListener ); + fireStatusEventForURL( ".uno:ChartElementSelector", aArg, true, xSingleListener ); } if( rURL.isEmpty() ) @@ -736,7 +736,7 @@ void ControllerCommandDispatch::fireStatusEvent( if( rURL.isEmpty() || rURL == ".uno:StatusBarVisible" ) { bool bIsStatusBarVisible( lcl_isStatusBarVisible( m_xController )); - fireStatusEventForURL( C2U(".uno:StatusBarVisible"), uno::makeAny( bIsStatusBarVisible ), true, xSingleListener ); + fireStatusEventForURL( ".uno:StatusBarVisible", uno::makeAny( bIsStatusBarVisible ), true, xSingleListener ); } } diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx index 99ce279e7b3b..27267eaab5a6 100644 --- a/chart2/source/controller/main/DragMethod_PieSegment.cxx +++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx @@ -119,7 +119,7 @@ bool DragMethod_PieSegment::EndSdrDrag(bool /*bCopy*/) Reference< beans::XPropertySet > xPointProperties( ObjectIdentifier::getObjectPropertySet( m_aObjectCID, xChartModel ) ); if( xPointProperties.is() ) - xPointProperties->setPropertyValue( C2U( "Offset" ), uno::makeAny( m_fAdditionalOffset+m_fInitialOffset )); + xPointProperties->setPropertyValue( "Offset", uno::makeAny( m_fAdditionalOffset+m_fInitialOffset )); } } catch( const uno::Exception & ex ) diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx index 8489ab376cdd..ce8a0e120aaa 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx @@ -88,7 +88,7 @@ DragMethod_RotateDiagram::DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWr if( ChartTypeHelper::isSupportingRightAngledAxes( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) ) - xDiagramProperties->getPropertyValue(C2U( "RightAngledAxes" )) >>= m_bRightAngledAxes; + xDiagramProperties->getPropertyValue("RightAngledAxes") >>= m_bRightAngledAxes; if(m_bRightAngledAxes) { if( m_eRotationDirection==ROTATIONDIRECTION_Z ) diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 116ac6f5f811..1820e80fdc1d 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -382,7 +382,7 @@ void DrawCommandDispatch::execute( const ::rtl::OUString& rCommand, const Sequen pDrawViewWrapper->SetCreateMode(); } - const ::rtl::OUString sKeyModifier( C2U( "KeyModifier" ) ); + const ::rtl::OUString sKeyModifier( "KeyModifier" ); const beans::PropertyValue* pIter = rArgs.getConstArray(); const beans::PropertyValue* pEnd = pIter + rArgs.getLength(); const beans::PropertyValue* pKeyModifier = ::std::find_if( diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index 550532442308..55132d7a5ea4 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -256,7 +256,7 @@ APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, lcl_aServiceName Sequence< ::rtl::OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static() { Sequence< ::rtl::OUString > aServices(1); - aServices[ 0 ] = C2U( "com.sun.star.frame.ToolbarController" ); + aServices[ 0 ] = "com.sun.star.frame.ToolbarController"; return aServices; } // ----------------------------------------------------------------------------- diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 3a38de79c430..6ed11f9f64fd 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -85,8 +85,8 @@ void lcl_getChildOIDs( Reference< beans::XPropertySetInfo > xInfo( xShapeProp->getPropertySetInfo()); OUString aName; if( xInfo.is() && - xInfo->hasPropertyByName( C2U("Name")) && - (xShapeProp->getPropertyValue( C2U("Name")) >>= aName ) && + xInfo->hasPropertyByName( "Name") && + (xShapeProp->getPropertyValue( "Name") >>= aName ) && !aName.isEmpty() && ::chart::ObjectIdentifier::isCID( aName )) { @@ -444,7 +444,7 @@ void ImplObjectHierarchy::createDataSeriesTree( if( DataSeriesHelper::hasDataLabelsAtSeries( xSeries ) ) { rtl::OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) ); - aChildParticle+=(C2U("=")); + aChildParticle+=("="); aSeriesSubContainer.push_back( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ) ) ); } @@ -470,11 +470,11 @@ void ImplObjectHierarchy::createDataSeriesTree( Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY ); Reference< beans::XPropertySet > xErrorBarProp; if( xSeriesProp.is() && - (xSeriesProp->getPropertyValue( C2U("ErrorBarY")) >>= xErrorBarProp) && + (xSeriesProp->getPropertyValue( "ErrorBarY") >>= xErrorBarProp) && xErrorBarProp.is()) { sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; - if( ( xErrorBarProp->getPropertyValue( C2U("ErrorBarStyle")) >>= nStyle ) && + if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) && ( nStyle != ::com::sun::star::chart::ErrorBarStyle::NONE ) ) { aSeriesSubContainer.push_back( @@ -484,11 +484,11 @@ void ImplObjectHierarchy::createDataSeriesTree( } if( xSeriesProp.is() && - (xSeriesProp->getPropertyValue( C2U("ErrorBarX")) >>= xErrorBarProp) && + (xSeriesProp->getPropertyValue( "ErrorBarX") >>= xErrorBarProp) && xErrorBarProp.is()) { sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; - if( ( xErrorBarProp->getPropertyValue( C2U("ErrorBarStyle")) >>= nStyle ) && + if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= nStyle ) && ( nStyle != ::com::sun::star::chart::ErrorBarStyle::NONE ) ) { aSeriesSubContainer.push_back( @@ -636,7 +636,7 @@ ObjectHierarchy::~ObjectHierarchy() ObjectHierarchy::tOID ObjectHierarchy::getRootNodeOID() { - return ObjectIdentifier( C2U( "ROOT" ) ); + return ObjectIdentifier( "ROOT" ); } bool ObjectHierarchy::isRootNode( const ObjectHierarchy::tOID& rOID ) diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index 258dd0706cfe..047d55dd5709 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -59,7 +59,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType Point aPos = aObjectRect.TopLeft(); aRelativePosition.Primary = (double(aPos.X())+double(aObjectRect.getWidth())/2.0)/double(aPageRect.getWidth()); aRelativePosition.Secondary = (double(aPos.Y())+double(aObjectRect.getHeight())/2.0)/double(aPageRect.getHeight()); - xObjectProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xObjectProp->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); } else if( OBJECTTYPE_DATA_CURVE_EQUATION==eObjectType ) { @@ -70,12 +70,12 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType Point aPos = aObjectRect.TopLeft(); aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getWidth()); aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getHeight()); - xObjectProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xObjectProp->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); } else if(OBJECTTYPE_LEGEND==eObjectType) { - xObjectProp->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny(LegendPosition(LegendPosition_CUSTOM))); - xObjectProp->setPropertyValue( C2U( "Expansion" ), uno::makeAny(::com::sun::star::chart::ChartLegendExpansion_CUSTOM)); + xObjectProp->setPropertyValue( "AnchorPosition", uno::makeAny(LegendPosition(LegendPosition_CUSTOM))); + xObjectProp->setPropertyValue( "Expansion", uno::makeAny(::com::sun::star::chart::ChartLegendExpansion_CUSTOM)); chart2::RelativePosition aRelativePosition; chart2::RelativeSize aRelativeSize; Point aAnchor = aObjectRect.TopLeft(); @@ -87,7 +87,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType static_cast< double >( aAnchor.Y()) / static_cast< double >( aPageRect.getHeight()); - xObjectProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xObjectProp->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); aRelativeSize.Primary = static_cast< double >( aObjectRect.getWidth()) / @@ -100,7 +100,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType if (aRelativeSize.Secondary > 1.0) aRelativeSize.Secondary = 1.0; - xObjectProp->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aRelativeSize) ); + xObjectProp->setPropertyValue( "RelativeSize", uno::makeAny(aRelativeSize) ); } else if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType) { @@ -113,7 +113,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType Point aPos = aObjectRect.Center(); aRelativePosition.Primary = double(aPos.X())/double(aPageRect.getWidth()); aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getHeight()); - xObjectProp->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aRelativePosition) ); + xObjectProp->setPropertyValue( "RelativePosition", uno::makeAny(aRelativePosition) ); //set size: RelativeSize aRelativeSize; @@ -121,7 +121,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType //and in the middle of the page aRelativeSize.Primary = double(aObjectRect.getWidth())/double(aPageRect.getWidth()); aRelativeSize.Secondary = double(aObjectRect.getHeight())/double(aPageRect.getHeight()); - xObjectProp->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aRelativeSize) ); + xObjectProp->setPropertyValue( "RelativeSize", uno::makeAny(aRelativeSize) ); } else return false; diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 104d7672aeaa..16c795875aa6 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -19,7 +19,6 @@ #include "SelectionHelper.hxx" #include "ObjectIdentifier.hxx" -//for C2U #include "macros.hxx" #include "DiagramHelper.hxx" #include "ChartModelHelper.hxx" @@ -192,7 +191,7 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* m_aSelectedOID = ObjectIdentifier( lcl_getObjectName( pNewObj ) );//name of pNewObj //ignore handle only objects for hit test - while( pNewObj && m_aSelectedOID.getObjectCID().match( C2U( "HandlesOnly" ) ) ) + while( pNewObj && m_aSelectedOID.getObjectCID().match( "HandlesOnly" ) ) { pNewObj->SetMarkProtect(true); pNewObj = pDrawViewWrapper->getHitObject(rMousePos); @@ -412,7 +411,7 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos aRet = lcl_getObjectName( pNewObj );//name of pNewObj //ignore handle only objects for hit test - while( pNewObj && aRet.match(C2U("HandlesOnly")) ) + while( pNewObj && aRet.match("HandlesOnly") ) { pNewObj->SetMarkProtect(true); pNewObj = rDrawViewWrapper.getHitObject(rMPos); @@ -499,7 +498,7 @@ SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj ) if(!pObj) return 0; rtl::OUString aName( lcl_getObjectName( pObj ) ); - if( aName.match(C2U("MarkHandles")) || aName.match(C2U("HandlesOnly")) ) + if( aName.match("MarkHandles") || aName.match("HandlesOnly") ) return pObj; if( !aName.isEmpty() )//dont't get the markhandles of a different object return 0; diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx index 1e0cfba55165..55da8a8bf1e1 100644 --- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx +++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx @@ -76,14 +76,14 @@ void StatusBarCommandDispatch::fireStatusEvent( uno::Any aArg; Reference< chart2::XChartDocument > xDoc( m_xModifiable, uno::UNO_QUERY ); aArg <<= ObjectNameProvider::getSelectedObjectText( m_aSelectedOID.getObjectCID(), xDoc ); - fireStatusEventForURL( C2U(".uno:Context"), aArg, true, xSingleListener ); + fireStatusEventForURL( ".uno:Context", aArg, true, xSingleListener ); } if( bFireModified ) { uno::Any aArg; if( m_bIsModified ) - aArg <<= C2U("*"); - fireStatusEventForURL( C2U(".uno:ModifiedStatus"), aArg, true, xSingleListener ); + aArg <<= OUString("*"); + fireStatusEventForURL( ".uno:ModifiedStatus", aArg, true, xSingleListener ); } } diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx index 24cfb507e9c2..27d23d137a44 100644 --- a/chart2/source/controller/main/UndoCommandDispatch.cxx +++ b/chart2/source/controller/main/UndoCommandDispatch.cxx @@ -84,9 +84,9 @@ void UndoCommandDispatch::fireStatusEvent( } if( bFireAll || rURL == ".uno:Undo" ) - fireStatusEventForURL( C2U(".uno:Undo"), aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener ); + fireStatusEventForURL( ".uno:Undo", aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener ); if( bFireAll || rURL == ".uno:Redo" ) - fireStatusEventForURL( C2U(".uno:Redo"), aRedoState, m_xUndoManager->isRedoPossible(), xSingleListener ); + fireStatusEventForURL( ".uno:Redo", aRedoState, m_xUndoManager->isRedoPossible(), xSingleListener ); } } diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx index 77bd04e82ebd..56e064332334 100644 --- a/chart2/source/inc/macros.hxx +++ b/chart2/source/inc/macros.hxx @@ -22,7 +22,7 @@ #include <typeinfo> /// creates a unicode-string from an ASCII string -#define C2U(constAsciiStr) (::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) )) +#define constAsciiStr (::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) )) /** shows an error-box for an exception ex else-branch necessary to avoid warning diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index 41cff8a6053f..885bee06e6dc 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -138,10 +138,10 @@ uno::Reference< embed::XStorage > lcl_getWriteStorage( uno::Reference<beans::XPropertySet> xProp(xStorage,uno::UNO_QUERY); OUString aMediaType; if ( ! xProp.is() || - ! ( xProp->getPropertyValue( C2U("MediaType")) >>= aMediaType ) || + ! ( xProp->getPropertyValue( "MediaType") >>= aMediaType ) || ( aMediaType.isEmpty() )) { - xProp->setPropertyValue( C2U("MediaType"), uno::makeAny( _sMediaType )); + xProp->setPropertyValue( "MediaType", uno::makeAny( _sMediaType )); } } catch (const uno::Exception& ex) @@ -315,7 +315,7 @@ sal_Int32 XMLFilter::impl_Import( try { Reference< lang::XServiceInfo > xServInfo( xDocumentComp, uno::UNO_QUERY_THROW ); - if( ! xServInfo->supportsService( C2U( "com.sun.star.chart2.ChartDocument" ))) + if( ! xServInfo->supportsService( "com.sun.star.chart2.ChartDocument")) { OSL_FAIL( "Import: No ChartDocument" ); return ERRCODE_SFX_GENERAL; @@ -343,7 +343,7 @@ sal_Int32 XMLFilter::impl_Import( aArgs[0] <<= xStorage; xGraphicObjectResolver.set( xServiceFactory->createInstanceWithArguments( - C2U("com.sun.star.comp.Svx.GraphicImportHelper"), aArgs ), uno::UNO_QUERY ); + "com.sun.star.comp.Svx.GraphicImportHelper", aArgs ), uno::UNO_QUERY ); } // create XPropertySet with extra informatio for the filter @@ -383,12 +383,12 @@ sal_Int32 XMLFilter::impl_Import( uno::Sequence< beans::PropertyValue > aModProps = xModel->getArgs(); for( sal_Int32 nInd = 0; nInd < aModProps.getLength(); nInd++ ) { - if( aModProps[nInd].Name.equals( C2U( "HierarchicalDocumentName" ) ) ) + if( aModProps[nInd].Name.equals( "HierarchicalDocumentName" ) ) { // Actually this argument only has meaning for embedded documents aModProps[nInd].Value >>= aHierarchName; } - else if( aModProps[nInd].Name.equals( C2U( "DocumentBaseURL" ) ) ) + else if( aModProps[nInd].Name.equals( "DocumentBaseURL" ) ) { aModProps[nInd].Value >>= aBaseUri; } @@ -396,32 +396,32 @@ sal_Int32 XMLFilter::impl_Import( } if( !aBaseUri.isEmpty() ) - xImportInfo->setPropertyValue( C2U("BaseURI"), uno::makeAny( aBaseUri ) ); + xImportInfo->setPropertyValue( "BaseURI", uno::makeAny( aBaseUri ) ); if( !aHierarchName.isEmpty() ) - xImportInfo->setPropertyValue( C2U("StreamRelPath"), uno::makeAny( aHierarchName ) ); + xImportInfo->setPropertyValue( "StreamRelPath", uno::makeAny( aHierarchName ) ); // import meta information if( bOasis ) nWarning |= impl_ImportStream( - C2U( sXML_metaStreamName ), - C2U( sXML_import_chart_oasis_meta_service ), + sXML_metaStreamName, + sXML_import_chart_oasis_meta_service, xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); // import styles nWarning |= impl_ImportStream( - C2U( sXML_styleStreamName ), + sXML_styleStreamName, bOasis - ? C2U( sXML_import_chart_oasis_styles_service ) - : C2U( sXML_import_chart_styles_service ), + ? OUString(sXML_import_chart_oasis_styles_service) + : OUString(sXML_import_chart_styles_service), xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); // import content sal_Int32 nContentWarning = impl_ImportStream( - C2U( sXML_contentStreamName ), + sXML_contentStreamName, bOasis - ? C2U( sXML_import_chart_oasis_content_service ) - : C2U( sXML_import_chart_content_service ), + ? OUString(sXML_import_chart_oasis_content_service) + : OUString(sXML_import_chart_content_service), xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); nWarning |= nContentWarning; @@ -429,8 +429,8 @@ sal_Int32 XMLFilter::impl_Import( if( nContentWarning != 0 ) { nWarning = impl_ImportStream( - C2U( sXML_oldContentStreamName ), - C2U( sXML_import_chart_old_content_service ), + sXML_oldContentStreamName, + sXML_import_chart_old_content_service, xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); } } @@ -462,7 +462,7 @@ sal_Int32 XMLFilter::impl_ImportStream( return 0; if( xImportInfo.is() ) - xImportInfo->setPropertyValue( C2U("StreamName"), uno::makeAny( rStreamName ) ); + xImportInfo->setPropertyValue( "StreamName", uno::makeAny( rStreamName ) ); if( xStorage.is() && xStorage->isStreamElement( rStreamName ) ) @@ -571,7 +571,7 @@ sal_Int32 XMLFilter::impl_Export( try { Reference< lang::XServiceInfo > xServInfo( xDocumentComp, uno::UNO_QUERY_THROW ); - if( ! xServInfo->supportsService( C2U( "com.sun.star.chart2.ChartDocument" ))) + if( ! xServInfo->supportsService( "com.sun.star.chart2.ChartDocument")) { OSL_FAIL( "Export: No ChartDocument" ); return ERRCODE_SFX_GENERAL; @@ -641,7 +641,7 @@ sal_Int32 XMLFilter::impl_Export( sal_Bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() ); xInfoSet->setPropertyValue( sUsePrettyPrinting, uno::makeAny( bUsePrettyPrinting ) ); if( ! bOasis ) - xInfoSet->setPropertyValue( C2U("ExportTableNumberList"), uno::makeAny( true )); + xInfoSet->setPropertyValue( "ExportTableNumberList", uno::makeAny( true )); sal_Int32 nArgs = 2; if( xGraphicObjectResolver.is()) @@ -659,24 +659,24 @@ sal_Int32 XMLFilter::impl_Export( // export meta information if( bOasis ) nWarning |= impl_ExportStream( - C2U( sXML_metaStreamName ), - C2U( sXML_export_chart_oasis_meta_service ), + sXML_metaStreamName, + sXML_export_chart_oasis_meta_service, xStorage, xSaxWriter, xServiceFactory, aFilterProperties ); // export styles nWarning |= impl_ExportStream( - C2U( sXML_styleStreamName ), + sXML_styleStreamName, bOasis - ? C2U( sXML_export_chart_oasis_styles_service ) - : C2U( sXML_export_chart_styles_service ), + ? OUString(sXML_export_chart_oasis_styles_service) + : OUString(sXML_export_chart_styles_service), xStorage, xSaxWriter, xServiceFactory, aFilterProperties ); // export content sal_Int32 nContentWarning = impl_ExportStream( - C2U( sXML_contentStreamName ), + sXML_contentStreamName, bOasis - ? C2U( sXML_export_chart_oasis_content_service ) - : C2U( sXML_export_chart_content_service ), + ? OUString(sXML_export_chart_oasis_content_service) + : OUString(sXML_export_chart_content_service), xStorage, xSaxWriter, xServiceFactory, aFilterProperties ); nWarning |= nContentWarning; @@ -729,9 +729,9 @@ sal_Int32 XMLFilter::impl_ExportStream( uno::Reference< beans::XPropertySet > xStreamProp( xOutputStream, uno::UNO_QUERY ); if(xStreamProp.is()) try { - xStreamProp->setPropertyValue( C2U("MediaType"), uno::makeAny( C2U("text/xml") ) ); - xStreamProp->setPropertyValue( C2U("Compressed"), uno::makeAny( sal_True ) );//@todo? - xStreamProp->setPropertyValue( C2U("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) ); + xStreamProp->setPropertyValue( "MediaType", uno::makeAny( OUString("text/xml") ) ); + xStreamProp->setPropertyValue( "Compressed", uno::makeAny( sal_True ) );//@todo? + xStreamProp->setPropertyValue( "UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) ); } catch (const uno::Exception& rEx) { @@ -747,7 +747,7 @@ sal_Int32 XMLFilter::impl_ExportStream( rFilterProperties.getConstArray()[0] >>= xInfoSet; OSL_ENSURE( xInfoSet.is(), "missing infoset for export" ); if( xInfoSet.is() ) - xInfoSet->setPropertyValue( C2U("StreamName"), uno::makeAny( rStreamName ) ); + xInfoSet->setPropertyValue( "StreamName", uno::makeAny( rStreamName ) ); } Reference< XExporter > xExporter( xServiceFactory->createInstanceWithArguments( @@ -777,8 +777,8 @@ sal_Int32 XMLFilter::impl_ExportStream( Sequence< OUString > XMLFilter::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.document.ImportFilter" ); - aServices[ 1 ] = C2U( "com.sun.star.document.ExportFilter" ); + aServices[ 0 ] = "com.sun.star.document.ImportFilter"; + aServices[ 1 ] = "com.sun.star.document.ExportFilter"; // todo: services are incomplete. Missing: // XInitialization, XNamed @@ -799,7 +799,7 @@ void XMLFilter::isOasisFormat(const Sequence< beans::PropertyValue >& _rMediaDes } // ----------------------------------------------------------------------------- -APPHELPER_XSERVICEINFO_IMPL( XMLFilter, C2U( "com.sun.star.comp.chart2.XMLFilter" ) ); +APPHELPER_XSERVICEINFO_IMPL( XMLFilter, OUString("com.sun.star.comp.chart2.XMLFilter") ); // ----------------------------------------------------------------------------- void XMLReportFilterHelper::isOasisFormat(const Sequence< beans::PropertyValue >& _rMediaDescriptor, bool & rOutOASIS ) diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index 5e0d07e6e4aa..b949ece25b14 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -85,100 +85,100 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Show" ), + Property( "Show", PROP_AXIS_SHOW, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CrossoverPosition" ), + Property( "CrossoverPosition", PROP_AXIS_CROSSOVER_POSITION, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisPosition * >(0)), beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CrossoverValue" ), + Property( "CrossoverValue", PROP_AXIS_CROSSOVER_VALUE, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "DisplayLabels" ), + Property( "DisplayLabels", PROP_AXIS_DISPLAY_LABELS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "NumberFormat" ), + Property( "NumberFormat", PROP_AXIS_NUMBER_FORMAT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "LabelPosition" ), + Property( "LabelPosition", PROP_AXIS_LABEL_POSITION, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisLabelPosition * >(0)), beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "TextRotation" ), + Property( "TextRotation", PROP_AXIS_TEXT_ROTATION, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "TextBreak" ), + Property( "TextBreak", PROP_AXIS_TEXT_BREAK, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "TextOverlap" ), + Property( "TextOverlap", PROP_AXIS_TEXT_OVERLAP, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "StackCharacters" ), + Property( "StackCharacters", PROP_AXIS_TEXT_STACKED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ArrangeOrder" ), + Property( "ArrangeOrder", PROP_AXIS_TEXT_ARRANGE_ORDER, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisArrangeOrderType * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ReferencePageSize" ), + Property( "ReferencePageSize", PROP_AXIS_REFERENCE_DIAGRAM_SIZE, ::getCppuType( reinterpret_cast< const awt::Size * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "MajorTickmarks" ), + Property( "MajorTickmarks", PROP_AXIS_MAJOR_TICKMARKS, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "MinorTickmarks" ), + Property( "MinorTickmarks", PROP_AXIS_MINOR_TICKMARKS, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "MarkPosition" ), + Property( "MarkPosition", PROP_AXIS_MARK_POSITION, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartAxisMarkPosition * >(0)), beans::PropertyAttribute::MAYBEDEFAULT )); @@ -606,8 +606,8 @@ Reference< beans::XPropertySetInfo > SAL_CALL Axis::getPropertySetInfo() Sequence< OUString > Axis::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.Axis" ); - aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.Axis"; + aServices[ 1 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index cb937f2be7cc..048f38d4e579 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -53,7 +53,7 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "SwapXAndYAxis" ), + Property( "SwapXAndYAxis", PROP_COORDINATESYSTEM_SWAPXANDYAXIS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -289,7 +289,7 @@ void SAL_CALL BaseCoordinateSystem::removeChartType( const Reference< chart2::XC aIt( ::std::find( m_aChartTypes.begin(), m_aChartTypes.end(), aChartType )); if( aIt == m_aChartTypes.end()) throw container::NoSuchElementException( - C2U( "The given chart type is no element of the container" ), + "The given chart type is no element of the container", static_cast< uno::XWeak * >( this )); m_aChartTypes.erase( aIt ); diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index ff8be7fe568d..73d249bac593 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -91,7 +91,7 @@ Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static( // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem, - C2U( "com.sun.star.comp.chart.CartesianCoordinateSystem" )) + OUString("com.sun.star.comp.chart.CartesianCoordinateSystem")) // ================================= diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 0564adde45e1..743e248a2b3c 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -104,7 +104,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext) , m_xInternalDataProvider( 0 ) , m_xPageBackground( new PageBackground( m_xContext ) ) , m_xXMLNamespaceMap( createNameContainer( ::getCppuType( (const OUString*) 0 ), - C2U( "com.sun.star.xml.NamespaceMap" ), C2U( "com.sun.star.comp.chart.XMLNameSpaceMap" ) ), uno::UNO_QUERY) + "com.sun.star.xml.NamespaceMap", "com.sun.star.comp.chart.XMLNameSpaceMap" ), uno::UNO_QUERY) { OSL_TRACE( "ChartModel: CTOR called" ); @@ -120,7 +120,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext) { ModifyListenerHelper::addListener( m_xPageBackground, this ); m_xChartTypeManager.set( xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.ChartTypeManager" ), m_xContext ), uno::UNO_QUERY ); + "com.sun.star.chart2.ChartTypeManager", m_xContext ), uno::UNO_QUERY ); } osl_atomic_decrement(&m_refCount); } @@ -273,7 +273,7 @@ void ChartModel::impl_adjustAdditionalShapesPositionAndSize( const awt::Size& aV if ( xProperties.is() ) { uno::Reference< drawing::XShapes > xShapes; - xProperties->getPropertyValue( C2U( "AdditionalShapes" ) ) >>= xShapes; + xProperties->getPropertyValue( "AdditionalShapes" ) >>= xShapes; if ( xShapes.is() ) { sal_Int32 nCount = xShapes->getCount(); @@ -314,8 +314,8 @@ uno::Sequence< rtl::OUString > ChartModel::getSupportedServiceNames_Static() { uno::Sequence< rtl::OUString > aSNS( 3 ); aSNS[0] = CHART_MODEL_SERVICE_NAME; - aSNS[1] = C2U( "com.sun.star.document.OfficeDocument" ); - aSNS[2] = C2U( "com.sun.star.chart.ChartDocument" ); + aSNS[1] = "com.sun.star.document.OfficeDocument"; + aSNS[2] = "com.sun.star.chart.ChartDocument"; //// @todo : add additional services if you support any further return aSNS; } @@ -760,8 +760,8 @@ Reference< chart2::data::XDataSource > ChartModel::impl_createDefaultData() //create data uno::Sequence< beans::PropertyValue > aArgs( 4 ); aArgs[0] = beans::PropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellRangeRepresentation" )), -1, - uno::makeAny( C2U("all") ), beans::PropertyState_DIRECT_VALUE ); + OUString( "CellRangeRepresentation" ), -1, + uno::makeAny( OUString("all") ), beans::PropertyState_DIRECT_VALUE ); aArgs[1] = beans::PropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasCategories" )), -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); @@ -821,7 +821,7 @@ void SAL_CALL ChartModel::attachDataProvider( const uno::Reference< chart2::data try { sal_Bool bIncludeHiddenCells = ChartModelHelper::isIncludeHiddenCells( Reference< frame::XModel >(this) ); - xProp->setPropertyValue(C2U("IncludeHiddenCells"), uno::makeAny(bIncludeHiddenCells)); + xProp->setPropertyValue("IncludeHiddenCells", uno::makeAny(bIncludeHiddenCells)); } catch (const beans::UnknownPropertyException&) { @@ -934,7 +934,7 @@ Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeT Reference< chart2::XChartTypeTemplate > xTemplate; Reference< lang::XMultiServiceFactory > xFact( m_xChartTypeManager, uno::UNO_QUERY ); if( xFact.is() ) - 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 ); return xTemplate; } @@ -1079,7 +1079,7 @@ embed::VisualRepresentation SAL_CALL ChartModel::getPreferredVisualRepresentatio if( xTransferable.is() ) { datatransfer::DataFlavor aDataFlavor( lcl_aGDIMetaFileMIMEType, - C2U( "GDIMetaFile" ), + "GDIMetaFile", ::getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); uno::Any aData( xTransferable->getTransferData( aDataFlavor ) ); @@ -1149,7 +1149,7 @@ Sequence< datatransfer::DataFlavor > SAL_CALL ChartModel::getTransferDataFlavors uno::Sequence< datatransfer::DataFlavor > aRet(1); aRet[0] = datatransfer::DataFlavor( lcl_aGDIMetaFileMIMETypeHighContrast, - C2U( "GDIMetaFile" ), + "GDIMetaFile", ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); return aRet; @@ -1183,13 +1183,13 @@ tServiceNameMap & lcl_getStaticServiceNameMap() { static tServiceNameMap aServiceNameMap( tMakeServiceNameMap - ( C2U( "com.sun.star.drawing.DashTable" ), SERVICE_DASH_TABLE ) - ( C2U( "com.sun.star.drawing.GradientTable" ), SERVICE_GARDIENT_TABLE ) - ( C2U( "com.sun.star.drawing.HatchTable" ), SERVICE_HATCH_TABLE ) - ( C2U( "com.sun.star.drawing.BitmapTable" ), SERVICE_BITMAP_TABLE ) - ( C2U( "com.sun.star.drawing.TransparencyGradientTable" ), SERVICE_TRANSP_GRADIENT_TABLE ) - ( C2U( "com.sun.star.drawing.MarkerTable" ), SERVICE_MARKER_TABLE ) - ( C2U( "com.sun.star.xml.NamespaceMap" ), SERVICE_NAMESPACE_MAP ) + ( "com.sun.star.drawing.DashTable", SERVICE_DASH_TABLE ) + ( "com.sun.star.drawing.GradientTable", SERVICE_GARDIENT_TABLE ) + ( "com.sun.star.drawing.HatchTable", SERVICE_HATCH_TABLE ) + ( "com.sun.star.drawing.BitmapTable", SERVICE_BITMAP_TABLE ) + ( "com.sun.star.drawing.TransparencyGradientTable", SERVICE_TRANSP_GRADIENT_TABLE ) + ( "com.sun.star.drawing.MarkerTable", SERVICE_MARKER_TABLE ) + ( "com.sun.star.xml.NamespaceMap", SERVICE_NAMESPACE_MAP ) ); return aServiceNameMap; } diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 0e638ece1c15..e0bf13019595 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -100,7 +100,7 @@ void lcl_addStorageToMediaDescriptor( { rOutMD.realloc( rOutMD.getLength() + 1 ); rOutMD[rOutMD.getLength() - 1] = beans::PropertyValue( - C2U("Storage"), -1, uno::makeAny( xStorage ), beans::PropertyState_DIRECT_VALUE ); + "Storage", -1, uno::makeAny( xStorage ), beans::PropertyState_DIRECT_VALUE ); } Reference< embed::XStorage > lcl_createStorage( @@ -157,7 +157,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter( { Reference< container::XNameAccess > xFilterFact( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.document.FilterFactory" ), m_xContext ), + "com.sun.star.document.FilterFactory", m_xContext ), uno::UNO_QUERY_THROW ); uno::Any aFilterProps( xFilterFact->getByName( aFilterName )); Sequence< beans::PropertyValue > aProps; @@ -190,7 +190,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter( OSL_TRACE( "No FilterName passed in MediaDescriptor" ); xFilter.set( m_xContext->getServiceManager()->createInstanceWithContext( - C2U("com.sun.star.comp.chart2.XMLFilter"), m_xContext ), + "com.sun.star.comp.chart2.XMLFilter", m_xContext ), uno::UNO_QUERY_THROW ); } @@ -247,10 +247,10 @@ void SAL_CALL ChartModel::store() ::rtl::OUString aLocation = m_aResource; if( aLocation.isEmpty() ) - throw io::IOException( C2U( "no location specified" ), static_cast< ::cppu::OWeakObject* >(this)); + throw io::IOException( "no location specified", static_cast< ::cppu::OWeakObject* >(this)); //@todo check whether aLocation is something like private:factory... if( m_bReadOnly ) - throw io::IOException( C2U( "document is read only" ), static_cast< ::cppu::OWeakObject* >(this)); + throw io::IOException( "document is read only", static_cast< ::cppu::OWeakObject* >(this)); aGuard.clear(); @@ -411,7 +411,7 @@ void SAL_CALL ChartModel::initNew() if( bSupportsCategories ) { aParam.realloc( 1 ); - aParam[0] = beans::PropertyValue( C2U("HasCategories"), -1, uno::makeAny( true ), + aParam[0] = beans::PropertyValue( "HasCategories", -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); } @@ -427,17 +427,17 @@ void SAL_CALL ChartModel::initNew() // create and attach legend Reference< chart2::XLegend > xLegend( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.Legend" ), m_xContext ), uno::UNO_QUERY_THROW ); + "com.sun.star.chart2.Legend", m_xContext ), uno::UNO_QUERY_THROW ); Reference< beans::XPropertySet > xLegendProperties( xLegend, uno::UNO_QUERY ); if( xLegendProperties.is() ) { - xLegendProperties->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE )); - xLegendProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE )); - xLegendProperties->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) )); // gray30 - xLegendProperties->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10 + xLegendProperties->setPropertyValue( "FillStyle", uno::makeAny( drawing::FillStyle_NONE )); + xLegendProperties->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE )); + xLegendProperties->setPropertyValue( "LineColor", uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) )); // gray30 + xLegendProperties->setPropertyValue( "FillColor", uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10 if( bIsRTL ) - xLegendProperties->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( chart2::LegendPosition_LINE_START )); + xLegendProperties->setPropertyValue( "AnchorPosition", uno::makeAny( chart2::LegendPosition_LINE_START )); } if(xDiagram.is()) xDiagram->setLegend( xLegend ); @@ -446,8 +446,8 @@ void SAL_CALL ChartModel::initNew() Reference< beans::XPropertySet > xDiagramProperties( xDiagram, uno::UNO_QUERY ); if( xDiagramProperties.is() ) { - xDiagramProperties->setPropertyValue( C2U("RightAngledAxes"), uno::makeAny( sal_True )); - xDiagramProperties->setPropertyValue( C2U("D3DScenePerspective"), uno::makeAny( drawing::ProjectionMode_PARALLEL )); + xDiagramProperties->setPropertyValue( "RightAngledAxes", uno::makeAny( sal_True )); + xDiagramProperties->setPropertyValue( "D3DScenePerspective", uno::makeAny( drawing::ProjectionMode_PARALLEL )); ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme_Realistic ); } @@ -457,18 +457,18 @@ void SAL_CALL ChartModel::initNew() Reference< beans::XPropertySet > xWall( xDiagram->getWall() ); if( xWall.is() ) { - xWall->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ) ); - xWall->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE ) ); - xWall->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30 - xWall->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10 + xWall->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_SOLID ) ); + xWall->setPropertyValue( "FillStyle", uno::makeAny( drawing::FillStyle_NONE ) ); + xWall->setPropertyValue( "LineColor", uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30 + xWall->setPropertyValue( "FillColor", uno::makeAny( static_cast< sal_Int32 >( 0xe6e6e6 ) ) ); // gray10 } Reference< beans::XPropertySet > xFloor( xDiagram->getFloor() ); if( xFloor.is() ) { - xFloor->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); - xFloor->setPropertyValue( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_SOLID ) ); - xFloor->setPropertyValue( C2U( "LineColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30 - xFloor->setPropertyValue( C2U( "FillColor" ), uno::makeAny( static_cast< sal_Int32 >( 0xcccccc ) ) ); // gray20 + xFloor->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE ) ); + xFloor->setPropertyValue( "FillStyle", uno::makeAny( drawing::FillStyle_SOLID ) ); + xFloor->setPropertyValue( "LineColor", uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30 + xFloor->setPropertyValue( "FillColor", uno::makeAny( static_cast< sal_Int32 >( 0xcccccc ) ) ); // gray20 } } @@ -514,9 +514,9 @@ void SAL_CALL ChartModel::load( aMDHelper.ISSET_InputStream ) { if( aMDHelper.ISSET_FilterName && - (aMDHelper.FilterName.equals( C2U("StarChart 5.0")) || - aMDHelper.FilterName.equals( C2U("StarChart 4.0")) || - aMDHelper.FilterName.equals( C2U("StarChart 3.0")) )) + (aMDHelper.FilterName.equals( "StarChart 5.0") || + aMDHelper.FilterName.equals( "StarChart 4.0") || + aMDHelper.FilterName.equals( "StarChart 3.0") )) { attachResource( aMDHelper.URL, rMediaDescriptor ); impl_load( rMediaDescriptor, 0 ); // cannot create a storage from binary streams, but I do not need the storage here anyhow @@ -612,7 +612,7 @@ void ChartModel::impl_loadGraphics( try { const Reference< embed::XStorage >& xGraphicsStorage( - xStorage->openStorageElement( C2U( "Pictures" ), + xStorage->openStorageElement( "Pictures", embed::ElementModes::READ ) ); if( xGraphicsStorage.is() ) diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx index 14711771169c..2537dba9f869 100644 --- a/chart2/source/model/main/DataPoint.cxx +++ b/chart2/source/model/main/DataPoint.cxx @@ -289,9 +289,9 @@ void DataPoint::fireModifyEvent() Sequence< OUString > DataPoint::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.DataPoint" ); - aServices[ 1 ] = C2U( "com.sun.star.chart2.DataPointProperties" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.DataPoint"; + aServices[ 1 ] = "com.sun.star.chart2.DataPointProperties"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } @@ -301,7 +301,7 @@ using impl::DataPoint_Base; IMPLEMENT_FORWARD_XINTERFACE2( DataPoint, DataPoint_Base, ::property::OPropertySet ) // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( DataPoint, C2U( "com.sun.star.comp.chart.DataPoint" )); +APPHELPER_XSERVICEINFO_IMPL( DataPoint, OUString("com.sun.star.comp.chart.DataPoint") ); } // namespace chart diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx index 3eba35af4b72..fb11ece86a93 100644 --- a/chart2/source/model/main/DataPointProperties.cxx +++ b/chart2/source/model/main/DataPointProperties.cxx @@ -51,7 +51,7 @@ void DataPointProperties::AddPropertiesToVector( // Common // ------ rOutProperties.push_back( - Property( C2U( "Color" ), + Property( "Color", PROP_DATAPOINT_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -59,7 +59,7 @@ void DataPointProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Transparency" ), + Property( "Transparency", PROP_DATAPOINT_TRANSPARENCY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -68,14 +68,14 @@ void DataPointProperties::AddPropertiesToVector( // Fill Properties // --------------- rOutProperties.push_back( - Property( C2U( "FillStyle" ), + Property( "FillStyle", PROP_DATAPOINT_FILL_STYLE, ::getCppuType( reinterpret_cast< const drawing::FillStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "TransparencyGradientName" ), + Property( "TransparencyGradientName", PROP_DATAPOINT_TRANSPARENCY_GRADIENT_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -83,7 +83,7 @@ void DataPointProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "GradientName" ), + Property( "GradientName", PROP_DATAPOINT_GRADIENT_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -92,14 +92,14 @@ void DataPointProperties::AddPropertiesToVector( rOutProperties.push_back( - beans::Property( C2U( "GradientStepCount" ), + beans::Property( "GradientStepCount", PROP_DATAPOINT_GRADIENT_STEPCOUNT, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "HatchName" ), + Property( "HatchName", PROP_DATAPOINT_HATCH_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -107,14 +107,14 @@ void DataPointProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "FillBitmapName" ), + Property( "FillBitmapName", PROP_DATAPOINT_FILL_BITMAP_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "FillBackground" ), + Property( "FillBackground", PROP_DATAPOINT_FILL_BACKGROUND, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -123,32 +123,32 @@ void DataPointProperties::AddPropertiesToVector( // border for filled objects rOutProperties.push_back( - Property( C2U( "BorderColor" ), + Property( "BorderColor", PROP_DATAPOINT_BORDER_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID // "maybe auto" | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "BorderStyle" ), + Property( "BorderStyle", PROP_DATAPOINT_BORDER_STYLE, ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "BorderWidth" ), + Property( "BorderWidth", PROP_DATAPOINT_BORDER_WIDTH, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "BorderDashName" ), + Property( "BorderDashName", PROP_DATAPOINT_BORDER_DASH_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "BorderTransparency" ), + Property( "BorderTransparency", PROP_DATAPOINT_BORDER_TRANSPARENCY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -157,25 +157,25 @@ void DataPointProperties::AddPropertiesToVector( // Line Properties // --------------- rOutProperties.push_back( - Property( C2U( "LineStyle" ), + Property( "LineStyle", LineProperties::PROP_LINE_STYLE, ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LineWidth" ), + Property( "LineWidth", LineProperties::PROP_LINE_WIDTH, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LineDash" ), + Property( "LineDash", LineProperties::PROP_LINE_DASH, ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "LineDashName" ), + Property( "LineDashName", LineProperties::PROP_LINE_DASH_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -184,28 +184,28 @@ void DataPointProperties::AddPropertiesToVector( // FillProperties // bitmap properties rOutProperties.push_back( - Property( C2U( "FillBitmapOffsetX" ), + Property( "FillBitmapOffsetX", FillProperties::PROP_FILL_BITMAP_OFFSETX, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapOffsetY" ), + Property( "FillBitmapOffsetY", FillProperties::PROP_FILL_BITMAP_OFFSETY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapPositionOffsetX" ), + Property( "FillBitmapPositionOffsetX", FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapPositionOffsetY" ), + Property( "FillBitmapPositionOffsetY", FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -213,35 +213,35 @@ void DataPointProperties::AddPropertiesToVector( rOutProperties.push_back( - Property( C2U( "FillBitmapRectanglePoint" ), + Property( "FillBitmapRectanglePoint", FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, ::getCppuType( reinterpret_cast< const drawing::RectanglePoint * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapLogicalSize" ), + Property( "FillBitmapLogicalSize", FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapSizeX" ), + Property( "FillBitmapSizeX", FillProperties::PROP_FILL_BITMAP_SIZEX, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapSizeY" ), + Property( "FillBitmapSizeY", FillProperties::PROP_FILL_BITMAP_SIZEY, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapMode" ), + Property( "FillBitmapMode", FillProperties::PROP_FILL_BITMAP_MODE, ::getCppuType( reinterpret_cast< const drawing::BitmapMode * >(0)), beans::PropertyAttribute::BOUND @@ -249,40 +249,40 @@ void DataPointProperties::AddPropertiesToVector( // others rOutProperties.push_back( - Property( C2U( "Symbol" ), + Property( "Symbol", PROP_DATAPOINT_SYMBOL_PROP, ::getCppuType( reinterpret_cast< const chart2::Symbol * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Offset" ), + Property( "Offset", PROP_DATAPOINT_OFFSET, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Geometry3D" ), + Property( "Geometry3D", PROP_DATAPOINT_GEOMETRY3D, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Label" ), + Property( "Label", PROP_DATAPOINT_LABEL, ::getCppuType( reinterpret_cast< const chart2::DataPointLabel * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LabelSeparator" ), + Property( "LabelSeparator", PROP_DATAPOINT_LABEL_SEPARATOR, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "NumberFormat" ), + Property( "NumberFormat", PROP_DATAPOINT_NUMBER_FORMAT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -290,28 +290,28 @@ void DataPointProperties::AddPropertiesToVector( //additional 'PercentageNumberFormat' rOutProperties.push_back( - Property( C2U( "PercentageNumberFormat" ), + Property( "PercentageNumberFormat", PROP_DATAPOINT_PERCENTAGE_NUMBER_FORMAT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "LabelPlacement" ), + Property( "LabelPlacement", PROP_DATAPOINT_LABEL_PLACEMENT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "ReferencePageSize" ), + Property( "ReferencePageSize", PROP_DATAPOINT_REFERENCE_DIAGRAM_SIZE, ::getCppuType( reinterpret_cast< const awt::Size * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "TextRotation" ), + Property( "TextRotation", PROP_DATAPOINT_TEXT_ROTATION, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND @@ -319,27 +319,27 @@ void DataPointProperties::AddPropertiesToVector( // statistics rOutProperties.push_back( - Property( C2U( "ErrorBarX" ), + Property( "ErrorBarX", PROP_DATAPOINT_ERROR_BAR_X, // XPropertySet supporting service ErrorBar ::getCppuType( reinterpret_cast< const uno::Reference< beans::XPropertySet > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "ErrorBarY" ), + Property( "ErrorBarY", PROP_DATAPOINT_ERROR_BAR_Y, // XPropertySet supporting service ErrorBar ::getCppuType( reinterpret_cast< const uno::Reference< beans::XPropertySet > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "ShowErrorBox" ), + Property( "ShowErrorBox", PROP_DATAPOINT_SHOW_ERROR_BOX, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "PercentDiagonal" ), + Property( "PercentDiagonal", PROP_DATAPOINT_PERCENT_DIAGONAL, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -406,7 +406,7 @@ void DataPointProperties::AddDefaultsToMap( sal_False // ShowLegendSymbol )); - PropertyHelper::setPropertyValueDefault< rtl::OUString >( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, C2U(" ") ); + PropertyHelper::setPropertyValueDefault< rtl::OUString >( rOutMap, PROP_DATAPOINT_LABEL_SEPARATOR, " " ); //@todo maybe choose a different one here -> should be dynamically that of the attached axis PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_X, uno::Reference< beans::XPropertySet >()); diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx index 26c64c350515..c292e1822a5f 100644 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -268,9 +268,9 @@ uno::Reference< util::XCloneable > SAL_CALL DataSeries::createClone() Sequence< OUString > DataSeries::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.DataSeries" ); - aServices[ 1 ] = C2U( "com.sun.star.chart2.DataPointProperties" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.DataSeries"; + aServices[ 1 ] = "com.sun.star.chart2.DataPointProperties"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } @@ -366,7 +366,7 @@ Reference< beans::XPropertySet > } ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries( - DataSeriesHelper::getAllDataSequencesByRole( aSequences , C2U("values"), true ) ); + DataSeriesHelper::getAllDataSequencesByRole( aSequences , "values", true ) ); if( !aValuesSeries.empty() ) { Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues() ); @@ -513,7 +513,7 @@ void SAL_CALL DataSeries::removeRegressionCurve( ::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) ); if( aIt == m_aRegressionCurves.end()) throw container::NoSuchElementException( - C2U( "The given regression curve is no element of this series" ), + "The given regression curve is no element of this series", static_cast< uno::XWeak * >( this )); m_aRegressionCurves.erase( aIt ); } @@ -616,7 +616,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( DataSeries, DataSeries_Base, OPropertySet ) // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( DataSeries, - C2U( "com.sun.star.comp.chart.DataSeries" )); + OUString("com.sun.star.comp.chart.DataSeries") ); } // namespace chart diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx index 941d1bdf29f8..74ca6183f34c 100644 --- a/chart2/source/model/main/DataSeriesProperties.cxx +++ b/chart2/source/model/main/DataSeriesProperties.cxx @@ -40,28 +40,28 @@ void DataSeriesProperties::AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "AttributedDataPoints" ), + Property( "AttributedDataPoints", PROP_DATASERIES_ATTRIBUTED_DATA_POINTS, ::getCppuType( reinterpret_cast< const uno::Sequence< sal_Int32 > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "StackingDirection" ), + Property( "StackingDirection", PROP_DATASERIES_STACKING_DIRECTION, ::getCppuType( reinterpret_cast< const chart2::StackingDirection * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "VaryColorsByPoint" ), + Property( "VaryColorsByPoint", PROP_DATASERIES_VARY_COLORS_BY_POINT, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "AttachedAxisIndex" ), + Property( "AttachedAxisIndex", PROP_DATASERIES_ATTACHED_AXIS_INDEX, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 1cca41cb71a2..75c97e173f93 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -80,88 +80,88 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "RelativePosition" ), + Property( "RelativePosition", PROP_DIAGRAM_REL_POS, ::getCppuType( reinterpret_cast< const chart2::RelativePosition * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "RelativeSize" ), + Property( "RelativeSize", PROP_DIAGRAM_REL_SIZE, ::getCppuType( reinterpret_cast< const chart2::RelativeSize * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "PosSizeExcludeAxes" ), + Property( "PosSizeExcludeAxes", PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SortByXValues" ), + Property( "SortByXValues", PROP_DIAGRAM_SORT_BY_X_VALUES, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U("ConnectBars"), + Property( "ConnectBars", PROP_DIAGRAM_CONNECT_BARS, ::getBooleanCppuType(), 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 | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "StartingAngle" ), + Property( "StartingAngle", PROP_DIAGRAM_STARTING_ANGLE, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); 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 )); rOutProperties.push_back( - Property( C2U( "MissingValueTreatment" ), + Property( "MissingValueTreatment", PROP_DIAGRAM_MISSING_VALUE_TREATMENT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -425,11 +425,11 @@ void SAL_CALL Diagram::setDiagramData( throw (uno::RuntimeException) { uno::Reference< lang::XMultiServiceFactory > xChartTypeManager( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.ChartTypeManager" ), m_xContext ), uno::UNO_QUERY ); + "com.sun.star.chart2.ChartTypeManager", m_xContext ), uno::UNO_QUERY ); DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( this, xChartTypeManager ); uno::Reference< chart2::XChartTypeTemplate > xTemplate( aTemplateAndService.first ); if( !xTemplate.is() ) - xTemplate.set( xChartTypeManager->createInstance( C2U("com.sun.star.chart2.template.Column") ), uno::UNO_QUERY ); + xTemplate.set( xChartTypeManager->createInstance( "com.sun.star.chart2.template.Column" ), uno::UNO_QUERY ); if(!xTemplate.is()) return; xTemplate->changeDiagramData( this, xDataSource, aArguments ); @@ -514,7 +514,7 @@ void SAL_CALL Diagram::removeCoordinateSystem( aIt( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )); if( aIt == m_aCoordSystems.end()) throw container::NoSuchElementException( - C2U( "The given coordinate-system is no element of the container" ), + "The given coordinate-system is no element of the container", static_cast< uno::XWeak * >( this )); m_aCoordSystems.erase( aIt ); } @@ -619,9 +619,9 @@ Sequence< OUString > Diagram::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.Diagram" ); - aServices[ 1 ] = C2U( "com.sun.star.layout.LayoutElement" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.Diagram"; + aServices[ 1 ] = "com.sun.star.layout.LayoutElement"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } @@ -716,7 +716,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( Diagram, Diagram_Base, ::property::OPropertySe // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( Diagram, - C2U( "com.sun.star.comp.chart2.Diagram" )); + OUString("com.sun.star.comp.chart2.Diagram") ); } // namespace chart diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx index bdb71320e096..e21beed575df 100644 --- a/chart2/source/model/main/FormattedString.cxx +++ b/chart2/source/model/main/FormattedString.cxx @@ -207,8 +207,8 @@ Sequence< OUString > FormattedString::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.FormattedString" ); - aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.FormattedString"; + aServices[ 1 ] = "com.sun.star.beans.PropertySet"; return aServices; } @@ -248,7 +248,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( FormattedString, FormattedString_Base, ::prope // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( FormattedString, - C2U( "com.sun.star.comp.chart.FormattedString" )); + OUString("com.sun.star.comp.chart.FormattedString") ); } // namespace chart diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx index ec947bdd219f..77e009be2f2c 100644 --- a/chart2/source/model/main/GridProperties.cxx +++ b/chart2/source/model/main/GridProperties.cxx @@ -54,7 +54,7 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Show" ), + Property( "Show", PROP_GRID_SHOW, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -247,8 +247,8 @@ void GridProperties::fireModifyEvent() Sequence< OUString > GridProperties::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.GridProperties" ); - aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.GridProperties"; + aServices[ 1 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 5e1656f48316..353d1e9eeb0c 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -65,41 +65,41 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "AnchorPosition" ), + Property( "AnchorPosition", PROP_LEGEND_ANCHOR_POSITION, ::getCppuType( reinterpret_cast< const chart2::LegendPosition * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Expansion" ), + Property( "Expansion", PROP_LEGEND_EXPANSION, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartLegendExpansion * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Show" ), + Property( "Show", PROP_LEGEND_SHOW, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ReferencePageSize" ), + Property( "ReferencePageSize", PROP_LEGEND_REF_PAGE_SIZE, ::getCppuType( reinterpret_cast< const awt::Size * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "RelativePosition" ), + Property( "RelativePosition", PROP_LEGEND_REL_POS, ::getCppuType( reinterpret_cast< const chart2::RelativePosition * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "RelativeSize" ), + Property( "RelativeSize", PROP_LEGEND_REL_SIZE, ::getCppuType( reinterpret_cast< const chart2::RelativeSize * >(0)), beans::PropertyAttribute::BOUND @@ -271,12 +271,12 @@ Sequence< OUString > Legend::getSupportedServiceNames_Static() const sal_Int32 nNumServices( 6 ); sal_Int32 nI = 0; Sequence< OUString > aServices( nNumServices ); - aServices[ nI++ ] = C2U( "com.sun.star.chart2.Legend" ); - aServices[ nI++ ] = C2U( "com.sun.star.beans.PropertySet" ); - aServices[ nI++ ] = C2U( "com.sun.star.drawing.FillProperties" ); - aServices[ nI++ ] = C2U( "com.sun.star.drawing.LineProperties" ); - aServices[ nI++ ] = C2U( "com.sun.star.style.CharacterProperties" ); - aServices[ nI++ ] = C2U( "com.sun.star.layout.LayoutElement" ); + aServices[ nI++ ] = "com.sun.star.chart2.Legend"; + aServices[ nI++ ] = "com.sun.star.beans.PropertySet"; + aServices[ nI++ ] = "com.sun.star.drawing.FillProperties"; + aServices[ nI++ ] = "com.sun.star.drawing.LineProperties"; + aServices[ nI++ ] = "com.sun.star.style.CharacterProperties"; + aServices[ nI++ ] = "com.sun.star.layout.LayoutElement"; OSL_ASSERT( nNumServices == nI ); return aServices; } diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index dce468a589df..83a4c8e02ea8 100644 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -224,8 +224,8 @@ void PageBackground::fireModifyEvent() uno::Sequence< ::rtl::OUString > PageBackground::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.PageBackground" ); - aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.PageBackground"; + aServices[ 1 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 6f34cc44a9dc..d82b09369e7c 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -91,7 +91,7 @@ Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static() // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem, - C2U( "com.sun.star.comp.chart.PolarCoordinateSystem" )) + OUString("com.sun.star.comp.chart.PolarCoordinateSystem") ) // ================================= diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx index 0fbf2e648c1d..f0d440f6f36f 100644 --- a/chart2/source/model/main/StockBar.cxx +++ b/chart2/source/model/main/StockBar.cxx @@ -236,8 +236,8 @@ void StockBar::fireModifyEvent() uno::Sequence< ::rtl::OUString > StockBar::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.StockBar" ); - aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.StockBar"; + aServices[ 1 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index fc3769d9c3ef..8295a390926f 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -70,76 +70,76 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "ParaAdjust" ), + Property( "ParaAdjust", PROP_TITLE_PARA_ADJUST, ::getCppuType( reinterpret_cast< ::com::sun::star::style::ParagraphAdjust * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaLastLineAdjust" ), + Property( "ParaLastLineAdjust", PROP_TITLE_PARA_LAST_LINE_ADJUST, ::getCppuType( reinterpret_cast< sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaLeftMargin" ), + Property( "ParaLeftMargin", PROP_TITLE_PARA_LEFT_MARGIN, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaRightMargin" ), + Property( "ParaRightMargin", PROP_TITLE_PARA_RIGHT_MARGIN, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaTopMargin" ), + Property( "ParaTopMargin", PROP_TITLE_PARA_TOP_MARGIN, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaBottomMargin" ), + Property( "ParaBottomMargin", PROP_TITLE_PARA_BOTTOM_MARGIN, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaIsHyphenation" ), + Property( "ParaIsHyphenation", PROP_TITLE_PARA_IS_HYPHENATION, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "TextRotation" ), + Property( "TextRotation", PROP_TITLE_TEXT_ROTATION, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "StackCharacters" ), + Property( "StackCharacters", PROP_TITLE_TEXT_STACKED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "RelativePosition" ), + Property( "RelativePosition", PROP_TITLE_REL_POS, ::getCppuType( reinterpret_cast< const chart2::RelativePosition * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "ReferencePageSize" ), + Property( "ReferencePageSize", PROP_TITLE_REF_PAGE_SIZE, ::getCppuType( reinterpret_cast< const awt::Size * >(0)), beans::PropertyAttribute::BOUND @@ -377,10 +377,10 @@ void Title::fireModifyEvent() uno::Sequence< ::rtl::OUString > Title::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.Title" ); - aServices[ 1 ] = C2U( "com.sun.star.style.ParagraphProperties" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); - aServices[ 3 ] = C2U( "com.sun.star.layout.LayoutElement" ); + aServices[ 0 ] = "com.sun.star.chart2.Title"; + aServices[ 1 ] = "com.sun.star.style.ParagraphProperties"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; + aServices[ 3 ] = "com.sun.star.layout.LayoutElement"; return aServices; } diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx index 2f56aa568909..4947f259e180 100644 --- a/chart2/source/model/main/Wall.cxx +++ b/chart2/source/model/main/Wall.cxx @@ -227,8 +227,8 @@ void Wall::fireModifyEvent() uno::Sequence< ::rtl::OUString > Wall::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.Wall" ); - aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.Wall"; + aServices[ 1 ] = "com.sun.star.beans.PropertySet"; return aServices; } diff --git a/chart2/source/model/template/AreaChartType.cxx b/chart2/source/model/template/AreaChartType.cxx index a00dc9dac108..2a06ac188695 100644 --- a/chart2/source/model/template/AreaChartType.cxx +++ b/chart2/source/model/template/AreaChartType.cxx @@ -56,13 +56,13 @@ uno::Sequence< ::rtl::OUString > AreaChartType::getSupportedServiceNames_Static( { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_AREA; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( AreaChartType, - C2U( "com.sun.star.comp.chart.AreaChartType" )); + OUString("com.sun.star.comp.chart.AreaChartType") ); } // namespace chart diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx index 7b63bee3908f..695d662da3db 100644 --- a/chart2/source/model/template/AreaChartTypeTemplate.cxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx @@ -53,7 +53,7 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Dimension" ), + Property( "Dimension", PROP_AREA_TEMPLATE_DIMENSION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -194,7 +194,7 @@ void SAL_CALL AreaChartTypeTemplate::applyStyle( throw (uno::RuntimeException) { ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount ); - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } void SAL_CALL AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) @@ -211,9 +211,9 @@ void SAL_CALL AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiag Reference< beans::XPropertySet > xProp( *aIt, uno::UNO_QUERY ); if( xState.is() && xProp.is() && - xProp->getPropertyValue( C2U("BorderStyle")) == aLineStyleAny ) + xProp->getPropertyValue( "BorderStyle") == aLineStyleAny ) { - xState->setPropertyToDefault( C2U("BorderStyle")); + xState->setPropertyToDefault( "BorderStyle"); } } } @@ -253,7 +253,7 @@ uno::Sequence< ::rtl::OUString > AreaChartTypeTemplate::getSupportedServiceNames { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/BarChartType.cxx b/chart2/source/model/template/BarChartType.cxx index 5450bc9bee90..cec160893c6c 100644 --- a/chart2/source/model/template/BarChartType.cxx +++ b/chart2/source/model/template/BarChartType.cxx @@ -57,13 +57,13 @@ uno::Sequence< ::rtl::OUString > BarChartType::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_BAR; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( BarChartType, - C2U( "com.sun.star.comp.chart.BarChartType" )); + OUString("com.sun.star.comp.chart.BarChartType") ); } // namespace chart diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx index 49c51d56be05..7f936b4f1b5b 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.cxx +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -54,13 +54,13 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Dimension" ), + Property( "Dimension", PROP_BAR_TEMPLATE_DIMENSION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Geometry3D" ), + Property( "Geometry3D", PROP_BAR_TEMPLATE_GEOMETRY3D, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -264,7 +264,7 @@ void SAL_CALL BarChartTypeTemplate::applyStyle( throw (uno::RuntimeException) { ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount ); - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); if( getDimension() == 3 ) { try @@ -272,7 +272,7 @@ void SAL_CALL BarChartTypeTemplate::applyStyle( //apply Geometry3D uno::Any aAGeometry3D; this->getFastPropertyValue( aAGeometry3D, PROP_BAR_TEMPLATE_GEOMETRY3D ); - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "Geometry3D" ), aAGeometry3D ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "Geometry3D", aAGeometry3D ); } catch( const uno::Exception & ex ) { @@ -296,12 +296,12 @@ void SAL_CALL BarChartTypeTemplate::resetStyles( if( xState.is()) { if( getDimension() == 3 ) - xState->setPropertyToDefault( C2U("Geometry3D")); + xState->setPropertyToDefault( "Geometry3D"); Reference< beans::XPropertySet > xProp( xState, uno::UNO_QUERY ); if( xProp.is() && - xProp->getPropertyValue( C2U("BorderStyle")) == aLineStyleAny ) + xProp->getPropertyValue( "BorderStyle") == aLineStyleAny ) { - xState->setPropertyToDefault( C2U("BorderStyle")); + xState->setPropertyToDefault( "BorderStyle"); } } } @@ -325,7 +325,7 @@ Sequence< OUString > BarChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/BubbleChartType.cxx b/chart2/source/model/template/BubbleChartType.cxx index aff8baa2d17d..d18219356b6a 100644 --- a/chart2/source/model/template/BubbleChartType.cxx +++ b/chart2/source/model/template/BubbleChartType.cxx @@ -169,17 +169,17 @@ uno::Sequence< ::rtl::OUString > SAL_CALL BubbleChartType::getSupportedMandatory { uno::Sequence< ::rtl::OUString > aMandRolesSeq(4); aMandRolesSeq.realloc( 4 ); - aMandRolesSeq[0] = C2U( "label" ); - aMandRolesSeq[1] = C2U( "values-x" ); - aMandRolesSeq[2] = C2U( "values-y" ); - aMandRolesSeq[3] = C2U( "values-size" ); + aMandRolesSeq[0] = "label"; + aMandRolesSeq[1] = "values-x"; + aMandRolesSeq[2] = "values-y"; + aMandRolesSeq[3] = "values-size"; return aMandRolesSeq; } OUString SAL_CALL BubbleChartType::getRoleOfSequenceForSeriesLabel() throw (uno::RuntimeException) { - return C2U( "values-size" ); + return OUString("values-size"); } // ____ OPropertySet ____ @@ -210,14 +210,14 @@ uno::Sequence< ::rtl::OUString > BubbleChartType::getSupportedServiceNames_Stati { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( BubbleChartType, - C2U( "com.sun.star.comp.chart.BubbleChartType" )); + OUString("com.sun.star.comp.chart.BubbleChartType") ); } // namespace chart diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx index b48c3696578f..79fef5d67752 100644 --- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx +++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx @@ -164,7 +164,7 @@ void SAL_CALL BubbleChartTypeTemplate::applyStyle( throw (uno::RuntimeException) { ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount ); - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); try { @@ -279,7 +279,7 @@ Sequence< OUString > BubbleChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx index 9e7db81b72c2..be2f1f0aee3f 100644 --- a/chart2/source/model/template/BubbleDataInterpreter.cxx +++ b/chart2/source/model/template/BubbleDataInterpreter.cxx @@ -86,7 +86,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource( xCategories.set( aData[nDataIdx] ); if( xCategories.is()) { - SetRole( xCategories->getValues(), C2U("categories")); + SetRole( xCategories->getValues(), "categories"); if( bUseCategoriesAsX ) { bSetXValues = false; @@ -99,20 +99,20 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource( { xValuesX.set( aData[nDataIdx] ); if( xValuesX.is()) - SetRole( xValuesX->getValues(), C2U("values-x")); + SetRole( xValuesX->getValues(), "values-x"); } else if( bNextIsYValues ) { aYValuesVector.push_back( aData[nDataIdx] ); if( aData[nDataIdx].is()) - SetRole( aData[nDataIdx]->getValues(), C2U("values-y")); + SetRole( aData[nDataIdx]->getValues(), "values-y"); bNextIsYValues = false; } else if( !bNextIsYValues ) { aSizeValuesVector.push_back( aData[nDataIdx] ); if( aData[nDataIdx].is()) - SetRole( aData[nDataIdx]->getValues(), C2U("values-size")); + SetRole( aData[nDataIdx]->getValues(), "values-size"); bNextIsYValues = (nDataSeqCount-(nDataIdx+1)) >= 2;//two or more left } } @@ -179,11 +179,11 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries( Sequence< Reference< data::XLabeledDataSequence > > aNewSequences; Reference< data::XLabeledDataSequence > xValuesSize( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-size"), false )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-size", false )); Reference< data::XLabeledDataSequence > xValuesY( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-y"), false )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y", false )); Reference< data::XLabeledDataSequence > xValuesX( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-x"), false )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x", false )); if( ! xValuesX.is() || ! xValuesY.is() || @@ -191,7 +191,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries( { vector< Reference< data::XLabeledDataSequence > > aValueSeqVec( DataSeriesHelper::getAllDataSequencesByRole( - xSeriesSource->getDataSequences(), C2U("values"), true )); + xSeriesSource->getDataSequences(), "values", true )); if( xValuesX.is()) aValueSeqVec.erase( find( aValueSeqVec.begin(), aValueSeqVec.end(), xValuesX )); if( xValuesY.is()) @@ -206,7 +206,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries( { xValuesSize.set( aValueSeqVec[nIndex++] ); if( xValuesSize.is()) - SetRole( xValuesSize->getValues(), C2U("values-size")); + SetRole( xValuesSize->getValues(), "values-size"); } if( ! xValuesY.is() && @@ -214,7 +214,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries( { xValuesY.set( aValueSeqVec[nIndex++] ); if( xValuesY.is()) - SetRole( xValuesY->getValues(), C2U("values-y")); + SetRole( xValuesY->getValues(), "values-y"); } if( ! xValuesX.is() && @@ -222,7 +222,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries( { xValuesX.set( aValueSeqVec[nIndex++] ); if( xValuesX.is()) - SetRole( xValuesY->getValues(), C2U("values-x")); + SetRole( xValuesY->getValues(), "values-x"); } } if( xValuesSize.is()) diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx index 7593bee4a06e..d1ccc532ef0e 100644 --- a/chart2/source/model/template/CandleStickChartType.cxx +++ b/chart2/source/model/template/CandleStickChartType.cxx @@ -52,33 +52,33 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Japanese" ), + Property( "Japanese", PROP_CANDLESTICKCHARTTYPE_JAPANESE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "WhiteDay" ), + Property( "WhiteDay", PROP_CANDLESTICKCHARTTYPE_WHITE_DAY, ::getCppuType( reinterpret_cast< Reference< beans::XPropertySet > *>(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "BlackDay" ), + Property( "BlackDay", PROP_CANDLESTICKCHARTTYPE_BLACK_DAY, ::getCppuType( reinterpret_cast< Reference< beans::XPropertySet > *>(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "ShowFirst" ), + Property( "ShowFirst", PROP_CANDLESTICKCHARTTYPE_SHOW_FIRST, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ShowHighLow" ), + Property( "ShowHighLow", PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -232,17 +232,17 @@ uno::Sequence< ::rtl::OUString > SAL_CALL CandleStickChartType::getSupportedMand ::std::vector< OUString > aMandRoles; - aMandRoles.push_back( C2U( "label" )); + aMandRoles.push_back( "label"); if( bShowFirst ) - aMandRoles.push_back( C2U( "values-first" )); + aMandRoles.push_back( "values-first"); if( bShowHiLow ) { - aMandRoles.push_back( C2U( "values-min" )); - aMandRoles.push_back( C2U( "values-max" )); + aMandRoles.push_back( "values-min"); + aMandRoles.push_back( "values-max"); } - aMandRoles.push_back( C2U( "values-last" )); + aMandRoles.push_back( "values-last"); return ContainerHelper::ContainerToSequence( aMandRoles ); } @@ -258,12 +258,12 @@ Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles() ::std::vector< OUString > aOptRoles; if( ! bShowFirst ) - aOptRoles.push_back( C2U( "values-first" )); + aOptRoles.push_back( "values-first"); if( ! bShowHiLow ) { - aOptRoles.push_back( C2U( "values-min" )); - aOptRoles.push_back( C2U( "values-max" )); + aOptRoles.push_back( "values-min"); + aOptRoles.push_back( "values-max"); } return ContainerHelper::ContainerToSequence( aOptRoles ); @@ -272,7 +272,7 @@ Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles() OUString SAL_CALL CandleStickChartType::getRoleOfSequenceForSeriesLabel() throw (uno::RuntimeException) { - return C2U( "values-last" ); + return OUString("values-last"); } // ____ OPropertySet ____ @@ -332,14 +332,14 @@ uno::Sequence< ::rtl::OUString > CandleStickChartType::getSupportedServiceNames_ { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( CandleStickChartType, - C2U( "com.sun.star.comp.chart.CandleStickChartType" )); + OUString("com.sun.star.comp.chart.CandleStickChartType") ); } // namespace chart diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx index b87107a975f1..d78d16ed0e89 100644 --- a/chart2/source/model/template/ChartType.cxx +++ b/chart2/source/model/template/ChartType.cxx @@ -112,8 +112,8 @@ Sequence< OUString > SAL_CALL ChartType::getSupportedMandatoryRoles() throw (uno::RuntimeException) { Sequence< OUString > aDefaultSeq(2); - aDefaultSeq[0] = C2U( "label" ); - aDefaultSeq[1] = C2U( "values-y" ); + aDefaultSeq[0] = "label"; + aDefaultSeq[1] = "values-y"; return aDefaultSeq; } @@ -126,7 +126,7 @@ Sequence< OUString > SAL_CALL ChartType::getSupportedOptionalRoles() OUString SAL_CALL ChartType::getRoleOfSequenceForSeriesLabel() throw (uno::RuntimeException) { - return C2U( "values-y" ); + return OUString("values-y"); } void ChartType::impl_addDataSeriesWithoutNotification( @@ -161,7 +161,7 @@ void SAL_CALL ChartType::removeDataSeries( const Reference< chart2::XDataSeries if( aIt == m_aDataSeries.end()) throw container::NoSuchElementException( - C2U( "The given series is no element of this charttype" ), + "The given series is no element of this charttype", static_cast< uno::XWeak * >( this )); ModifyListenerHelper::removeListener( xDataSeries, m_xModifyEventForwarder ); diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 61f55cffd54c..25aba04d05c1 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -135,72 +135,72 @@ const tTemplateMapType & lcl_DefaultChartTypeMap() { static const tTemplateMapType aMap = tTemplateMapType( ::comphelper::MakeMap< tTemplateMapType::key_type, tTemplateMapType::mapped_type > - ( C2U( "com.sun.star.chart2.template.Symbol" ), TEMPLATE_SYMBOL ) - ( C2U( "com.sun.star.chart2.template.StackedSymbol" ), TEMPLATE_STACKEDSYMBOL ) - ( C2U( "com.sun.star.chart2.template.PercentStackedSymbol" ), TEMPLATE_PERCENTSTACKEDSYMBOL ) - ( C2U( "com.sun.star.chart2.template.Line" ), TEMPLATE_LINE ) - ( C2U( "com.sun.star.chart2.template.StackedLine" ), TEMPLATE_STACKEDLINE ) - ( C2U( "com.sun.star.chart2.template.PercentStackedLine" ), TEMPLATE_PERCENTSTACKEDLINE ) - ( C2U( "com.sun.star.chart2.template.LineSymbol" ), TEMPLATE_LINESYMBOL ) - ( C2U( "com.sun.star.chart2.template.StackedLineSymbol" ), TEMPLATE_STACKEDLINESYMBOL ) - ( C2U( "com.sun.star.chart2.template.PercentStackedLineSymbol" ), TEMPLATE_PERCENTSTACKEDLINESYMBOL ) - ( C2U( "com.sun.star.chart2.template.ThreeDLine" ), TEMPLATE_THREEDLINE ) - ( C2U( "com.sun.star.chart2.template.StackedThreeDLine" ), TEMPLATE_STACKEDTHREEDLINE ) - ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDLine" ), TEMPLATE_PERCENTSTACKEDTHREEDLINE ) - ( C2U( "com.sun.star.chart2.template.ThreeDLineDeep" ), TEMPLATE_THREEDLINEDEEP ) - ( C2U( "com.sun.star.chart2.template.Column" ), TEMPLATE_COLUMN ) - ( C2U( "com.sun.star.chart2.template.StackedColumn" ), TEMPLATE_STACKEDCOLUMN ) - ( C2U( "com.sun.star.chart2.template.PercentStackedColumn" ), TEMPLATE_PERCENTSTACKEDCOLUMN ) - ( C2U( "com.sun.star.chart2.template.Bar" ), TEMPLATE_BAR ) - ( C2U( "com.sun.star.chart2.template.StackedBar" ), TEMPLATE_STACKEDBAR ) - ( C2U( "com.sun.star.chart2.template.PercentStackedBar" ), TEMPLATE_PERCENTSTACKEDBAR ) - ( C2U( "com.sun.star.chart2.template.ThreeDColumnDeep" ), TEMPLATE_THREEDCOLUMNDEEP ) - ( C2U( "com.sun.star.chart2.template.ThreeDColumnFlat" ), TEMPLATE_THREEDCOLUMNFLAT ) - ( C2U( "com.sun.star.chart2.template.StackedThreeDColumnFlat" ), TEMPLATE_STACKEDTHREEDCOLUMNFLAT ) - ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDColumnFlat" ), TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT ) - ( C2U( "com.sun.star.chart2.template.ThreeDBarDeep" ), TEMPLATE_THREEDBARDEEP ) - ( C2U( "com.sun.star.chart2.template.ThreeDBarFlat" ), TEMPLATE_THREEDBARFLAT ) - ( C2U( "com.sun.star.chart2.template.StackedThreeDBarFlat" ), TEMPLATE_STACKEDTHREEDBARFLAT ) - ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDBarFlat" ), TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT ) - ( C2U( "com.sun.star.chart2.template.ColumnWithLine" ), TEMPLATE_COLUMNWITHLINE ) - ( C2U( "com.sun.star.chart2.template.StackedColumnWithLine" ), TEMPLATE_STACKEDCOLUMNWITHLINE ) - ( C2U( "com.sun.star.chart2.template.Area" ), TEMPLATE_AREA ) - ( C2U( "com.sun.star.chart2.template.StackedArea" ), TEMPLATE_STACKEDAREA ) - ( C2U( "com.sun.star.chart2.template.PercentStackedArea" ), TEMPLATE_PERCENTSTACKEDAREA ) - ( C2U( "com.sun.star.chart2.template.ThreeDArea" ), TEMPLATE_THREEDAREA ) - ( C2U( "com.sun.star.chart2.template.StackedThreeDArea" ), TEMPLATE_STACKEDTHREEDAREA ) - ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDArea" ), TEMPLATE_PERCENTSTACKEDTHREEDAREA ) - ( C2U( "com.sun.star.chart2.template.Pie" ), TEMPLATE_PIE ) - ( C2U( "com.sun.star.chart2.template.PieAllExploded" ), TEMPLATE_PIEALLEXPLODED ) - ( C2U( "com.sun.star.chart2.template.Donut" ), TEMPLATE_DONUT ) - ( C2U( "com.sun.star.chart2.template.DonutAllExploded" ), TEMPLATE_DONUTALLEXPLODED ) - ( C2U( "com.sun.star.chart2.template.ThreeDPie" ), TEMPLATE_THREEDPIE ) - ( C2U( "com.sun.star.chart2.template.ThreeDPieAllExploded" ), TEMPLATE_THREEDPIEALLEXPLODED ) - ( C2U( "com.sun.star.chart2.template.ThreeDDonut" ), TEMPLATE_THREEDDONUT ) - ( C2U( "com.sun.star.chart2.template.ThreeDDonutAllExploded" ), TEMPLATE_THREEDDONUTALLEXPLODED ) - ( C2U( "com.sun.star.chart2.template.ScatterLineSymbol" ), TEMPLATE_SCATTERLINESYMBOL ) - ( C2U( "com.sun.star.chart2.template.ScatterLine" ), TEMPLATE_SCATTERLINE ) - ( C2U( "com.sun.star.chart2.template.ScatterSymbol" ), TEMPLATE_SCATTERSYMBOL ) - ( C2U( "com.sun.star.chart2.template.ThreeDScatter" ), TEMPLATE_THREEDSCATTER ) - ( C2U( "com.sun.star.chart2.template.Net" ), TEMPLATE_NET ) - ( C2U( "com.sun.star.chart2.template.NetSymbol" ), TEMPLATE_NETSYMBOL ) - ( C2U( "com.sun.star.chart2.template.NetLine" ), TEMPLATE_NETLINE ) - ( C2U( "com.sun.star.chart2.template.StackedNet" ), TEMPLATE_STACKEDNET ) - ( C2U( "com.sun.star.chart2.template.StackedNetSymbol" ), TEMPLATE_STACKEDNETSYMBOL ) - ( C2U( "com.sun.star.chart2.template.StackedNetLine" ), TEMPLATE_STACKEDNETLINE ) - ( C2U( "com.sun.star.chart2.template.PercentStackedNet" ), TEMPLATE_PERCENTSTACKEDNET ) - ( C2U( "com.sun.star.chart2.template.PercentStackedNetSymbol" ), TEMPLATE_PERCENTSTACKEDNETSYMBOL ) - ( C2U( "com.sun.star.chart2.template.PercentStackedNetLine" ), TEMPLATE_PERCENTSTACKEDNETLINE ) - ( C2U( "com.sun.star.chart2.template.FilledNet" ), TEMPLATE_FILLEDNET ) - ( C2U( "com.sun.star.chart2.template.StackedFilledNet" ), TEMPLATE_STACKEDFILLEDNET ) - ( C2U( "com.sun.star.chart2.template.PercentStackedFilledNet" ), TEMPLATE_PERCENTSTACKEDFILLEDNET ) - ( C2U( "com.sun.star.chart2.template.StockLowHighClose" ), TEMPLATE_STOCKLOWHIGHCLOSE ) - ( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ), TEMPLATE_STOCKOPENLOWHIGHCLOSE ) - ( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), TEMPLATE_STOCKVOLUMELOWHIGHCLOSE ) - ( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE ) - ( C2U( "com.sun.star.chart2.template.Bubble" ), TEMPLATE_BUBBLE ) -// ( C2U( "com.sun.star.chart2.template.Surface" ), TEMPLATE_SURFACE ) -// ( C2U( "com.sun.star.chart2.template.Addin" ), TEMPLATE_ADDIN ) + ( "com.sun.star.chart2.template.Symbol", TEMPLATE_SYMBOL ) + ( "com.sun.star.chart2.template.StackedSymbol", TEMPLATE_STACKEDSYMBOL ) + ( "com.sun.star.chart2.template.PercentStackedSymbol", TEMPLATE_PERCENTSTACKEDSYMBOL ) + ( "com.sun.star.chart2.template.Line", TEMPLATE_LINE ) + ( "com.sun.star.chart2.template.StackedLine", TEMPLATE_STACKEDLINE ) + ( "com.sun.star.chart2.template.PercentStackedLine", TEMPLATE_PERCENTSTACKEDLINE ) + ( "com.sun.star.chart2.template.LineSymbol", TEMPLATE_LINESYMBOL ) + ( "com.sun.star.chart2.template.StackedLineSymbol", TEMPLATE_STACKEDLINESYMBOL ) + ( "com.sun.star.chart2.template.PercentStackedLineSymbol", TEMPLATE_PERCENTSTACKEDLINESYMBOL ) + ( "com.sun.star.chart2.template.ThreeDLine", TEMPLATE_THREEDLINE ) + ( "com.sun.star.chart2.template.StackedThreeDLine", TEMPLATE_STACKEDTHREEDLINE ) + ( "com.sun.star.chart2.template.PercentStackedThreeDLine", TEMPLATE_PERCENTSTACKEDTHREEDLINE ) + ( "com.sun.star.chart2.template.ThreeDLineDeep", TEMPLATE_THREEDLINEDEEP ) + ( "com.sun.star.chart2.template.Column", TEMPLATE_COLUMN ) + ( "com.sun.star.chart2.template.StackedColumn", TEMPLATE_STACKEDCOLUMN ) + ( "com.sun.star.chart2.template.PercentStackedColumn", TEMPLATE_PERCENTSTACKEDCOLUMN ) + ( "com.sun.star.chart2.template.Bar", TEMPLATE_BAR ) + ( "com.sun.star.chart2.template.StackedBar", TEMPLATE_STACKEDBAR ) + ( "com.sun.star.chart2.template.PercentStackedBar", TEMPLATE_PERCENTSTACKEDBAR ) + ( "com.sun.star.chart2.template.ThreeDColumnDeep", TEMPLATE_THREEDCOLUMNDEEP ) + ( "com.sun.star.chart2.template.ThreeDColumnFlat", TEMPLATE_THREEDCOLUMNFLAT ) + ( "com.sun.star.chart2.template.StackedThreeDColumnFlat", TEMPLATE_STACKEDTHREEDCOLUMNFLAT ) + ( "com.sun.star.chart2.template.PercentStackedThreeDColumnFlat", TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT ) + ( "com.sun.star.chart2.template.ThreeDBarDeep", TEMPLATE_THREEDBARDEEP ) + ( "com.sun.star.chart2.template.ThreeDBarFlat", TEMPLATE_THREEDBARFLAT ) + ( "com.sun.star.chart2.template.StackedThreeDBarFlat", TEMPLATE_STACKEDTHREEDBARFLAT ) + ( "com.sun.star.chart2.template.PercentStackedThreeDBarFlat", TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT ) + ( "com.sun.star.chart2.template.ColumnWithLine", TEMPLATE_COLUMNWITHLINE ) + ( "com.sun.star.chart2.template.StackedColumnWithLine", TEMPLATE_STACKEDCOLUMNWITHLINE ) + ( "com.sun.star.chart2.template.Area", TEMPLATE_AREA ) + ( "com.sun.star.chart2.template.StackedArea", TEMPLATE_STACKEDAREA ) + ( "com.sun.star.chart2.template.PercentStackedArea", TEMPLATE_PERCENTSTACKEDAREA ) + ( "com.sun.star.chart2.template.ThreeDArea", TEMPLATE_THREEDAREA ) + ( "com.sun.star.chart2.template.StackedThreeDArea", TEMPLATE_STACKEDTHREEDAREA ) + ( "com.sun.star.chart2.template.PercentStackedThreeDArea", TEMPLATE_PERCENTSTACKEDTHREEDAREA ) + ( "com.sun.star.chart2.template.Pie", TEMPLATE_PIE ) + ( "com.sun.star.chart2.template.PieAllExploded", TEMPLATE_PIEALLEXPLODED ) + ( "com.sun.star.chart2.template.Donut", TEMPLATE_DONUT ) + ( "com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED ) + ( "com.sun.star.chart2.template.ThreeDPie", TEMPLATE_THREEDPIE ) + ( "com.sun.star.chart2.template.ThreeDPieAllExploded", TEMPLATE_THREEDPIEALLEXPLODED ) + ( "com.sun.star.chart2.template.ThreeDDonut", TEMPLATE_THREEDDONUT ) + ( "com.sun.star.chart2.template.ThreeDDonutAllExploded", TEMPLATE_THREEDDONUTALLEXPLODED ) + ( "com.sun.star.chart2.template.ScatterLineSymbol", TEMPLATE_SCATTERLINESYMBOL ) + ( "com.sun.star.chart2.template.ScatterLine", TEMPLATE_SCATTERLINE ) + ( "com.sun.star.chart2.template.ScatterSymbol", TEMPLATE_SCATTERSYMBOL ) + ( "com.sun.star.chart2.template.ThreeDScatter", TEMPLATE_THREEDSCATTER ) + ( "com.sun.star.chart2.template.Net", TEMPLATE_NET ) + ( "com.sun.star.chart2.template.NetSymbol", TEMPLATE_NETSYMBOL ) + ( "com.sun.star.chart2.template.NetLine", TEMPLATE_NETLINE ) + ( "com.sun.star.chart2.template.StackedNet", TEMPLATE_STACKEDNET ) + ( "com.sun.star.chart2.template.StackedNetSymbol", TEMPLATE_STACKEDNETSYMBOL ) + ( "com.sun.star.chart2.template.StackedNetLine", TEMPLATE_STACKEDNETLINE ) + ( "com.sun.star.chart2.template.PercentStackedNet", TEMPLATE_PERCENTSTACKEDNET ) + ( "com.sun.star.chart2.template.PercentStackedNetSymbol", TEMPLATE_PERCENTSTACKEDNETSYMBOL ) + ( "com.sun.star.chart2.template.PercentStackedNetLine", TEMPLATE_PERCENTSTACKEDNETLINE ) + ( "com.sun.star.chart2.template.FilledNet", TEMPLATE_FILLEDNET ) + ( "com.sun.star.chart2.template.StackedFilledNet", TEMPLATE_STACKEDFILLEDNET ) + ( "com.sun.star.chart2.template.PercentStackedFilledNet", TEMPLATE_PERCENTSTACKEDFILLEDNET ) + ( "com.sun.star.chart2.template.StockLowHighClose", TEMPLATE_STOCKLOWHIGHCLOSE ) + ( "com.sun.star.chart2.template.StockOpenLowHighClose", TEMPLATE_STOCKOPENLOWHIGHCLOSE ) + ( "com.sun.star.chart2.template.StockVolumeLowHighClose", TEMPLATE_STOCKVOLUMELOWHIGHCLOSE ) + ( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose", TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE ) + ( "com.sun.star.chart2.template.Bubble", TEMPLATE_BUBBLE ) +// ( "com.sun.star.chart2.template.Surface", TEMPLATE_SURFACE ) +// ( "com.sun.star.chart2.template.Addin", TEMPLATE_ADDIN ) ); return aMap; @@ -573,7 +573,7 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() if( xEnumAcc.is()) { uno::Reference< container::XEnumeration > xEnum( - xEnumAcc->createContentEnumeration( C2U( "com.sun.star.chart2.ChartTypeTemplate" ) )); + xEnumAcc->createContentEnumeration( "com.sun.star.chart2.ChartTypeTemplate" )); if( xEnum.is()) { uno::Reference< uno::XInterface > xFactIntf; @@ -597,8 +597,8 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() Sequence< OUString > ChartTypeManager::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.ChartTypeManager" ); - aServices[ 1 ] = C2U( "com.sun.star.lang.MultiServiceFactory" ); + aServices[ 0 ] = "com.sun.star.chart2.ChartTypeManager"; + aServices[ 1 ] = "com.sun.star.lang.MultiServiceFactory"; return aServices; } @@ -606,7 +606,7 @@ Sequence< OUString > ChartTypeManager::getSupportedServiceNames_Static() // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( ChartTypeManager, - C2U( "com.sun.star.comp.chart.ChartTypeManager" )); + OUString("com.sun.star.comp.chart.ChartTypeManager") ); } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 195dbb2f9f61..3f7899f34e15 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -67,7 +67,7 @@ void lcl_applyDefaultStyle( Reference< chart2::XColorScheme > xColorScheme( xDiagram->getDefaultColorScheme()); if( xSeriesProp.is() && xColorScheme.is() ) xSeriesProp->setPropertyValue( - C2U("Color"), + "Color", uno::makeAny( xColorScheme->getColorByIndex( nIndex ))); } } @@ -75,7 +75,7 @@ void lcl_applyDefaultStyle( void lcl_ensureCorrectLabelPlacement( const Reference< beans::XPropertySet >& xProp, const uno::Sequence < sal_Int32 >& rAvailablePlacements ) { sal_Int32 nLabelPlacement=0; - if( xProp.is() && (xProp->getPropertyValue( C2U( "LabelPlacement" ) ) >>= nLabelPlacement) ) + if( xProp.is() && (xProp->getPropertyValue( "LabelPlacement" ) >>= nLabelPlacement) ) { bool bValid = false; for( sal_Int32 nN = 0; nN < rAvailablePlacements.getLength(); nN++ ) @@ -92,7 +92,7 @@ void lcl_ensureCorrectLabelPlacement( const Reference< beans::XPropertySet >& xP //otherwise use the first supported one if( rAvailablePlacements.getLength() ) aNewValue <<=rAvailablePlacements[0]; - xProp->setPropertyValue( C2U("LabelPlacement"), aNewValue ); + xProp->setPropertyValue( "LabelPlacement", aNewValue ); } } } @@ -101,10 +101,10 @@ void lcl_resetLabelPlacementIfDefault( const Reference< beans::XPropertySet >& x { sal_Int32 nLabelPlacement=0; - if( xProp.is() && (xProp->getPropertyValue( C2U( "LabelPlacement" ) ) >>= nLabelPlacement) ) + if( xProp.is() && (xProp->getPropertyValue( "LabelPlacement" ) >>= nLabelPlacement) ) { if( nDefaultPlacement == nLabelPlacement ) - xProp->setPropertyValue( C2U("LabelPlacement"), uno::Any() ); + xProp->setPropertyValue( "LabelPlacement", uno::Any() ); } } @@ -117,9 +117,9 @@ void lcl_ensureCorrectMissingValueTreatment( const Reference< chart2::XDiagram > ::chart::ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) ); if( aAvailableMissingValueTreatment.getLength() ) - xDiaProp->setPropertyValue( C2U( "MissingValueTreatment" ), uno::makeAny( aAvailableMissingValueTreatment[0] ) ); + xDiaProp->setPropertyValue( "MissingValueTreatment", uno::makeAny( aAvailableMissingValueTreatment[0] ) ); else - xDiaProp->setPropertyValue( C2U( "MissingValueTreatment" ), uno::Any() ); + xDiaProp->setPropertyValue( "MissingValueTreatment", uno::Any() ); } } @@ -152,7 +152,7 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource // create diagram xDia.set( GetComponentContext()->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.Diagram" ), + "com.sun.star.chart2.Diagram", GetComponentContext() ), uno::UNO_QUERY_THROW ); @@ -221,7 +221,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram > if( aData.Categories.is()) { aParam.realloc( 1 ); - aParam[0] = beans::PropertyValue( C2U("HasCategories"), -1, uno::makeAny( true ), + aParam[0] = beans::PropertyValue( "HasCategories", -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); } aData = xInterpreter->interpretDataSource( xSource, aParam, aFlatSeriesSeq ); @@ -404,7 +404,7 @@ void SAL_CALL ChartTypeTemplate::applyStyle( : (eStackMode == StackMode_Z_STACKED ) ? chart2::StackingDirection_Z_STACKING : chart2::StackingDirection_NO_STACKING ); - xSeriesProp->setPropertyValue( C2U("StackingDirection"), aPropValue ); + xSeriesProp->setPropertyValue( "StackingDirection", aPropValue ); //ensure valid label placement { @@ -413,7 +413,7 @@ void SAL_CALL ChartTypeTemplate::applyStyle( lcl_ensureCorrectLabelPlacement( xSeriesProp, aAvailablePlacements ); uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) lcl_ensureCorrectLabelPlacement( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), aAvailablePlacements ); } @@ -458,9 +458,9 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram if( xAxisProp.is()) { // set number format to source format - uno::Any aValue( xAxisProp->getPropertyValue(C2U("NumberFormat"))); + uno::Any aValue( xAxisProp->getPropertyValue("NumberFormat")); if( aValue.hasValue()) - xAxisProp->setPropertyValue(C2U("NumberFormat"), uno::Any()); + xAxisProp->setPropertyValue("NumberFormat", uno::Any()); } } } @@ -510,7 +510,7 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram lcl_resetLabelPlacementIfDefault( xSeriesProp, nDefaultPlacement ); uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) lcl_resetLabelPlacementIfDefault( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), nDefaultPlacement ); } @@ -762,9 +762,9 @@ void ChartTypeTemplate::adaptAxes( if( xAxisProp.is()) { // set number format to source format - uno::Any aValue( xAxisProp->getPropertyValue(C2U("NumberFormat"))); + uno::Any aValue( xAxisProp->getPropertyValue("NumberFormat")); if( aValue.hasValue()) - xAxisProp->setPropertyValue(C2U("NumberFormat"), uno::Any()); + xAxisProp->setPropertyValue("NumberFormat", uno::Any()); } } } @@ -915,9 +915,9 @@ void ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem( Sequence< OUString > ChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); - aServices[ 1 ] = C2U( "com.sun.star.layout.LayoutElement" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 0 ] = "com.sun.star.chart2.ChartTypeTemplate"; + aServices[ 1 ] = "com.sun.star.layout.LayoutElement"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } @@ -930,7 +930,7 @@ Reference< uno::XComponentContext > ChartTypeTemplate::GetComponentContext() con // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( ChartTypeTemplate, - C2U( "com.sun.star.comp.chart.ChartTypeTemplate" )); + OUString("com.sun.star.comp.chart.ChartTypeTemplate") ); } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx index c4bb660d9f5c..90bf825e42de 100644 --- a/chart2/source/model/template/ColumnChartType.cxx +++ b/chart2/source/model/template/ColumnChartType.cxx @@ -43,14 +43,14 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "OverlapSequence" ), + Property( "OverlapSequence", PROP_BARCHARTTYPE_OVERLAP_SEQUENCE, ::getCppuType( reinterpret_cast< const Sequence< sal_Int32 > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "GapwidthSequence" ), + Property( "GapwidthSequence", PROP_BARCHARTTYPE_GAPWIDTH_SEQUENCE, ::getCppuType( reinterpret_cast< const Sequence< sal_Int32 > * >(0)), beans::PropertyAttribute::BOUND @@ -182,13 +182,13 @@ uno::Sequence< ::rtl::OUString > ColumnChartType::getSupportedServiceNames_Stati { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_COLUMN; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( ColumnChartType, - C2U( "com.sun.star.comp.chart.ColumnChartType" )); + OUString("com.sun.star.comp.chart.ColumnChartType") ); } // namespace chart diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index 1df923c33e3f..28f956512355 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -59,7 +59,7 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "NumberOfLines" ), + Property( "NumberOfLines", PROP_COL_LINE_NUMBER_OF_LINES, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -258,7 +258,7 @@ void SAL_CALL ColumnLineChartTypeTemplate::applyStyle( if( nChartTypeIndex==0 ) // columns { - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } else if( nChartTypeIndex==1 ) // lines { @@ -425,7 +425,7 @@ uno::Sequence< ::rtl::OUString > ColumnLineChartTypeTemplate::getSupportedServic { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 374add7f1626..613570f164b9 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -97,14 +97,14 @@ InterpretedData SAL_CALL DataInterpreter::interpretDataSource( { xCategories.set( aData[i] ); if( xCategories.is()) - SetRole( xCategories->getValues(), C2U("categories")); + SetRole( xCategories->getValues(), "categories"); bCategoriesUsed = true; } else { aSequencesVec.push_back( aData[i] ); if( aData[i].is()) - SetRole( aData[i]->getValues(), C2U("values-y")); + SetRole( aData[i]->getValues(), "values-y"); } } catch( const uno::Exception & ex ) @@ -160,14 +160,14 @@ InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries( // values-y Reference< data::XLabeledDataSequence > xValuesY( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-y"), false )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y", false )); // re-use values-... as values-y if( ! xValuesY.is()) { xValuesY.set( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values"), true )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values", true )); if( xValuesY.is()) - SetRole( xValuesY->getValues(), C2U("values-y")); + SetRole( xValuesY->getValues(), "values-y"); } if( xValuesY.is()) { @@ -328,7 +328,7 @@ OUString DataInterpreter::GetRole( const Reference< data::XDataSequence > & xSeq try { Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY_THROW ); - xProp->getPropertyValue( C2U("Role")) >>= aResult; + xProp->getPropertyValue( "Role") >>= aResult; } catch( const uno::Exception & ex ) { @@ -344,7 +344,7 @@ void DataInterpreter::SetRole( const Reference< data::XDataSequence > & xSeq, co try { Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( C2U("Role"), uno::makeAny( rRole )); + xProp->setPropertyValue( "Role", uno::makeAny( rRole )); } catch( const uno::Exception & ex ) { @@ -371,7 +371,7 @@ bool DataInterpreter::HasCategories( bool bHasCategories = false; if( rArguments.getLength() > 0 ) - GetProperty( rArguments, C2U(("HasCategories"))) >>= bHasCategories; + GetProperty( rArguments, "HasCategories" ) >>= bHasCategories; for( sal_Int32 nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.getLength(); ++nLSeqIdx ) bHasCategories = ( rData[nLSeqIdx].is() && GetRole( rData[nLSeqIdx]->getValues() ) == "categories"); @@ -383,7 +383,7 @@ bool DataInterpreter::UseCategoriesAsX( const Sequence< beans::PropertyValue > & { bool bUseCategoriesAsX = true; if( rArguments.getLength() > 0 ) - GetProperty( rArguments, C2U(("UseCategoriesAsX"))) >>= bUseCategoriesAsX; + GetProperty( rArguments, "UseCategoriesAsX" ) >>= bUseCategoriesAsX; return bUseCategoriesAsX; } @@ -392,12 +392,12 @@ bool DataInterpreter::UseCategoriesAsX( const Sequence< beans::PropertyValue > & Sequence< OUString > DataInterpreter::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 1 ); - aServices[0] = C2U( "com.sun.star.chart2.DataInterpreter" ); + aServices[0] = "com.sun.star.chart2.DataInterpreter"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( DataInterpreter, C2U("com.sun.star.comp.chart2.DataInterpreter")); +APPHELPER_XSERVICEINFO_IMPL( DataInterpreter, OUString("com.sun.star.comp.chart2.DataInterpreter") ); } // namespace chart @@ -419,12 +419,12 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource ) { if( aSequences[k].is()) { - OUString aSourceRepr(C2U("<none>")); + OUString aSourceRepr("<none>"); if( aSequences[k]->getValues().is()) aSourceRepr = aSequences[k]->getValues()->getSourceRangeRepresentation(); xProp.set( aSequences[k]->getValues(), uno::UNO_QUERY ); if( xProp.is() && - ( xProp->getPropertyValue( C2U( "Role" )) >>= aId )) + ( xProp->getPropertyValue( "Role") >>= aId )) { OSL_TRACE( " <data sequence %d> Role: %s, Source: %s", k, U2C( aId ), U2C( aSourceRepr )); } @@ -433,12 +433,12 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource ) OSL_TRACE( " <data sequence %d> unknown Role, Source: %s", k, U2C( aSourceRepr ) ); } - aSourceRepr = C2U("<none>"); + aSourceRepr = "<none>"; if( aSequences[k]->getLabel().is()) aSourceRepr = OUString( aSequences[k]->getLabel()->getSourceRangeRepresentation()); xProp.set( aSequences[k]->getLabel(), uno::UNO_QUERY ); if( xProp.is() && - ( xProp->getPropertyValue( C2U( "Role" )) >>= aId )) + ( xProp->getPropertyValue( "Role") >>= aId )) { OSL_TRACE( " <data sequence label %d> Role: %s, Source: %s", k, U2C( aId ), U2C( aSourceRepr )); } diff --git a/chart2/source/model/template/FilledNetChartType.cxx b/chart2/source/model/template/FilledNetChartType.cxx index 3ffd11967926..4c267fe40679 100644 --- a/chart2/source/model/template/FilledNetChartType.cxx +++ b/chart2/source/model/template/FilledNetChartType.cxx @@ -72,14 +72,14 @@ uno::Sequence< ::rtl::OUString > FilledNetChartType::getSupportedServiceNames_St { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( FilledNetChartType, - C2U( "com.sun.star.comp.chart.FilledNetChartType" )); + OUString("com.sun.star.comp.chart.FilledNetChartType") ); } // namespace chart diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx index 5aaaec1adb99..d35dde6fe776 100644 --- a/chart2/source/model/template/LineChartType.cxx +++ b/chart2/source/model/template/LineChartType.cxx @@ -48,20 +48,20 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "CurveStyle" ), + Property( "CurveStyle", PROP_LINECHARTTYPE_CURVE_STYLE, ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CurveResolution" ), + Property( "CurveResolution", PROP_LINECHARTTYPE_CURVE_RESOLUTION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SplineOrder" ), + Property( "SplineOrder", PROP_LINECHARTTYPE_SPLINE_ORDER, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -193,14 +193,14 @@ uno::Sequence< ::rtl::OUString > LineChartType::getSupportedServiceNames_Static( { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_LINE; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( LineChartType, - C2U( "com.sun.star.comp.chart.LineChartType" )); + OUString("com.sun.star.comp.chart.LineChartType") ); } // namespace chart diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx index 78229978c392..5f264bee3100 100644 --- a/chart2/source/model/template/LineChartTypeTemplate.cxx +++ b/chart2/source/model/template/LineChartTypeTemplate.cxx @@ -59,19 +59,19 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "CurveStyle" ), + Property( "CurveStyle", PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CurveResolution" ), + Property( "CurveResolution", PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SplineOrder" ), + Property( "SplineOrder", PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -229,7 +229,7 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate( drawing::LineStyle eLineStyle; Reference< beans::XPropertySet > xProp( *aIt, uno::UNO_QUERY_THROW ); - bool bCurrentHasSymbol = (xProp->getPropertyValue( C2U( "Symbol" )) >>= aSymbProp) && + bool bCurrentHasSymbol = (xProp->getPropertyValue( "Symbol") >>= aSymbProp) && (aSymbProp.Style != chart2::SymbolStyle_NONE); if( bCurrentHasSymbol ) @@ -241,7 +241,7 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate( break; } - bool bCurrentHasLine = (xProp->getPropertyValue( C2U( "LineStyle" )) >>= eLineStyle) && + bool bCurrentHasLine = (xProp->getPropertyValue( "LineStyle") >>= eLineStyle) && ( eLineStyle != drawing::LineStyle_NONE ); if( bCurrentHasLine ) @@ -278,9 +278,9 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate( uno::Reference< beans::XPropertySet > xChartTypeProp( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), uno::UNO_QUERY_THROW ); - setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue(C2U("CurveStyle" )) ); - setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue(C2U("CurveResolution" )) ); - setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue(C2U("SplineOrder" )) ); + setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue("CurveStyle") ); + setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue("CurveResolution") ); + setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue("SplineOrder") ); } catch( const uno::Exception & ex ) { @@ -306,11 +306,11 @@ Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForIndex( sal if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "CurveStyle" ), getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE )); + "CurveStyle", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE )); xCTProp->setPropertyValue( - C2U( "CurveResolution" ), getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); + "CurveResolution", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); xCTProp->setPropertyValue( - C2U( "SplineOrder" ), getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER )); + "SplineOrder", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER )); } } catch( const uno::Exception & ex ) @@ -340,11 +340,11 @@ Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForN if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "CurveStyle" ), getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE )); + "CurveStyle", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE )); xCTProp->setPropertyValue( - C2U( "CurveResolution" ), getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); + "CurveResolution", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); xCTProp->setPropertyValue( - C2U( "SplineOrder" ), getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER )); + "SplineOrder", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER )); } } catch( const uno::Exception & ex ) @@ -384,7 +384,7 @@ Sequence< OUString > LineChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx index 84ae4653054d..ca3ddc545056 100644 --- a/chart2/source/model/template/NetChartType.cxx +++ b/chart2/source/model/template/NetChartType.cxx @@ -62,7 +62,7 @@ Reference< XCoordinateSystem > SAL_CALL { if( DimensionCount != 2 ) throw lang::IllegalArgumentException( - C2U( "NetChart must be two-dimensional" ), + "NetChart must be two-dimensional", static_cast< ::cppu::OWeakObject* >( this ), 0 ); Reference< XCoordinateSystem > xResult( @@ -178,14 +178,14 @@ uno::Sequence< ::rtl::OUString > NetChartType::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_NET; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( NetChartType, - C2U( "com.sun.star.comp.chart.NetChartType" )); + OUString("com.sun.star.comp.chart.NetChartType") ); } // namespace chart diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx index 0a1ae7836ae5..f7205f1581e1 100644 --- a/chart2/source/model/template/NetChartTypeTemplate.cxx +++ b/chart2/source/model/template/NetChartTypeTemplate.cxx @@ -126,7 +126,7 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate( drawing::LineStyle eLineStyle; Reference< beans::XPropertySet > xProp( *aIt, uno::UNO_QUERY_THROW ); - bool bCurrentHasSymbol = (xProp->getPropertyValue( C2U( "Symbol" )) >>= aSymbProp) && + bool bCurrentHasSymbol = (xProp->getPropertyValue( "Symbol") >>= aSymbProp) && (aSymbProp.Style != chart2::SymbolStyle_NONE); if( bCurrentHasSymbol ) @@ -138,7 +138,7 @@ sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate( break; } - bool bCurrentHasLine = (xProp->getPropertyValue( C2U( "LineStyle" )) >>= eLineStyle) && + bool bCurrentHasLine = (xProp->getPropertyValue( "LineStyle") >>= eLineStyle) && ( eLineStyle != drawing::LineStyle_NONE ); if( bCurrentHasLine ) @@ -209,7 +209,7 @@ Sequence< OUString > NetChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx index 450a622b52ab..41e44fafd89a 100644 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -49,7 +49,7 @@ static void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "UseRings" ), + Property( "UseRings", PROP_PIECHARTTYPE_USE_RINGS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -217,14 +217,14 @@ uno::Sequence< ::rtl::OUString > PieChartType::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_PIE; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( PieChartType, - C2U( "com.sun.star.comp.chart.PieChartType" )); + OUString("com.sun.star.comp.chart.PieChartType") ); } // namespace chart diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 49cc2e1c944a..36c727a558d4 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -65,25 +65,25 @@ static void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "OffsetMode" ), + Property( "OffsetMode", PROP_PIE_TEMPLATE_OFFSET_MODE, ::getCppuType( reinterpret_cast< const chart2::PieChartOffsetMode * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "DefaultOffset" ), + Property( "DefaultOffset", PROP_PIE_TEMPLATE_DEFAULT_OFFSET, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Dimension" ), + Property( "Dimension", PROP_PIE_TEMPLATE_DIMENSION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "UseRings" ), + Property( "UseRings", PROP_PIE_TEMPLATE_USE_RINGS, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -288,7 +288,7 @@ void PieChartTypeTemplate::createChartTypes( if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "UseRings" ), getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); + "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); } Reference< chart2::XChartTypeContainer > xCTCnt( rCoordSys[0], uno::UNO_QUERY_THROW ); xCTCnt->setChartTypes( Sequence< Reference< chart2::XChartType > >( &xCT, 1 )); @@ -339,11 +339,11 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( sal_Int32 nOuterSeriesIndex = 0; //@todo in future this will depend on Orientation of the radius axis scale Reference< chart2::XDataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] ); Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY_THROW ); - xProp->getPropertyValue( C2U( "Offset" )) >>= fOffset; + xProp->getPropertyValue( "Offset") >>= fOffset; //get AttributedDataPoints uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { @@ -351,7 +351,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( if(xPointProp.is()) { double fPointOffset=0.0; - if( (xProp->getPropertyValue( C2U( "Offset" )) >>= fPointOffset ) ) + if( (xProp->getPropertyValue( "Offset") >>= fPointOffset ) ) { if( ! ::rtl::math::approxEqual( fPointOffset, fOffset ) ) { @@ -387,7 +387,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( uno::Reference< beans::XPropertySet > xCTProp( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), uno::UNO_QUERY_THROW ); sal_Bool bUseRings = false; - if( xCTProp->getPropertyValue( C2U( "UseRings" )) >>= bUseRings ) + if( xCTProp->getPropertyValue( "UseRings") >>= bUseRings ) { bResult = ( bTemplateUsesRings == bUseRings ); } @@ -410,7 +410,7 @@ Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_ if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "UseRings" ), getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); + "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); } } @@ -439,7 +439,7 @@ Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNe if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "UseRings" ), getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); + "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); } } @@ -480,7 +480,7 @@ void SAL_CALL PieChartTypeTemplate::applyStyle( double fOffsetToSet = fDefaultOffset; uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - xProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList; + xProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList; // determine whether to set the new offset bool bSetOffset = ( ePieOffsetMode == chart2::PieChartOffsetMode_ALL_EXPLODED ); @@ -531,10 +531,10 @@ void SAL_CALL PieChartTypeTemplate::applyStyle( } // line style - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); // vary colors by point - xProp->setPropertyValue( C2U("VaryColorsByPoint"), uno::makeAny( true )); + xProp->setPropertyValue( "VaryColorsByPoint", uno::makeAny( true )); } catch( const uno::Exception & ex ) { @@ -595,12 +595,12 @@ void SAL_CALL PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagr Reference< beans::XPropertyState > xState( *aIt, uno::UNO_QUERY ); if( xState.is()) { - xState->setPropertyToDefault( C2U("VaryColorsByPoint")); + xState->setPropertyToDefault( "VaryColorsByPoint"); Reference< beans::XPropertySet > xProp( xState, uno::UNO_QUERY ); if( xProp.is() && - xProp->getPropertyValue( C2U("BorderStyle")) == aLineStyleAny ) + xProp->getPropertyValue( "BorderStyle") == aLineStyleAny ) { - xState->setPropertyToDefault( C2U("BorderStyle")); + xState->setPropertyToDefault( "BorderStyle"); } } } @@ -625,7 +625,7 @@ uno::Sequence< ::rtl::OUString > PieChartTypeTemplate::getSupportedServiceNames_ { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx index 2cab24ef67d9..20e89cb15ff7 100644 --- a/chart2/source/model/template/ScatterChartType.cxx +++ b/chart2/source/model/template/ScatterChartType.cxx @@ -52,20 +52,20 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "CurveStyle" ), + Property( "CurveStyle", PROP_SCATTERCHARTTYPE_CURVE_STYLE, ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CurveResolution" ), + Property( "CurveResolution", PROP_SCATTERCHARTTYPE_CURVE_RESOLUTION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SplineOrder" ), + Property( "SplineOrder", PROP_SCATTERCHARTTYPE_SPLINE_ORDER, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -218,9 +218,9 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScatterChartType::getSupportedMandator throw (uno::RuntimeException) { uno::Sequence< ::rtl::OUString > aMandRolesSeq(3); - aMandRolesSeq[0] = C2U( "label" ); - aMandRolesSeq[1] = C2U( "values-x" ); - aMandRolesSeq[2] = C2U( "values-y" ); + aMandRolesSeq[0] = "label"; + aMandRolesSeq[1] = "values-x"; + aMandRolesSeq[2] = "values-y"; return aMandRolesSeq; } @@ -259,14 +259,14 @@ uno::Sequence< ::rtl::OUString > ScatterChartType::getSupportedServiceNames_Stat { uno::Sequence< ::rtl::OUString > aServices( 3 ); aServices[ 0 ] = CHART2_SERVICE_NAME_CHARTTYPE_SCATTER; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartType" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartType"; + aServices[ 2 ] = "com.sun.star.beans.PropertySet"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( ScatterChartType, - C2U( "com.sun.star.comp.chart.ScatterChartType" )); + OUString("com.sun.star.comp.chart.ScatterChartType") ); } // namespace chart diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx index 2b895fd0b985..57a48ebda661 100644 --- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx @@ -61,19 +61,19 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "CurveStyle" ), + Property( "CurveStyle", PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CurveResolution" ), + Property( "CurveResolution", PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "SplineOrder" ), + Property( "SplineOrder", PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -221,7 +221,7 @@ void SAL_CALL ScatterChartTypeTemplate::applyStyle( DataSeriesHelper::switchLinesOnOrOff( xProp, m_bHasLines ); DataSeriesHelper::makeLinesThickOrThin( xProp, m_nDim==2 ); if( m_nDim==3 ) - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } catch( const uno::Exception & ex ) { @@ -263,7 +263,7 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate( drawing::LineStyle eLineStyle; Reference< beans::XPropertySet > xProp( *aIt, uno::UNO_QUERY_THROW ); - bool bCurrentHasSymbol = (xProp->getPropertyValue( C2U( "Symbol" )) >>= aSymbProp) && + bool bCurrentHasSymbol = (xProp->getPropertyValue( "Symbol") >>= aSymbProp) && (aSymbProp.Style != chart2::SymbolStyle_NONE); if( bCurrentHasSymbol ) @@ -275,7 +275,7 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate( break; } - bool bCurrentHasLine = (xProp->getPropertyValue( C2U( "LineStyle" )) >>= eLineStyle) && + bool bCurrentHasLine = (xProp->getPropertyValue( "LineStyle") >>= eLineStyle) && ( eLineStyle != drawing::LineStyle_NONE ); if( bCurrentHasLine ) @@ -312,9 +312,9 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate( uno::Reference< beans::XPropertySet > xChartTypeProp( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ), uno::UNO_QUERY_THROW ); - setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue(C2U("CurveStyle" )) ); - setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue(C2U("CurveResolution" )) ); - setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue(C2U("SplineOrder" )) ); + setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue("CurveStyle") ); + setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue("CurveResolution") ); + setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue("SplineOrder") ); } catch( const uno::Exception & ex ) { @@ -340,11 +340,11 @@ Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForIndex( if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "CurveStyle" ), getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE )); + "CurveStyle", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE )); xCTProp->setPropertyValue( - C2U( "CurveResolution" ), getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); + "CurveResolution", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); xCTProp->setPropertyValue( - C2U( "SplineOrder" ), getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER )); + "SplineOrder", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER )); } } catch( const uno::Exception & ex ) @@ -374,11 +374,11 @@ Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeF if( xCTProp.is()) { xCTProp->setPropertyValue( - C2U( "CurveStyle" ), getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE )); + "CurveStyle", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE )); xCTProp->setPropertyValue( - C2U( "CurveResolution" ), getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); + "CurveResolution", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION )); xCTProp->setPropertyValue( - C2U( "SplineOrder" ), getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER )); + "SplineOrder", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER )); } } catch( const uno::Exception & ex ) @@ -404,7 +404,7 @@ Sequence< OUString > ScatterChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index fb50ae3faf58..b203abd4e8c4 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -68,25 +68,25 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "Volume" ), + Property( "Volume", PROP_STOCKCHARTTYPE_TEMPLATE_VOLUME, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Open" ), + Property( "Open", PROP_STOCKCHARTTYPE_TEMPLATE_OPEN, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LowHigh" ), + Property( "LowHigh", PROP_STOCKCHARTTYPE_TEMPLATE_LOW_HIGH, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Japanese" ), + Property( "Japanese", PROP_STOCKCHARTTYPE_TEMPLATE_JAPANESE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -246,12 +246,12 @@ void SAL_CALL StockChartTypeTemplate::applyStyle( Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY ); if( xProp.is() ) - xProp->setPropertyValue( C2U("AttachedAxisIndex"), uno::makeAny( nNewAxisIndex ) ); + xProp->setPropertyValue( "AttachedAxisIndex", uno::makeAny( nNewAxisIndex ) ); if( bHasVolume && nChartTypeIndex==0 ) { //switch lines off for volume bars - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } else { @@ -259,9 +259,9 @@ void SAL_CALL StockChartTypeTemplate::applyStyle( if( xProp.is() ) { drawing::LineStyle eStyle = drawing::LineStyle_NONE; - xProp->getPropertyValue( C2U("LineStyle") ) >>= eStyle; + xProp->getPropertyValue( "LineStyle" ) >>= eStyle; if( eStyle == drawing::LineStyle_NONE ) - xProp->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_SOLID )); + xProp->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_SOLID )); } } @@ -286,7 +286,7 @@ void SAL_CALL StockChartTypeTemplate::resetStyles( { Reference< beans::XPropertySet > xProp( *aIt, uno::UNO_QUERY ); if( xProp.is() ) - xProp->setPropertyValue( C2U("AttachedAxisIndex"), uno::makeAny( sal_Int32(0) ) ); + xProp->setPropertyValue( "AttachedAxisIndex", uno::makeAny( sal_Int32(0) ) ); } } @@ -374,9 +374,9 @@ void StockChartTypeTemplate::createChartTypes( Reference< beans::XPropertySet > xCTProp( xCT, uno::UNO_QUERY ); if( xCTProp.is()) { - xCTProp->setPropertyValue( C2U("Japanese"), uno::makeAny( bJapaneseStyle )); - xCTProp->setPropertyValue( C2U("ShowFirst"), uno::makeAny( bShowFirst )); - xCTProp->setPropertyValue( C2U("ShowHighLow"), uno::makeAny( bShowHighLow )); + xCTProp->setPropertyValue( "Japanese", uno::makeAny( bJapaneseStyle )); + xCTProp->setPropertyValue( "ShowFirst", uno::makeAny( bShowFirst )); + xCTProp->setPropertyValue( "ShowHighLow", uno::makeAny( bShowHighLow )); } if( aSeriesSeq.getLength() > nSeriesIndex && @@ -475,12 +475,12 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate( if( xCTProp.is()) { sal_Bool bJapaneseProp = sal_False; - xCTProp->getPropertyValue( C2U("Japanese")) >>= bJapaneseProp; + xCTProp->getPropertyValue( "Japanese") >>= bJapaneseProp; bResult = bResult && ( bHasJapaneseStyle == bJapaneseProp ); // in old chart japanese == showFirst sal_Bool bShowFirstProp = sal_False; - xCTProp->getPropertyValue( C2U("ShowFirst")) >>= bShowFirstProp; + xCTProp->getPropertyValue( "ShowFirst") >>= bShowFirstProp; bResult = bResult && ( bHasOpenValue == bShowFirstProp ); } } @@ -530,7 +530,7 @@ Sequence< OUString > StockChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = "com.sun.star.chart2.ChartTypeTemplate"; return aServices; } diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx index 75379c89e04b..0cafbd98a14a 100644 --- a/chart2/source/model/template/StockDataInterpreter.cxx +++ b/chart2/source/model/template/StockDataInterpreter.cxx @@ -143,7 +143,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( aSequences[nBarGroupIndex][nLabeledSeqIdx].realloc( 1 ); aSequences[nBarGroupIndex][nLabeledSeqIdx][0].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-y")); + SetRole( aData[nSourceIndex]->getValues(), "values-y"); ++nSourceIndex; } @@ -153,7 +153,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( aSequences[nCandleStickGroupIndex][nLabeledSeqIdx].realloc( 4 ); aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-first")); + SetRole( aData[nSourceIndex]->getValues(), "values-first"); ++nSourceIndex, ++nSeqIdx; } else @@ -161,17 +161,17 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-min")); + SetRole( aData[nSourceIndex]->getValues(), "values-min"); ++nSourceIndex, ++nSeqIdx; aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-max")); + SetRole( aData[nSourceIndex]->getValues(), "values-max"); ++nSourceIndex, ++nSeqIdx; aSequences[nCandleStickGroupIndex][nLabeledSeqIdx][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-last")); + SetRole( aData[nSourceIndex]->getValues(), "values-last"); ++nSourceIndex, ++nSeqIdx; } @@ -182,7 +182,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( aSequences[nBarGroupIndex][nVolumeSeries - 1].realloc( 1 ); OSL_ASSERT( nDataCount > nSourceIndex ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-y")); + SetRole( aData[nSourceIndex]->getValues(), "values-y"); aSequences[nBarGroupIndex][nVolumeSeries - 1][0].set( aData[nSourceIndex] ); ++nSourceIndex; --nRemaining; @@ -201,7 +201,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( sal_Int32 nSeqIdx( 0 ); aSequences[nCandleStickGroupIndex][nSeriesIndex][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-min")); + SetRole( aData[nSourceIndex]->getValues(), "values-min"); ++nSourceIndex, ++nSeqIdx; // 2. high @@ -209,7 +209,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( { aSequences[nCandleStickGroupIndex][nSeriesIndex][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-max")); + SetRole( aData[nSourceIndex]->getValues(), "values-max"); ++nSourceIndex, ++nSeqIdx; } @@ -219,7 +219,7 @@ InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource( { aSequences[nCandleStickGroupIndex][nSeriesIndex][nSeqIdx].set( aData[nSourceIndex] ); if( aData[nSourceIndex].is()) - SetRole( aData[nSourceIndex]->getValues(), C2U("values-last")); + SetRole( aData[nSourceIndex]->getValues(), "values-last"); ++nSourceIndex, ++nSeqIdx; } diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx index e79c23444572..48d742421d83 100644 --- a/chart2/source/model/template/XYDataInterpreter.cxx +++ b/chart2/source/model/template/XYDataInterpreter.cxx @@ -80,7 +80,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource( xCategories.set( aData[nDataIdx] ); if( xCategories.is()) { - SetRole( xCategories->getValues(), C2U("categories")); + SetRole( xCategories->getValues(), "categories"); if( bUseCategoriesAsX ) bSetXValues = false; } @@ -90,13 +90,13 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource( { xValuesX.set( aData[nDataIdx] ); if( xValuesX.is()) - SetRole( xValuesX->getValues(), C2U("values-x")); + SetRole( xValuesX->getValues(), "values-x"); } else { aSequencesVec.push_back( aData[nDataIdx] ); if( aData[nDataIdx].is()) - SetRole( aData[nDataIdx]->getValues(), C2U("values-y")); + SetRole( aData[nDataIdx]->getValues(), "values-y"); } } catch( const uno::Exception & ex ) @@ -163,16 +163,16 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries( // values-y Reference< data::XLabeledDataSequence > xValuesY( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-y"), false )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-y", false )); Reference< data::XLabeledDataSequence > xValuesX( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-x"), false )); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x", false )); // re-use values-... as values-x/values-y if( ! xValuesX.is() || ! xValuesY.is()) { vector< Reference< data::XLabeledDataSequence > > aValueSeqVec( DataSeriesHelper::getAllDataSequencesByRole( - xSeriesSource->getDataSequences(), C2U("values"), true )); + xSeriesSource->getDataSequences(), "values", true )); if( xValuesX.is()) aValueSeqVec.erase( find( aValueSeqVec.begin(), aValueSeqVec.end(), xValuesX )); if( xValuesY.is()) @@ -184,7 +184,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries( { xValuesY.set( aValueSeqVec[nIndex++] ); if( xValuesY.is()) - SetRole( xValuesY->getValues(), C2U("values-y")); + SetRole( xValuesY->getValues(), "values-y"); } if( ! xValuesX.is() && @@ -192,7 +192,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries( { xValuesX.set( aValueSeqVec[nIndex++] ); if( xValuesX.is()) - SetRole( xValuesY->getValues(), C2U("values-x")); + SetRole( xValuesY->getValues(), "values-x"); } } if( xValuesY.is()) diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index d7281a71e04d..614236dff6d7 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -95,7 +95,7 @@ bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling ) bool bReturn = false; Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY ); bReturn =( xServiceName.is() && (xServiceName->getServiceName()).equals( - C2U( "com.sun.star.chart2.LogarithmicScaling" ))); + "com.sun.star.chart2.LogarithmicScaling")); return bReturn; } @@ -149,7 +149,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis( Reference< chart2::XChartDocument > xChartDoc( xNumberFormatsSupplier, uno::UNO_QUERY ); Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY ); - if( xProp.is() && !( xProp->getPropertyValue( C2U( "NumberFormat" ) ) >>= nNumberFormatKey ) ) + if( xProp.is() && !( xProp->getPropertyValue( "NumberFormat" ) >>= nNumberFormatKey ) ) { bool bFormatSet = false; //check whether we have a percent scale -> use percent format @@ -190,7 +190,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis( if( xSource.is() ) { ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aXValues( - DataSeriesHelper::getAllDataSequencesByRole( xSource->getDataSequences(), C2U("values-x"), true ) ); + DataSeriesHelper::getAllDataSequencesByRole( xSource->getDataSequences(), "values-x", true ) ); if( aXValues.empty() ) { Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) ); @@ -234,7 +234,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis( { ::rtl::OUString aRoleToMatch; if( nDimensionIndex == 0 ) - aRoleToMatch = C2U("values-x"); + aRoleToMatch = "values-x"; Sequence< Reference< XChartType > > aChartTypes( xCTCnt->getChartTypes()); for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx ) { @@ -333,7 +333,7 @@ Reference< XAxis > AxisHelper::createAxis( return NULL; Reference< XAxis > xAxis( xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.Axis" ), xContext ), uno::UNO_QUERY ); + "com.sun.star.chart2.Axis", xContext ), uno::UNO_QUERY ); OSL_ASSERT( xAxis.is()); if( xAxis.is()) @@ -362,7 +362,7 @@ Reference< XAxis > AxisHelper::createAxis( if( xMainProp.is() ) { ::com::sun::star::chart::ChartAxisPosition eMainAxisPos( ::com::sun::star::chart::ChartAxisPosition_ZERO ); - xMainProp->getPropertyValue(C2U( "CrossoverPosition" )) >>= eMainAxisPos; + xMainProp->getPropertyValue("CrossoverPosition") >>= eMainAxisPos; if( ::com::sun::star::chart::ChartAxisPosition_END == eMainAxisPos ) eNewAxisPos = ::com::sun::star::chart::ChartAxisPosition_START; } @@ -370,7 +370,7 @@ Reference< XAxis > AxisHelper::createAxis( Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY ); if( xProp.is() ) - xProp->setPropertyValue(C2U( "CrossoverPosition" ), uno::makeAny(eNewAxisPos) ); + xProp->setPropertyValue("CrossoverPosition", uno::makeAny(eNewAxisPos) ); } Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY ); @@ -462,9 +462,9 @@ void AxisHelper::makeAxisVisible( const Reference< XAxis >& xAxis ) Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY ); if( xProps.is() ) { - xProps->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_True ) ); + xProps->setPropertyValue( "Show", uno::makeAny( sal_True ) ); LineProperties::SetLineVisible( xProps ); - xProps->setPropertyValue( C2U( "DisplayLabels" ), uno::makeAny( sal_True ) ); + xProps->setPropertyValue( "DisplayLabels", uno::makeAny( sal_True ) ); } } @@ -472,7 +472,7 @@ void AxisHelper::makeGridVisible( const Reference< beans::XPropertySet >& xGridP { if( xGridProperties.is() ) { - xGridProperties->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_True ) ); + xGridProperties->setPropertyValue( "Show", uno::makeAny( sal_True ) ); LineProperties::SetLineVisible( xGridProperties ); } } @@ -488,7 +488,7 @@ void AxisHelper::makeAxisInvisible( const Reference< XAxis >& xAxis ) Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY ); if( xProps.is() ) { - xProps->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_False ) ); + xProps->setPropertyValue( "Show", uno::makeAny( sal_False ) ); } } @@ -539,7 +539,7 @@ void AxisHelper::makeGridInvisible( const Reference< beans::XPropertySet >& xGri { if( xGridProperties.is() ) { - xGridProperties->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_False ) ); + xGridProperties->setPropertyValue( "Show", uno::makeAny( sal_False ) ); } } @@ -621,7 +621,7 @@ Reference< XAxis > AxisHelper::getCrossingMainAxis( const Reference< XAxis >& xA nDimensionIndex=1; bool bSwapXY = false; Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY ); - if( xCooSysProp.is() && (xCooSysProp->getPropertyValue( C2U("SwapXAndYAxis") ) >>= bSwapXY) && bSwapXY ) + if( xCooSysProp.is() && (xCooSysProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXY) && bSwapXY ) nDimensionIndex=0; } else if( 1==nDimensionIndex ) @@ -664,7 +664,7 @@ sal_Bool AxisHelper::isAxisVisible( const Reference< XAxis >& xAxis ) Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY ); if( xProps.is() ) { - xProps->getPropertyValue( C2U( "Show" ) ) >>= bRet; + xProps->getPropertyValue( "Show" ) >>= bRet; bRet = bRet && ( LineProperties::IsLineVisible( xProps ) || areAxisLabelsVisible( xProps ) ); } @@ -677,7 +677,7 @@ sal_Bool AxisHelper::areAxisLabelsVisible( const Reference< beans::XPropertySet sal_Bool bRet = false; if( xAxisProperties.is() ) { - xAxisProperties->getPropertyValue( C2U( "DisplayLabels" ) ) >>= bRet; + xAxisProperties->getPropertyValue( "DisplayLabels" ) >>= bRet; } return bRet; } @@ -688,7 +688,7 @@ sal_Bool AxisHelper::isGridVisible( const Reference< beans::XPropertySet >& xGri if( xGridProperies.is() ) { - xGridProperies->getPropertyValue( C2U( "Show" ) ) >>= bRet; + xGridProperies->getPropertyValue( "Show" ) >>= bRet; bRet = bRet && LineProperties::IsLineVisible( xGridProperies ); } @@ -813,7 +813,7 @@ std::vector< Reference< XAxis > > AxisHelper::getAllAxesOfCoordinateSystem( { Reference< beans::XPropertySet > xAxisProp( xAxis, uno::UNO_QUERY ); if( !xAxisProp.is() || - !(xAxisProp->getPropertyValue( C2U("Show")) >>= bAddAxis) ) + !(xAxisProp->getPropertyValue( "Show") >>= bAddAxis) ) bAddAxis = false; } if( bAddAxis ) @@ -919,7 +919,7 @@ bool AxisHelper::isSecondaryYAxisNeeded( const Reference< XCoordinateSystem >& x if(xProp.is()) { sal_Int32 nAttachedAxisIndex = 0; - if( ( xProp->getPropertyValue( C2U( "AttachedAxisIndex" ) ) >>= nAttachedAxisIndex ) && nAttachedAxisIndex>0 ) + if( ( xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nAttachedAxisIndex ) && nAttachedAxisIndex>0 ) return true; } } @@ -1074,7 +1074,7 @@ void AxisHelper::setRTLAxisLayout( const Reference< XCoordinateSystem >& xCooSys bool bVertical = false; Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY ); if( xCooSysProp.is() ) - xCooSysProp->getPropertyValue( C2U("SwapXAndYAxis") ) >>= bVertical; + xCooSysProp->getPropertyValue( "SwapXAndYAxis" ) >>= bVertical; sal_Int32 nHorizontalAxisDimension = bVertical ? 1 : 0; sal_Int32 nVerticalAxisDimension = bVertical ? 0 : 1; diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx index a91bb89579a8..6426170481ff 100644 --- a/chart2/source/tools/CachedDataSequence.cxx +++ b/chart2/source/tools/CachedDataSequence.cxx @@ -123,13 +123,13 @@ CachedDataSequence::~CachedDataSequence() void CachedDataSequence::registerProperties() { - registerProperty( C2U( "NumberFormatKey" ), + registerProperty( "NumberFormatKey", PROP_NUMBERFORMAT_KEY, 0, // PropertyAttributes & m_nNumberFormatKey, ::getCppuType( & m_nNumberFormatKey ) ); - registerProperty( C2U( "Role" ), + registerProperty( "Role", PROP_PROPOSED_ROLE, 0, // PropertyAttributes & m_sRole, @@ -234,9 +234,9 @@ Sequence< OUString > CachedDataSequence::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 4 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.data.DataSequence" ); - aServices[ 2 ] = C2U( "com.sun.star.chart2.data.NumericalDataSequence" ); - aServices[ 3 ] = C2U( "com.sun.star.chart2.data.TextualDataSequence" ); + aServices[ 1 ] = "com.sun.star.chart2.data.DataSequence"; + aServices[ 2 ] = "com.sun.star.chart2.data.NumericalDataSequence"; + aServices[ 3 ] = "com.sun.star.chart2.data.TextualDataSequence"; return aServices; } diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index 029b07197ed8..b04390e2c1a5 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -62,13 +62,13 @@ void CharacterProperties::AddPropertiesToVector( { // CharacterProperties rOutProperties.push_back( - Property( C2U( "CharFontName" ), + Property( "CharFontName", PROP_CHAR_FONT_NAME, ::getCppuType( reinterpret_cast< const OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CharFontStyleName" ), + Property( "CharFontStyleName", PROP_CHAR_FONT_STYLE_NAME, ::getCppuType( reinterpret_cast< const OUString * >(0)), beans::PropertyAttribute::BOUND @@ -76,56 +76,56 @@ void CharacterProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); // CharFontFamily (see awt.FontFamily) rOutProperties.push_back( - Property( C2U( "CharFontFamily" ), + Property( "CharFontFamily", PROP_CHAR_FONT_FAMILY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontCharSet (see awt.CharSet) rOutProperties.push_back( - Property( C2U( "CharFontCharSet" ), + Property( "CharFontCharSet", PROP_CHAR_FONT_CHAR_SET, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontPitch (see awt.FontPitch) rOutProperties.push_back( - Property( C2U( "CharFontPitch" ), + Property( "CharFontPitch", PROP_CHAR_FONT_PITCH, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharColor rOutProperties.push_back( - Property( C2U( "CharColor" ), + Property( "CharColor", PROP_CHAR_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharEscapement rOutProperties.push_back( - Property( C2U( "CharEscapement" ), + Property( "CharEscapement", PROP_CHAR_ESCAPEMENT, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); // CharHeight rOutProperties.push_back( - Property( C2U( "CharHeight" ), + Property( "CharHeight", PROP_CHAR_CHAR_HEIGHT, ::getCppuType( reinterpret_cast< const float * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharUnderline (see awt.FontUnderline) rOutProperties.push_back( - Property( C2U( "CharUnderline" ), + Property( "CharUnderline", PROP_CHAR_UNDERLINE, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharUnderlineColor rOutProperties.push_back( - Property( C2U( "CharUnderlineColor" ), + Property( "CharUnderlineColor", PROP_CHAR_UNDERLINE_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -133,21 +133,21 @@ void CharacterProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); // CharUnderlineHasColor rOutProperties.push_back( - Property( C2U( "CharUnderlineHasColor" ), + Property( "CharUnderlineHasColor", PROP_CHAR_UNDERLINE_HAS_COLOR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharOverline (see awt.FontUnderline) rOutProperties.push_back( - Property( C2U( "CharOverline" ), + Property( "CharOverline", PROP_CHAR_OVERLINE, ::getCppuType( reinterpret_cast< const sal_Int16* >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT ) ); // CharOverlineColor rOutProperties.push_back( - Property( C2U( "CharOverlineColor" ), + Property( "CharOverlineColor", PROP_CHAR_OVERLINE_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32* >( 0 ) ), beans::PropertyAttribute::BOUND @@ -155,34 +155,34 @@ void CharacterProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID ) ); // CharOverlineHasColor rOutProperties.push_back( - Property( C2U( "CharOverlineHasColor" ), + Property( "CharOverlineHasColor", PROP_CHAR_OVERLINE_HAS_COLOR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT ) ); // CharWeight (see awt.FontWeight) rOutProperties.push_back( - Property( C2U( "CharWeight" ), + Property( "CharWeight", PROP_CHAR_WEIGHT, ::getCppuType( reinterpret_cast< const float * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharPosture rOutProperties.push_back( - Property( C2U( "CharPosture" ), + Property( "CharPosture", PROP_CHAR_POSTURE, ::getCppuType( reinterpret_cast< const awt::FontSlant * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "CharAutoKerning" ), + Property( "CharAutoKerning", PROP_CHAR_AUTO_KERNING, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "CharKerning" ), + Property( "CharKerning", PROP_CHAR_KERNING, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -190,49 +190,49 @@ void CharacterProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); // CharEscapementHeight rOutProperties.push_back( - Property( C2U( "CharEscapementHeight" ), + Property( "CharEscapementHeight", PROP_CHAR_ESCAPEMENT_HEIGHT, ::getCppuType( reinterpret_cast< const sal_Int8 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); // CharStrikeout (see awt.FontStrikeout) rOutProperties.push_back( - Property( C2U( "CharStrikeout" ), + Property( "CharStrikeout", PROP_CHAR_STRIKE_OUT, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharWordMode rOutProperties.push_back( - Property( C2U( "CharWordMode" ), + Property( "CharWordMode", PROP_CHAR_WORD_MODE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharLocale rOutProperties.push_back( - Property( C2U( "CharLocale" ), + Property( "CharLocale", PROP_CHAR_LOCALE, ::getCppuType( reinterpret_cast< const lang::Locale * >(0)), //#i111967# no PropertyChangeEvent is fired on change so far beans::PropertyAttribute::MAYBEDEFAULT )); // CharShadowed rOutProperties.push_back( - Property( C2U( "CharShadowed" ), + Property( "CharShadowed", PROP_CHAR_SHADOWED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharContoured rOutProperties.push_back( - Property( C2U( "CharContoured" ), + Property( "CharContoured", PROP_CHAR_CONTOURED, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharRelief (see text.FontRelief) rOutProperties.push_back( - Property( C2U( "CharRelief" ), + Property( "CharRelief", PROP_CHAR_RELIEF, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -240,7 +240,7 @@ void CharacterProperties::AddPropertiesToVector( // CharEmphasize (see text.FontEmphasis) rOutProperties.push_back( - Property( C2U( "CharEmphasis" ), + Property( "CharEmphasis", PROP_CHAR_EMPHASIS, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -249,14 +249,14 @@ void CharacterProperties::AddPropertiesToVector( // ===== // CharFontNameAsian rOutProperties.push_back( - Property( C2U( "CharFontNameAsian" ), + Property( "CharFontNameAsian", PROP_CHAR_ASIAN_FONT_NAME, ::getCppuType( reinterpret_cast< const OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontStyleNameAsian rOutProperties.push_back( - Property( C2U( "CharFontStyleNameAsian" ), + Property( "CharFontStyleNameAsian", PROP_CHAR_ASIAN_FONT_STYLE_NAME, ::getCppuType( reinterpret_cast< const OUString * >(0)), beans::PropertyAttribute::BOUND @@ -264,49 +264,49 @@ void CharacterProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); // CharFontFamilyAsian (see awt.FontFamily) rOutProperties.push_back( - Property( C2U( "CharFontFamilyAsian" ), + Property( "CharFontFamilyAsian", PROP_CHAR_ASIAN_FONT_FAMILY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontCharSetAsian (see awt.CharSet) rOutProperties.push_back( - Property( C2U( "CharFontCharSetAsian" ), + Property( "CharFontCharSetAsian", PROP_CHAR_ASIAN_CHAR_SET, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontPitchAsian (see awt.FontPitch) rOutProperties.push_back( - Property( C2U( "CharFontPitchAsian" ), + Property( "CharFontPitchAsian", PROP_CHAR_ASIAN_FONT_PITCH, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharHeightAsian rOutProperties.push_back( - Property( C2U( "CharHeightAsian" ), + Property( "CharHeightAsian", PROP_CHAR_ASIAN_CHAR_HEIGHT, ::getCppuType( reinterpret_cast< const float * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharWeightAsian rOutProperties.push_back( - Property( C2U( "CharWeightAsian" ), + Property( "CharWeightAsian", PROP_CHAR_ASIAN_WEIGHT, ::getCppuType( reinterpret_cast< const float * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharPostureAsian rOutProperties.push_back( - Property( C2U( "CharPostureAsian" ), + Property( "CharPostureAsian", PROP_CHAR_ASIAN_POSTURE, ::getCppuType( reinterpret_cast< const awt::FontSlant * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharLocaleAsian rOutProperties.push_back( - Property( C2U( "CharLocaleAsian" ), + Property( "CharLocaleAsian", PROP_CHAR_ASIAN_LOCALE, ::getCppuType( reinterpret_cast< const lang::Locale * >(0)), //#i111967# no PropertyChangeEvent is fired on change so far @@ -316,14 +316,14 @@ void CharacterProperties::AddPropertiesToVector( // === // CharFontNameComplex rOutProperties.push_back( - Property( C2U( "CharFontNameComplex" ), + Property( "CharFontNameComplex", PROP_CHAR_COMPLEX_FONT_NAME, ::getCppuType( reinterpret_cast< const OUString * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontStyleNameComplex rOutProperties.push_back( - Property( C2U( "CharFontStyleNameComplex" ), + Property( "CharFontStyleNameComplex", PROP_CHAR_COMPLEX_FONT_STYLE_NAME, ::getCppuType( reinterpret_cast< const OUString * >(0)), beans::PropertyAttribute::BOUND @@ -331,49 +331,49 @@ void CharacterProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); // CharFontFamilyComplex (see awt.FontFamily) rOutProperties.push_back( - Property( C2U( "CharFontFamilyComplex" ), + Property( "CharFontFamilyComplex", PROP_CHAR_COMPLEX_FONT_FAMILY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontCharSetComplex (see awt.CharSet) rOutProperties.push_back( - Property( C2U( "CharFontCharSetComplex" ), + Property( "CharFontCharSetComplex", PROP_CHAR_COMPLEX_CHAR_SET, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharFontPitchComplex (see awt.FontPitch) rOutProperties.push_back( - Property( C2U( "CharFontPitchComplex" ), + Property( "CharFontPitchComplex", PROP_CHAR_COMPLEX_FONT_PITCH, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharHeightComplex rOutProperties.push_back( - Property( C2U( "CharHeightComplex" ), + Property( "CharHeightComplex", PROP_CHAR_COMPLEX_CHAR_HEIGHT, ::getCppuType( reinterpret_cast< const float * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharWeightComplex rOutProperties.push_back( - Property( C2U( "CharWeightComplex" ), + Property( "CharWeightComplex", PROP_CHAR_COMPLEX_WEIGHT, ::getCppuType( reinterpret_cast< const float * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharPostureComplex rOutProperties.push_back( - Property( C2U( "CharPostureComplex" ), + Property( "CharPostureComplex", PROP_CHAR_COMPLEX_POSTURE, ::getCppuType( reinterpret_cast< const awt::FontSlant * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); // CharLocaleComplex rOutProperties.push_back( - Property( C2U( "CharLocaleComplex" ), + Property( "CharLocaleComplex", PROP_CHAR_COMPLEX_LOCALE, ::getCppuType( reinterpret_cast< const lang::Locale * >(0)), //#i111967# no PropertyChangeEvent is fired on change so far @@ -381,14 +381,14 @@ void CharacterProperties::AddPropertiesToVector( // Writing Mode left to right vs right to left rOutProperties.push_back( - Property( C2U( "WritingMode" ), + Property( "WritingMode", PROP_WRITING_MODE, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), /*com::sun::star::text::WritingMode2*/ beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ParaIsCharacterDistance" ), + Property( "ParaIsCharacterDistance", PROP_PARA_IS_CHARACTER_DISTANCE, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -402,11 +402,11 @@ void CharacterProperties::AddDefaultsToMap( SvtLinguConfig aLinguConfig; lang::Locale aDefaultLocale; - aLinguConfig.GetProperty(C2U("DefaultLocale")) >>= aDefaultLocale; + aLinguConfig.GetProperty("DefaultLocale") >>= aDefaultLocale; lang::Locale aDefaultLocale_CJK; - aLinguConfig.GetProperty(C2U("DefaultLocale_CJK")) >>= aDefaultLocale_CJK; + aLinguConfig.GetProperty("DefaultLocale_CJK") >>= aDefaultLocale_CJK; lang::Locale aDefaultLocale_CTL; - aLinguConfig.GetProperty(C2U("DefaultLocale_CTL")) >>= aDefaultLocale_CTL; + aLinguConfig.GetProperty("DefaultLocale_CTL") >>= aDefaultLocale_CTL; using namespace ::com::sun::star::i18n::ScriptType; LanguageType nLang; @@ -480,18 +480,18 @@ awt::FontDescriptor CharacterProperties::createFontDescriptorFromPropertySet( awt::FontDescriptor aResult; // Note: keep this sorted! ::comphelper::MakeVector< OUString > aPropNames - ( C2U("CharFontCharSet")); // CharSet + ( "CharFontCharSet"); // CharSet aPropNames - ( C2U("CharFontFamily")) // Family - ( C2U("CharFontName")) // Name - ( C2U("CharFontPitch")) // Pitch - ( C2U("CharFontStyleName")) // StyleName - ( C2U("CharHeight")) // Height - ( C2U("CharPosture")) // Slant - ( C2U("CharStrikeout")) // Strikeout - ( C2U("CharUnderline")) // Underline - ( C2U("CharWeight")) // Weight - ( C2U("CharWordMode")) // WordLineMode + ( "CharFontFamily") // Family + ( "CharFontName") // Name + ( "CharFontPitch") // Pitch + ( "CharFontStyleName") // StyleName + ( "CharHeight") // Height + ( "CharPosture") // Slant + ( "CharStrikeout") // Strikeout + ( "CharUnderline") // Underline + ( "CharWeight") // Weight + ( "CharWordMode") // WordLineMode ; uno::Sequence< OUString > aPropNameSeq( ContainerHelper::ContainerToSequence( aPropNames )); diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx index 7dbb649de98d..7002a471f2d0 100644 --- a/chart2/source/tools/ChartModelHelper.cxx +++ b/chart2/source/tools/ChartModelHelper.cxx @@ -166,7 +166,7 @@ bool ChartModelHelper::isIncludeHiddenCells( const uno::Reference< frame::XModel try { - xProp->getPropertyValue(C2U("IncludeHiddenCells")) >>= bIncluded; + xProp->getPropertyValue("IncludeHiddenCells") >>= bIncluded; } catch( const beans::UnknownPropertyException& ) { @@ -186,7 +186,7 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, const un if (xDiagramProperties.is()) { bool bOldValue = bIncludeHiddenCells; - xDiagramProperties->getPropertyValue( C2U("IncludeHiddenCells") ) >>= bOldValue; + xDiagramProperties->getPropertyValue( "IncludeHiddenCells" ) >>= bOldValue; if( bOldValue == bIncludeHiddenCells ) bChanged = true; @@ -201,7 +201,7 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, const un { uno::Reference< beans::XPropertySet > xDataProviderProperties( xChartDoc->getDataProvider(), uno::UNO_QUERY ); if( xDataProviderProperties.is() ) - xDataProviderProperties->setPropertyValue(C2U("IncludeHiddenCells"), aNewValue ); + xDataProviderProperties->setPropertyValue("IncludeHiddenCells", aNewValue ); } } catch( const beans::UnknownPropertyException& ) @@ -220,10 +220,10 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, const un { xProp.set( uno::Reference< beans::XPropertySet >( aData[i]->getValues(), uno::UNO_QUERY ) ); if(xProp.is()) - xProp->setPropertyValue(C2U("IncludeHiddenCells"), aNewValue ); + xProp->setPropertyValue("IncludeHiddenCells", aNewValue ); xProp.set( uno::Reference< beans::XPropertySet >( aData[i]->getLabel(), uno::UNO_QUERY ) ); if(xProp.is()) - xProp->setPropertyValue(C2U("IncludeHiddenCells"), aNewValue ); + xProp->setPropertyValue("IncludeHiddenCells", aNewValue ); } } } @@ -232,7 +232,7 @@ bool ChartModelHelper::setIncludeHiddenCells( bool bIncludeHiddenCells, const un //the property is optional! } - xDiagramProperties->setPropertyValue( C2U("IncludeHiddenCells"), aNewValue); + xDiagramProperties->setPropertyValue( "IncludeHiddenCells", aNewValue); } } catch (const uno::Exception& e) diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx index d31a50efe804..51b760de355d 100644 --- a/chart2/source/tools/ChartTypeHelper.cxx +++ b/chart2/source/tools/ChartTypeHelper.cxx @@ -254,7 +254,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const bool bDonut = false; uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY_THROW ); if(xChartTypeProp.is()) - xChartTypeProp->getPropertyValue( C2U("UseRings")) >>= bDonut; + xChartTypeProp->getPropertyValue( "UseRings") >>= bDonut; if(!bDonut) { @@ -293,7 +293,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const { uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY ); chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING; - xSeriesProp->getPropertyValue( C2U("StackingDirection") ) >>= eStacking; + xSeriesProp->getPropertyValue( "StackingDirection" ) >>= eStacking; bStacked = (chart2::StackingDirection_Y_STACKING == eStacking); } @@ -553,7 +553,7 @@ sal_Int32 ChartTypeHelper::getNumberOfDisplayedSeries( { uno::Reference< beans::XPropertySet > xChartTypeProp( xChartType, uno::UNO_QUERY_THROW ); bool bDonut = false; - if( (xChartTypeProp->getPropertyValue( C2U("UseRings")) >>= bDonut) + if( (xChartTypeProp->getPropertyValue( "UseRings") >>= bDonut) && !bDonut ) { return nNumberOfSeries>0 ? 1 : 0; @@ -643,7 +643,7 @@ bool ChartTypeHelper::isSeriesInFrontOfAxisLine( const uno::Reference< XChartTyp rtl::OUString ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( const uno::Reference< XChartType >& xChartType ) { - rtl::OUString aRet( C2U( "values-y" ) ); + rtl::OUString aRet( "values-y" ); if( !xChartType.is() ) return aRet; rtl::OUString aChartTypeName = xChartType->getChartType(); @@ -654,7 +654,7 @@ rtl::OUString ChartTypeHelper::getRoleOfSequenceForYAxisNumberFormatDetection( c rtl::OUString ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( const uno::Reference< XChartType >& xChartType ) { - rtl::OUString aRet( C2U( "values-y" ) ); + rtl::OUString aRet( "values-y" ); if( !xChartType.is() ) return aRet; rtl::OUString aChartTypeName = xChartType->getChartType(); diff --git a/chart2/source/tools/ColorPerPointHelper.cxx b/chart2/source/tools/ColorPerPointHelper.cxx index 84ecf6017620..ad60db5af27a 100644 --- a/chart2/source/tools/ColorPerPointHelper.cxx +++ b/chart2/source/tools/ColorPerPointHelper.cxx @@ -55,7 +55,7 @@ bool ColorPerPointHelper::hasPointOwnColor( if( !xPointState.is() ) return false; - return (xPointState->getPropertyState( C2U("Color")) != beans::PropertyState_DEFAULT_VALUE ); + return (xPointState->getPropertyState( "Color") != beans::PropertyState_DEFAULT_VALUE ); } return false; @@ -69,7 +69,7 @@ bool ColorPerPointHelper::hasPointOwnProperties( if( xSeriesProperties.is() ) { uno::Sequence< sal_Int32 > aIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aIndexList ) { const sal_Int32 * pBegIt = aIndexList.getConstArray(); const sal_Int32 * pEndIt = pBegIt + aIndexList.getLength(); diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index ba90ac631571..6167490401cb 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -73,7 +73,7 @@ private: }; ChartConfigItem::ChartConfigItem( ConfigItemListener & rListener ) : - ::utl::ConfigItem( C2U("Office.Chart/DefaultColor")), + ::utl::ConfigItem( "Office.Chart/DefaultColor"), m_rListener( rListener ) {} @@ -180,13 +180,13 @@ void ConfigColorScheme::notify( const OUString & rPropertyName ) Sequence< OUString > ConfigColorScheme::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.ColorScheme" ); + aServices[ 0 ] = "com.sun.star.chart2.ColorScheme"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( ConfigColorScheme, - C2U( "com.sun.star.comp.chart2.ConfigDefaultColorScheme" )) + OUString("com.sun.star.comp.chart2.ConfigDefaultColorScheme") ) // ================================================================================ diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 15ea9151e1e2..ca39c3f92739 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -152,16 +152,16 @@ void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const Reference< chart2:: if( xSeriesProperties.is() ) { DataPointLabel aLabelAtSeries; - xSeriesProperties->getPropertyValue( C2U( "Label" ) ) >>= aLabelAtSeries; + xSeriesProperties->getPropertyValue( "Label" ) >>= aLabelAtSeries; aLabelAtSeries.ShowNumber = bInsert; if( !bInsert ) { aLabelAtSeries.ShowNumberInPercent = false; aLabelAtSeries.ShowCategoryName = false; } - xSeriesProperties->setPropertyValue( C2U( "Label" ), uno::makeAny( aLabelAtSeries ) ); + xSeriesProperties->setPropertyValue( "Label", uno::makeAny( aLabelAtSeries ) ); uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { @@ -169,14 +169,14 @@ void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const Reference< chart2:: if( xPointProp.is() ) { DataPointLabel aLabel; - xPointProp->getPropertyValue( C2U( "Label" ) ) >>= aLabel; + xPointProp->getPropertyValue( "Label" ) >>= aLabel; aLabel.ShowNumber = bInsert; if( !bInsert ) { aLabel.ShowNumberInPercent = false; aLabel.ShowCategoryName = false; } - xPointProp->setPropertyValue( C2U( "Label" ), uno::makeAny( aLabel ) ); + xPointProp->setPropertyValue( "Label", uno::makeAny( aLabel ) ); } } } @@ -204,7 +204,7 @@ OUString GetRole( const uno::Reference< chart2::data::XLabeledDataSequence >& xL { Reference< beans::XPropertySet > xProp( xLabeledDataSequence->getValues(), uno::UNO_QUERY ); if( xProp.is() ) - xProp->getPropertyValue( C2U("Role") ) >>= aRet; + xProp->getPropertyValue( "Role" ) >>= aRet; } return aRet; } @@ -408,7 +408,7 @@ void setStackModeAtSeries( xProp->setPropertyValue( aPropName, aPropValue ); sal_Int32 nAxisIndex; - xProp->getPropertyValue( C2U("AttachedAxisIndex") ) >>= nAxisIndex; + xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nAxisIndex; aAxisIndexSet.insert(nAxisIndex); } } @@ -460,7 +460,7 @@ sal_Int32 getAttachedAxisIndex( const Reference< chart2::XDataSeries > & xSeries Reference< beans::XPropertySet > xProp( xSeries, uno::UNO_QUERY ); if( xProp.is() ) { - xProp->getPropertyValue( C2U("AttachedAxisIndex") ) >>= nRet; + xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nRet; } } catch( const uno::Exception & ex ) @@ -484,7 +484,7 @@ sal_Int32 getNumberFormatKeyFromAxis( Reference< beans::XPropertySet > xAxisProp( xCorrespondingCoordinateSystem->getAxisByDimension( nDimensionIndex, nAxisIndex ), uno::UNO_QUERY ); if( xAxisProp.is()) - xAxisProp->getPropertyValue( C2U("NumberFormat")) >>= nResult; + xAxisProp->getPropertyValue( "NumberFormat") >>= nResult; } catch( const uno::Exception & ex ) { @@ -546,7 +546,7 @@ void switchSymbolsOnOrOff( const Reference< beans::XPropertySet > & xSeriesPrope return; chart2::Symbol aSymbProp; - if( (xSeriesProperties->getPropertyValue( C2U( "Symbol" )) >>= aSymbProp ) ) + if( (xSeriesProperties->getPropertyValue( "Symbol") >>= aSymbProp ) ) { if( !bSymbolsOn ) aSymbProp.Style = chart2::SymbolStyle_NONE; @@ -555,7 +555,7 @@ void switchSymbolsOnOrOff( const Reference< beans::XPropertySet > & xSeriesPrope aSymbProp.Style = chart2::SymbolStyle_STANDARD; aSymbProp.StandardSymbol = nSeriesIndex; } - xSeriesProperties->setPropertyValue( C2U( "Symbol" ), uno::makeAny( aSymbProp )); + xSeriesProperties->setPropertyValue( "Symbol", uno::makeAny( aSymbProp )); } //todo: check attributed data points } @@ -569,14 +569,14 @@ void switchLinesOnOrOff( const Reference< beans::XPropertySet > & xSeriesPropert { // keep line-styles that are not NONE drawing::LineStyle eLineStyle; - if( (xSeriesProperties->getPropertyValue( C2U( "LineStyle" )) >>= eLineStyle ) && + if( (xSeriesProperties->getPropertyValue( "LineStyle") >>= eLineStyle ) && eLineStyle == drawing::LineStyle_NONE ) { - xSeriesProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ) ); + xSeriesProperties->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_SOLID ) ); } } else - xSeriesProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + xSeriesProperties->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } void makeLinesThickOrThin( const Reference< beans::XPropertySet > & xSeriesProperties, bool bThick ) @@ -586,11 +586,11 @@ void makeLinesThickOrThin( const Reference< beans::XPropertySet > & xSeriesPrope sal_Int32 nNewValue = bThick ? 80 : 0; sal_Int32 nOldValue = 0; - if( (xSeriesProperties->getPropertyValue( C2U( "LineWidth" )) >>= nOldValue ) && + if( (xSeriesProperties->getPropertyValue( "LineWidth") >>= nOldValue ) && nOldValue != nNewValue ) { if( !(bThick && nOldValue>0)) - xSeriesProperties->setPropertyValue( C2U( "LineWidth" ), uno::makeAny( nNewValue ) ); + xSeriesProperties->setPropertyValue( "LineWidth", uno::makeAny( nNewValue ) ); } } @@ -603,7 +603,7 @@ void setPropertyAlsoToAllAttributedDataPoints( const Reference< chart2::XDataSer xSeriesProperties->setPropertyValue( rPropertyName, rPropertyValue ); uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { @@ -623,7 +623,7 @@ bool hasAttributedDataPointDifferentValue( const Reference< chart2::XDataSeries return false; uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { @@ -689,7 +689,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque uno::Sequence< sal_Int32 > aHiddenValues; try { - xProp->getPropertyValue( C2U( "HiddenValues" ) ) >>= aHiddenValues; + xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenValues; if( !aHiddenValues.getLength() ) return true; } @@ -743,7 +743,7 @@ sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Refere if( xProp.is()) { Sequence<sal_Int32> aHiddenIndicesSeq; - xProp->getPropertyValue( C2U("HiddenValues") ) >>= aHiddenIndicesSeq; + xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenIndicesSeq; if( aHiddenIndicesSeq.getLength() ) { ::std::vector< sal_Int32 > aHiddenIndices( ContainerHelper::SequenceToVector( aHiddenIndicesSeq ) ); @@ -775,7 +775,7 @@ bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries ) if( xProp.is() ) { DataPointLabel aLabel; - if( (xProp->getPropertyValue( C2U( "Label" ) ) >>= aLabel) ) + if( (xProp->getPropertyValue( "Label" ) >>= aLabel) ) bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName; } } @@ -795,7 +795,7 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries ) if( xSeriesProperties.is() ) { uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { @@ -803,7 +803,7 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries ) if( xPointProp.is() ) { DataPointLabel aLabel; - if( (xPointProp->getPropertyValue( C2U( "Label" ) ) >>= aLabel) ) + if( (xPointProp->getPropertyValue( "Label" ) >>= aLabel) ) bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName; if( bRet ) break; @@ -829,7 +829,7 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I if( xSeriesProperties.is() ) { uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProperties->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { ::std::vector< sal_Int32 > aIndices( ContainerHelper::SequenceToVector( aAttributedDataPointIndexList ) ); ::std::vector< sal_Int32 >::iterator aIt = ::std::find( aIndices.begin(), aIndices.end(), nPointIndex ); @@ -841,7 +841,7 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I if( xProp.is() ) { DataPointLabel aLabel; - if( (xProp->getPropertyValue( C2U( "Label" ) ) >>= aLabel) ) + if( (xProp->getPropertyValue( "Label" ) >>= aLabel) ) bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName; } } @@ -871,9 +871,9 @@ void insertDataLabelToPoint( const Reference< beans::XPropertySet >& xPointProp if( xPointProp.is() ) { DataPointLabel aLabel; - xPointProp->getPropertyValue( C2U( "Label" ) ) >>= aLabel; + xPointProp->getPropertyValue( "Label" ) >>= aLabel; aLabel.ShowNumber = true; - xPointProp->setPropertyValue( C2U( "Label" ), uno::makeAny( aLabel ) ); + xPointProp->setPropertyValue( "Label", uno::makeAny( aLabel ) ); } } catch(const uno::Exception &e) @@ -889,11 +889,11 @@ void deleteDataLabelsFromPoint( const Reference< beans::XPropertySet >& xPointPr if( xPointProp.is() ) { DataPointLabel aLabel; - xPointProp->getPropertyValue( C2U( "Label" ) ) >>= aLabel; + xPointProp->getPropertyValue( "Label" ) >>= aLabel; aLabel.ShowNumber = false; aLabel.ShowNumberInPercent = false; aLabel.ShowCategoryName = false; - xPointProp->setPropertyValue( C2U( "Label" ), uno::makeAny( aLabel ) ); + xPointProp->setPropertyValue( "Label", uno::makeAny( aLabel ) ); } } catch(const uno::Exception &e) diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx index cf905481bb3a..cef1dc179d89 100644 --- a/chart2/source/tools/DataSourceHelper.cxx +++ b/chart2/source/tools/DataSourceHelper.cxx @@ -85,11 +85,11 @@ void lcl_addErrorBarRanges( try { uno::Reference< beans::XPropertySet > xErrorBarProp; - if( ( xSeriesProp->getPropertyValue( C2U("ErrorBarY")) >>= xErrorBarProp ) && + if( ( xSeriesProp->getPropertyValue( "ErrorBarY") >>= xErrorBarProp ) && xErrorBarProp.is()) { sal_Int32 eStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; - if( ( xErrorBarProp->getPropertyValue( C2U("ErrorBarStyle")) >>= eStyle ) && + if( ( xErrorBarProp->getPropertyValue( "ErrorBarStyle") >>= eStyle ) && eStyle == ::com::sun::star::chart::ErrorBarStyle::FROM_DATA ) { uno::Reference< data::XDataSource > xErrorBarDataSource( xErrorBarProp, uno::UNO_QUERY ); @@ -161,13 +161,13 @@ uno::Sequence< beans::PropertyValue > DataSourceHelper::createArguments( eRowSource = ::com::sun::star::chart::ChartDataRowSource_COLUMNS; uno::Sequence< beans::PropertyValue > aArguments(3); - aArguments[0] = beans::PropertyValue( C2U("DataRowSource") + aArguments[0] = beans::PropertyValue( "DataRowSource" , -1, uno::makeAny( eRowSource ) , beans::PropertyState_DIRECT_VALUE ); - aArguments[1] = beans::PropertyValue( C2U("FirstCellAsLabel") + aArguments[1] = beans::PropertyValue( "FirstCellAsLabel" , -1, uno::makeAny( bFirstCellAsLabel ) , beans::PropertyState_DIRECT_VALUE ); - aArguments[2] = beans::PropertyValue( C2U("HasCategories") + aArguments[2] = beans::PropertyValue( "HasCategories" , -1, uno::makeAny( bHasCategories ) , beans::PropertyState_DIRECT_VALUE ); @@ -182,14 +182,14 @@ uno::Sequence< beans::PropertyValue > DataSourceHelper::createArguments( uno::Sequence< beans::PropertyValue > aArguments( createArguments( bUseColumns, bFirstCellAsLabel, bHasCategories )); aArguments.realloc( aArguments.getLength() + 1 ); aArguments[aArguments.getLength() - 1] = - beans::PropertyValue( C2U("CellRangeRepresentation") + beans::PropertyValue( "CellRangeRepresentation" , -1, uno::makeAny( rRangeRepresentation ) , beans::PropertyState_DIRECT_VALUE ); if( rSequenceMapping.getLength() ) { aArguments.realloc( aArguments.getLength() + 1 ); aArguments[aArguments.getLength() - 1] = - beans::PropertyValue( C2U("SequenceMapping") + beans::PropertyValue( "SequenceMapping" , -1, uno::makeAny( rSequenceMapping ) , beans::PropertyState_DIRECT_VALUE ); } @@ -251,7 +251,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR //the first x-values is always the next sequence //todo ... other x-values get lost for old format Reference< chart2::data::XLabeledDataSequence > xXValues( - DataSeriesHelper::getDataSequenceByRole( xSeriesSource, C2U("values-x") ) ); + DataSeriesHelper::getDataSequenceByRole( xSeriesSource, "values-x" ) ); if( xXValues.is() ) aResultVector.push_back( xXValues ); @@ -259,7 +259,7 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR for( sal_Int32 nN=0; nN<aDataSeqences.getLength(); nN++ ) { OUString aRole( DataSeriesHelper::GetRole( aDataSeqences[nN] ) ); - if( !aRole.equals(C2U("values-x")) ) + if( !aRole.equals("values-x") ) aResultVector.push_back( aDataSeqences[nN] ); } diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index 6d2fcb82b74c..0da667653051 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -150,12 +150,12 @@ void DiagramHelper::setVertical( if( xProp.is() ) { bool bOldSwap = sal_False; - if( !(xProp->getPropertyValue( C2U("SwapXAndYAxis") ) >>= bOldSwap) + if( !(xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bOldSwap) || bVertical != bOldSwap ) bChanged = true; if( bChanged ) - xProp->setPropertyValue( C2U("SwapXAndYAxis"), aValue ); + xProp->setPropertyValue( "SwapXAndYAxis", aValue ); } if( xCooSys.is() ) { @@ -179,7 +179,7 @@ void DiagramHelper::setVertical( if( !xTitleProps.is() ) continue; double fAngleDegree = 0.0; - xTitleProps->getPropertyValue( C2U( "TextRotation" ) ) >>= fAngleDegree; + xTitleProps->getPropertyValue( "TextRotation" ) >>= fAngleDegree; if( !::rtl::math::approxEqual( fAngleDegree, 0.0 ) && !::rtl::math::approxEqual( fAngleDegree, 90.0 ) ) continue; @@ -190,7 +190,7 @@ void DiagramHelper::setVertical( else if( bVertical && nDimIndex == 0 ) fNewAngleDegree = 90.0; - xTitleProps->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fNewAngleDegree )); + xTitleProps->setPropertyValue( "TextRotation", uno::makeAny( fNewAngleDegree )); } } } @@ -224,7 +224,7 @@ bool DiagramHelper::getVertical( const uno::Reference< chart2::XDiagram > & xDia if( xProp.is()) { bool bCurrent = false; - if( xProp->getPropertyValue( C2U("SwapXAndYAxis") ) >>= bCurrent ) + if( xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bCurrent ) { if( !rbFound ) { @@ -323,7 +323,7 @@ void DiagramHelper::setStackMode( { Reference< beans::XPropertySet > xProp( aSeriesList[nS], uno::UNO_QUERY ); if(xProp.is()) - xProp->setPropertyValue( C2U( "StackingDirection" ), aNewDirection ); + xProp->setPropertyValue( "StackingDirection", aNewDirection ); } } } @@ -402,7 +402,7 @@ StackMode DiagramHelper::getStackModeFromChartType( Reference< beans::XPropertySet > xProp( aSeries[i], uno::UNO_QUERY_THROW ); chart2::StackingDirection eCurrentDirection = eCommonDirection; // property is not MAYBEVOID - bool bSuccess = ( xProp->getPropertyValue( C2U("StackingDirection") ) >>= eCurrentDirection ); + bool bSuccess = ( xProp->getPropertyValue( "StackingDirection" ) >>= eCurrentDirection ); OSL_ASSERT( bSuccess ); (void)(bSuccess); // avoid warning in non-debug builds if( ! bDirectionInitialized ) @@ -613,7 +613,7 @@ bool DiagramHelper::attachSeriesToAxis( bool bAttachToMainAxis { try { - xProp->setPropertyValue( C2U("AttachedAxisIndex"), uno::makeAny( nNewAxisIndex ) ); + xProp->setPropertyValue( "AttachedAxisIndex", uno::makeAny( nNewAxisIndex ) ); bChanged = true; } catch( const uno::Exception & ex ) @@ -935,7 +935,7 @@ Reference< data::XLabeledDataSequence > { try { - xProp->setPropertyValue( C2U( "Role" ), uno::makeAny( C2U("categories") ) ); + xProp->setPropertyValue( "Role", uno::makeAny( OUString("categories") ) ); } catch( const uno::Exception & ex ) { @@ -1059,7 +1059,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c if( xAxisProps.is() && xNumberFormatsSupplier.is() ) { sal_Int32 nNumberFormat = -1; - xAxisProps->getPropertyValue( C2U("NumberFormat") ) >>= nNumberFormat; + xAxisProps->getPropertyValue( "NumberFormat" ) >>= nNumberFormat; Reference< util::XNumberFormats > xNumberFormats = Reference< util::XNumberFormats >( xNumberFormatsSupplier->getNumberFormats() ); if( xNumberFormats.is() ) @@ -1075,7 +1075,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c } sal_Int32 nType = util::NumberFormat::UNDEFINED; if( xKeyProps.is() ) - xKeyProps->getPropertyValue( C2U("Type") ) >>= nType; + xKeyProps->getPropertyValue( "Type" ) >>= nType; if( !( nType & util::NumberFormat::DATE ) ) { //set a date format to the axis @@ -1084,7 +1084,7 @@ void lcl_switchToDateCategories( const Reference< XChartDocument >& xChartDoc, c Sequence<sal_Int32> aKeySeq = xNumberFormats->queryKeys( util::NumberFormat::DATE, rLocaleDataWrapper.getLanguageTag().getLocale(), bCreate ); if( aKeySeq.getLength() ) { - xAxisProps->setPropertyValue( C2U("NumberFormat"), uno::makeAny(aKeySeq[0]) ); + xAxisProps->setPropertyValue( "NumberFormat", uno::makeAny(aKeySeq[0]) ); } } } @@ -1161,7 +1161,7 @@ bool DiagramHelper::isDateNumberFormat( sal_Int32 nNumberFormat, const Reference if( xKeyProps.is() ) { sal_Int32 nType = util::NumberFormat::UNDEFINED; - xKeyProps->getPropertyValue( C2U("Type") ) >>= nType; + xKeyProps->getPropertyValue( "Type" ) >>= nType; bIsDate = nType & util::NumberFormat::DATE; } return bIsDate; @@ -1522,7 +1522,7 @@ sal_Int32 DiagramHelper::getGeometry3D( { sal_Int32 nGeom = 0; Reference< beans::XPropertySet > xProp( *aIt, uno::UNO_QUERY_THROW ); - if( xProp->getPropertyValue( C2U( "Geometry3D" )) >>= nGeom ) + if( xProp->getPropertyValue( "Geometry3D") >>= nGeom ) { if( ! rbFound ) { @@ -1558,7 +1558,7 @@ void DiagramHelper::setGeometry3D( aSeriesVec.begin(); aIt != aSeriesVec.end(); ++aIt ) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( - *aIt, C2U( "Geometry3D" ), uno::makeAny( nNewGeometry )); + *aIt, "Geometry3D", uno::makeAny( nNewGeometry )); } } @@ -1571,7 +1571,7 @@ sal_Int32 DiagramHelper::getCorrectedMissingValueTreatment( ChartTypeHelper::getSupportedMissingValueTreatments( xChartType ) ); uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY ); - if( xDiaProp.is() && (xDiaProp->getPropertyValue( C2U( "MissingValueTreatment" ) ) >>= nResult) ) + if( xDiaProp.is() && (xDiaProp->getPropertyValue( "MissingValueTreatment" ) >>= nResult) ) { //ensure that the set value is supported by this charttype for( sal_Int32 nN = 0; nN < aAvailableMissingValueTreatments.getLength(); nN++ ) @@ -1598,11 +1598,11 @@ DiagramPositioningMode DiagramHelper::getDiagramPositioningMode( const uno::Refe { RelativePosition aRelPos; RelativeSize aRelSize; - if( (xDiaProps->getPropertyValue(C2U("RelativePosition")) >>= aRelPos ) && - (xDiaProps->getPropertyValue(C2U("RelativeSize")) >>= aRelSize ) ) + if( (xDiaProps->getPropertyValue("RelativePosition") >>= aRelPos ) && + (xDiaProps->getPropertyValue("RelativeSize") >>= aRelSize ) ) { bool bPosSizeExcludeAxes=false; - xDiaProps->getPropertyValue(C2U("PosSizeExcludeAxes")) >>= bPosSizeExcludeAxes; + xDiaProps->getPropertyValue("PosSizeExcludeAxes") >>= bPosSizeExcludeAxes; if( bPosSizeExcludeAxes ) eMode = DiagramPositioningMode_EXCLUDING; else @@ -1633,8 +1633,8 @@ bool DiagramHelper::setDiagramPositioning( const uno::Reference< frame::XModel > RelativePosition aOldPos; RelativeSize aOldSize; - xDiaProps->getPropertyValue(C2U("RelativePosition") ) >>= aOldPos; - xDiaProps->getPropertyValue(C2U("RelativeSize") ) >>= aOldSize; + xDiaProps->getPropertyValue("RelativePosition" ) >>= aOldPos; + xDiaProps->getPropertyValue("RelativeSize" ) >>= aOldSize; RelativePosition aNewPos; aNewPos.Anchor = drawing::Alignment_TOP_LEFT; @@ -1654,8 +1654,8 @@ bool DiagramHelper::setDiagramPositioning( const uno::Reference< frame::XModel > if( (aNewPos.Secondary + aNewSize.Secondary) > 1.0 ) aNewPos.Secondary = 1.0 - aNewSize.Secondary; - xDiaProps->setPropertyValue( C2U( "RelativePosition" ), uno::makeAny(aNewPos) ); - xDiaProps->setPropertyValue( C2U( "RelativeSize" ), uno::makeAny(aNewSize) ); + xDiaProps->setPropertyValue( "RelativePosition", uno::makeAny(aNewPos) ); + xDiaProps->setPropertyValue( "RelativeSize", uno::makeAny(aNewSize) ); bChanged = (aOldPos.Anchor!=aNewPos.Anchor) || (aOldPos.Primary!=aNewPos.Primary) || @@ -1677,8 +1677,8 @@ awt::Rectangle DiagramHelper::getDiagramRectangleFromModel( const uno::Reference RelativePosition aRelPos; RelativeSize aRelSize; - xDiaProps->getPropertyValue(C2U("RelativePosition") ) >>= aRelPos; - xDiaProps->getPropertyValue(C2U("RelativeSize") ) >>= aRelSize; + xDiaProps->getPropertyValue("RelativePosition" ) >>= aRelPos; + xDiaProps->getPropertyValue("RelativeSize" ) >>= aRelSize; awt::Size aAbsSize( static_cast< sal_Int32 >( aRelSize.Primary * aPageSize.Width ), diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index 96e000c3f6aa..b9515b222862 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -57,40 +57,40 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "ErrorBarStyle" ), + Property( "ErrorBarStyle", PROP_ERROR_BAR_STYLE, ::getCppuType( reinterpret_cast< sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "PositiveError" ), + Property( "PositiveError", PROP_ERROR_BAR_POS_ERROR, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "NegativeError" ), + Property( "NegativeError", PROP_ERROR_BAR_NEG_ERROR, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "Weight" ), + Property( "Weight", PROP_ERROR_BAR_WEIGHT, ::getCppuType( reinterpret_cast< const double * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ShowPositiveError" ), + Property( "ShowPositiveError", PROP_ERROR_BAR_SHOW_POS_ERROR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ShowNegativeError" ), + Property( "ShowNegativeError", PROP_ERROR_BAR_SHOW_NEG_ERROR, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -332,7 +332,7 @@ uno::Sequence< ::rtl::OUString > ErrorBar::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ErrorBar" ); + aServices[ 1 ] = "com.sun.star.chart2.ErrorBar"; return aServices; } diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx index e3d800f1b1f8..b1a52555b8e0 100644 --- a/chart2/source/tools/ExplicitCategoriesProvider.cxx +++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx @@ -383,7 +383,7 @@ Sequence< OUString > lcl_getExplicitSimpleCategories( { aRet.realloc(nMaxCategoryCount); aOuterEnd = aComplexCatsPerIndex.end(); - OUString aSpace(C2U(" ")); + OUString aSpace(" "); for(sal_Int32 nN=0; nN<nMaxCategoryCount; nN++) { OUString aText; @@ -445,7 +445,7 @@ bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >& xDataS bOwnData = true; Reference< beans::XPropertySet > xAxisProps( xCooSysModel->getAxisByDimension(0,0), uno::UNO_QUERY ); sal_Int32 nAxisNumberFormat = 0; - if( xAxisProps.is() && (xAxisProps->getPropertyValue( C2U("NumberFormat") ) >>= nAxisNumberFormat) ) + if( xAxisProps.is() && (xAxisProps->getPropertyValue( "NumberFormat" ) >>= nAxisNumberFormat) ) { bOwnDataAnddAxisHasAnyFormat = true; bOwnDataAnddAxisHasDateFormat = DiagramHelper::isDateNumberFormat( nAxisNumberFormat, xNumberFormats ); diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx index 64ed951f2f74..75e66ce52a32 100644 --- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx @@ -143,42 +143,42 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation( bool bHasSlope = !rtl::math::approxEqual( fSlope, 1.0 ); bool bHasIntercept = !rtl::math::approxEqual( fIntercept, 1.0 ); - OUStringBuffer aBuf( C2U( "f(x) = " )); + OUStringBuffer aBuf( "f(x) = "); if ( fIntercept == 0.0) { // underflow, a true zero is impossible - aBuf.append( C2U( "exp( " )); + aBuf.append( "exp( "); aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) ); - aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " )); + aBuf.append( (m_fLogSlope < 0.0) ? " - " : " + "); aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) ); - aBuf.append( C2U( " x )" )); + aBuf.append( " x )"); } else { if (bHasIntercept) { aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept) ); - aBuf.append( C2U( " exp( " )); + aBuf.append( " exp( "); aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogSlope) ); - aBuf.append( C2U( " x )" )); + aBuf.append( " x )"); } else { // show logarithmic output, if intercept and slope both are near one // otherwise drop output of intercept, which is 1 here - aBuf.append( C2U( " exp( " )); + aBuf.append( " exp( "); if (!bHasSlope) { aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) ); - aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " )); + aBuf.append( (m_fLogSlope < 0.0) ? " - " : " + "); aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) ); } else { aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogSlope) ); } - aBuf.append( C2U( " x )" )); + aBuf.append( " x )"); } } diff --git a/chart2/source/tools/FillProperties.cxx b/chart2/source/tools/FillProperties.cxx index e6f6f716500a..64b822edd314 100644 --- a/chart2/source/tools/FillProperties.cxx +++ b/chart2/source/tools/FillProperties.cxx @@ -37,14 +37,14 @@ namespace void lcl_AddPropertiesToVector_without_BitmapProperties( ::std::vector< ::com::sun::star::beans::Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "FillStyle" ), + Property( "FillStyle", FillProperties::PROP_FILL_STYLE, ::getCppuType( reinterpret_cast< const drawing::FillStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillColor" ), + Property( "FillColor", FillProperties::PROP_FILL_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -52,14 +52,14 @@ void lcl_AddPropertiesToVector_without_BitmapProperties( ::std::vector< ::com::s | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillTransparence" ), + Property( "FillTransparence", FillProperties::PROP_FILL_TRANSPARENCE, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillTransparenceGradientName" ), + Property( "FillTransparenceGradientName", FillProperties::PROP_FILL_TRANSPARENCE_GRADIENT_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -67,7 +67,7 @@ void lcl_AddPropertiesToVector_without_BitmapProperties( ::std::vector< ::com::s | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillGradientName" ), + Property( "FillGradientName", FillProperties::PROP_FILL_GRADIENT_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -75,14 +75,14 @@ void lcl_AddPropertiesToVector_without_BitmapProperties( ::std::vector< ::com::s | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - beans::Property( C2U( "FillGradientStepCount" ), + beans::Property( "FillGradientStepCount", FillProperties::PROP_FILL_GRADIENT_STEPCOUNT, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "FillHatchName" ), + Property( "FillHatchName", FillProperties::PROP_FILL_HATCH_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -92,7 +92,7 @@ void lcl_AddPropertiesToVector_without_BitmapProperties( ::std::vector< ::com::s //bitmap properties see lcl_AddPropertiesToVector_only_BitmapProperties() rOutProperties.push_back( - Property( C2U( "FillBackground" ), + Property( "FillBackground", FillProperties::PROP_FILL_BACKGROUND, ::getCppuType( reinterpret_cast< const sal_Bool * >(0)), beans::PropertyAttribute::BOUND @@ -102,7 +102,7 @@ void lcl_AddPropertiesToVector_without_BitmapProperties( ::std::vector< ::com::s void lcl_AddPropertiesToVector_only_BitmapProperties( ::std::vector< ::com::sun::star::beans::Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "FillBitmapName" ), + Property( "FillBitmapName", FillProperties::PROP_FILL_BITMAP_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -110,28 +110,28 @@ void lcl_AddPropertiesToVector_only_BitmapProperties( ::std::vector< ::com::sun: | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapOffsetX" ), + Property( "FillBitmapOffsetX", FillProperties::PROP_FILL_BITMAP_OFFSETX, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapOffsetY" ), + Property( "FillBitmapOffsetY", FillProperties::PROP_FILL_BITMAP_OFFSETY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapPositionOffsetX" ), + Property( "FillBitmapPositionOffsetX", FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETX, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapPositionOffsetY" ), + Property( "FillBitmapPositionOffsetY", FillProperties::PROP_FILL_BITMAP_POSITION_OFFSETY, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND @@ -139,35 +139,35 @@ void lcl_AddPropertiesToVector_only_BitmapProperties( ::std::vector< ::com::sun: rOutProperties.push_back( - Property( C2U( "FillBitmapRectanglePoint" ), + Property( "FillBitmapRectanglePoint", FillProperties::PROP_FILL_BITMAP_RECTANGLEPOINT, ::getCppuType( reinterpret_cast< const drawing::RectanglePoint * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapLogicalSize" ), + Property( "FillBitmapLogicalSize", FillProperties::PROP_FILL_BITMAP_LOGICALSIZE, ::getCppuType( reinterpret_cast< const sal_Bool * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapSizeX" ), + Property( "FillBitmapSizeX", FillProperties::PROP_FILL_BITMAP_SIZEX, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapSizeY" ), + Property( "FillBitmapSizeY", FillProperties::PROP_FILL_BITMAP_SIZEY, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "FillBitmapMode" ), + Property( "FillBitmapMode", FillProperties::PROP_FILL_BITMAP_MODE, ::getCppuType( reinterpret_cast< const drawing::BitmapMode * >(0)), beans::PropertyAttribute::BOUND diff --git a/chart2/source/tools/FormattedStringHelper.cxx b/chart2/source/tools/FormattedStringHelper.cxx index 71fafe4f5440..43593bcd49f7 100644 --- a/chart2/source/tools/FormattedStringHelper.cxx +++ b/chart2/source/tools/FormattedStringHelper.cxx @@ -46,7 +46,7 @@ Sequence< Reference< chart2::XFormattedString > > { xFormStr.set( xContext->getServiceManager()->createInstanceWithContext( - C2U("com.sun.star.chart2.FormattedString"), xContext ), + "com.sun.star.chart2.FormattedString", xContext ), uno::UNO_QUERY_THROW ); xFormStr->setString( rString ); diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx index a60706481a7f..c7458c75e463 100644 --- a/chart2/source/tools/InternalData.cxx +++ b/chart2/source/tools/InternalData.cxx @@ -107,12 +107,12 @@ void InternalData::createDefaultData() m_aRowLabels.clear(); m_aRowLabels.reserve( m_nRowCount ); generate_n( back_inserter( m_aRowLabels ), m_nRowCount, - lcl_NumberedStringGenerator( aRowName, C2U("%ROWNUMBER") )); + lcl_NumberedStringGenerator( aRowName, "%ROWNUMBER" )); m_aColumnLabels.clear(); m_aColumnLabels.reserve( m_nColumnCount ); generate_n( back_inserter( m_aColumnLabels ), m_nColumnCount, - lcl_NumberedStringGenerator( aColName, C2U("%COLUMNNUMBER") )); + lcl_NumberedStringGenerator( aColName, "%COLUMNNUMBER" )); } bool InternalData::isDefaultData() diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 2ce54495a804..4c9b4030d4e9 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -714,19 +714,19 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments( { Sequence< beans::PropertyValue > aArguments( 4 ); aArguments[0] = beans::PropertyValue( - C2U("CellRangeRepresentation"), -1, uno::makeAny( lcl_aCompleteRange ), + "CellRangeRepresentation", -1, uno::makeAny( lcl_aCompleteRange ), beans::PropertyState_DIRECT_VALUE ); aArguments[1] = beans::PropertyValue( - C2U("DataRowSource"), -1, uno::makeAny( + "DataRowSource", -1, uno::makeAny( m_bDataInColumns ? ::com::sun::star::chart::ChartDataRowSource_COLUMNS : ::com::sun::star::chart::ChartDataRowSource_ROWS ), beans::PropertyState_DIRECT_VALUE ); // internal data always contains labels and categories aArguments[2] = beans::PropertyValue( - C2U("FirstCellAsLabel"), -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); + "FirstCellAsLabel", -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); aArguments[3] = beans::PropertyValue( - C2U("HasCategories"), -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); + "HasCategories", -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); // #i85913# Sequence Mapping is not needed for internal data, as it is // applied to the data when the data source is created. @@ -1038,7 +1038,7 @@ void SAL_CALL InternalDataProvider::insertDataPointForAllSequences( ::sal_Int32 } // notify change to all affected ranges - tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( C2U("0"))); + tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( "0")); tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep ))); ::std::for_each( aBegin, aEnd, lcl_setModified()); @@ -1062,7 +1062,7 @@ void SAL_CALL InternalDataProvider::deleteDataPointForAllSequences( ::sal_Int32 } // notify change to all affected ranges - tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( C2U("0"))); + tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( "0")); tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep ))); ::std::for_each( aBegin, aEnd, lcl_setModified()); @@ -1082,7 +1082,7 @@ void SAL_CALL InternalDataProvider::swapDataPointWithNextOneForAllSequences( ::s : m_aInternalData.getRowCount()); // notify change to all affected ranges - tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( C2U("0"))); + tSequenceMap::const_iterator aBegin( m_aSequenceMap.lower_bound( "0")); tSequenceMap::const_iterator aEnd( m_aSequenceMap.upper_bound( OUString::valueOf( nMaxRep ))); ::std::for_each( aBegin, aEnd, lcl_setModified()); diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx index 5b214a251295..a7ac13fb9b15 100644 --- a/chart2/source/tools/LabeledDataSequence.cxx +++ b/chart2/source/tools/LabeledDataSequence.cxx @@ -156,13 +156,13 @@ void SAL_CALL LabeledDataSequence::removeModifyListener( const Reference< util:: Sequence< OUString > LabeledDataSequence::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = C2U( "com.sun.star.chart2.data.LabeledDataSequence" ); + aServices[ 0 ] = "com.sun.star.chart2.data.LabeledDataSequence"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static APPHELPER_XSERVICEINFO_IMPL( LabeledDataSequence, - C2U( "com.sun.star.comp.chart2.LabeledDataSequence" )) + OUString("com.sun.star.comp.chart2.LabeledDataSequence") ) // ================================================================================ diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx index 540a6a190aba..f636dc0e3400 100644 --- a/chart2/source/tools/LegendHelper.cxx +++ b/chart2/source/tools/LegendHelper.cxx @@ -42,24 +42,24 @@ Reference< chart2::XLegend > LegendHelper::showLegend( const Reference< frame::X uno::Reference< beans::XPropertySet > xProp( xLegend, uno::UNO_QUERY ); if( xProp.is()) { - xProp->setPropertyValue( C2U("Show"), uno::makeAny(sal_True) ); + xProp->setPropertyValue( "Show", uno::makeAny(sal_True) ); chart2::RelativePosition aRelativePosition; - if( !(xProp->getPropertyValue( C2U( "RelativePosition" )) >>= aRelativePosition) ) + if( !(xProp->getPropertyValue( "RelativePosition") >>= aRelativePosition) ) { chart2::LegendPosition ePos = chart2::LegendPosition_LINE_END; - if( !(xProp->getPropertyValue( C2U( "AnchorPosition" )) >>= ePos ) ) - xProp->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( ePos )); + if( !(xProp->getPropertyValue( "AnchorPosition") >>= ePos ) ) + xProp->setPropertyValue( "AnchorPosition", uno::makeAny( ePos )); ::com::sun::star::chart::ChartLegendExpansion eExpansion = ( ePos == chart2::LegendPosition_LINE_END || ePos == chart2::LegendPosition_LINE_START ) ? ::com::sun::star::chart::ChartLegendExpansion_HIGH : ::com::sun::star::chart::ChartLegendExpansion_WIDE; - if( !(xProp->getPropertyValue( C2U( "Expansion" )) >>= eExpansion ) ) - xProp->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eExpansion )); + if( !(xProp->getPropertyValue( "Expansion") >>= eExpansion ) ) + xProp->setPropertyValue( "Expansion", uno::makeAny( eExpansion )); - xProp->setPropertyValue( C2U( "RelativePosition" ), uno::Any()); + xProp->setPropertyValue( "RelativePosition", uno::Any()); } } @@ -72,7 +72,7 @@ void LegendHelper::hideLegend( const Reference< frame::XModel >& xModel ) uno::Reference< beans::XPropertySet > xProp( xLegend, uno::UNO_QUERY ); if( xProp.is()) { - xProp->setPropertyValue( C2U("Show"), uno::makeAny(sal_False) ); + xProp->setPropertyValue( "Show", uno::makeAny(sal_False) ); } } @@ -95,7 +95,7 @@ uno::Reference< chart2::XLegend > LegendHelper::getLegend( if( bCreate && !xResult.is() && xContext.is() ) { xResult.set( xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.Legend" ), xContext ), uno::UNO_QUERY ); + "com.sun.star.chart2.Legend", xContext ), uno::UNO_QUERY ); xDia->setLegend( xResult ); } } @@ -120,7 +120,7 @@ bool LegendHelper::hasLegend( const uno::Reference< chart2::XDiagram > & xDiagra { uno::Reference< beans::XPropertySet > xLegendProp( xDiagram->getLegend(), uno::UNO_QUERY ); if( xLegendProp.is()) - xLegendProp->getPropertyValue( C2U("Show")) >>= bReturn; + xLegendProp->getPropertyValue( "Show") >>= bReturn; } return bReturn; diff --git a/chart2/source/tools/LineProperties.cxx b/chart2/source/tools/LineProperties.cxx index 5a78cdaaadef..54de032cf02c 100644 --- a/chart2/source/tools/LineProperties.cxx +++ b/chart2/source/tools/LineProperties.cxx @@ -37,14 +37,14 @@ void LineProperties::AddPropertiesToVector( // Line Properties see service drawing::LineProperties // --------------- rOutProperties.push_back( - Property( C2U( "LineStyle" ), + Property( "LineStyle", PROP_LINE_STYLE, ::getCppuType( reinterpret_cast< const drawing::LineStyle * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LineDash" ), + Property( "LineDash", PROP_LINE_DASH, ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)), beans::PropertyAttribute::BOUND @@ -52,7 +52,7 @@ void LineProperties::AddPropertiesToVector( //not in service description rOutProperties.push_back( - Property( C2U( "LineDashName" ), + Property( "LineDashName", PROP_LINE_DASH_NAME, ::getCppuType( reinterpret_cast< const ::rtl::OUString * >(0)), beans::PropertyAttribute::BOUND @@ -60,28 +60,28 @@ void LineProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "LineColor" ), + Property( "LineColor", PROP_LINE_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LineTransparence" ), + Property( "LineTransparence", PROP_LINE_TRANSPARENCE, ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LineWidth" ), + Property( "LineWidth", PROP_LINE_WIDTH, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "LineJoint" ), + Property( "LineJoint", PROP_LINE_JOINT, ::getCppuType( reinterpret_cast< const drawing::LineJoint * >(0)), beans::PropertyAttribute::BOUND @@ -107,11 +107,11 @@ bool LineProperties::IsLineVisible( const ::com::sun::star::uno::Reference< if( xLineProperties.is() ) { drawing::LineStyle aLineStyle(drawing::LineStyle_SOLID); - xLineProperties->getPropertyValue( C2U( "LineStyle" ) ) >>= aLineStyle; + xLineProperties->getPropertyValue( "LineStyle" ) >>= aLineStyle; if( aLineStyle != drawing::LineStyle_NONE ) { sal_Int16 nLineTransparence=0; - xLineProperties->getPropertyValue( C2U( "LineTransparence" ) ) >>= nLineTransparence; + xLineProperties->getPropertyValue( "LineTransparence" ) >>= nLineTransparence; if(100!=nLineTransparence) { bRet = true; @@ -134,14 +134,14 @@ void LineProperties::SetLineVisible( const ::com::sun::star::uno::Reference< if( xLineProperties.is() ) { drawing::LineStyle aLineStyle(drawing::LineStyle_SOLID); - xLineProperties->getPropertyValue( C2U( "LineStyle" ) ) >>= aLineStyle; + xLineProperties->getPropertyValue( "LineStyle" ) >>= aLineStyle; if( aLineStyle == drawing::LineStyle_NONE ) - xLineProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ) ); + xLineProperties->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_SOLID ) ); sal_Int16 nLineTransparence=0; - xLineProperties->getPropertyValue( C2U( "LineTransparence" ) ) >>= nLineTransparence; + xLineProperties->getPropertyValue( "LineTransparence" ) >>= nLineTransparence; if(100==nLineTransparence) - xLineProperties->setPropertyValue( C2U( "LineTransparence" ), uno::makeAny( sal_Int16(0) ) ); + xLineProperties->setPropertyValue( "LineTransparence", uno::makeAny( sal_Int16(0) ) ); } } catch( const uno::Exception & ex ) @@ -158,9 +158,9 @@ void LineProperties::SetLineInvisible( const ::com::sun::star::uno::Reference< if( xLineProperties.is() ) { drawing::LineStyle aLineStyle(drawing::LineStyle_SOLID); - xLineProperties->getPropertyValue( C2U( "LineStyle" ) ) >>= aLineStyle; + xLineProperties->getPropertyValue( "LineStyle" ) >>= aLineStyle; if( aLineStyle != drawing::LineStyle_NONE ) - xLineProperties->setPropertyValue( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_NONE ) ); + xLineProperties->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE ) ); } } catch( const uno::Exception & ex ) diff --git a/chart2/source/tools/LinearRegressionCurveCalculator.cxx b/chart2/source/tools/LinearRegressionCurveCalculator.cxx index 59083d0f9c8a..f168f63429d3 100644 --- a/chart2/source/tools/LinearRegressionCurveCalculator.cxx +++ b/chart2/source/tools/LinearRegressionCurveCalculator.cxx @@ -126,7 +126,7 @@ OUString LinearRegressionCurveCalculator::ImplGetRepresentation( const uno::Reference< util::XNumberFormatter >& xNumFormatter, ::sal_Int32 nNumberFormatKey ) const { - OUStringBuffer aBuf( C2U( "f(x) = " )); + OUStringBuffer aBuf( "f(x) = "); bool bHaveSlope = false; diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx index 59ef94522ed7..29ea58f996ff 100644 --- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx +++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx @@ -135,7 +135,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation( const uno::Reference< util::XNumberFormatter >& xNumFormatter, ::sal_Int32 nNumberFormatKey ) const { - OUStringBuffer aBuf( C2U( "f(x) = " )); + OUStringBuffer aBuf( "f(x) = "); bool bHaveSlope = false; diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index b1c85c6ba514..358385f059a3 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -51,12 +51,12 @@ using rtl::OUStringBuffer; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; -static OUString m_aMultiClick( C2U("MultiClick") ); -static OUString m_aDragMethodEquals( C2U("DragMethod=") ); -static OUString m_aDragParameterEquals( C2U("DragParameter=") ); -static OUString m_aProtocol( C2U("CID/") ); +static OUString m_aMultiClick( "MultiClick" ); +static OUString m_aDragMethodEquals( "DragMethod=" ); +static OUString m_aDragParameterEquals( "DragParameter=" ); +static OUString m_aProtocol( "CID/" ); static OUString m_aEmptyString; -static OUString m_aPieSegmentDragMethodServiceName( C2U("PieSegmentDraging") ); +static OUString m_aPieSegmentDragMethodServiceName( "PieSegmentDraging" ); namespace { @@ -103,13 +103,13 @@ const tTitleMap& lcl_getTitleMap() { //maps the title type to the ParentParticle for that title static tTitleMap m_aTitleMap = tTitleMap - ( TitleHelper::MAIN_TITLE, C2U("") ) - ( TitleHelper::SUB_TITLE, C2U("D=0") ) - ( TitleHelper::X_AXIS_TITLE, C2U("D=0:CS=0:Axis=0,0") ) - ( TitleHelper::Y_AXIS_TITLE, C2U("D=0:CS=0:Axis=1,0") ) - ( TitleHelper::Z_AXIS_TITLE, C2U("D=0:CS=0:Axis=2,0") ) - ( TitleHelper::SECONDARY_X_AXIS_TITLE, C2U("D=0:CS=0:Axis=0,1") ) - ( TitleHelper::SECONDARY_Y_AXIS_TITLE, C2U("D=0:CS=0:Axis=1,1") ) + ( TitleHelper::MAIN_TITLE, "" ) + ( TitleHelper::SUB_TITLE, "D=0" ) + ( TitleHelper::X_AXIS_TITLE, "D=0:CS=0:Axis=0,0" ) + ( TitleHelper::Y_AXIS_TITLE, "D=0:CS=0:Axis=1,0" ) + ( TitleHelper::Z_AXIS_TITLE, "D=0:CS=0:Axis=2,0" ) + ( TitleHelper::SECONDARY_X_AXIS_TITLE, "D=0:CS=0:Axis=0,1" ) + ( TitleHelper::SECONDARY_Y_AXIS_TITLE, "D=0:CS=0:Axis=1,1" ) ; return m_aTitleMap; } @@ -191,13 +191,13 @@ sal_Int32 lcl_StringToIndex( const OUString& rIndexString ) void lcl_parseCooSysIndices( sal_Int32& rnDiagram, sal_Int32& rnCooSys, const OUString& rString ) { - rnDiagram = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, C2U("D=") ) ); - rnCooSys = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, C2U("CS=") ) ); + rnDiagram = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "D=" ) ); + rnCooSys = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "CS=" ) ); } void lcl_parseAxisIndices( sal_Int32& rnDimensionIndex, sal_Int32& rnAxisIndex, const OUString& rString ) { - OUString aAxisIndexString = lcl_getIndexStringAfterString( rString, C2U(":Axis=") ); + OUString aAxisIndexString = lcl_getIndexStringAfterString( rString, ":Axis=" ); sal_Int32 nCharacterIndex=0; rnDimensionIndex = lcl_StringToIndex( aAxisIndexString.getToken( 0, ',', nCharacterIndex ) ); rnAxisIndex = lcl_StringToIndex( aAxisIndexString.getToken( 0, ',', nCharacterIndex ) ); @@ -206,14 +206,14 @@ void lcl_parseAxisIndices( sal_Int32& rnDimensionIndex, sal_Int32& rnAxisIndex, void lcl_parseGridIndices( sal_Int32& rnSubGridIndex, const OUString& rString ) { rnSubGridIndex = -1; - rnSubGridIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, C2U(":SubGrid=") ) ); + rnSubGridIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, ":SubGrid=" ) ); } void lcl_parseSeriesIndices( sal_Int32& rnChartTypeIndex, sal_Int32& rnSeriesIndex, sal_Int32& rnPointIndex, const OUString& rString ) { - rnChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, C2U("CT=") ) ); - rnSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, C2U("Series=") ) ); - rnPointIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, C2U("Point=") ) ); + rnChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "CT=" ) ); + rnSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "Series=" ) ); + rnPointIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rString, "Point=" ) ); } void lcl_getDiagramAndCooSys( const OUString& rObjectCID @@ -449,7 +449,7 @@ OUString ObjectIdentifier::createParticleForDiagram( const Reference< XDiagram >& /*xDiagram*/ , const Reference< frame::XModel >& /*xChartModel*/ ) { - static OUString aRet(C2U("D=0")); + static OUString aRet("D=0"); //todo: if more than one diagram is implemeted, add the correct diagram index here return aRet; } @@ -486,7 +486,7 @@ OUString ObjectIdentifier::createParticleForAxis( sal_Int32 nDimensionIndex , sal_Int32 nAxisIndex ) { - OUStringBuffer aRet(C2U("Axis=")); + OUStringBuffer aRet("Axis="); aRet.append( OUString::valueOf( nDimensionIndex ) ); aRet.appendAscii(","); @@ -499,11 +499,11 @@ OUString ObjectIdentifier::createParticleForGrid( sal_Int32 nDimensionIndex , sal_Int32 nAxisIndex ) { - OUStringBuffer aRet(C2U("Axis=")); + OUStringBuffer aRet("Axis="); aRet.append( OUString::valueOf( nDimensionIndex ) ); aRet.appendAscii(","); aRet.append( OUString::valueOf( nAxisIndex ) ); - aRet.append( C2U(":Grid=0") ); + aRet.append( ":Grid=0" ); return aRet.makeStringAndClear(); } @@ -825,76 +825,76 @@ OUString ObjectIdentifier::getStringForType( ObjectType eObjectType ) switch( eObjectType ) { case OBJECTTYPE_PAGE: - aRet=C2U("Page"); + aRet="Page"; break; case OBJECTTYPE_TITLE: - aRet=C2U("Title"); + aRet="Title"; break; case OBJECTTYPE_LEGEND: - aRet=C2U("Legend"); + aRet="Legend"; break; case OBJECTTYPE_LEGEND_ENTRY: - aRet=C2U("LegendEntry"); + aRet="LegendEntry"; break; case OBJECTTYPE_DIAGRAM: - aRet=C2U("D"); + aRet="D"; break; case OBJECTTYPE_DIAGRAM_WALL: - aRet=C2U("DiagramWall"); + aRet="DiagramWall"; break; case OBJECTTYPE_DIAGRAM_FLOOR: - aRet=C2U("DiagramFloor"); + aRet="DiagramFloor"; break; case OBJECTTYPE_AXIS: - aRet=C2U("Axis"); + aRet="Axis"; break; case OBJECTTYPE_AXIS_UNITLABEL: - aRet=C2U("AxisUnitLabel"); + aRet="AxisUnitLabel"; break; case OBJECTTYPE_GRID: - aRet=C2U("Grid"); + aRet="Grid"; break; case OBJECTTYPE_SUBGRID: - aRet=C2U("SubGrid"); + aRet="SubGrid"; break; case OBJECTTYPE_DATA_SERIES: - aRet=C2U("Series"); + aRet="Series"; break; case OBJECTTYPE_DATA_POINT: - aRet=C2U("Point"); + aRet="Point"; break; case OBJECTTYPE_DATA_LABELS: - aRet=C2U("DataLabels"); + aRet="DataLabels"; break; case OBJECTTYPE_DATA_LABEL: - aRet=C2U("DataLabel"); + aRet="DataLabel"; break; case OBJECTTYPE_DATA_ERRORS_X: - aRet=C2U("ErrorsX"); + aRet="ErrorsX"; break; case OBJECTTYPE_DATA_ERRORS_Y: - aRet=C2U("ErrorsY"); + aRet="ErrorsY"; break; case OBJECTTYPE_DATA_ERRORS_Z: - aRet=C2U("ErrorsZ"); + aRet="ErrorsZ"; break; case OBJECTTYPE_DATA_CURVE: - aRet=C2U("Curve"); + aRet="Curve"; break; case OBJECTTYPE_DATA_CURVE_EQUATION: - aRet=C2U("Equation"); + aRet="Equation"; break; case OBJECTTYPE_DATA_AVERAGE_LINE: - aRet=C2U("Average"); + aRet="Average"; break; case OBJECTTYPE_DATA_STOCK_RANGE: - aRet=C2U("StockRange"); + aRet="StockRange"; break; case OBJECTTYPE_DATA_STOCK_LOSS: - aRet=C2U("StockLoss"); + aRet="StockLoss"; break; case OBJECTTYPE_DATA_STOCK_GAIN: - aRet=C2U("StockGain"); + aRet="StockGain"; break; default: //OBJECTTYPE_UNKNOWN ; @@ -918,53 +918,53 @@ ObjectType ObjectIdentifier::getObjectType( const OUString& rCID ) if( nLastSign>0 ) nLastSign++; - if( rCID.match(C2U("Page"),nLastSign) ) + if( rCID.match("Page",nLastSign) ) eRet = OBJECTTYPE_PAGE; - else if( rCID.match(C2U("Title"),nLastSign) ) + else if( rCID.match("Title",nLastSign) ) eRet = OBJECTTYPE_TITLE; - else if( rCID.match(C2U("LegendEntry"),nLastSign) ) + else if( rCID.match("LegendEntry",nLastSign) ) eRet = OBJECTTYPE_LEGEND_ENTRY; - else if( rCID.match(C2U("Legend"),nLastSign) ) + else if( rCID.match("Legend",nLastSign) ) eRet = OBJECTTYPE_LEGEND; - else if( rCID.match(C2U("DiagramWall"),nLastSign) ) + else if( rCID.match("DiagramWall",nLastSign) ) eRet = OBJECTTYPE_DIAGRAM_WALL; - else if( rCID.match(C2U("DiagramFloor"),nLastSign) ) + else if( rCID.match("DiagramFloor",nLastSign) ) eRet = OBJECTTYPE_DIAGRAM_FLOOR; - else if( rCID.match(C2U("D="),nLastSign) ) + else if( rCID.match("D=",nLastSign) ) eRet = OBJECTTYPE_DIAGRAM; - else if( rCID.match(C2U("AxisUnitLabel"),nLastSign) ) + else if( rCID.match("AxisUnitLabel",nLastSign) ) eRet = OBJECTTYPE_AXIS_UNITLABEL; - else if( rCID.match(C2U("Axis"),nLastSign) ) + else if( rCID.match("Axis",nLastSign) ) eRet = OBJECTTYPE_AXIS; - else if( rCID.match(C2U("Grid"),nLastSign) ) + else if( rCID.match("Grid",nLastSign) ) eRet = OBJECTTYPE_GRID; - else if( rCID.match(C2U("SubGrid"),nLastSign) ) + else if( rCID.match("SubGrid",nLastSign) ) eRet = OBJECTTYPE_SUBGRID; - else if( rCID.match(C2U("Series"),nLastSign) ) + else if( rCID.match("Series",nLastSign) ) eRet = OBJECTTYPE_DATA_SERIES; - else if( rCID.match(C2U("Point"),nLastSign) ) + else if( rCID.match("Point",nLastSign) ) eRet = OBJECTTYPE_DATA_POINT; - else if( rCID.match(C2U("DataLabels"),nLastSign) ) + else if( rCID.match("DataLabels",nLastSign) ) eRet = OBJECTTYPE_DATA_LABELS; - else if( rCID.match(C2U("DataLabel"),nLastSign) ) + else if( rCID.match("DataLabel",nLastSign) ) eRet = OBJECTTYPE_DATA_LABEL; - else if( rCID.match(C2U("ErrorsX"),nLastSign) ) + else if( rCID.match("ErrorsX",nLastSign) ) eRet = OBJECTTYPE_DATA_ERRORS_X; - else if( rCID.match(C2U("ErrorsY"),nLastSign) ) + else if( rCID.match("ErrorsY",nLastSign) ) eRet = OBJECTTYPE_DATA_ERRORS_Y; - else if( rCID.match(C2U("ErrorsZ"),nLastSign) ) + else if( rCID.match("ErrorsZ",nLastSign) ) eRet = OBJECTTYPE_DATA_ERRORS_Z; - else if( rCID.match(C2U("Curve"),nLastSign) ) + else if( rCID.match("Curve",nLastSign) ) eRet = OBJECTTYPE_DATA_CURVE; - else if( rCID.match(C2U("Equation"),nLastSign) ) + else if( rCID.match("Equation",nLastSign) ) eRet = OBJECTTYPE_DATA_CURVE_EQUATION; - else if( rCID.match(C2U("Average"),nLastSign) ) + else if( rCID.match("Average",nLastSign) ) eRet = OBJECTTYPE_DATA_AVERAGE_LINE; - else if( rCID.match(C2U("StockRange"),nLastSign) ) + else if( rCID.match("StockRange",nLastSign) ) eRet = OBJECTTYPE_DATA_STOCK_RANGE; - else if( rCID.match(C2U("StockLoss"),nLastSign) ) + else if( rCID.match("StockLoss",nLastSign) ) eRet = OBJECTTYPE_DATA_STOCK_LOSS; - else if( rCID.match(C2U("StockGain"),nLastSign) ) + else if( rCID.match("StockGain",nLastSign) ) eRet = OBJECTTYPE_DATA_STOCK_GAIN; else eRet = OBJECTTYPE_UNKNOWN; @@ -1031,7 +1031,7 @@ sal_Int32 ObjectIdentifier::getIndexFromParticleOrCID( const rtl::OUString& rPar { sal_Int32 nRet = -1; - OUString aIndexString = lcl_getIndexStringAfterString( rParticleOrCID, C2U("=") ); + OUString aIndexString = lcl_getIndexStringAfterString( rParticleOrCID, "=" ); sal_Int32 nCharacterIndex=0; nRet = lcl_StringToIndex( aIndexString.getToken( 0, ',', nCharacterIndex ) ); @@ -1044,7 +1044,7 @@ OUString ObjectIdentifier::createSeriesSubObjectStub( ObjectType eSubObjectType , const rtl::OUString& rDragParameterString ) { OUString aChildParticle( getStringForType( eSubObjectType ) ); - aChildParticle+=(C2U("=")); + aChildParticle+=("="); return createClassifiedIdentifierForParticles( rSeriesParticle, aChildParticle @@ -1237,11 +1237,11 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet( OUString errorBar; if ( eObjectType == OBJECTTYPE_DATA_ERRORS_X) - errorBar = C2U("ErrorBarX"); + errorBar = "ErrorBarX"; else if (eObjectType == OBJECTTYPE_DATA_ERRORS_Y) - errorBar = C2U("ErrorBarY"); + errorBar = "ErrorBarY"; else - errorBar = C2U("ErrorBarZ"); + errorBar = "ErrorBarZ"; xSeriesProp->getPropertyValue( errorBar ) >>= xErrorBarProp; xObjectProperties = Reference< beans::XPropertySet >( xErrorBarProp, uno::UNO_QUERY ); @@ -1277,7 +1277,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet( Reference<XChartType> xChartType( lcl_getFirstStockChartType( xChartModel ) ); Reference< beans::XPropertySet > xChartTypeProps( xChartType, uno::UNO_QUERY ); if(xChartTypeProps.is()) - xChartTypeProps->getPropertyValue( C2U( "BlackDay" ) ) >>= xObjectProperties; + xChartTypeProps->getPropertyValue( "BlackDay" ) >>= xObjectProperties; } break; case OBJECTTYPE_DATA_STOCK_GAIN: @@ -1285,7 +1285,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet( Reference<XChartType> xChartType( lcl_getFirstStockChartType( xChartModel ) ); Reference< beans::XPropertySet > xChartTypeProps( xChartType, uno::UNO_QUERY ); if(xChartTypeProps.is()) - xChartTypeProps->getPropertyValue( C2U( "WhiteDay" ) ) >>= xObjectProperties; + xChartTypeProps->getPropertyValue( "WhiteDay" ) >>= xObjectProperties; } break; default: //OBJECTTYPE_UNKNOWN @@ -1387,10 +1387,10 @@ OUString ObjectIdentifier::getSeriesParticleFromCID( const OUString& rCID ) OUString ObjectIdentifier::getMovedSeriesCID( const ::rtl::OUString& rObjectCID, sal_Bool bForward ) { - sal_Int32 nDiagramIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, C2U("CID/D=") ) ); - sal_Int32 nCooSysIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, C2U("CS=") ) ); - sal_Int32 nChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, C2U("CT=") ) ); - sal_Int32 nSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, C2U("Series=") ) ); + sal_Int32 nDiagramIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "CID/D=" ) ); + sal_Int32 nCooSysIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "CS=" ) ); + sal_Int32 nChartTypeIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "CT=" ) ); + sal_Int32 nSeriesIndex = lcl_StringToIndex( lcl_getIndexStringAfterString( rObjectCID, "Series=" ) ); if( bForward ) nSeriesIndex--; diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx index 7e7e794d76e2..b84032790e06 100644 --- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx @@ -137,7 +137,7 @@ OUString PotentialRegressionCurveCalculator::ImplGetRepresentation( const uno::Reference< util::XNumberFormatter >& xNumFormatter, ::sal_Int32 nNumberFormatKey ) const { - OUStringBuffer aBuf( C2U( "f(x) = " )); + OUStringBuffer aBuf( "f(x) = "); if( m_fIntercept == 0.0 ) { diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx index c333832e7c63..746cf6a1a35b 100644 --- a/chart2/source/tools/PropertyHelper.cxx +++ b/chart2/source/tools/PropertyHelper.cxx @@ -187,11 +187,11 @@ OUString addLineDashUniqueNameToTable( if( xFact.is()) { Reference< container::XNameContainer > xNameCnt( - xFact->createInstance( C2U( "com.sun.star.drawing.DashTable" )), + xFact->createInstance( "com.sun.star.drawing.DashTable"), uno::UNO_QUERY ); if( xNameCnt.is()) return lcl_addNamedPropertyUniqueNameToTable( - rValue, xNameCnt, C2U( "ChartDash " ), rPreferredName ); + rValue, xNameCnt, "ChartDash ", rPreferredName ); } return OUString(); } @@ -204,11 +204,11 @@ OUString addGradientUniqueNameToTable( if( xFact.is()) { Reference< container::XNameContainer > xNameCnt( - xFact->createInstance( C2U( "com.sun.star.drawing.GradientTable" )), + xFact->createInstance( "com.sun.star.drawing.GradientTable"), uno::UNO_QUERY ); if( xNameCnt.is()) return lcl_addNamedPropertyUniqueNameToTable( - rValue, xNameCnt, C2U( "ChartGradient " ), rPreferredName ); + rValue, xNameCnt, "ChartGradient ", rPreferredName ); } return OUString(); } @@ -222,11 +222,11 @@ OUString addTransparencyGradientUniqueNameToTable( if( xFact.is()) { Reference< container::XNameContainer > xNameCnt( - xFact->createInstance( C2U( "com.sun.star.drawing.TransparencyGradientTable" )), + xFact->createInstance( "com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY ); if( xNameCnt.is()) return lcl_addNamedPropertyUniqueNameToTable( - rValue, xNameCnt, C2U( "ChartTransparencyGradient " ), rPreferredName ); + rValue, xNameCnt, "ChartTransparencyGradient ", rPreferredName ); } return OUString(); } @@ -239,11 +239,11 @@ OUString addHatchUniqueNameToTable( if( xFact.is()) { Reference< container::XNameContainer > xNameCnt( - xFact->createInstance( C2U( "com.sun.star.drawing.HatchTable" )), + xFact->createInstance( "com.sun.star.drawing.HatchTable"), uno::UNO_QUERY ); if( xNameCnt.is()) return lcl_addNamedPropertyUniqueNameToTable( - rValue, xNameCnt, C2U( "ChartHatch " ), rPreferredName ); + rValue, xNameCnt, "ChartHatch ", rPreferredName ); } return OUString(); } @@ -256,11 +256,11 @@ OUString addBitmapUniqueNameToTable( if( xFact.is()) { Reference< container::XNameContainer > xNameCnt( - xFact->createInstance( C2U( "com.sun.star.drawing.BitmapTable" )), + xFact->createInstance( "com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY ); if( xNameCnt.is()) return lcl_addNamedPropertyUniqueNameToTable( - rValue, xNameCnt, C2U( "ChartBitmap " ), rPreferredName ); + rValue, xNameCnt, "ChartBitmap ", rPreferredName ); } return OUString(); } diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx index b77c2ae5f752..545e4e697626 100644 --- a/chart2/source/tools/RangeHighlighter.cxx +++ b/chart2/source/tools/RangeHighlighter.cxx @@ -228,7 +228,7 @@ void RangeHighlighter::fillRangesForErrorBars( sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; bUsesRangesAsErrorBars = ( xErrorBar.is() && - (xErrorBar->getPropertyValue( C2U("ErrorBarStyle")) >>= nStyle) && + (xErrorBar->getPropertyValue( "ErrorBarStyle") >>= nStyle) && nStyle == ::com::sun::star::chart::ErrorBarStyle::FROM_DATA ); } catch( const uno::Exception & ex ) diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx index ec0e7067bbbf..4f63a5b45fd5 100644 --- a/chart2/source/tools/ReferenceSizeProvider.cxx +++ b/chart2/source/tools/ReferenceSizeProvider.cxx @@ -81,7 +81,7 @@ void ReferenceSizeProvider::setValuesAtTitle( Reference< beans::XPropertySet > xTitleProp( xTitle, uno::UNO_QUERY_THROW ); awt::Size aOldRefSize; bool bHasOldRefSize( - xTitleProp->getPropertyValue( C2U("ReferencePageSize")) >>= aOldRefSize ); + xTitleProp->getPropertyValue( "ReferencePageSize") >>= aOldRefSize ); // set from auto-resize on to off -> adapt font sizes at XFormattedStrings if( bHasOldRefSize && ! useAutoScale()) @@ -122,7 +122,7 @@ void ReferenceSizeProvider::setValuesAtAllDataSeries() Sequence< sal_Int32 > aPointIndexes; try { - if( xSeriesProp->getPropertyValue( C2U("AttributedDataPoints")) >>= aPointIndexes ) + if( xSeriesProp->getPropertyValue( "AttributedDataPoints") >>= aPointIndexes ) { for( sal_Int32 i=0; i< aPointIndexes.getLength(); ++i ) setValuesAtPropertySet( @@ -298,7 +298,7 @@ ReferenceSizeProvider::AutoResizeState ReferenceSizeProvider::getAutoResizeState Sequence< sal_Int32 > aPointIndexes; try { - if( xSeriesProp->getPropertyValue( C2U("AttributedDataPoints")) >>= aPointIndexes ) + if( xSeriesProp->getPropertyValue( "AttributedDataPoints") >>= aPointIndexes ) { for( sal_Int32 i=0; i< aPointIndexes.getLength(); ++i ) { diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index 07c033ae7baa..16a57e838249 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -53,20 +53,20 @@ OUString lcl_getServiceNameForType( ::chart::RegressionCurveHelper::tRegressionT switch( eType ) { case ::chart::RegressionCurveHelper::REGRESSION_TYPE_LINEAR: - aServiceName = C2U( "com.sun.star.chart2.LinearRegressionCurve" ); + aServiceName = "com.sun.star.chart2.LinearRegressionCurve"; break; case ::chart::RegressionCurveHelper::REGRESSION_TYPE_LOG: - aServiceName = C2U( "com.sun.star.chart2.LogarithmicRegressionCurve" ); + aServiceName = "com.sun.star.chart2.LogarithmicRegressionCurve"; break; case ::chart::RegressionCurveHelper::REGRESSION_TYPE_EXP: - aServiceName = C2U( "com.sun.star.chart2.ExponentialRegressionCurve" ); + aServiceName = "com.sun.star.chart2.ExponentialRegressionCurve"; break; case ::chart::RegressionCurveHelper::REGRESSION_TYPE_POWER: - aServiceName = C2U( "com.sun.star.chart2.PotentialRegressionCurve" ); + aServiceName = "com.sun.star.chart2.PotentialRegressionCurve"; break; default: OSL_FAIL("unknown regression curve type - use linear instead"); - aServiceName = C2U( "com.sun.star.chart2.LinearRegressionCurve" ); + aServiceName = "com.sun.star.chart2.LinearRegressionCurve"; break; } return aServiceName; @@ -250,7 +250,7 @@ bool RegressionCurveHelper::isMeanValueLine( uno::Reference< XServiceName > xServName( xRegCurve, uno::UNO_QUERY ); if( xServName.is() && xServName->getServiceName().equals( - C2U( "com.sun.star.chart2.MeanValueRegressionCurve" ))) + "com.sun.star.chart2.MeanValueRegressionCurve")) return true; return false; } @@ -298,8 +298,8 @@ void RegressionCurveHelper::addMeanValueLine( uno::Reference< XPropertySet > xProp( xCurve, uno::UNO_QUERY ); if( xProp.is()) { - xProp->setPropertyValue( C2U( "LineColor" ), - xSeriesProp->getPropertyValue( C2U( "Color" ))); + xProp->setPropertyValue( "LineColor", + xSeriesProp->getPropertyValue( "Color")); } } } @@ -371,10 +371,10 @@ void RegressionCurveHelper::addRegressionCurve( uno::Reference< XPropertySet > xSeriesProp( xRegCnt, uno::UNO_QUERY ); if( xSeriesProp.is()) { - xProp->setPropertyValue( C2U( "LineColor" ), - xSeriesProp->getPropertyValue( C2U( "Color" ))); + xProp->setPropertyValue( "LineColor", + xSeriesProp->getPropertyValue( "Color")); } -// xProp->setPropertyValue( C2U( "LineWidth" ), uno::makeAny( sal_Int32( 100 ))); +// xProp->setPropertyValue( "LineWidth", uno::makeAny( sal_Int32( 100 ))); } } } @@ -437,8 +437,8 @@ void RegressionCurveHelper::removeEquations( uno::Reference< beans::XPropertySet > xEqProp( xRegCurve->getEquationProperties() ) ; if( xEqProp.is()) { - xEqProp->setPropertyValue( C2U("ShowEquation"), uno::makeAny( false )); - xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false )); + xEqProp->setPropertyValue( "ShowEquation", uno::makeAny( false )); + xEqProp->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( false )); } } } @@ -669,8 +669,8 @@ bool RegressionCurveHelper::hasEquation( const Reference< chart2::XRegressionCur { bool bShowEquation = false; bool bShowCoefficient = false; - xEquationProp->getPropertyValue( C2U("ShowEquation")) >>= bShowEquation; - xEquationProp->getPropertyValue( C2U("ShowCorrelationCoefficient")) >>= bShowCoefficient; + xEquationProp->getPropertyValue( "ShowEquation") >>= bShowEquation; + xEquationProp->getPropertyValue( "ShowCorrelationCoefficient") >>= bShowCoefficient; bHasEquation = bShowEquation || bShowCoefficient; } } diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx index f82064ae666a..7312081755be 100644 --- a/chart2/source/tools/RegressionCurveModel.cxx +++ b/chart2/source/tools/RegressionCurveModel.cxx @@ -40,18 +40,18 @@ using ::osl::MutexGuard; namespace { static const OUString lcl_aImplementationName_MeanValue( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.MeanValueRegressionCurve" )); + "com.sun.star.comp.chart2.MeanValueRegressionCurve" ); static const OUString lcl_aImplementationName_Linear( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.LinearRegressionCurve" )); + "com.sun.star.comp.chart2.LinearRegressionCurve" ); static const OUString lcl_aImplementationName_Logarithmic( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.LogarithmicRegressionCurve" )); + "com.sun.star.comp.chart2.LogarithmicRegressionCurve" ); static const OUString lcl_aImplementationName_Exponential( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.ExponentialRegressionCurve" )); + "com.sun.star.comp.chart2.ExponentialRegressionCurve" ); static const OUString lcl_aImplementationName_Potential( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.PotentialRegressionCurve" )); + "com.sun.star.comp.chart2.PotentialRegressionCurve" ); static const OUString lcl_aServiceName( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.RegressionCurve" )); + "com.sun.star.chart2.RegressionCurve" ); struct StaticXXXDefaults_Initializer { @@ -182,15 +182,15 @@ void SAL_CALL RegressionCurveModel::setEquationProperties( const uno::Reference< switch( m_eRegressionCurveType ) { case CURVE_TYPE_MEAN_VALUE: - return C2U( "com.sun.star.chart2.MeanValueRegressionCurve" ); + return OUString("com.sun.star.chart2.MeanValueRegressionCurve"); case CURVE_TYPE_LINEAR: - return C2U( "com.sun.star.chart2.LinearRegressionCurve" ); + return OUString("com.sun.star.chart2.LinearRegressionCurve"); case CURVE_TYPE_LOGARITHM: - return C2U( "com.sun.star.chart2.LogarithmicRegressionCurve" ); + return OUString("com.sun.star.chart2.LogarithmicRegressionCurve"); case CURVE_TYPE_EXPONENTIAL: - return C2U( "com.sun.star.chart2.ExponentialRegressionCurve" ); + return OUString("com.sun.star.chart2.ExponentialRegressionCurve"); case CURVE_TYPE_POWER: - return C2U( "com.sun.star.chart2.PotentialRegressionCurve" ); + return OUString("com.sun.star.chart2.PotentialRegressionCurve"); } return ::rtl::OUString(); @@ -303,7 +303,7 @@ uno::Sequence< ::rtl::OUString > MeanValueRegressionCurve::getSupportedServiceNa { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.MeanValueRegressionCurve" ); + aServices[ 1 ] = "com.sun.star.chart2.MeanValueRegressionCurve"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static @@ -331,7 +331,7 @@ uno::Sequence< ::rtl::OUString > LinearRegressionCurve::getSupportedServiceNames { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.LinearRegressionCurve" ); + aServices[ 1 ] = "com.sun.star.chart2.LinearRegressionCurve"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static @@ -359,7 +359,7 @@ uno::Sequence< ::rtl::OUString > LogarithmicRegressionCurve::getSupportedService { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.LogarithmicRegressionCurve" ); + aServices[ 1 ] = "com.sun.star.chart2.LogarithmicRegressionCurve"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static @@ -387,7 +387,7 @@ uno::Sequence< ::rtl::OUString > ExponentialRegressionCurve::getSupportedService { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.ExponentialRegressionCurve" ); + aServices[ 1 ] = "com.sun.star.chart2.ExponentialRegressionCurve"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static @@ -415,7 +415,7 @@ uno::Sequence< ::rtl::OUString > PotentialRegressionCurve::getSupportedServiceNa { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.PotentialRegressionCurve" ); + aServices[ 1 ] = "com.sun.star.chart2.PotentialRegressionCurve"; return aServices; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx index 553650cc4cfe..dacbd2d90d6f 100644 --- a/chart2/source/tools/RegressionEquation.cxx +++ b/chart2/source/tools/RegressionEquation.cxx @@ -65,35 +65,35 @@ void lcl_AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "ShowEquation" ), + Property( "ShowEquation", PROP_EQUATION_SHOW, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ShowCorrelationCoefficient" ), + Property( "ShowCorrelationCoefficient", PROP_EQUATION_SHOW_CORRELATION_COEFF, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "ReferencePageSize" ), + Property( "ReferencePageSize", PROP_EQUATION_REF_PAGE_SIZE, ::getCppuType( reinterpret_cast< const awt::Size * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "RelativePosition" ), + Property( "RelativePosition", PROP_EQUATION_REL_POS, ::getCppuType( reinterpret_cast< const chart2::RelativePosition * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "NumberFormat" ), + Property( "NumberFormat", PROP_EQUATION_NUMBER_FORMAT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -317,10 +317,10 @@ uno::Sequence< ::rtl::OUString > RegressionEquation::getSupportedServiceNames_St sal_Int32 nI = 0; uno::Sequence< ::rtl::OUString > aServices( nNumServices ); aServices[ nI++ ] = lcl_aServiceName; - aServices[ nI++ ] = C2U( "com.sun.star.beans.PropertySet" ); - aServices[ nI++ ] = C2U( "com.sun.star.drawing.FillProperties" ); - aServices[ nI++ ] = C2U( "com.sun.star.drawing.LineProperties" ); - aServices[ nI++ ] = C2U( "com.sun.star.style.CharacterProperties" ); + aServices[ nI++ ] = "com.sun.star.beans.PropertySet"; + aServices[ nI++ ] = "com.sun.star.drawing.FillProperties"; + aServices[ nI++ ] = "com.sun.star.drawing.LineProperties"; + aServices[ nI++ ] = "com.sun.star.style.CharacterProperties"; OSL_ASSERT( nNumServices == nI ); return aServices; } diff --git a/chart2/source/tools/SceneProperties.cxx b/chart2/source/tools/SceneProperties.cxx index 71329513e967..8e86976501e8 100644 --- a/chart2/source/tools/SceneProperties.cxx +++ b/chart2/source/tools/SceneProperties.cxx @@ -44,7 +44,7 @@ void SceneProperties::AddPropertiesToVector( { // transformation matrix rOutProperties.push_back( - Property( C2U( "D3DTransformMatrix" ), + Property( "D3DTransformMatrix", PROP_SCENE_TRANSF_MATRIX, ::getCppuType( reinterpret_cast< const drawing::HomogenMatrix * >(0)), beans::PropertyAttribute::BOUND @@ -53,7 +53,7 @@ void SceneProperties::AddPropertiesToVector( // distance: deprecated ( this is not used by the chart view; it's only here for compatibility with old chart ) rOutProperties.push_back( - Property( C2U( "D3DSceneDistance" ), + Property( "D3DSceneDistance", PROP_SCENE_DISTANCE, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -62,7 +62,7 @@ void SceneProperties::AddPropertiesToVector( // focalLength: deprecated ( this is not used by the chart view; it's only here for compatibility with old chart ) rOutProperties.push_back( - Property( C2U( "D3DSceneFocalLength" ), + Property( "D3DSceneFocalLength", PROP_SCENE_FOCAL_LENGTH, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -71,7 +71,7 @@ void SceneProperties::AddPropertiesToVector( // shadowSlant rOutProperties.push_back( - Property( C2U( "D3DSceneShadowSlant" ), + Property( "D3DSceneShadowSlant", PROP_SCENE_SHADOW_SLANT, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -80,7 +80,7 @@ void SceneProperties::AddPropertiesToVector( // shadeMode rOutProperties.push_back( - Property( C2U( "D3DSceneShadeMode" ), + Property( "D3DSceneShadeMode", PROP_SCENE_SHADE_MODE, ::getCppuType( reinterpret_cast< const drawing::ShadeMode * >(0)), beans::PropertyAttribute::BOUND @@ -89,7 +89,7 @@ void SceneProperties::AddPropertiesToVector( // ambientColor rOutProperties.push_back( - Property( C2U( "D3DSceneAmbientColor" ), + Property( "D3DSceneAmbientColor", PROP_SCENE_AMBIENT_COLOR, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND @@ -98,7 +98,7 @@ void SceneProperties::AddPropertiesToVector( // lightingMode rOutProperties.push_back( - Property( C2U( "D3DSceneTwoSidedLighting" ), + Property( "D3DSceneTwoSidedLighting", PROP_SCENE_TWO_SIDED_LIGHTING, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -107,7 +107,7 @@ void SceneProperties::AddPropertiesToVector( // camera geometry rOutProperties.push_back( - Property( C2U( "D3DCameraGeometry" ), + Property( "D3DCameraGeometry", PROP_SCENE_CAMERA_GEOMETRY, ::getCppuType( reinterpret_cast< const drawing::CameraGeometry * >(0)), beans::PropertyAttribute::BOUND @@ -116,7 +116,7 @@ void SceneProperties::AddPropertiesToVector( // perspective rOutProperties.push_back( - Property( C2U( "D3DScenePerspective" ), + Property( "D3DScenePerspective", PROP_SCENE_PERSPECTIVE, ::getCppuType( reinterpret_cast< const drawing::ProjectionMode * >(0)), beans::PropertyAttribute::BOUND @@ -128,21 +128,21 @@ void SceneProperties::AddPropertiesToVector( // ------------- // light source 1 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor1" ), + Property( "D3DSceneLightColor1", PROP_SCENE_LIGHT_COLOR_1, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection1" ), + Property( "D3DSceneLightDirection1", PROP_SCENE_LIGHT_DIRECTION_1, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn1" ), + Property( "D3DSceneLightOn1", PROP_SCENE_LIGHT_ON_1, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -150,21 +150,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 2 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor2" ), + Property( "D3DSceneLightColor2", PROP_SCENE_LIGHT_COLOR_2, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection2" ), + Property( "D3DSceneLightDirection2", PROP_SCENE_LIGHT_DIRECTION_2, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn2" ), + Property( "D3DSceneLightOn2", PROP_SCENE_LIGHT_ON_2, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -172,21 +172,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 3 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor3" ), + Property( "D3DSceneLightColor3", PROP_SCENE_LIGHT_COLOR_3, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection3" ), + Property( "D3DSceneLightDirection3", PROP_SCENE_LIGHT_DIRECTION_3, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn3" ), + Property( "D3DSceneLightOn3", PROP_SCENE_LIGHT_ON_3, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -194,21 +194,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 4 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor4" ), + Property( "D3DSceneLightColor4", PROP_SCENE_LIGHT_COLOR_4, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection4" ), + Property( "D3DSceneLightDirection4", PROP_SCENE_LIGHT_DIRECTION_4, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn4" ), + Property( "D3DSceneLightOn4", PROP_SCENE_LIGHT_ON_4, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -216,21 +216,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 5 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor5" ), + Property( "D3DSceneLightColor5", PROP_SCENE_LIGHT_COLOR_5, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection5" ), + Property( "D3DSceneLightDirection5", PROP_SCENE_LIGHT_DIRECTION_5, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn5" ), + Property( "D3DSceneLightOn5", PROP_SCENE_LIGHT_ON_5, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -238,21 +238,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 6 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor6" ), + Property( "D3DSceneLightColor6", PROP_SCENE_LIGHT_COLOR_6, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection6" ), + Property( "D3DSceneLightDirection6", PROP_SCENE_LIGHT_DIRECTION_6, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn6" ), + Property( "D3DSceneLightOn6", PROP_SCENE_LIGHT_ON_6, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -260,21 +260,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 7 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor7" ), + Property( "D3DSceneLightColor7", PROP_SCENE_LIGHT_COLOR_7, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection7" ), + Property( "D3DSceneLightDirection7", PROP_SCENE_LIGHT_DIRECTION_7, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn7" ), + Property( "D3DSceneLightOn7", PROP_SCENE_LIGHT_ON_7, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND @@ -282,21 +282,21 @@ void SceneProperties::AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); // light source 8 rOutProperties.push_back( - Property( C2U( "D3DSceneLightColor8" ), + Property( "D3DSceneLightColor8", PROP_SCENE_LIGHT_COLOR_8, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightDirection8" ), + Property( "D3DSceneLightDirection8", PROP_SCENE_LIGHT_DIRECTION_8, ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( - Property( C2U( "D3DSceneLightOn8" ), + Property( "D3DSceneLightOn8", PROP_SCENE_LIGHT_ON_8, ::getBooleanCppuType(), beans::PropertyAttribute::BOUND diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx index fd6282d02551..a955a97bb7bf 100644 --- a/chart2/source/tools/StatisticsHelper.cxx +++ b/chart2/source/tools/StatisticsHelper.cxx @@ -81,7 +81,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getErrorBarLabeledSequence( bool bPositiveValue, bool bYError, OUString & rOutRoleNameUsed ) { - OUStringBuffer aRole( C2U("error-bars-")); + OUStringBuffer aRole( "error-bars-"); if( bYError ) aRole.append( sal_Unicode( 'y' )); else @@ -120,7 +120,7 @@ void lcl_setRole( { Reference< beans::XPropertySet > xSeqProp( xNewSequence, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->setPropertyValue( C2U("Role"), uno::makeAny( rRole )); + xSeqProp->setPropertyValue( "Role", uno::makeAny( rRole )); } void lcl_addSequenceToDataSource( @@ -150,7 +150,7 @@ void lcl_setXMLRangePropertyAtDataSequence( { try { - const OUString aXMLRangePropName( C2U( "CachedXMLRange" )); + const OUString aXMLRangePropName( "CachedXMLRange"); Reference< beans::XPropertySet > xProp( xDataSequence, uno::UNO_QUERY_THROW ); Reference< beans::XPropertySetInfo > xInfo( xProp->getPropertySetInfo()); if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName )) @@ -308,7 +308,7 @@ Reference< beans::XPropertySet > StatisticsHelper::addErrorBars( if( !xSeriesProp.is()) return xErrorBar; - const OUString aPropName( bYError ? C2U("ErrorBarY") : C2U("ErrorBarX")); + const OUString aPropName( bYError ? "ErrorBarY" : "ErrorBarX"); if( !( xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar ) || !xErrorBar.is()) { @@ -318,7 +318,7 @@ Reference< beans::XPropertySet > StatisticsHelper::addErrorBars( OSL_ASSERT( xErrorBar.is()); if( xErrorBar.is()) { - xErrorBar->setPropertyValue( C2U("ErrorBarStyle"), uno::makeAny( nStyle )); + xErrorBar->setPropertyValue( "ErrorBarStyle", uno::makeAny( nStyle )); } xSeriesProp->setPropertyValue( aPropName, uno::makeAny( xErrorBar )); @@ -332,7 +332,7 @@ Reference< beans::XPropertySet > StatisticsHelper::getErrorBars( { Reference< beans::XPropertySet > xSeriesProp( xDataSeries, uno::UNO_QUERY ); Reference< beans::XPropertySet > xErrorBar; - const OUString aPropName( bYError ? C2U("ErrorBarY") : C2U("ErrorBarX")); + const OUString aPropName( bYError ? "ErrorBarY" : "ErrorBarX"); if ( xSeriesProp.is()) xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar; @@ -348,7 +348,7 @@ bool StatisticsHelper::hasErrorBars( sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; return ( xErrorBar.is() && - ( xErrorBar->getPropertyValue( C2U("ErrorBarStyle")) >>= nStyle ) && + ( xErrorBar->getPropertyValue( "ErrorBarStyle") >>= nStyle ) && nStyle != ::com::sun::star::chart::ErrorBarStyle::NONE ); } @@ -358,7 +358,7 @@ void StatisticsHelper::removeErrorBars( { Reference< beans::XPropertySet > xErrorBar( getErrorBars( xDataSeries, bYError )); if ( xErrorBar.is()) - xErrorBar->setPropertyValue( C2U("ErrorBarStyle"), uno::makeAny( + xErrorBar->setPropertyValue( "ErrorBarStyle", uno::makeAny( ::com::sun::star::chart::ErrorBarStyle::NONE )); } @@ -370,7 +370,7 @@ bool StatisticsHelper::usesErrorBarRanges( sal_Int32 nStyle = ::com::sun::star::chart::ErrorBarStyle::NONE; return ( xErrorBar.is() && - ( xErrorBar->getPropertyValue( C2U("ErrorBarStyle")) >>= nStyle ) && + ( xErrorBar->getPropertyValue( "ErrorBarStyle") >>= nStyle ) && nStyle == ::com::sun::star::chart::ErrorBarStyle::FROM_DATA ); } diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index 66199cc114bd..4805390c4b8c 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -53,7 +53,7 @@ bool lcl_isRightAngledAxesSetAndSupported( const Reference< beans::XPropertySet sal_Bool bRightAngledAxes = sal_False; if( xSceneProperties.is() ) { - xSceneProperties->getPropertyValue( C2U("RightAngledAxes")) >>= bRightAngledAxes; + xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes; if(bRightAngledAxes) { uno::Reference< chart2::XDiagram > xDiagram( xSceneProperties, uno::UNO_QUERY ); @@ -101,14 +101,14 @@ void lcl_rotateLights( const ::basegfx::B3DHomMatrix& rLightRottion, const Refer ::basegfx::B3DHomMatrix aLightRottion( rLightRottion ); BaseGFXHelper::ReduceToRotationMatrix( aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection1"), C2U("D3DSceneLightOn1"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection2"), C2U("D3DSceneLightOn2"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection3"), C2U("D3DSceneLightOn3"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection4"), C2U("D3DSceneLightOn4"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection5"), C2U("D3DSceneLightOn5"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection6"), C2U("D3DSceneLightOn6"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection7"), C2U("D3DSceneLightOn7"), aLightRottion ); - lcl_RotateLightSource( xSceneProperties, C2U("D3DSceneLightDirection8"), C2U("D3DSceneLightOn8"), aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection1", "D3DSceneLightOn1", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection2", "D3DSceneLightOn2", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection3", "D3DSceneLightOn3", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection4", "D3DSceneLightOn4", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection5", "D3DSceneLightOn5", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection6", "D3DSceneLightOn6", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection7", "D3DSceneLightOn7", aLightRottion ); + lcl_RotateLightSource( xSceneProperties, "D3DSceneLightDirection8", "D3DSceneLightOn8", aLightRottion ); } ::basegfx::B3DHomMatrix lcl_getInverseRotationMatrix( const Reference< beans::XPropertySet >& xSceneProperties ) @@ -150,7 +150,7 @@ bool lcl_isLightScheme( const uno::Reference< beans::XPropertySet >& xDiagramPro return false; sal_Bool bIsOn = sal_False; - xDiagramProps->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_2 ) ) >>= bIsOn; + xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_2 ) >>= bIsOn; if(!bIsOn) return false; @@ -158,17 +158,17 @@ bool lcl_isLightScheme( const uno::Reference< beans::XPropertySet >& xDiagramPro uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ); sal_Int32 nColor = 0; - xDiagramProps->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ) ) >>= nColor; + xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ) >>= nColor; if( nColor != ::chart::ChartTypeHelper::getDefaultDirectLightColor( !bRealistic, xChartType ) ) return false; sal_Int32 nAmbientColor = 0; - xDiagramProps->getPropertyValue( C2U( UNO_NAME_3D_SCENE_AMBIENTCOLOR ) ) >>= nAmbientColor; + xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR ) >>= nAmbientColor; if( nAmbientColor != ::chart::ChartTypeHelper::getDefaultAmbientLightColor( !bRealistic, xChartType ) ) return false; drawing::Direction3D aDirection(0,0,0); - xDiagramProps->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ) ) >>= aDirection; + xDiagramProps->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ) >>= aDirection; drawing::Direction3D aDefaultDirection( bRealistic ? ChartTypeHelper::getDefaultRealisticLightDirection(xChartType) @@ -177,7 +177,7 @@ bool lcl_isLightScheme( const uno::Reference< beans::XPropertySet >& xDiagramPro //rotate default light direction when right angled axes are off but supported { sal_Bool bRightAngledAxes = sal_False; - xDiagramProps->getPropertyValue( C2U("RightAngledAxes")) >>= bRightAngledAxes; + xDiagramProps->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes; if(!bRightAngledAxes) { if( ChartTypeHelper::isSupportingRightAngledAxes( @@ -210,7 +210,7 @@ void lcl_setLightsForScheme( const uno::Reference< beans::XPropertySet >& xDiagr if( rScheme == ThreeDLookScheme_Unknown) return; - xDiagramProps->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_2 ), uno::makeAny( sal_True ) ); + xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_2, uno::makeAny( sal_True ) ); uno::Reference< chart2::XDiagram > xDiagram( xDiagramProps, uno::UNO_QUERY ); uno::Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ); @@ -218,27 +218,27 @@ void lcl_setLightsForScheme( const uno::Reference< beans::XPropertySet >& xDiagr ? ChartTypeHelper::getDefaultSimpleLightDirection(xChartType) : ChartTypeHelper::getDefaultRealisticLightDirection(xChartType) ) ); - xDiagramProps->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ), aADirection ); + xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2, aADirection ); //rotate light direction when right angled axes are off but supported { sal_Bool bRightAngledAxes = sal_False; - xDiagramProps->getPropertyValue( C2U("RightAngledAxes")) >>= bRightAngledAxes; + xDiagramProps->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes; if(!bRightAngledAxes) { if( ChartTypeHelper::isSupportingRightAngledAxes( xChartType ) ) { ::basegfx::B3DHomMatrix aRotation( lcl_getCompleteRotationMatrix( xDiagramProps ) ); BaseGFXHelper::ReduceToRotationMatrix( aRotation ); - lcl_RotateLightSource( xDiagramProps, C2U("D3DSceneLightDirection2"), C2U("D3DSceneLightOn2"), aRotation ); + lcl_RotateLightSource( xDiagramProps, "D3DSceneLightDirection2", "D3DSceneLightOn2", aRotation ); } } } sal_Int32 nColor = ::chart::ChartTypeHelper::getDefaultDirectLightColor( rScheme==ThreeDLookScheme_Simple, xChartType ); - xDiagramProps->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ), uno::makeAny( nColor ) ); + xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_2, uno::makeAny( nColor ) ); sal_Int32 nAmbientColor = ::chart::ChartTypeHelper::getDefaultAmbientLightColor( rScheme==ThreeDLookScheme_Simple, xChartType ); - xDiagramProps->setPropertyValue( C2U( UNO_NAME_3D_SCENE_AMBIENTCOLOR ), uno::makeAny( nAmbientColor ) ); + xDiagramProps->setPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR, uno::makeAny( nAmbientColor ) ); } bool lcl_isRealisticScheme( drawing::ShadeMode aShadeMode @@ -325,7 +325,7 @@ namespace drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() ); if( xSceneProperties.is() ) - xSceneProperties->getPropertyValue( C2U( "D3DCameraGeometry" ) ) >>= aCG; + xSceneProperties->getPropertyValue( "D3DCameraGeometry" ) >>= aCG; ::basegfx::B3DVector aVPN( BaseGFXHelper::Direction3DToB3DVector( aCG.vpn ) ); ::basegfx::B3DVector aVUP( BaseGFXHelper::Direction3DToB3DVector( aCG.vup ) ); @@ -937,7 +937,7 @@ void ThreeDHelper::getRotationAngleFromDiagram( ::basegfx::B3DHomMatrix aSceneRotation; { drawing::HomogenMatrix aHomMatrix; - if( xSceneProperties->getPropertyValue( C2U("D3DTransformMatrix")) >>= aHomMatrix ) + if( xSceneProperties->getPropertyValue( "D3DTransformMatrix") >>= aHomMatrix ) { aSceneRotation = BaseGFXHelper::HomogenMatrixToB3DHomMatrix( aHomMatrix ); BaseGFXHelper::ReduceToRotationMatrix( aSceneRotation ); @@ -970,10 +970,10 @@ void ThreeDHelper::switchRightAngledAxes( const Reference< beans::XPropertySet > if( xSceneProperties.is() ) { sal_Bool bOldRightAngledAxes = sal_False; - xSceneProperties->getPropertyValue( C2U("RightAngledAxes")) >>= bOldRightAngledAxes; + xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bOldRightAngledAxes; if( bOldRightAngledAxes!=bRightAngledAxes) { - xSceneProperties->setPropertyValue( C2U("RightAngledAxes"), uno::makeAny( bRightAngledAxes )); + xSceneProperties->setPropertyValue( "RightAngledAxes", uno::makeAny( bRightAngledAxes )); if( bRotateLights ) { if(bRightAngledAxes) @@ -1031,11 +1031,11 @@ void ThreeDHelper::setRotationAngleToDiagram( //set new rotation to transformation matrix xSceneProperties->setPropertyValue( - C2U("D3DTransformMatrix"), uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation ))); + "D3DTransformMatrix", uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation ))); //rotate lights if RightAngledAxes are not set or not supported sal_Bool bRightAngledAxes = sal_False; - xSceneProperties->getPropertyValue( C2U("RightAngledAxes")) >>= bRightAngledAxes; + xSceneProperties->getPropertyValue( "RightAngledAxes") >>= bRightAngledAxes; uno::Reference< chart2::XDiagram > xDiagram( xSceneProperties, uno::UNO_QUERY ); if(!bRightAngledAxes || !ChartTypeHelper::isSupportingRightAngledAxes( DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) ) @@ -1120,7 +1120,7 @@ double ThreeDHelper::getCameraDistance( try { drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() ); - xSceneProperties->getPropertyValue( C2U( "D3DCameraGeometry" ) ) >>= aCG; + xSceneProperties->getPropertyValue( "D3DCameraGeometry" ) >>= aCG; ::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( aCG.vrp ) ); fCameraDistance = aVRP.getLength(); @@ -1145,14 +1145,14 @@ void ThreeDHelper::setCameraDistance( fCameraDistance = FIXED_SIZE_FOR_3D_CHART_VOLUME; drawing::CameraGeometry aCG( ThreeDHelper::getDefaultCameraGeometry() ); - xSceneProperties->getPropertyValue( C2U( "D3DCameraGeometry" ) ) >>= aCG; + xSceneProperties->getPropertyValue( "D3DCameraGeometry" ) >>= aCG; ::basegfx::B3DVector aVRP( BaseGFXHelper::Position3DToB3DVector( aCG.vrp ) ); if( ::basegfx::fTools::equalZero( aVRP.getLength() ) ) aVRP = ::basegfx::B3DVector(0,0,1); aVRP.setLength(fCameraDistance); aCG.vrp = BaseGFXHelper::B3DVectorToPosition3D( aVRP ); - xSceneProperties->setPropertyValue( C2U("D3DCameraGeometry"), uno::makeAny( aCG )); + xSceneProperties->setPropertyValue( "D3DCameraGeometry", uno::makeAny( aCG )); } catch( const uno::Exception & ex ) { @@ -1204,7 +1204,7 @@ ThreeDLookScheme ThreeDHelper::detectScheme( const uno::Reference< XDiagram >& x try { if( xDiagramProps.is() ) - xDiagramProps->getPropertyValue( C2U( "D3DSceneShadeMode" ) )>>= aShadeMode; + xDiagramProps->getPropertyValue( "D3DSceneShadeMode" )>>= aShadeMode; } catch( const uno::Exception & ex ) { @@ -1247,10 +1247,10 @@ void ThreeDHelper::setScheme( const uno::Reference< XDiagram >& xDiagram, ThreeD if( xProp.is() ) { drawing::ShadeMode aOldShadeMode; - if( ! ( (xProp->getPropertyValue( C2U( "D3DSceneShadeMode" ) )>>=aOldShadeMode) && + if( ! ( (xProp->getPropertyValue( "D3DSceneShadeMode" )>>=aOldShadeMode) && aOldShadeMode == aShadeMode )) { - xProp->setPropertyValue( C2U( "D3DSceneShadeMode" ), uno::makeAny( aShadeMode )); + xProp->setPropertyValue( "D3DSceneShadeMode", uno::makeAny( aShadeMode )); } } @@ -1268,8 +1268,8 @@ void ThreeDHelper::set3DSettingsToDefault( const uno::Reference< beans::XPropert Reference< beans::XPropertyState > xState( xSceneProperties, uno::UNO_QUERY ); if(xState.is()) { - xState->setPropertyToDefault( C2U("D3DSceneDistance")); - xState->setPropertyToDefault( C2U("D3DSceneFocalLength")); + xState->setPropertyToDefault( "D3DSceneDistance"); + xState->setPropertyToDefault( "D3DSceneFocalLength"); } ThreeDHelper::setDefaultRotation( xSceneProperties ); ThreeDHelper::setDefaultIllumination( xSceneProperties ); @@ -1281,12 +1281,12 @@ void ThreeDHelper::setDefaultRotation( const uno::Reference< beans::XPropertySet return; drawing::CameraGeometry aCameraGeo( ThreeDHelper::getDefaultCameraGeometry( bPieOrDonut ) ); - xSceneProperties->setPropertyValue( C2U("D3DCameraGeometry"), uno::makeAny( aCameraGeo )); + xSceneProperties->setPropertyValue( "D3DCameraGeometry", uno::makeAny( aCameraGeo )); ::basegfx::B3DHomMatrix aSceneRotation; if( bPieOrDonut ) aSceneRotation.rotate( -F_PI/3.0, 0, 0 ); - xSceneProperties->setPropertyValue( C2U("D3DTransformMatrix"), + xSceneProperties->setPropertyValue( "D3DTransformMatrix", uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aSceneRotation ))); } @@ -1304,14 +1304,14 @@ void ThreeDHelper::setDefaultIllumination( const uno::Reference< beans::XPropert drawing::ShadeMode aShadeMode( drawing::ShadeMode_SMOOTH ); try { - xSceneProperties->getPropertyValue( C2U( "D3DSceneShadeMode" ) )>>= aShadeMode; - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_1 ), uno::makeAny( sal_False ) ); - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_3 ), uno::makeAny( sal_False ) ); - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_4 ), uno::makeAny( sal_False ) ); - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_5 ), uno::makeAny( sal_False ) ); - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_6 ), uno::makeAny( sal_False ) ); - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_7 ), uno::makeAny( sal_False ) ); - xSceneProperties->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_8 ), uno::makeAny( sal_False ) ); + xSceneProperties->getPropertyValue( "D3DSceneShadeMode" )>>= aShadeMode; + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_1, uno::makeAny( sal_False ) ); + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_3, uno::makeAny( sal_False ) ); + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_4, uno::makeAny( sal_False ) ); + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_5, uno::makeAny( sal_False ) ); + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_6, uno::makeAny( sal_False ) ); + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_7, uno::makeAny( sal_False ) ); + xSceneProperties->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_8, uno::makeAny( sal_False ) ); } catch( const uno::Exception & ex ) { @@ -1339,8 +1339,8 @@ void ThreeDHelper::getRoundedEdgesAndObjectLines( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) ); sal_Int32 nSeriesCount = static_cast<sal_Int32>( aSeriesList.size() ); - rtl::OUString aPercentDiagonalPropertyName( C2U( "PercentDiagonal" ) ); - rtl::OUString aBorderStylePropertyName( C2U( "BorderStyle" ) ); + rtl::OUString aPercentDiagonalPropertyName( "PercentDiagonal" ); + rtl::OUString aBorderStylePropertyName( "BorderStyle" ); for( sal_Int32 nS = 0; nS < nSeriesCount; ++nS ) { @@ -1444,10 +1444,10 @@ void ThreeDHelper::setRoundedEdgesAndObjectLines( uno::Reference< XDataSeries > xSeries( aSeriesList[nS] ); if( nRoundedEdges>=0 && nRoundedEdges<=100 ) - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "PercentDiagonal" ), aARoundedEdges ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "PercentDiagonal", aARoundedEdges ); if( nObjectLines==0 || nObjectLines==1 ) - DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "BorderStyle" ), aALineStyle ); + DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", aALineStyle ); } } diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx index 7abd2d0e21fb..f618780e8876 100644 --- a/chart2/source/tools/TitleHelper.cxx +++ b/chart2/source/tools/TitleHelper.cxx @@ -158,7 +158,7 @@ uno::Reference< XTitle > TitleHelper::createTitle( uno::Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY ); if( xProps.is() ) { - xProps->setPropertyValue( C2U( "Show" ), uno::makeAny( sal_False ) ); + xProps->setPropertyValue( "Show", uno::makeAny( sal_False ) ); xTitled = lcl_getTitleParent( eTitleType, xModel ); } } @@ -168,7 +168,7 @@ uno::Reference< XTitle > TitleHelper::createTitle( uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ) ); xTitle.set( xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.Title" ), + "com.sun.star.chart2.Title", xContext ), uno::UNO_QUERY ); if(xTitle.is()) @@ -224,7 +224,7 @@ uno::Reference< XTitle > TitleHelper::createTitle( || (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) ) { double fNewAngleDegree = 90.0; - xTitleProps->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fNewAngleDegree )); + xTitleProps->setPropertyValue( "TextRotation", uno::makeAny( fNewAngleDegree )); } } } @@ -264,7 +264,7 @@ void TitleHelper::setCompleteString( const rtl::OUString& rNewText bool bStacked = false; uno::Reference< beans::XPropertySet > xTitleProperties( xTitle, uno::UNO_QUERY ); if( xTitleProperties.is() ) - xTitleProperties->getPropertyValue( C2U( "StackCharacters" ) ) >>= bStacked; + xTitleProperties->getPropertyValue( "StackCharacters" ) >>= bStacked; if( bStacked ) { @@ -302,7 +302,7 @@ void TitleHelper::setCompleteString( const rtl::OUString& rNewText { uno::Reference< uno::XInterface > xI( xContext->getServiceManager()->createInstanceWithContext( - C2U( "com.sun.star.chart2.FormattedString" ), xContext ) ); + "com.sun.star.chart2.FormattedString", xContext ) ); uno::Reference< XFormattedString > xFormattedString( xI, uno::UNO_QUERY ); if(xFormattedString.is()) @@ -316,9 +316,9 @@ void TitleHelper::setCompleteString( const rtl::OUString& rNewText uno::Reference< beans::XPropertySet > xProp( xFormattedString, uno::UNO_QUERY_THROW ); uno::Any aFontSize( uno::makeAny( *pDefaultCharHeight )); - xProp->setPropertyValue( C2U("CharHeight"), aFontSize ); - xProp->setPropertyValue( C2U("CharHeightAsian"), aFontSize ); - xProp->setPropertyValue( C2U("CharHeightComplex"), aFontSize ); + xProp->setPropertyValue( "CharHeight", aFontSize ); + xProp->setPropertyValue( "CharHeightAsian", aFontSize ); + xProp->setPropertyValue( "CharHeightComplex", aFontSize ); } catch( const uno::Exception & ex ) { diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx index b0a6ab194ffe..4fe74ef72d23 100644 --- a/chart2/source/tools/UncachedDataSequence.cxx +++ b/chart2/source/tools/UncachedDataSequence.cxx @@ -105,19 +105,19 @@ UncachedDataSequence::~UncachedDataSequence() void UncachedDataSequence::registerProperties() { - registerProperty( C2U( "NumberFormatKey" ), + registerProperty( "NumberFormatKey", PROP_NUMBERFORMAT_KEY, 0, // PropertyAttributes & m_nNumberFormatKey, ::getCppuType( & m_nNumberFormatKey ) ); - registerProperty( C2U( "Role" ), + registerProperty( "Role", PROP_PROPOSED_ROLE, 0, // PropertyAttributes & m_sRole, ::getCppuType( & m_sRole ) ); - registerProperty( C2U( "CachedXMLRange" ), + registerProperty( "CachedXMLRange", PROP_XML_RANGE, 0, // PropertyAttributes & m_aXMLRange, @@ -130,9 +130,9 @@ Sequence< OUString > UncachedDataSequence::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 4 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "com.sun.star.chart2.data.DataSequence" ); - aServices[ 2 ] = C2U( "com.sun.star.chart2.data.NumericalDataSequence" ); - aServices[ 3 ] = C2U( "com.sun.star.chart2.data.TextualDataSequence" ); + aServices[ 1 ] = "com.sun.star.chart2.data.DataSequence"; + aServices[ 2 ] = "com.sun.star.chart2.data.NumericalDataSequence"; + aServices[ 3 ] = "com.sun.star.chart2.data.TextualDataSequence"; return aServices; } diff --git a/chart2/source/tools/UserDefinedProperties.cxx b/chart2/source/tools/UserDefinedProperties.cxx index 69ad99db5b6b..c145cb48edfe 100644 --- a/chart2/source/tools/UserDefinedProperties.cxx +++ b/chart2/source/tools/UserDefinedProperties.cxx @@ -33,19 +33,19 @@ void UserDefinedProperties::AddPropertiesToVector( ::std::vector< Property > & rOutProperties ) { rOutProperties.push_back( - Property( C2U( "ChartUserDefinedAttributes" ), + Property( "ChartUserDefinedAttributes", PROP_XML_USERDEF_CHART, ::getCppuType( reinterpret_cast< const uno::Reference< container::XNameContainer > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "TextUserDefinedAttributes" ), + Property( "TextUserDefinedAttributes", PROP_XML_USERDEF_TEXT, ::getCppuType( reinterpret_cast< const uno::Reference< container::XNameContainer > * >(0)), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID )); rOutProperties.push_back( - Property( C2U( "ParaUserDefinedAttributes" ), + Property( "ParaUserDefinedAttributes", PROP_XML_USERDEF_PARA, ::getCppuType( reinterpret_cast< const uno::Reference< container::XNameContainer > * >(0)), beans::PropertyAttribute::BOUND @@ -53,7 +53,7 @@ void UserDefinedProperties::AddPropertiesToVector( // UserDefinedAttributesSupplier // ---------------------------- rOutProperties.push_back( - Property( C2U( "UserDefinedAttributes" ), + Property( "UserDefinedAttributes", PROP_XML_USERDEF, ::getCppuType( reinterpret_cast< const uno::Reference< container::XNameContainer > * >(0)), beans::PropertyAttribute::BOUND diff --git a/chart2/source/tools/WrappedIgnoreProperty.cxx b/chart2/source/tools/WrappedIgnoreProperty.cxx index 24099f1fd40d..069d18ab2b00 100644 --- a/chart2/source/tools/WrappedIgnoreProperty.cxx +++ b/chart2/source/tools/WrappedIgnoreProperty.cxx @@ -84,12 +84,12 @@ beans::PropertyState WrappedIgnoreProperty::getPropertyState( const Reference< b void WrappedIgnoreProperties::addIgnoreLineProperties( std::vector< WrappedProperty* >& rList ) { - rList.push_back( new WrappedIgnoreProperty( C2U( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "LineDashName" ), uno::makeAny( rtl::OUString() ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "LineColor" ), uno::makeAny( sal_Int32(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "LineTransparence" ), uno::makeAny( sal_Int16(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "LineWidth" ), uno::makeAny( sal_Int32(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "LineJoint" ), uno::makeAny( drawing::LineJoint_ROUND ) ) ); + rList.push_back( new WrappedIgnoreProperty( "LineStyle", uno::makeAny( drawing::LineStyle_SOLID ) ) ); + rList.push_back( new WrappedIgnoreProperty( "LineDashName", uno::makeAny( rtl::OUString() ) ) ); + rList.push_back( new WrappedIgnoreProperty( "LineColor", uno::makeAny( sal_Int32(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "LineTransparence", uno::makeAny( sal_Int16(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "LineWidth", uno::makeAny( sal_Int32(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "LineJoint", uno::makeAny( drawing::LineJoint_ROUND ) ) ); } void WrappedIgnoreProperties::addIgnoreFillProperties( std::vector< WrappedProperty* >& rList ) @@ -100,32 +100,32 @@ void WrappedIgnoreProperties::addIgnoreFillProperties( std::vector< WrappedPrope void WrappedIgnoreProperties::addIgnoreFillProperties_without_BitmapProperties( ::std::vector< WrappedProperty* >& rList ) { - rList.push_back( new WrappedIgnoreProperty( C2U( "FillStyle" ), uno::makeAny( drawing::FillStyle_SOLID ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillColor" ), uno::makeAny( sal_Int32(-1) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillTransparence" ), uno::makeAny( sal_Int16(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillTransparenceGradientName" ), uno::makeAny( ::rtl::OUString() ) ) ); -// rList.push_back( new WrappedIgnoreProperty( C2U( "FillTransparenceGradient" ), uno::makeAny( awt::Gradient() ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillGradientName" ), uno::makeAny( ::rtl::OUString() ) ) ); -// rList.push_back( new WrappedIgnoreProperty( C2U( "FillGradient" ), uno::makeAny( awt::Gradient() ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillHatchName" ), uno::makeAny( ::rtl::OUString() ) ) ); -// rList.push_back( new WrappedIgnoreProperty( C2U( "FillHatch" ), uno::makeAny( drawing::Hatch() ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBackground" ), uno::makeAny( sal_Bool(sal_False) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillStyle", uno::makeAny( drawing::FillStyle_SOLID ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillColor", uno::makeAny( sal_Int32(-1) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillTransparence", uno::makeAny( sal_Int16(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillTransparenceGradientName", uno::makeAny( ::rtl::OUString() ) ) ); +// rList.push_back( new WrappedIgnoreProperty( "FillTransparenceGradient", uno::makeAny( awt::Gradient() ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillGradientName", uno::makeAny( ::rtl::OUString() ) ) ); +// rList.push_back( new WrappedIgnoreProperty( "FillGradient", uno::makeAny( awt::Gradient() ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillHatchName", uno::makeAny( ::rtl::OUString() ) ) ); +// rList.push_back( new WrappedIgnoreProperty( "FillHatch", uno::makeAny( drawing::Hatch() ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBackground", uno::makeAny( sal_Bool(sal_False) ) ) ); } void WrappedIgnoreProperties::addIgnoreFillProperties_only_BitmapProperties( ::std::vector< WrappedProperty* >& rList ) { -// rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapName" ), uno::makeAny( ::rtl::OUString() ) ) ); -// rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmap" ), uno::makeAny( uno::Reference< awt::XBitmap > (0) ) ) ); -// rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapURL" ), uno::makeAny( ::rtl::OUString() ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapOffsetX" ), uno::makeAny( sal_Int16(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapOffsetY" ), uno::makeAny( sal_Int16(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapPositionOffsetX" ), uno::makeAny( sal_Int16(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapPositionOffsetY" ), uno::makeAny( sal_Int16(0) ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapRectanglePoint" ), uno::makeAny( drawing::RectanglePoint_LEFT_TOP ) ) ); - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapLogicalSize" ), uno::makeAny( sal_Bool(sal_False) ) ) );//todo correct default? - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapSizeX" ), uno::makeAny( sal_Int32(10) ) ) );//todo which default? - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapSizeY" ), uno::makeAny( sal_Int32(10) ) ) );//todo which default? - rList.push_back( new WrappedIgnoreProperty( C2U( "FillBitmapMode" ), uno::makeAny( drawing::BitmapMode_REPEAT ) ) ); +// rList.push_back( new WrappedIgnoreProperty( "FillBitmapName", uno::makeAny( ::rtl::OUString() ) ) ); +// rList.push_back( new WrappedIgnoreProperty( "FillBitmap", uno::makeAny( uno::Reference< awt::XBitmap > (0) ) ) ); +// rList.push_back( new WrappedIgnoreProperty( "FillBitmapURL", uno::makeAny( ::rtl::OUString() ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBitmapOffsetX", uno::makeAny( sal_Int16(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBitmapOffsetY", uno::makeAny( sal_Int16(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBitmapPositionOffsetX", uno::makeAny( sal_Int16(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBitmapPositionOffsetY", uno::makeAny( sal_Int16(0) ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBitmapRectanglePoint", uno::makeAny( drawing::RectanglePoint_LEFT_TOP ) ) ); + rList.push_back( new WrappedIgnoreProperty( "FillBitmapLogicalSize", uno::makeAny( sal_Bool(sal_False) ) ) );//todo correct default? + rList.push_back( new WrappedIgnoreProperty( "FillBitmapSizeX", uno::makeAny( sal_Int32(10) ) ) );//todo which default? + rList.push_back( new WrappedIgnoreProperty( "FillBitmapSizeY", uno::makeAny( sal_Int32(10) ) ) );//todo which default? + rList.push_back( new WrappedIgnoreProperty( "FillBitmapMode", uno::makeAny( drawing::BitmapMode_REPEAT ) ) ); } //............................................................................. diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx index e50e543bbe5c..c2a12a6bcb7a 100644 --- a/chart2/source/view/axes/VAxisBase.cxx +++ b/chart2/source/view/axes/VAxisBase.cxx @@ -140,7 +140,7 @@ sal_Bool VAxisBase::isAnythingToDraw() if( xProps.is() ) { sal_Bool bShow = sal_False; - xProps->getPropertyValue( C2U( "Show" ) ) >>= bShow; + xProps->getPropertyValue( "Show" ) >>= bShow; if( !bShow ) return false; } @@ -187,7 +187,7 @@ bool VAxisBase::prepareShapeCreation() //----------------------------------------- //create named group shape - m_xGroupShape_Shapes = this->createGroupShape( m_xLogicTarget, m_nDimension==2 ? m_aCID : C2U("")); + m_xGroupShape_Shapes = this->createGroupShape( m_xLogicTarget, m_nDimension==2 ? m_aCID : ""); if( m_aAxisProperties.m_bDisplayLabels ) m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget, m_aCID ); diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx index 86ec8f2ac6b9..2ebe0f10652d 100644 --- a/chart2/source/view/axes/VAxisProperties.cxx +++ b/chart2/source/view/axes/VAxisProperties.cxx @@ -259,11 +259,11 @@ void AxisProperties::initAxisPositioning( const uno::Reference< beans::XProperty { if( AxisHelper::isAxisPositioningEnabled() ) { - xAxisProp->getPropertyValue(C2U( "CrossoverPosition" )) >>= m_eCrossoverType; + xAxisProp->getPropertyValue("CrossoverPosition") >>= m_eCrossoverType; if( ::com::sun::star::chart::ChartAxisPosition_VALUE == m_eCrossoverType ) { double fValue = 0.0; - xAxisProp->getPropertyValue(C2U( "CrossoverValue" )) >>= fValue; + xAxisProp->getPropertyValue("CrossoverValue") >>= fValue; if( m_bCrossingAxisIsCategoryAxes ) fValue = ::rtl::math::round(fValue); @@ -272,8 +272,8 @@ void AxisProperties::initAxisPositioning( const uno::Reference< beans::XProperty else if( ::com::sun::star::chart::ChartAxisPosition_ZERO == m_eCrossoverType ) m_pfMainLinePositionAtOtherAxis = new double(0.0); - xAxisProp->getPropertyValue(C2U( "LabelPosition" )) >>= m_eLabelPos; - xAxisProp->getPropertyValue(C2U( "MarkPosition" )) >>= m_eTickmarkPos; + xAxisProp->getPropertyValue("LabelPosition") >>= m_eLabelPos; + xAxisProp->getPropertyValue("MarkPosition") >>= m_eTickmarkPos; } else { @@ -350,11 +350,11 @@ void AxisProperties::init( bool bCartesian ) m_aLineProperties.initFromPropertySet( xProp ); //init display labels - xProp->getPropertyValue( C2U( "DisplayLabels" ) ) >>= m_bDisplayLabels; + xProp->getPropertyValue( "DisplayLabels" ) >>= m_bDisplayLabels; //init TickmarkProperties - xProp->getPropertyValue( C2U( "MajorTickmarks" ) ) >>= m_nMajorTickmarks; - xProp->getPropertyValue( C2U( "MinorTickmarks" ) ) >>= m_nMinorTickmarks; + xProp->getPropertyValue( "MajorTickmarks" ) >>= m_nMajorTickmarks; + xProp->getPropertyValue( "MinorTickmarks" ) >>= m_nMinorTickmarks; sal_Int32 nMaxDepth = 0; if(m_nMinorTickmarks!=0) @@ -400,13 +400,13 @@ void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel ) { try { - xProp->getPropertyValue( C2U( "TextBreak" ) ) >>= this->bLineBreakAllowed; - xProp->getPropertyValue( C2U( "TextOverlap" ) ) >>= this->bOverlapAllowed; - xProp->getPropertyValue( C2U( "StackCharacters" ) ) >>= this->bStackCharacters; - xProp->getPropertyValue( C2U( "TextRotation" ) ) >>= this->fRotationAngleDegree; + xProp->getPropertyValue( "TextBreak" ) >>= this->bLineBreakAllowed; + xProp->getPropertyValue( "TextOverlap" ) >>= this->bOverlapAllowed; + xProp->getPropertyValue( "StackCharacters" ) >>= this->bStackCharacters; + xProp->getPropertyValue( "TextRotation" ) >>= this->fRotationAngleDegree; ::com::sun::star::chart::ChartAxisArrangeOrderType eArrangeOrder; - xProp->getPropertyValue( C2U( "ArrangeOrder" ) ) >>= eArrangeOrder; + xProp->getPropertyValue( "ArrangeOrder" ) >>= eArrangeOrder; switch(eArrangeOrder) { case ::com::sun::star::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE: diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 40b48862d7c1..fee4c6b8878c 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -650,7 +650,7 @@ bool VCartesianAxis::createTextShapes( , m_aAxisLabelProperties.m_aFontReferenceSize ); LabelPositionHelper::changeTextAdjustment( aPropValues, aPropNames, m_aAxisProperties.m_aLabelAlignment ); - uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,C2U("CharColor")); + uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); sal_Int32 nColor = Color( COL_AUTO ).GetColor(); if(pColorAny) *pColorAny >>= nColor; @@ -1512,7 +1512,7 @@ void VCartesianAxis::updatePositions() { try { - xProp->setPropertyValue( C2U( "Transformation" ), aATransformation ); + xProp->setPropertyValue( "Transformation", aATransformation ); } catch( const uno::Exception& e ) { @@ -1643,7 +1643,7 @@ void VCartesianAxis::createShapes() m_xGroupShape_Shapes, aPoints , &m_aAxisProperties.m_aLineProperties ); //because of this name this line will be used for marking the axis - m_pShapeFactory->setShapeName( xShape, C2U("MarkHandles") ); + m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); } //----------------------------------------- //create an additional line at NULL diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx index 195a25c47c86..2c7ca4b4ba48 100644 --- a/chart2/source/view/axes/VCartesianGrid.cxx +++ b/chart2/source/view/axes/VCartesianGrid.cxx @@ -286,7 +286,7 @@ void VCartesianGrid::createShapes() aHandleLineProperties.LineStyle = uno::makeAny( drawing::LineStyle_NONE ); Reference< drawing::XShape > xHandleShape = m_pShapeFactory->createLine2D( xTarget, aHandlesPoints, &aHandleLineProperties ); - m_pShapeFactory->setShapeName( xHandleShape, C2U("HandlesOnly") ); + m_pShapeFactory->setShapeName( xHandleShape, "HandlesOnly" ); } //----------------------------------------- else //if(2!=m_nDimension) diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index 6d8f1abc7808..90343690ee59 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -561,7 +561,7 @@ bool VCoordinateSystem::getPropertySwapXAndYAxis() const sal_Bool bSwapXAndY = false; if( xProp.is()) try { - xProp->getPropertyValue( C2U( "SwapXAndYAxis" ) ) >>= bSwapXAndY; + xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY; } catch( const uno::Exception& e ) { diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx index 647d30873cb4..8d65bc74f392 100644 --- a/chart2/source/view/axes/VPolarAngleAxis.cxx +++ b/chart2/source/view/axes/VPolarAngleAxis.cxx @@ -73,7 +73,7 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis( LabelPositionHelper::doDynamicFontResize( aPropValues, aPropNames, xProps , rAxisLabelProperties.m_aFontReferenceSize ); - uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,C2U("CharColor")); + uno::Any* pColorAny = PropertyMapper::getValuePointer(aPropValues,aPropNames,"CharColor"); sal_Int32 nColor = Color( COL_AUTO ).GetColor(); if(pColorAny) *pColorAny >>= nColor; @@ -212,7 +212,7 @@ void VPolarAngleAxis::createShapes() uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties ); //because of this name this line will be used for marking the axis - m_pShapeFactory->setShapeName( xShape, C2U("MarkHandles") ); + m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); //----------------------------------------- //create labels diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx index dc05b79f4618..fb485e3623bb 100644 --- a/chart2/source/view/axes/VPolarGrid.cxx +++ b/chart2/source/view/axes/VPolarGrid.cxx @@ -154,7 +154,7 @@ void VPolarGrid::create2DAngleGrid( const Reference< drawing::XShapes >& xLogicT Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( xMainTarget, aAllPoints, &rLinePropertiesList[nDepth] ); //because of this name this line will be used for marking - m_pShapeFactory->setShapeName( xShape, C2U("MarkHandles") ); + m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); } } #endif @@ -218,7 +218,7 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( xTarget, aAllPoints, &rLinePropertiesList[nDepth] ); //because of this name this line will be used for marking - m_pShapeFactory->setShapeName( xShape, C2U("MarkHandles") ); + m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); } } diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 5058bc644896..c78a495506d3 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -53,8 +53,8 @@ BarChart::BarChart( const uno::Reference<XChartType>& xChartTypeModel { if( m_xChartTypeModelProps.is() ) { - m_xChartTypeModelProps->getPropertyValue( C2U( "OverlapSequence" ) ) >>= m_aOverlapSequence; - m_xChartTypeModelProps->getPropertyValue( C2U( "GapwidthSequence" ) ) >>= m_aGapwidthSequence; + m_xChartTypeModelProps->getPropertyValue( "OverlapSequence" ) >>= m_aOverlapSequence; + m_xChartTypeModelProps->getPropertyValue( "GapwidthSequence" ) >>= m_aGapwidthSequence; } } catch( const uno::Exception& e ) @@ -276,7 +276,7 @@ uno::Reference< drawing::XShape > BarChart::createDataPoint3D_Bar( if( xObjectProperties.is() ) { sal_Int16 nPercentDiagonal = 0; - xObjectProperties->getPropertyValue( C2U( "PercentDiagonal" ) ) >>= nPercentDiagonal; + xObjectProperties->getPropertyValue( "PercentDiagonal" ) >>= nPercentDiagonal; if( nPercentDiagonal < 5 ) bRoundedEdges = false; } @@ -639,7 +639,7 @@ void BarChart::createShapes() sal_Int32 nGeometry3D = DataPointGeometry3D::CUBOID; if(m_nDimension==3) try { - xDataPointProperties->getPropertyValue( C2U( "Geometry3D" )) >>= nGeometry3D; + xDataPointProperties->getPropertyValue( "Geometry3D") >>= nGeometry3D; } catch( const uno::Exception& e ) { diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index 9177babffce6..0352621b3ca4 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -333,7 +333,7 @@ void BubbleChart::createShapes() , pSeries->getPropertiesOfPoint( nIndex ) , PropertyMapper::getPropertyNameMapForFilledSeriesProperties() ); - m_pShapeFactory->setShapeName( xShape, C2U("MarkHandles") ); + m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); } //create data point label diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index 5a9787f7b5d5..ad1a16405a22 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -127,13 +127,13 @@ void CandleStickChart::createShapes() { if( m_xChartTypeModelProps.is() ) { - m_xChartTypeModelProps->getPropertyValue( C2U( "ShowFirst" ) ) >>= bShowFirst; + m_xChartTypeModelProps->getPropertyValue( "ShowFirst" ) >>= bShowFirst; uno::Reference< beans::XPropertySet > xWhiteDayProps(0); uno::Reference< beans::XPropertySet > xBlackDayProps(0); - m_xChartTypeModelProps->getPropertyValue( C2U( "Japanese" ) ) >>= bJapaneseStyle; - m_xChartTypeModelProps->getPropertyValue( C2U( "WhiteDay" ) ) >>= xWhiteDayProps; - m_xChartTypeModelProps->getPropertyValue( C2U( "BlackDay" ) ) >>= xBlackDayProps; + m_xChartTypeModelProps->getPropertyValue( "Japanese" ) >>= bJapaneseStyle; + m_xChartTypeModelProps->getPropertyValue( "WhiteDay" ) >>= xWhiteDayProps; + m_xChartTypeModelProps->getPropertyValue( "BlackDay" ) >>= xBlackDayProps; tPropertyNameValueMap aWhiteBox_Map; PropertyMapper::getValueMap( aWhiteBox_Map, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xWhiteDayProps ); @@ -260,7 +260,7 @@ void CandleStickChart::createShapes() sal_Int32 nLineIndex =0; AddPointToPoly( aPoly, aPosMiddleMinimum, nLineIndex); AddPointToPoly( aPoly, aPosMiddleMaximum, nLineIndex); - xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ), uno::makeAny( PolyToPointSequence(aPoly) ) ); + xProp->setPropertyValue( UNO_NAME_POLYPOLYGON, uno::makeAny( PolyToPointSequence(aPoly) ) ); } this->setMappedProperties( xShape, xPointProp, PropertyMapper::getPropertyNameMapForLineSeriesProperties() ); } @@ -315,7 +315,7 @@ void CandleStickChart::createShapes() uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY ); if(xProp.is()) { - xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ), uno::makeAny( PolyToPointSequence(aPoly) ) ); + xProp->setPropertyValue( UNO_NAME_POLYPOLYGON, uno::makeAny( PolyToPointSequence(aPoly) ) ); this->setMappedProperties( xShape, xPointProp, PropertyMapper::getPropertyNameMapForLineSeriesProperties() ); } } diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index e8fc6892d89d..b5c307a86c87 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -124,7 +124,7 @@ PieChart::PieChart( const uno::Reference<XChartType>& xChartTypeModel uno::Reference< beans::XPropertySet > xChartTypeProps( xChartTypeModel, uno::UNO_QUERY ); if( xChartTypeProps.is() ) try { - xChartTypeProps->getPropertyValue( C2U( "UseRings" )) >>= m_bUseRings; + xChartTypeProps->getPropertyValue( "UseRings") >>= m_bUseRings; if( m_bUseRings ) { m_pPosHelper->m_fRadiusOffset = 1.0; @@ -245,14 +245,14 @@ double PieChart::getMaxOffset() return m_fMaxOffset; double fExplodePercentage=0.0; - xSeriesProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; + xSeriesProp->getPropertyValue( "Offset") >>= fExplodePercentage; if(fExplodePercentage>m_fMaxOffset) m_fMaxOffset=fExplodePercentage; if(!m_bSizeExcludesLabelsAndExplodedSegments) { uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; - if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) + if( xSeriesProp->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList ) { for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;) { @@ -260,7 +260,7 @@ double PieChart::getMaxOffset() if(xPointProp.is()) { fExplodePercentage=0.0; - xPointProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; + xPointProp->getPropertyValue( "Offset") >>= fExplodePercentage; if(fExplodePercentage>m_fMaxOffset) m_fMaxOffset=fExplodePercentage; } @@ -404,7 +404,7 @@ void PieChart::createShapes() bool bDoExplode = ( nExplodeableSlot == static_cast< ::std::vector< VDataSeriesGroup >::size_type >(fSlotX) ); if(bDoExplode) try { - xPointProperties->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; + xPointProperties->getPropertyValue( "Offset") >>= fExplodePercentage; } catch( const uno::Exception& e ) { @@ -425,7 +425,7 @@ void PieChart::createShapes() if(!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is()) { apOverwritePropertiesMap.reset( new tPropertyNameValueMap() ); - (*apOverwritePropertiesMap)[C2U("FillColor")] = uno::makeAny( + (*apOverwritePropertiesMap)["FillColor"] = uno::makeAny( m_xColorScheme->getColorByIndex( nPointIndex )); } } @@ -857,7 +857,7 @@ void PieChart::rearrangeLabelToAvoidOverlapIfRequested( const awt::Size& rPageSi if( xProp.is() ) { sal_Int32 nColor = 0; - xProp->getPropertyValue(C2U("CharColor")) >>= nColor; + xProp->getPropertyValue("CharColor") >>= nColor; if( nColor != -1 )//automatic font color does not work for lines -> fallback to black aVLineProperties.Color = uno::makeAny(nColor); } diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 533638d78935..3caa6604f673 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -454,7 +454,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re { uno::Reference< beans::XPropertySet > xProps( rDataSeries.getPropertiesOfPoint( nPointIndex ) ); if( xProps.is() ) - xProps->getPropertyValue( C2U( "CharHeight" )) >>= fViewFontSize; + xProps->getPropertyValue( "CharHeight") >>= fViewFontSize; // pt -> 1/100th mm fViewFontSize *= (2540.0f / 72.0f); } @@ -485,15 +485,15 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re uno::Reference< beans::XPropertySet > xPointProps( rDataSeries.getPropertiesOfPoint( nPointIndex ) ); if(xPointProps.is()) { - xPointProps->getPropertyValue( C2U( "LabelSeparator" ) ) >>= aSeparator; - xPointProps->getPropertyValue( C2U( "TextRotation" ) ) >>= fRotationDegrees; + xPointProps->getPropertyValue( "LabelSeparator" ) >>= aSeparator; + xPointProps->getPropertyValue( "TextRotation" ) >>= fRotationDegrees; } } catch( const uno::Exception& e ) { ASSERT_EXCEPTION( e ); } - bool bMultiLineLabel = aSeparator.equals(C2U("\n"));; + bool bMultiLineLabel = aSeparator.equals("\n");; sal_Int32 nLineCountForSymbolsize = 0; { if(pLabel->ShowCategoryName) @@ -564,7 +564,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re const double fDegreesPi( fRotationDegrees * ( F_PI / -180.0 ) ); uno::Reference< beans::XPropertySet > xProp( xTextShape, uno::UNO_QUERY ); if( xProp.is() ) - xProp->setPropertyValue( C2U( "Transformation" ), ShapeFactory::makeTransformation( aScreenPosition2D, fDegreesPi ) ); + xProp->setPropertyValue( "Transformation", ShapeFactory::makeTransformation( aScreenPosition2D, fDegreesPi ) ); LabelPositionHelper::correctPositionForRotation( xTextShape, eAlignment, fRotationDegrees, true /*bRotateAroundCenter*/ ); } @@ -642,8 +642,8 @@ double lcl_getErrorBarLogicLength( { double fPercent = 0; if( xProp->getPropertyValue( bPositive - ? C2U("PositiveError") - : C2U("NegativeError")) >>= fPercent ) + ? "PositiveError" + : "NegativeError") >>= fPercent ) { if( nIndex >=0 && nIndex < rData.getLength() && ! ::rtl::math::isNan( rData[nIndex] ) && @@ -656,16 +656,16 @@ double lcl_getErrorBarLogicLength( break; case ::com::sun::star::chart::ErrorBarStyle::ABSOLUTE: xProp->getPropertyValue( bPositive - ? C2U("PositiveError") - : C2U("NegativeError")) >>= fResult; + ? "PositiveError" + : "NegativeError") >>= fResult; break; case ::com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN: { // todo: check if this is really what's called error-margin double fPercent = 0; if( xProp->getPropertyValue( bPositive - ? C2U("PositiveError") - : C2U("NegativeError")) >>= fPercent ) + ? "PositiveError" + : "NegativeError") >>= fPercent ) { double fMaxValue; ::rtl::math::setInf(&fMaxValue, true); @@ -801,9 +801,9 @@ void VSeriesPlotter::createErrorBar( sal_Bool bShowNegative = sal_False; sal_Int32 nErrorBarStyle = ::com::sun::star::chart::ErrorBarStyle::VARIANCE; - xErrorBarProperties->getPropertyValue( C2U( "ShowPositiveError" )) >>= bShowPositive; - xErrorBarProperties->getPropertyValue( C2U( "ShowNegativeError" )) >>= bShowNegative; - xErrorBarProperties->getPropertyValue( C2U( "ErrorBarStyle" )) >>= nErrorBarStyle; + xErrorBarProperties->getPropertyValue( "ShowPositiveError") >>= bShowPositive; + xErrorBarProperties->getPropertyValue( "ShowNegativeError") >>= bShowNegative; + xErrorBarProperties->getPropertyValue( "ErrorBarStyle") >>= nErrorBarStyle; if(!bShowPositive && !bShowNegative) return; @@ -1050,7 +1050,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries createGroupShape( xTarget, rVDataSeries.getDataCurveCID( nN, bAverageLine ) ); uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( xRegressionGroupShapes, PolyToPointSequence( aRegressionPoly ), &aVLineProperties ); - m_pShapeFactory->setShapeName( xShape, C2U("MarkHandles") ); + m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); aDefaultPos = xShape->getPosition(); } @@ -1080,15 +1080,15 @@ void VSeriesPlotter::createRegressionCurveEquationShapes( bool bShowEquation = false; bool bShowCorrCoeff = false; OUString aSep( sal_Unicode('\n')); - if(( xEquationProperties->getPropertyValue( C2U("ShowEquation")) >>= bShowEquation ) && - ( xEquationProperties->getPropertyValue( C2U("ShowCorrelationCoefficient")) >>= bShowCorrCoeff )) + if(( xEquationProperties->getPropertyValue( "ShowEquation") >>= bShowEquation ) && + ( xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient") >>= bShowCorrCoeff )) { if( ! (bShowEquation || bShowCorrCoeff)) return; ::rtl::OUStringBuffer aFormula; sal_Int32 nNumberFormatKey = 0; - xEquationProperties->getPropertyValue( C2U("NumberFormat")) >>= nNumberFormatKey; + xEquationProperties->getPropertyValue( "NumberFormat") >>= nNumberFormatKey; if( bShowEquation ) { @@ -1112,7 +1112,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes( { aFormula.append( sal_Unicode( 'R' )); aFormula.append( sal_Unicode( 0x00b2 )); - aFormula.append( C2U( " = " )); + aFormula.append( " = "); double fR( xRegressionCurveCalculator->getCorrelationCoefficient()); if( m_apNumberFormatterWrapper.get()) { @@ -1133,7 +1133,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes( awt::Point aScreenPosition2D; chart2::RelativePosition aRelativePosition; - if( xEquationProperties->getPropertyValue( C2U("RelativePosition")) >>= aRelativePosition ) + if( xEquationProperties->getPropertyValue( "RelativePosition") >>= aRelativePosition ) { //@todo decide whether x is primary or secondary double fX = aRelativePosition.Primary*m_aPageReferenceSize.Width; @@ -2071,7 +2071,7 @@ bool lcl_HasVisibleLine( const uno::Reference< beans::XPropertySet >& xProps, bo bool bHasVisibleLine = false; rbHasDashedLine = false; drawing::LineStyle aLineStyle = drawing::LineStyle_NONE; - if( xProps.is() && ( xProps->getPropertyValue( C2U("LineStyle")) >>= aLineStyle ) ) + if( xProps.is() && ( xProps->getPropertyValue( "LineStyle") >>= aLineStyle ) ) { if( aLineStyle != drawing::LineStyle_NONE ) bHasVisibleLine = true; @@ -2235,7 +2235,7 @@ Reference< drawing::XShape > VSeriesPlotter::createLegendSymbolForPoint( OSL_ASSERT( xPointSet.is()); xPointSet->setPropertyValue( - C2U("Color"), uno::makeAny( m_xColorScheme->getColorByIndex( nPointIndex ))); + "Color", uno::makeAny( m_xColorScheme->getColorByIndex( nPointIndex ))); } } @@ -2319,7 +2319,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( } // label - aLabelText = ( DataSeriesHelper::getDataSeriesLabel( rSeries.getModel(), m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : C2U("values-y")) ); + aLabelText = ( DataSeriesHelper::getDataSeriesLabel( rSeries.getModel(), m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : "values-y") ); aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, xTextProperties ); aResult.push_back(aEntry); @@ -2341,7 +2341,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( { //label OUString aResStr( RegressionCurveHelper::getUINameForRegressionCurve( aCurves[i] ) ); - replaceParamterInString( aResStr, C2U("%SERIESNAME"), aLabelText ); + replaceParamterInString( aResStr, "%SERIESNAME", aLabelText ); aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aResStr, xTextProperties ); // symbol diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index f3dd98ecdf32..4c26350b802f 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -78,7 +78,7 @@ VDiagram::VDiagram( DiagramHelper::getChartTypeByIndex( m_xDiagram, 0 ) ) ) { if(xSourceProp.is()) - xSourceProp->getPropertyValue(C2U( "RightAngledAxes" )) >>= m_bRightAngledAxes; + xSourceProp->getPropertyValue("RightAngledAxes") >>= m_bRightAngledAxes; if( m_bRightAngledAxes ) { ThreeDHelper::adaptRadAnglesForRightAngledAxes( m_fXAnglePi, m_fYAnglePi ); @@ -167,11 +167,11 @@ void VDiagram::createShapes_2d() uno::Reference< drawing::XShapes > xOuterGroup_Shapes = m_pShapeFactory->createGroup2D(m_xLogicTarget); m_xOuterGroupShape = uno::Reference<drawing::XShape>( xOuterGroup_Shapes, uno::UNO_QUERY ); - uno::Reference< drawing::XShapes > xGroupForWall( m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,C2U("PlotAreaExcludingAxes")) ); + uno::Reference< drawing::XShapes > xGroupForWall( m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") ); //create independent group shape as container for datapoints and such things { - uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,C2U("testonly;CooContainer=XXX_CID")); + uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID"); m_xCoordinateRegionShape = uno::Reference<drawing::XShape>( xShapes, uno::UNO_QUERY ); } @@ -181,8 +181,8 @@ void VDiagram::createShapes_2d() //add back wall { m_xWall2D = uno::Reference< drawing::XShape >( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.RectangleShape" ) ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.RectangleShape" ), uno::UNO_QUERY ); xGroupForWall->add(m_xWall2D); uno::Reference< beans::XPropertySet > xProp( m_xWall2D, uno::UNO_QUERY ); @@ -207,7 +207,7 @@ void VDiagram::createShapes_2d() { //CID for selection handling rtl::OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) );//@todo read CID from model - xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ), uno::makeAny( aWallCID ) ); + xProp->setPropertyValue( UNO_NAME_MISC_OBJ_NAME, uno::makeAny( aWallCID ) ); } } catch( const uno::Exception& e ) @@ -245,56 +245,56 @@ void lcl_setLightSources( const uno::Reference< beans::XPropertySet > & xSource, const uno::Reference< beans::XPropertySet > & xDest ) { - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_1 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_1 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_2 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_2 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_3 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_3 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_4 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_4 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_5 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_5 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_6 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_6 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_7 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_7 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_8 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTON_8 ))); - - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_1 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_1 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_3 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_3 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_4 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_4 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_5 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_5 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_6 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_6 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_7 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_7 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_8 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTDIRECTION_8 ))); - - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_1 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_1 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_2 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_3 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_3 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_4 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_4 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_5 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_5 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_6 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_6 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_7 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_7 ))); - xDest->setPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_8 ), - xSource->getPropertyValue( C2U( UNO_NAME_3D_SCENE_LIGHTCOLOR_8 ))); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_1, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_1)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_2, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_2)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_3, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_3)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_4, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_4)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_5, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_5)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_6, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_6)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_7, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_7)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_8, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTON_8)); + + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_1, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_1)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_2)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_3, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_3)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_4, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_4)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_5, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_5)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_6, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_6)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_7, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_7)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_8, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTDIRECTION_8)); + + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_1, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_1)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_2, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_2)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_3, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_3)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_4, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_4)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_5, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_5)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_6, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_6)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_7, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_7)); + xDest->setPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_8, + xSource->getPropertyValue( UNO_NAME_3D_SCENE_LIGHTCOLOR_8)); } namespace @@ -453,7 +453,7 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize ) // and in it's destructor, calculates a new 2D SnapRect for the scene and it's modified 3D geometry. E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); - m_xAspectRatio3D->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + m_xAspectRatio3D->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aResult )) ); } catch( const uno::Exception& e ) @@ -488,9 +488,9 @@ void VDiagram::createShapes_3d() //create shape m_xOuterGroupShape = uno::Reference< drawing::XShape >( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DSceneObject" ) ), uno::UNO_QUERY ); - ShapeFactory::setShapeName( m_xOuterGroupShape, C2U("PlotAreaExcludingAxes") ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DSceneObject" ), uno::UNO_QUERY ); + ShapeFactory::setShapeName( m_xOuterGroupShape, "PlotAreaExcludingAxes" ); m_xLogicTarget->add(m_xOuterGroupShape); uno::Reference< drawing::XShapes > xOuterGroup_Shapes = @@ -591,20 +591,20 @@ void VDiagram::createShapes_3d() { //ignore distance and focal length from file format and model comcpletely //use vrp only to indicate the distance of the camera and thus influence the perspecitve - xDestProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_DISTANCE ), uno::makeAny( + xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_DISTANCE, uno::makeAny( static_cast<sal_Int32>(ThreeDHelper::getCameraDistance( xSourceProp )))); - xDestProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_PERSPECTIVE ), - xSourceProp->getPropertyValue( C2U( UNO_NAME_3D_SCENE_PERSPECTIVE ))); + xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE, + xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE)); } //light { - xDestProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_SHADE_MODE ), - xSourceProp->getPropertyValue( C2U( UNO_NAME_3D_SCENE_SHADE_MODE ))); - xDestProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_AMBIENTCOLOR ), - xSourceProp->getPropertyValue( C2U( UNO_NAME_3D_SCENE_AMBIENTCOLOR ))); - xDestProp->setPropertyValue( C2U( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING ), - xSourceProp->getPropertyValue( C2U( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING ))); + xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE, + xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE)); + xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR, + xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR)); + xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING, + xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING)); lcl_setLightSources( xSourceProp, xDestProp ); } @@ -624,7 +624,7 @@ void VDiagram::createShapes_3d() //#i98497# 3D charts are rendered with wrong size E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); - xDestProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ), + xDestProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX, uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aEffectiveTranformation ) ) ); } } @@ -665,7 +665,7 @@ void VDiagram::createShapes_3d() //create an additional scene for the smaller inner coordinate region: { - uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes,C2U("testonly;CooContainer=XXX_CID") ); + uno::Reference< drawing::XShapes > xShapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID" ); m_xCoordinateRegionShape = uno::Reference< drawing::XShape >( xShapes, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xShapeProp( m_xCoordinateRegionShape, uno::UNO_QUERY ); @@ -682,7 +682,7 @@ void VDiagram::createShapes_3d() aM.translate(GRID_TO_WALL_DISTANCE/fXScale, GRID_TO_WALL_DISTANCE/fYScale, GRID_TO_WALL_DISTANCE/fZScale); aM.scale( fXScale, fYScale, fZScale ); E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); - xShapeProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + xShapeProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix(aM)) ); } catch( const uno::Exception& e ) diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index e60f3345c2ca..8847ffad4ac4 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -49,7 +49,7 @@ ChartItemPool::ChartItemPool(): ppPoolDefaults[SCHATTR_DATADESCR_SHOW_PERCENTAGE- SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_PERCENTAGE); ppPoolDefaults[SCHATTR_DATADESCR_SHOW_CATEGORY - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_CATEGORY); ppPoolDefaults[SCHATTR_DATADESCR_SHOW_SYMBOL - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL); - ppPoolDefaults[SCHATTR_DATADESCR_SEPARATOR - SCHATTR_START] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR,C2U(" ")); + ppPoolDefaults[SCHATTR_DATADESCR_SEPARATOR - SCHATTR_START] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR," "); ppPoolDefaults[SCHATTR_DATADESCR_PLACEMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT,0); ppPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, ::std::vector < sal_Int32 >() ); ppPoolDefaults[SCHATTR_DATADESCR_NO_PERCENTVALUE - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index f2ace4a0c072..fed30c56ed91 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -247,46 +247,46 @@ void ChartView::getMetaFile( const uno::Reference< io::XOutputStream >& xOutStre // creating the graphic exporter uno::Reference< document::XExporter > xExporter( xFactory->createInstance( - C2U("com.sun.star.drawing.GraphicExportFilter")), uno::UNO_QUERY); + "com.sun.star.drawing.GraphicExportFilter"), uno::UNO_QUERY); uno::Reference< document::XFilter > xFilter( xExporter, uno::UNO_QUERY ); if( !xExporter.is() || !xFilter.is() ) return; uno::Sequence< beans::PropertyValue > aProps(3); - aProps[0].Name = C2U("FilterName"); - aProps[0].Value <<= C2U("SVM"); + aProps[0].Name = "FilterName"; + aProps[0].Value <<= OUString("SVM"); - aProps[1].Name = C2U("OutputStream"); + aProps[1].Name = "OutputStream"; aProps[1].Value <<= xOutStream; uno::Sequence< beans::PropertyValue > aFilterData(4); - aFilterData[0].Name = C2U("ExportOnlyBackground"); + aFilterData[0].Name = "ExportOnlyBackground"; aFilterData[0].Value <<= sal_False; - aFilterData[1].Name = C2U("HighContrast"); + aFilterData[1].Name = "HighContrast"; aFilterData[1].Value <<= bUseHighContrast; - aFilterData[2].Name = C2U("Version"); + aFilterData[2].Name = "Version"; const sal_Int32 nVersion = SOFFICE_FILEFORMAT_50; aFilterData[2].Value <<= nVersion; - aFilterData[3].Name = C2U("CurrentPage"); + aFilterData[3].Name = "CurrentPage"; aFilterData[3].Value <<= uno::Reference< uno::XInterface >( m_xDrawPage, uno::UNO_QUERY ); //#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100% { aFilterData.realloc( aFilterData.getLength()+4 ); - aFilterData[4].Name = C2U("ScaleXNumerator"); + aFilterData[4].Name = "ScaleXNumerator"; aFilterData[4].Value = uno::makeAny( m_nScaleXNumerator ); - aFilterData[5].Name = C2U("ScaleXDenominator"); + aFilterData[5].Name = "ScaleXDenominator"; aFilterData[5].Value = uno::makeAny( m_nScaleXDenominator ); - aFilterData[6].Name = C2U("ScaleYNumerator"); + aFilterData[6].Name = "ScaleYNumerator"; aFilterData[6].Value = uno::makeAny( m_nScaleYNumerator ); - aFilterData[7].Name = C2U("ScaleYDenominator"); + aFilterData[7].Name = "ScaleYDenominator"; aFilterData[7].Value = uno::makeAny( m_nScaleYDenominator ); } - aProps[2].Name = C2U("FilterData"); + aProps[2].Name = "FilterData"; aProps[2].Value <<= aFilterData; xExporter->setSourceDocument( uno::Reference< lang::XComponent >( m_xDrawPage, uno::UNO_QUERY) ); @@ -340,10 +340,10 @@ uno::Sequence< datatransfer::DataFlavor > SAL_CALL ChartView::getTransferDataFla uno::Sequence< datatransfer::DataFlavor > aRet(2); aRet[0] = datatransfer::DataFlavor( lcl_aGDIMetaFileMIMEType, - C2U( "GDIMetaFile" ), + "GDIMetaFile", ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); aRet[1] = datatransfer::DataFlavor( lcl_aGDIMetaFileMIMETypeHighContrast, - C2U( "GDIMetaFile" ), + "GDIMetaFile", ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); return aRet; @@ -624,11 +624,11 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter( try { uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW ); - xDiaProp->getPropertyValue( C2U( "SortByXValues" ) ) >>= bSortByXValues; - xDiaProp->getPropertyValue( C2U( "ConnectBars" ) ) >>= bConnectBars; - xDiaProp->getPropertyValue( C2U( "GroupBarsPerAxis" ) ) >>= bGroupBarsPerAxis; - xDiaProp->getPropertyValue( C2U( "IncludeHiddenCells" ) ) >>= bIncludeHiddenCells; - xDiaProp->getPropertyValue( C2U( "StartingAngle" ) ) >>= nStartingAngle; + xDiaProp->getPropertyValue( "SortByXValues" ) >>= bSortByXValues; + xDiaProp->getPropertyValue( "ConnectBars" ) >>= bConnectBars; + xDiaProp->getPropertyValue( "GroupBarsPerAxis" ) >>= bGroupBarsPerAxis; + xDiaProp->getPropertyValue( "IncludeHiddenCells" ) >>= bIncludeHiddenCells; + xDiaProp->getPropertyValue( "StartingAngle" ) >>= nStartingAngle; } catch( const uno::Exception & ex ) { @@ -881,7 +881,7 @@ void SeriesPlotterContainer::setNumberFormatsFromAxes() if( xAxisProp.is()) { sal_Int32 nNumberFormatKey(0); - if( xAxisProp->getPropertyValue( C2U( "NumberFormat" ) ) >>= nNumberFormatKey ) + if( xAxisProp->getPropertyValue( "NumberFormat" ) >>= nNumberFormatKey ) { aAxesNumberFormats.setFormat( nNumberFormatKey, nDimensionIndex, nAxisIndex ); } @@ -1096,11 +1096,11 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( const uno:: ::com::sun::star::chart::ChartAxisPosition eCrossingMainAxisPos( ::com::sun::star::chart::ChartAxisPosition_ZERO ); if( xCrossingMainAxis.is() ) { - xCrossingMainAxis->getPropertyValue(C2U( "CrossoverPosition" )) >>= eCrossingMainAxisPos; + xCrossingMainAxis->getPropertyValue("CrossoverPosition") >>= eCrossingMainAxisPos; if( ::com::sun::star::chart::ChartAxisPosition_VALUE == eCrossingMainAxisPos ) { double fValue = 0.0; - xCrossingMainAxis->getPropertyValue(C2U( "CrossoverValue" )) >>= fValue; + xCrossingMainAxis->getPropertyValue("CrossoverValue") >>= fValue; aExplicitScale.Origin = fValue; } else if( ::com::sun::star::chart::ChartAxisPosition_ZERO == eCrossingMainAxisPos ) @@ -1194,20 +1194,20 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod uno::Reference< container::XNameAccess > xStylesFamilies( xStyleFamiliesSupplier->getStyleFamilies() ); if( xStylesFamilies.is() ) { - if( !xStylesFamilies->hasByName( C2U("PageStyles") ) ) + if( !xStylesFamilies->hasByName( "PageStyles" ) ) { //draw/impress is parent document uno::Reference< lang::XMultiServiceFactory > xFatcory( xParentProps, uno::UNO_QUERY ); if( xFatcory.is() ) { - uno::Reference< beans::XPropertySet > xDrawDefaults( xFatcory->createInstance( C2U( "com.sun.star.drawing.Defaults" ) ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xDrawDefaults( xFatcory->createInstance( "com.sun.star.drawing.Defaults" ), uno::UNO_QUERY ); if( xDrawDefaults.is() ) - xDrawDefaults->getPropertyValue( C2U("WritingMode") ) >>= nWritingMode; + xDrawDefaults->getPropertyValue( "WritingMode" ) >>= nWritingMode; } } else { - uno::Reference< container::XNameAccess > xPageStyles( xStylesFamilies->getByName( C2U("PageStyles") ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xPageStyles( xStylesFamilies->getByName( "PageStyles" ), uno::UNO_QUERY ); if( xPageStyles.is() ) { rtl::OUString aPageStyle; @@ -1234,11 +1234,11 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod { static rtl::OUString aChartCLSID = rtl::OUString( SvGlobalName( SO3_SCH_CLASSID ).GetHexName()); rtl::OUString aCLSID; - xEmbeddedProps->getPropertyValue( C2U("CLSID") ) >>= aCLSID; + xEmbeddedProps->getPropertyValue( "CLSID" ) >>= aCLSID; if( aCLSID.equals(aChartCLSID) ) { uno::Reference< frame::XModel > xModel; - xEmbeddedProps->getPropertyValue( C2U("Model") ) >>= xModel; + xEmbeddedProps->getPropertyValue( "Model" ) >>= xModel; if( xModel == xChartModel ) { uno::Reference< text::XTextContent > xEmbeddedObject( xEmbeddedProps, uno::UNO_QUERY ); @@ -1250,14 +1250,14 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod uno::Reference< beans::XPropertySet > xAnchorProps( xAnchor, uno::UNO_QUERY ); if( xAnchorProps.is() ) { - xAnchorProps->getPropertyValue( C2U("WritingMode") ) >>= nWritingMode; + xAnchorProps->getPropertyValue( "WritingMode" ) >>= nWritingMode; } uno::Reference< text::XText > xText( xAnchor->getText() ); if( xText.is() ) { uno::Reference< beans::XPropertySet > xTextCursorProps( xText->createTextCursor(), uno::UNO_QUERY ); if( xTextCursorProps.is() ) - xTextCursorProps->getPropertyValue( C2U("PageStyleName") ) >>= aPageStyle; + xTextCursorProps->getPropertyValue( "PageStyleName" ) >>= aPageStyle; } } } @@ -1275,22 +1275,22 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod { uno::Reference< beans::XPropertySet > xTextCursorProps( xText->createTextCursor(), uno::UNO_QUERY ); if( xTextCursorProps.is() ) - xTextCursorProps->getPropertyValue( C2U("PageStyleName") ) >>= aPageStyle; + xTextCursorProps->getPropertyValue( "PageStyleName" ) >>= aPageStyle; } } } else { //Calc is parent document - xParentProps->getPropertyValue( C2U("PageStyle") ) >>= aPageStyle; + xParentProps->getPropertyValue( "PageStyle" ) >>= aPageStyle; if(aPageStyle.isEmpty()) - aPageStyle = C2U("Default"); + aPageStyle = "Default"; } if( nWritingMode == -1 || nWritingMode == text::WritingMode2::PAGE ) { uno::Reference< beans::XPropertySet > xPageStyle( xPageStyles->getByName( aPageStyle ), uno::UNO_QUERY ); if( xPageStyle.is() ) - xPageStyle->getPropertyValue( C2U("WritingMode") ) >>= nWritingMode; + xPageStyle->getPropertyValue( "WritingMode" ) >>= nWritingMode; } } } @@ -1577,7 +1577,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& if(bSnapRectToUsedArea) { if( bUseFixedInnerSize ) - m_aResultingDiagramRectangleExcludingAxes = getRectangleOfObject( C2U("PlotAreaExcludingAxes") ); + m_aResultingDiagramRectangleExcludingAxes = getRectangleOfObject( "PlotAreaExcludingAxes" ); else { ::basegfx::B2IRectangle aConsumedInnerRect = aVDiagram.getCurrentRectangle(); @@ -1602,7 +1602,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& bool bPosSizeExcludeAxesProperty = true; uno::Reference< beans::XPropertySet > xDiaProps( xDiagram, uno::UNO_QUERY_THROW ); if( xDiaProps.is() ) - xDiaProps->getPropertyValue(C2U("PosSizeExcludeAxes")) >>= bPosSizeExcludeAxesProperty; + xDiaProps->getPropertyValue("PosSizeExcludeAxes") >>= bPosSizeExcludeAxesProperty; if( bUseFixedInnerSize || bPosSizeExcludeAxesProperty ) { aPos = awt::Point( m_aResultingDiagramRectangleExcludingAxes.X, m_aResultingDiagramRectangleExcludingAxes.Y ); @@ -1724,9 +1724,9 @@ awt::Rectangle ChartView::getRectangleOfObject( const rtl::OUString& rObjectCID, SdrObjList* pRootList = pRootSdrObject->GetSubList(); if( pRootList ) { - OUString aShapeName = C2U("MarkHandles"); + OUString aShapeName = "MarkHandles"; if( eObjectType == OBJECTTYPE_DIAGRAM ) - aShapeName = C2U("PlotAreaIncludingAxes"); + aShapeName = "PlotAreaIncludingAxes"; SdrObject* pShape = DrawModelWrapper::getNamedSdrObject( aShapeName, pRootList ); if( pShape ) xShape = uno::Reference< drawing::XShape >( pShape->getUnoShape(), uno::UNO_QUERY); @@ -1780,7 +1780,7 @@ bool lcl_getPropertySwapXAndYAxis( const uno::Reference< XDiagram >& xDiagram ) uno::Reference<beans::XPropertySet> xProp(aCooSysList[0], uno::UNO_QUERY ); if( xProp.is()) try { - xProp->getPropertyValue( C2U( "SwapXAndYAxis" ) ) >>= bSwapXAndY; + xProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY; } catch( const uno::Exception& e ) { @@ -1813,7 +1813,7 @@ sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( if( !xSeriesOrPointProp.is() ) return nFormat; - rtl::OUString aPropName( C2U( "NumberFormat" ) ); + rtl::OUString aPropName( "NumberFormat" ); if( !(xSeriesOrPointProp->getPropertyValue(aPropName) >>= nFormat) ) { uno::Reference< chart2::XChartType > xChartType( DataSeriesHelper::getChartTypeOfSeries( xSeries, xDiagram ) ); @@ -1852,7 +1852,7 @@ sal_Int32 ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabe sal_Int32 nFormat=0; if( !xSeriesOrPointProp.is() ) return nFormat; - if( !(xSeriesOrPointProp->getPropertyValue(C2U( "PercentageNumberFormat" )) >>= nFormat) ) + if( !(xSeriesOrPointProp->getPropertyValue("PercentageNumberFormat") >>= nFormat) ) { nFormat = DiagramHelper::getPercentNumberFormat( xNumberFormatsSupplier ); } @@ -2026,11 +2026,11 @@ bool getAvailablePosAndSizeForDiagram( bool bPosSizeExcludeAxes = false; if( xProp.is() ) - xProp->getPropertyValue( C2U( "PosSizeExcludeAxes" ) ) >>= bPosSizeExcludeAxes; + xProp->getPropertyValue( "PosSizeExcludeAxes" ) >>= bPosSizeExcludeAxes; //size: ::com::sun::star::chart2::RelativeSize aRelativeSize; - if( xProp.is() && (xProp->getPropertyValue( C2U( "RelativeSize" ) )>>=aRelativeSize) ) + if( xProp.is() && (xProp->getPropertyValue( "RelativeSize" )>>=aRelativeSize) ) { rOutAvailableDiagramSize.Height = static_cast<sal_Int32>(aRelativeSize.Secondary*rPageSize.Height); rOutAvailableDiagramSize.Width = static_cast<sal_Int32>(aRelativeSize.Primary*rPageSize.Width); @@ -2041,7 +2041,7 @@ bool getAvailablePosAndSizeForDiagram( //position: chart2::RelativePosition aRelativePosition; - if( xProp.is() && (xProp->getPropertyValue( C2U( "RelativePosition" ) )>>=aRelativePosition) ) + if( xProp.is() && (xProp->getPropertyValue( "RelativePosition" )>>=aRelativePosition) ) { //@todo decide whether x is primary or secondary @@ -2170,7 +2170,7 @@ boost::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType awt::Point aNewPosition(0,0); chart2::RelativePosition aRelativePosition; uno::Reference< beans::XPropertySet > xProp(xTitle, uno::UNO_QUERY); - if( xProp.is() && (xProp->getPropertyValue( C2U( "RelativePosition" ) )>>=aRelativePosition) ) + if( xProp.is() && (xProp->getPropertyValue( "RelativePosition" )>>=aRelativePosition) ) { rbAutoPosition = false; @@ -2314,7 +2314,7 @@ void formatPage( { uno::Reference< drawing::XShape > xShape( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY ); if( xTarget.is() && xShape.is()) { @@ -2323,7 +2323,7 @@ void formatPage( xPageProp.set( xShape, uno::UNO_QUERY ); if( xPageProp.is()) { - xPageProp->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_NONE )); + xPageProp->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE )); } } } @@ -2335,7 +2335,7 @@ void formatPage( PropertyMapper::getValueMap( aNameValueMap, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xModelPage ); rtl::OUString aCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, rtl::OUString() ) ); - aNameValueMap.insert( tPropertyNameValueMap::value_type( C2U("Name"), uno::makeAny( aCID ) ) ); //CID rtl::OUString + aNameValueMap.insert( tPropertyNameValueMap::value_type( "Name", uno::makeAny( aCID ) ) ); //CID rtl::OUString tNameSequence aNames; tAnySequence aValues; @@ -2393,11 +2393,11 @@ void ChartView::impl_refreshAddIn() if( xProp.is()) try { uno::Reference< util::XRefreshable > xAddIn; - xProp->getPropertyValue( C2U( "AddIn" ) ) >>= xAddIn; + xProp->getPropertyValue( "AddIn" ) >>= xAddIn; if( xAddIn.is() ) { sal_Bool bRefreshAddInAllowed = sal_True; - xProp->getPropertyValue( C2U( "RefreshAddInAllowed" ) ) >>= bRefreshAddInAllowed; + xProp->getPropertyValue( "RefreshAddInAllowed" ) >>= bRefreshAddInAllowed; if( bRefreshAddInAllowed ) xAddIn->refresh(); } @@ -2463,11 +2463,11 @@ void ChartView::createShapes() uno::Reference< drawing::XShape > xDiagram_MarkHandles( ShapeFactory(m_xShapeFactory).createInvisibleRectangle( xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0,0) ) ); - ShapeFactory::setShapeName( xDiagram_MarkHandles, C2U("MarkHandles") ); + ShapeFactory::setShapeName( xDiagram_MarkHandles, "MarkHandles" ); uno::Reference< drawing::XShape > xDiagram_OuterRect( ShapeFactory(m_xShapeFactory).createInvisibleRectangle( xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0,0) ) ); - ShapeFactory::setShapeName( xDiagram_OuterRect, C2U("PlotAreaIncludingAxes") ); + ShapeFactory::setShapeName( xDiagram_OuterRect, "PlotAreaIncludingAxes" ); uno::Reference< drawing::XShapes > xDiagramPlusAxes_Shapes( ShapeFactory(m_xShapeFactory).createGroup2D(xDiagramPlusAxesPlusMarkHandlesGroup_Shapes ) ); @@ -2625,7 +2625,7 @@ void ChartView::impl_updateView() //m_bRefreshAddIn = false; try { - impl_notifyModeChangeListener(C2U("invalid")); + impl_notifyModeChangeListener("invalid"); //prepare draw model { @@ -2668,7 +2668,7 @@ void ChartView::impl_updateView() m_pDrawModelWrapper->unlockControllers(); } - impl_notifyModeChangeListener(C2U("valid")); + impl_notifyModeChangeListener("valid"); //m_bRefreshAddIn = bOldRefreshAddIn; } @@ -2682,7 +2682,7 @@ void SAL_CALL ChartView::modified( const lang::EventObject& /* aEvent */ ) if( m_bInViewUpdate ) m_bViewUpdatePending = true; - impl_notifyModeChangeListener(C2U("dirty")); + impl_notifyModeChangeListener("dirty"); } //SfxListener @@ -2825,11 +2825,11 @@ void SAL_CALL ChartView::setPropertyValue( const ::rtl::OUString& rPropertyName throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException , lang::WrappedTargetException, uno::RuntimeException) { - if( rPropertyName.equals(C2U("Resolution")) ) + if( rPropertyName.equals("Resolution") ) { awt::Size aNewResolution; if( ! (rValue >>= aNewResolution) ) - throw lang::IllegalArgumentException( C2U("Property 'Resolution' requires value of type awt::Size"), 0, 0 ); + throw lang::IllegalArgumentException( "Property 'Resolution' requires value of type awt::Size", 0, 0 ); if( m_aPageResolution.Width!=aNewResolution.Width || m_aPageResolution.Height!=aNewResolution.Height ) { @@ -2842,12 +2842,12 @@ void SAL_CALL ChartView::setPropertyValue( const ::rtl::OUString& rPropertyName this->modified( lang::EventObject( static_cast< uno::XWeak* >( this ) ) ); } } - else if( rPropertyName.equals(C2U("ZoomFactors")) ) + else if( rPropertyName.equals("ZoomFactors") ) { //#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100% uno::Sequence< beans::PropertyValue > aZoomFactors; if( ! (rValue >>= aZoomFactors) ) - throw lang::IllegalArgumentException( C2U("Property 'ZoomFactors' requires value of type Sequence< PropertyValue >"), 0, 0 ); + throw lang::IllegalArgumentException( "Property 'ZoomFactors' requires value of type Sequence< PropertyValue >", 0, 0 ); sal_Int32 nFilterArgs = aZoomFactors.getLength(); beans::PropertyValue* pDataValues = aZoomFactors.getArray(); @@ -2865,26 +2865,26 @@ void SAL_CALL ChartView::setPropertyValue( const ::rtl::OUString& rPropertyName pDataValues++; } } - else if( rPropertyName.equals(C2U("SdrViewIsInEditMode")) ) + else if( rPropertyName.equals("SdrViewIsInEditMode") ) { //#i77362 change notification for changes on additional shapes are missing if( ! (rValue >>= m_bSdrViewIsInEditMode) ) - throw lang::IllegalArgumentException( C2U("Property 'SdrViewIsInEditMode' requires value of type sal_Bool"), 0, 0 ); + throw lang::IllegalArgumentException( "Property 'SdrViewIsInEditMode' requires value of type sal_Bool", 0, 0 ); } else - throw beans::UnknownPropertyException( C2U("unknown property was tried to set to chart wizard"), 0 ); + throw beans::UnknownPropertyException( "unknown property was tried to set to chart wizard", 0 ); } Any SAL_CALL ChartView::getPropertyValue( const ::rtl::OUString& rPropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { Any aRet; - if( rPropertyName.equals(C2U("Resolution")) ) + if( rPropertyName.equals("Resolution") ) { aRet = uno::makeAny( m_aPageResolution ); } else - throw beans::UnknownPropertyException( C2U("unknown property was tried to get from chart wizard"), 0 ); + throw beans::UnknownPropertyException( "unknown property was tried to get from chart wizard", 0 ); return aRet; } diff --git a/chart2/source/view/main/DataPointSymbolSupplier.cxx b/chart2/source/view/main/DataPointSymbolSupplier.cxx index b07d7eefabd7..cdd80540093a 100644 --- a/chart2/source/view/main/DataPointSymbolSupplier.cxx +++ b/chart2/source/view/main/DataPointSymbolSupplier.cxx @@ -34,8 +34,8 @@ uno::Reference< drawing::XShapes > DataPointSymbolSupplier::create2DSymbolList( , const drawing::Direction3D& rSize ) { uno::Reference< drawing::XShape > xGroup( - xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.GroupShape" ) ), uno::UNO_QUERY ); + xShapeFactory->createInstance( + "com.sun.star.drawing.GroupShape" ), uno::UNO_QUERY ); if(xTarget.is()) xTarget->add(xGroup); uno::Reference< drawing::XShapes > xGroupShapes = diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx index 9a56c2c51fd8..2ef17307407b 100644 --- a/chart2/source/view/main/LabelPositionHelper.cxx +++ b/chart2/source/view/main/LabelPositionHelper.cxx @@ -66,7 +66,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT; else if( LABEL_ALIGN_LEFT==eAlignment || LABEL_ALIGN_LEFT_TOP==eAlignment || LABEL_ALIGN_LEFT_BOTTOM==eAlignment ) eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT; - uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,C2U("TextHorizontalAdjust")); + uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextHorizontalAdjust"); if(pHorizontalAdjustAny) *pHorizontalAdjustAny = uno::makeAny(eHorizontalAdjust); } @@ -78,7 +78,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM; else if( LABEL_ALIGN_BOTTOM==eAlignment || LABEL_ALIGN_RIGHT_BOTTOM==eAlignment || LABEL_ALIGN_LEFT_BOTTOM==eAlignment ) eVerticalAdjust = drawing::TextVerticalAdjust_TOP; - uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,C2U("TextVerticalAdjust")); + uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextVerticalAdjust"); if(pVerticalAdjustAny) *pVerticalAdjustAny = uno::makeAny(eVerticalAdjust); } @@ -105,13 +105,13 @@ void LabelPositionHelper::doDynamicFontResize( tAnySequence& rPropValues //------------------------- //handle dynamic font resize: awt::Size aOldReferenceSize; - if( xAxisModelProps->getPropertyValue( C2U("ReferencePageSize")) >>= aOldReferenceSize ) + if( xAxisModelProps->getPropertyValue( "ReferencePageSize") >>= aOldReferenceSize ) { - uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, C2U("CharHeight") ); + uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeight" ); lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize ); - pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, C2U("CharHeightAsian") ); + pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightAsian" ); lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize ); - pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, C2U("CharHeightComplex") ); + pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightComplex" ); lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize ); } } diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index e5b784bbe246..b022a92435d5 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -159,7 +159,7 @@ uno::Any* PropertyMapper::getValuePointerForLimitedSpace( tAnySequence& rPropVal , bool bLimitedHeight) { return PropertyMapper::getValuePointer( rPropValues, rPropNames - , bLimitedHeight ? C2U("TextMaximumFrameHeight") : C2U("TextMaximumFrameWidth") ); + , bLimitedHeight ? OUString("TextMaximumFrameHeight") : OUString("TextMaximumFrameWidth") ); } const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProperties() @@ -410,21 +410,21 @@ void PropertyMapper::getTextLabelMultiPropertyLists( , xSourceProp ); //some more shape properties apart from character properties, position-matrix and label string - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("LineStyle"), uno::makeAny(drawing::LineStyle_NONE) ) ); // drawing::LineStyle - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextHorizontalAdjust"), uno::makeAny(drawing::TextHorizontalAdjust_CENTER) ) ); // drawing::TextHorizontalAdjust - needs to be overwritten - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextVerticalAdjust"), uno::makeAny(drawing::TextVerticalAdjust_CENTER) ) ); //drawing::TextVerticalAdjust - needs to be overwritten - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowHeight"), uno::makeAny(sal_True) ) ); // sal_Bool - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( "LineStyle", uno::makeAny(drawing::LineStyle_NONE) ) ); // drawing::LineStyle + aValueMap.insert( tPropertyNameValueMap::value_type( "TextHorizontalAdjust", uno::makeAny(drawing::TextHorizontalAdjust_CENTER) ) ); // drawing::TextHorizontalAdjust - needs to be overwritten + aValueMap.insert( tPropertyNameValueMap::value_type( "TextVerticalAdjust", uno::makeAny(drawing::TextVerticalAdjust_CENTER) ) ); //drawing::TextVerticalAdjust - needs to be overwritten + aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowHeight", uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowWidth", uno::makeAny(sal_True) ) ); // sal_Bool if( bName ) - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("Name"), uno::makeAny( rtl::OUString() ) ) ); //CID rtl::OUString - needs to be overwritten for each point + aValueMap.insert( tPropertyNameValueMap::value_type( "Name", uno::makeAny( rtl::OUString() ) ) ); //CID rtl::OUString - needs to be overwritten for each point if( nLimitedSpace > 0 ) { if(bLimitedHeight) - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextMaximumFrameHeight"), uno::makeAny(nLimitedSpace) ) ); //sal_Int32 + aValueMap.insert( tPropertyNameValueMap::value_type( "TextMaximumFrameHeight", uno::makeAny(nLimitedSpace) ) ); //sal_Int32 else - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextMaximumFrameWidth"), uno::makeAny(nLimitedSpace) ) ); //sal_Int32 - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("ParaIsHyphenation"), uno::makeAny(sal_True) ) ); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextMaximumFrameWidth", uno::makeAny(nLimitedSpace) ) ); //sal_Int32 + aValueMap.insert( tPropertyNameValueMap::value_type( "ParaIsHyphenation", uno::makeAny(sal_True) ) ); } PropertyMapper::getMultiPropertyListsFromValueMap( rPropNames, rPropValues, aValueMap ); @@ -441,22 +441,22 @@ void PropertyMapper::getPreparedTextShapePropertyLists( , xSourceProp ); // auto-grow makes sure the shape has the correct size after setting text - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextHorizontalAdjust"), uno::makeAny( drawing::TextHorizontalAdjust_CENTER ))); - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextVerticalAdjust"), uno::makeAny( drawing::TextVerticalAdjust_CENTER ))); - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowHeight"), uno::makeAny( true ))); - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny( true ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextHorizontalAdjust", uno::makeAny( drawing::TextHorizontalAdjust_CENTER ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextVerticalAdjust", uno::makeAny( drawing::TextVerticalAdjust_CENTER ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowHeight", uno::makeAny( true ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowWidth", uno::makeAny( true ))); // set some distance to the border, in case it is shown const sal_Int32 nWidthDist = 250; const sal_Int32 nHeightDist = 125; - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextLeftDistance"), uno::makeAny( nWidthDist ))); - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextRightDistance"), uno::makeAny( nWidthDist ))); - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextUpperDistance"), uno::makeAny( nHeightDist ))); - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextLowerDistance"), uno::makeAny( nHeightDist ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextLeftDistance", uno::makeAny( nWidthDist ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextRightDistance", uno::makeAny( nWidthDist ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextUpperDistance", uno::makeAny( nHeightDist ))); + aValueMap.insert( tPropertyNameValueMap::value_type( "TextLowerDistance", uno::makeAny( nHeightDist ))); // use a line-joint showing the border of thick lines like two rectangles // filled in between. - aValueMap[C2U("LineJoint")] <<= drawing::LineJoint_ROUND; + aValueMap["LineJoint"] <<= drawing::LineJoint_ROUND; PropertyMapper::getMultiPropertyListsFromValueMap( rPropNames, rPropValues, aValueMap ); } diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 6a4569399fc1..739ce751ad5b 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -77,7 +77,7 @@ void ShapeFactory::setShapeName( const uno::Reference< drawing::XShape >& xShape { try { - xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ) + xProp->setPropertyValue( UNO_NAME_MISC_OBJ_NAME , uno::makeAny( rName ) ); } catch( const uno::Exception& e ) @@ -99,7 +99,7 @@ rtl::OUString ShapeFactory::getShapeName( const uno::Reference< drawing::XShape { try { - xProp->getPropertyValue( C2U( UNO_NAME_MISC_OBJ_NAME ) ) >>= aRet; + xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet; } catch( const uno::Exception& e ) { @@ -125,7 +125,7 @@ uno::Reference< drawing::XShapes > ShapeFactory::getChartRootShape( { if( xShapes->getByIndex( nN ) >>= xShape ) { - if( ShapeFactory::getShapeName( xShape ).equals(C2U("com.sun.star.chart2.shapes")) ) + if( ShapeFactory::getShapeName( xShape ).equals("com.sun.star.chart2.shapes") ) { xRet = uno::Reference< drawing::XShapes >( xShape, uno::UNO_QUERY ); break; @@ -147,7 +147,7 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape( //create the root shape xRet = this->createGroup2D( uno::Reference<drawing::XShapes>( xDrawPage, uno::UNO_QUERY ) - , C2U("com.sun.star.chart2.shapes") ); + , "com.sun.star.chart2.shapes" ); } return xRet; } @@ -442,7 +442,7 @@ uno::Reference<drawing::XShape> if( xSourceProp.is() ) { drawing::LineStyle aLineStyle; - xSourceProp->getPropertyValue( C2U( "BorderStyle" ) ) >>= aLineStyle; + xSourceProp->getPropertyValue( "BorderStyle" ) >>= aLineStyle; if( aLineStyle == drawing::LineStyle_SOLID ) bRounded = false; } @@ -471,8 +471,8 @@ uno::Reference<drawing::XShape> //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DExtrudeObject" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -486,16 +486,16 @@ uno::Reference<drawing::XShape> double fDepth = rSize.DirectionZ; if(fDepth<0) fDepth*=-1.0; - xProp->setPropertyValue( C2U( UNO_NAME_3D_EXTRUDE_DEPTH ) + xProp->setPropertyValue( UNO_NAME_3D_EXTRUDE_DEPTH , uno::makeAny((sal_Int32)fDepth) ); //PercentDiagonal sal_Int16 nPercentDiagonal = bRounded ? 3 : 0; - xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + xProp->setPropertyValue( UNO_NAME_3D_PERCENT_DIAGONAL , uno::makeAny( nPercentDiagonal ) ); //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_POLYPOLYGON3D , createPolyPolygon_Cube( rSize, double(nPercentDiagonal)/200.0,bRounded) ); //Matrix for position @@ -507,7 +507,7 @@ uno::Reference<drawing::XShape> , rPosition.PositionY , rPosition.PositionZ - (fDepth/2.0)); drawing::HomogenMatrix aHM = B3DHomMatrixToHomogenMatrix(aM); - xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + xProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(aHM) ); } } @@ -710,8 +710,8 @@ uno::Reference<drawing::XShape> //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DLatheObject") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DLatheObject" ), uno::UNO_QUERY ); xTarget->add(xShape); double fWidth = rSize.DirectionX/2.0; //The depth will be corrrected within Matrix @@ -727,7 +727,7 @@ uno::Reference<drawing::XShape> { //PercentDiagonal sal_Int16 nPercentDiagonal = 5; - xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + xProp->setPropertyValue( UNO_NAME_3D_PERCENT_DIAGONAL , uno::makeAny( nPercentDiagonal ) ); //Polygon @@ -736,7 +736,7 @@ uno::Reference<drawing::XShape> fHeight, fRadius, nVerticalSegmentCount) : createPolyPolygon_Cone( fHeight, fRadius, fTopHeight, nVerticalSegmentCount); - xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ), aPPolygon ); + xProp->setPropertyValue( UNO_NAME_3D_POLYPOLYGON3D, aPPolygon ); //Matrix for position { @@ -747,18 +747,18 @@ uno::Reference<drawing::XShape> aM.scale(1.0,1.0,rSize.DirectionZ/rSize.DirectionX); aM.translate(rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ); drawing::HomogenMatrix aHM = B3DHomMatrixToHomogenMatrix(aM); - xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + xProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(aHM) ); } //Segments - xProp->setPropertyValue( C2U( UNO_NAME_3D_HORZ_SEGS ) + xProp->setPropertyValue( UNO_NAME_3D_HORZ_SEGS , uno::makeAny(CHART_3DOBJECT_SEGMENTCOUNT) ); - xProp->setPropertyValue( C2U( UNO_NAME_3D_VERT_SEGS ) + xProp->setPropertyValue( UNO_NAME_3D_VERT_SEGS , uno::makeAny((sal_Int32)nVerticalSegmentCount) );//depends on point count of the used polygon //Reduced lines - xProp->setPropertyValue( C2U( UNO_NAME_3D_REDUCED_LINE_GEOMETRY ) + xProp->setPropertyValue( UNO_NAME_3D_REDUCED_LINE_GEOMETRY , uno::makeAny((sal_Bool)sal_True) ); } catch( const uno::Exception& e ) @@ -961,7 +961,7 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( m_xShapeFactory->createInstance( - C2U("com.sun.star.drawing.ClosedBezierShape") ), uno::UNO_QUERY ); + "com.sun.star.drawing.ClosedBezierShape" ), uno::UNO_QUERY ); xTarget->add(xShape); //need to add the shape before setting of properties //set properties @@ -981,7 +981,7 @@ uno::Reference< drawing::XShape > , fUnitCircleStartAngleDegree*F_PI/180.0, fUnitCircleWidthAngleDegree*F_PI/180.0 , aTransformationFromUnitCircle, fAngleSubdivisionRadian ); - xProp->setPropertyValue( C2U( "PolyPolygonBezier" ), uno::makeAny( aCoords ) ); + xProp->setPropertyValue( "PolyPolygonBezier", uno::makeAny( aCoords ) ); } catch( const uno::Exception& e ) { @@ -1013,8 +1013,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DExtrudeObject" ), uno::UNO_QUERY ); xTarget->add(xShape); //need to add the shape before setting of properties //set properties @@ -1035,36 +1035,36 @@ uno::Reference< drawing::XShape > , aTransformationFromUnitCircle, fAngleSubdivisionRadian ); //depth - xProp->setPropertyValue( C2U( UNO_NAME_3D_EXTRUDE_DEPTH ) + xProp->setPropertyValue( UNO_NAME_3D_EXTRUDE_DEPTH , uno::makeAny((sal_Int32)fDepth) ); //PercentDiagonal sal_Int16 nPercentDiagonal = 0; - xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + xProp->setPropertyValue( UNO_NAME_3D_PERCENT_DIAGONAL , uno::makeAny( nPercentDiagonal ) ); //Polygon drawing::PolyPolygonShape3D aPoly( BezierToPoly(aCoords) ); ShapeFactory::closePolygon( aPoly ); - xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_POLYPOLYGON3D , uno::makeAny( aPoly ) ); //DoubleSided - xProp->setPropertyValue( C2U( UNO_NAME_3D_DOUBLE_SIDED ) + xProp->setPropertyValue( UNO_NAME_3D_DOUBLE_SIDED , uno::makeAny( (sal_Bool)true) ); //Reduced lines - xProp->setPropertyValue( C2U( UNO_NAME_3D_REDUCED_LINE_GEOMETRY ) + xProp->setPropertyValue( UNO_NAME_3D_REDUCED_LINE_GEOMETRY , uno::makeAny((sal_Bool)sal_True) ); //TextureProjectionMode - xProp->setPropertyValue( C2U( UNO_NAME_3D_TEXTURE_PROJ_Y ) + xProp->setPropertyValue( UNO_NAME_3D_TEXTURE_PROJ_Y , uno::makeAny( drawing::TextureProjectionMode_OBJECTSPECIFIC ) ); //TextureProjectionMode - xProp->setPropertyValue( C2U( UNO_NAME_3D_TEXTURE_PROJ_X ) + xProp->setPropertyValue( UNO_NAME_3D_TEXTURE_PROJ_X , uno::makeAny( drawing::TextureProjectionMode_PARALLEL ) ); - xProp->setPropertyValue( C2U( UNO_NAME_3D_TEXTURE_PROJ_Y ) + xProp->setPropertyValue( UNO_NAME_3D_TEXTURE_PROJ_Y , uno::makeAny( drawing::TextureProjectionMode_OBJECTSPECIFIC ) ); } catch( const uno::Exception& e ) @@ -1093,8 +1093,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DPolygonObject" ) ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DPolygonObject" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -1105,27 +1105,27 @@ uno::Reference< drawing::XShape > try { //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_POLYPOLYGON3D , rStripe.getPolyPolygonShape3D() ); //TexturePolygon - xProp->setPropertyValue( C2U( UNO_NAME_3D_TEXTUREPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_TEXTUREPOLYGON3D , rStripe.getTexturePolygon( nRotatedTexture ) ); //Normals Polygon - xProp->setPropertyValue( C2U( UNO_NAME_3D_NORMALSPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_NORMALSPOLYGON3D , rStripe.getNormalsPolygon() ); //NormalsKind if(bFlatNormals) - xProp->setPropertyValue( C2U( UNO_NAME_3D_NORMALS_KIND ) + xProp->setPropertyValue( UNO_NAME_3D_NORMALS_KIND , uno::makeAny( drawing::NormalsKind_FLAT ) ); //LineOnly - xProp->setPropertyValue( C2U( UNO_NAME_3D_LINEONLY ) + xProp->setPropertyValue( UNO_NAME_3D_LINEONLY , uno::makeAny( (sal_Bool)false) ); //DoubleSided - xProp->setPropertyValue( C2U( UNO_NAME_3D_DOUBLE_SIDED ) + xProp->setPropertyValue( UNO_NAME_3D_DOUBLE_SIDED , uno::makeAny(bDoubleSided) ); if( xSourceProp.is()) @@ -1152,8 +1152,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DExtrudeObject") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DExtrudeObject" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -1164,20 +1164,20 @@ uno::Reference< drawing::XShape > try { //depth - xProp->setPropertyValue( C2U( UNO_NAME_3D_EXTRUDE_DEPTH ) + xProp->setPropertyValue( UNO_NAME_3D_EXTRUDE_DEPTH , uno::makeAny((sal_Int32)fDepth) ); //PercentDiagonal sal_Int16 nPercentDiagonal = 0; - xProp->setPropertyValue( C2U( UNO_NAME_3D_PERCENT_DIAGONAL ) + xProp->setPropertyValue( UNO_NAME_3D_PERCENT_DIAGONAL , uno::makeAny( nPercentDiagonal ) ); //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_POLYPOLYGON3D , uno::makeAny( rPolyPolygon ) ); //DoubleSided - xProp->setPropertyValue( C2U( UNO_NAME_3D_DOUBLE_SIDED ) + xProp->setPropertyValue( UNO_NAME_3D_DOUBLE_SIDED , uno::makeAny( (sal_Bool)true) ); //the z component of the polygon is now ignored by the drawing layer, @@ -1191,7 +1191,7 @@ uno::Reference< drawing::XShape > , 0 , rPolyPolygon.SequenceZ[0][0] ); drawing::HomogenMatrix aHM = B3DHomMatrixToHomogenMatrix(aM); - xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + xProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(aHM) ); } } @@ -1212,8 +1212,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.PolyPolygonShape") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.PolyPolygonShape" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -1227,12 +1227,12 @@ uno::Reference< drawing::XShape > drawing::PointSequenceSequence aPoints( PolyToPointSequence(rPolyPolygon) ); //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ) + xProp->setPropertyValue( UNO_NAME_POLYPOLYGON , uno::makeAny( aPoints ) ); //ZOrder //an area should always be behind other shapes - xProp->setPropertyValue( C2U( UNO_NAME_MISC_OBJ_ZORDER ) + xProp->setPropertyValue( UNO_NAME_MISC_OBJ_ZORDER , uno::makeAny( sal_Int32(0) ) ); } catch( const uno::Exception& e ) @@ -1785,8 +1785,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.PolyPolygonShape") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.PolyPolygonShape" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -1800,15 +1800,15 @@ uno::Reference< drawing::XShape > createPolyPolygon_Symbol( rPosition, rSize, nStandardSymbol ) )); //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ) + xProp->setPropertyValue( UNO_NAME_POLYPOLYGON , uno::makeAny( aPoints ) ); //LineColor - xProp->setPropertyValue( C2U( UNO_NAME_LINECOLOR ) + xProp->setPropertyValue( UNO_NAME_LINECOLOR , uno::makeAny( nBorderColor ) ); //FillColor - xProp->setPropertyValue( C2U( UNO_NAME_FILLCOLOR ) + xProp->setPropertyValue( UNO_NAME_FILLCOLOR , uno::makeAny( nFillColor ) ); } catch( const uno::Exception& e ) @@ -1834,8 +1834,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.GraphicObjectShape") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.GraphicObjectShape" ), uno::UNO_QUERY ); xTarget->add(xShape); try @@ -1858,7 +1858,7 @@ uno::Reference< drawing::XShape > { try { - xProp->setPropertyValue( C2U("Graphic"), uno::makeAny( xGraphic )); + xProp->setPropertyValue( "Graphic", uno::makeAny( xGraphic )); } catch( const uno::Exception& e ) { @@ -1878,8 +1878,8 @@ uno::Reference< drawing::XShapes > { //create and add to target uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.GroupShape" ) ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.GroupShape" ), uno::UNO_QUERY ); xTarget->add(xShape); //set name @@ -1913,8 +1913,8 @@ uno::Reference< drawing::XShapes > { //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DSceneObject" ) ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DSceneObject" ), uno::UNO_QUERY ); xTarget->add(xShape); @@ -1930,7 +1930,7 @@ uno::Reference< drawing::XShapes > try { ::basegfx::B3DHomMatrix aM; - xProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) + xProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX , uno::makeAny(B3DHomMatrixToHomogenMatrix(aM)) ); } catch( const uno::Exception& e ) @@ -1966,8 +1966,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.EllipseShape") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.EllipseShape" ), uno::UNO_QUERY ); xTarget->add(xShape); try @@ -1992,7 +1992,7 @@ uno::Reference< drawing::XShape > try { drawing::CircleKind eKind = drawing::CircleKind_FULL; - xProp->setPropertyValue( C2U( UNO_NAME_CIRCKIND ) + xProp->setPropertyValue( UNO_NAME_CIRCKIND , uno::makeAny( eKind ) ); } catch( const uno::Exception& e ) @@ -2016,8 +2016,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.Shape3DPolygonObject") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.Shape3DPolygonObject" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -2028,31 +2028,31 @@ uno::Reference< drawing::XShape > try { //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_3D_POLYPOLYGON3D ) + xProp->setPropertyValue( UNO_NAME_3D_POLYPOLYGON3D , uno::makeAny( rPoints ) ); //LineOnly - xProp->setPropertyValue( C2U( UNO_NAME_3D_LINEONLY ) + xProp->setPropertyValue( UNO_NAME_3D_LINEONLY , uno::makeAny( (sal_Bool)true ) ); //Transparency if(rLineProperties.Transparence.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINETRANSPARENCE ) + xProp->setPropertyValue( UNO_NAME_LINETRANSPARENCE , rLineProperties.Transparence ); //LineStyle if(rLineProperties.LineStyle.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINESTYLE ) + xProp->setPropertyValue( UNO_NAME_LINESTYLE , rLineProperties.LineStyle ); //LineWidth if(rLineProperties.Width.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINEWIDTH ) + xProp->setPropertyValue( UNO_NAME_LINEWIDTH , rLineProperties.Width ); //LineColor if(rLineProperties.Color.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINECOLOR ) + xProp->setPropertyValue( UNO_NAME_LINECOLOR , rLineProperties.Color ); //, uno::makeAny( sal_Int32( Color(COL_RED).GetColor()) ) ); } @@ -2077,8 +2077,8 @@ uno::Reference< drawing::XShape > //create shape uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.PolyLineShape") ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.PolyLineShape" ), uno::UNO_QUERY ); xTarget->add(xShape); //set properties @@ -2089,34 +2089,34 @@ uno::Reference< drawing::XShape > try { //Polygon - xProp->setPropertyValue( C2U( UNO_NAME_POLYPOLYGON ) + xProp->setPropertyValue( UNO_NAME_POLYPOLYGON , uno::makeAny( rPoints ) ); if(pLineProperties) { //Transparency if(pLineProperties->Transparence.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINETRANSPARENCE ) + xProp->setPropertyValue( UNO_NAME_LINETRANSPARENCE , pLineProperties->Transparence ); //LineStyle if(pLineProperties->LineStyle.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINESTYLE ) + xProp->setPropertyValue( UNO_NAME_LINESTYLE , pLineProperties->LineStyle ); //LineWidth if(pLineProperties->Width.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINEWIDTH ) + xProp->setPropertyValue( UNO_NAME_LINEWIDTH , pLineProperties->Width ); //LineColor if(pLineProperties->Color.hasValue()) - xProp->setPropertyValue( C2U( UNO_NAME_LINECOLOR ) + xProp->setPropertyValue( UNO_NAME_LINECOLOR , pLineProperties->Color ); //LineDashName if(pLineProperties->DashName.hasValue()) - xProp->setPropertyValue( C2U( "LineDashName" ) + xProp->setPropertyValue( "LineDashName" , pLineProperties->DashName ); } } @@ -2148,8 +2148,8 @@ void ShapeFactory::makeShapeInvisible( const uno::Reference< drawing::XShape >& { try { - xShapeProp->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_NONE )); - xShapeProp->setPropertyValue( C2U("FillStyle"), uno::makeAny( drawing::FillStyle_NONE )); + xShapeProp->setPropertyValue( "LineStyle", uno::makeAny( drawing::LineStyle_NONE )); + xShapeProp->setPropertyValue( "FillStyle", uno::makeAny( drawing::FillStyle_NONE )); } catch( const uno::Exception& e ) { @@ -2168,7 +2168,7 @@ uno::Reference< drawing::XShape > ShapeFactory::createInvisibleRectangle( return 0; uno::Reference< drawing::XShape > xShape( m_xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY ); if( xTarget.is() && xShape.is()) { xTarget->add( xShape ); @@ -2199,8 +2199,8 @@ uno::Reference< drawing::XShape > //create shape and add to page uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.TextShape" ) ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.TextShape" ), uno::UNO_QUERY ); xTarget->add(xShape); //set text @@ -2218,7 +2218,7 @@ uno::Reference< drawing::XShape > //the matrix needs to be set at the end behind autogrow and such position influencing properties try { - xProp->setPropertyValue( C2U( "Transformation" ), rATransformation ); + xProp->setPropertyValue( "Transformation", rATransformation ); } catch( const uno::Exception& e ) { diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 13b136d9d363..764274883e74 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -70,12 +70,12 @@ double lcl_CalcViewFontSize( awt::Size aPropRefSize; float fFontHeight( 0.0 ); - if( xProp.is() && ( xProp->getPropertyValue( C2U( "CharHeight" )) >>= fFontHeight )) + if( xProp.is() && ( xProp->getPropertyValue( "CharHeight") >>= fFontHeight )) { fResult = fFontHeight; try { - if( (xProp->getPropertyValue( C2U( "ReferencePageSize" )) >>= aPropRefSize) && + if( (xProp->getPropertyValue( "ReferencePageSize") >>= aPropRefSize) && (aPropRefSize.Height > 0)) { fResult = ::chart::RelativeSizeHelper::calculate( fFontHeight, aPropRefSize, rReferenceSize ); @@ -104,7 +104,7 @@ void lcl_getProperties( ::chart::tPropertyNameValueMap aLineFillValueMap; ::chart::PropertyMapper::getValueMap( aLineFillValueMap, ::chart::PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xLegendProp ); - aLineFillValueMap[ C2U("LineJoint") ] = uno::makeAny( drawing::LineJoint_ROUND ); + aLineFillValueMap[ "LineJoint" ] = uno::makeAny( drawing::LineJoint_ROUND ); ::chart::PropertyMapper::getMultiPropertyListsFromValueMap( rOutLineFillProperties.first, rOutLineFillProperties.second, aLineFillValueMap ); @@ -114,31 +114,31 @@ void lcl_getProperties( ::chart::PropertyMapper::getValueMap( aTextValueMap, ::chart::PropertyMapper::getPropertyNameMapForCharacterProperties(), xLegendProp ); drawing::TextHorizontalAdjust eHorizAdjust( drawing::TextHorizontalAdjust_LEFT ); - aTextValueMap[ C2U("TextAutoGrowHeight") ] = uno::makeAny( sal_True ); - aTextValueMap[ C2U("TextAutoGrowWidth") ] = uno::makeAny( sal_True ); - aTextValueMap[ C2U("TextHorizontalAdjust") ] = uno::makeAny( eHorizAdjust ); - aTextValueMap[ C2U("TextMaximumFrameWidth") ] = uno::makeAny( rReferenceSize.Width ); //needs to be overwritten by actual available space in the legend + aTextValueMap[ "TextAutoGrowHeight" ] = uno::makeAny( sal_True ); + aTextValueMap[ "TextAutoGrowWidth" ] = uno::makeAny( sal_True ); + aTextValueMap[ "TextHorizontalAdjust" ] = uno::makeAny( eHorizAdjust ); + aTextValueMap[ "TextMaximumFrameWidth" ] = uno::makeAny( rReferenceSize.Width ); //needs to be overwritten by actual available space in the legend // recalculate font size awt::Size aPropRefSize; float fFontHeight( 0.0 ); - if( (xLegendProp->getPropertyValue( C2U( "ReferencePageSize" )) >>= aPropRefSize) && + if( (xLegendProp->getPropertyValue( "ReferencePageSize") >>= aPropRefSize) && (aPropRefSize.Height > 0) && - (aTextValueMap[ C2U("CharHeight") ] >>= fFontHeight) ) + (aTextValueMap[ "CharHeight" ] >>= fFontHeight) ) { - aTextValueMap[ C2U("CharHeight") ] = uno::makeAny( + aTextValueMap[ "CharHeight" ] = uno::makeAny( static_cast< float >( ::chart::RelativeSizeHelper::calculate( fFontHeight, aPropRefSize, rReferenceSize ))); - if( aTextValueMap[ C2U("CharHeightAsian") ] >>= fFontHeight ) + if( aTextValueMap[ "CharHeightAsian" ] >>= fFontHeight ) { - aTextValueMap[ C2U("CharHeightAsian") ] = uno::makeAny( + aTextValueMap[ "CharHeightAsian" ] = uno::makeAny( static_cast< float >( ::chart::RelativeSizeHelper::calculate( fFontHeight, aPropRefSize, rReferenceSize ))); } - if( aTextValueMap[ C2U("CharHeightComplex") ] >>= fFontHeight ) + if( aTextValueMap[ "CharHeightComplex" ] >>= fFontHeight ) { - aTextValueMap[ C2U("CharHeightComplex") ] = uno::makeAny( + aTextValueMap[ "CharHeightComplex" ] = uno::makeAny( static_cast< float >( ::chart::RelativeSizeHelper::calculate( fFontHeight, aPropRefSize, rReferenceSize ))); } @@ -166,7 +166,7 @@ awt::Size lcl_createTextShapes( // create label shape Reference< drawing::XShape > xEntry( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.TextShape" )), uno::UNO_QUERY_THROW ); + "com.sun.star.drawing.TextShape"), uno::UNO_QUERY_THROW ); xTarget->add( xEntry ); // set label text @@ -181,7 +181,7 @@ awt::Size lcl_createTextShapes( OUString aLabelString( aLabelSeq[i]->getString()); // workaround for Issue #i67540# if( aLabelString.isEmpty()) - aLabelString = C2U(" "); + aLabelString = " "; if( xRange.is()) xRange->setString( aLabelString ); @@ -300,7 +300,7 @@ awt::Size lcl_placeLegendEntries( const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance; sal_Int32 nMaxTextWidth = rAvailableSpace.Width - (2 * nXPadding) - nSymbolPlusDistanceWidth; - rtl::OUString aPropNameTextMaximumFrameWidth( C2U("TextMaximumFrameWidth") ); + rtl::OUString aPropNameTextMaximumFrameWidth( "TextMaximumFrameWidth" ); uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, aPropNameTextMaximumFrameWidth); if(pFrameWidthAny) { @@ -769,7 +769,7 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe if(xLegendProp.is()) { sal_Int16 nWritingMode=-1; - if( (xLegendProp->getPropertyValue( C2U("WritingMode") ) >>= nWritingMode) ) + if( (xLegendProp->getPropertyValue( "WritingMode" ) >>= nWritingMode) ) { if( nWritingMode == text::WritingMode2::PAGE ) nWritingMode = nDefaultWritingMode; @@ -828,7 +828,7 @@ bool VLegend::isVisible( const Reference< XLegend > & xLegend ) try { Reference< beans::XPropertySet > xLegendProp( xLegend, uno::UNO_QUERY_THROW ); - xLegendProp->getPropertyValue( C2U( "Show" )) >>= bShow; + xLegendProp->getPropertyValue( "Show") >>= bShow; } catch( const uno::Exception & ex ) { @@ -853,7 +853,7 @@ void VLegend::createShapes( { //create shape and add to page m_xShape.set( m_xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.GroupShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.GroupShape"), uno::UNO_QUERY ); m_xTarget->add( m_xShape ); // set name to enable selection @@ -868,7 +868,7 @@ void VLegend::createShapes( { Reference< drawing::XShape > xBorder( m_xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY ); // for quickly setting properties tPropertyValues aLineFillProperties; @@ -881,11 +881,11 @@ void VLegend::createShapes( if( xLegendProp.is()) { // get Expansion property - xLegendProp->getPropertyValue( C2U( "Expansion" )) >>= eExpansion; + xLegendProp->getPropertyValue( "Expansion") >>= eExpansion; if( eExpansion == ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) { RelativeSize aRelativeSize; - if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize)) + if ((xLegendProp->getPropertyValue( "RelativeSize") >>= aRelativeSize)) { aLegendSize.Width = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width )); aLegendSize.Height = static_cast<sal_Int32>(::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height )); @@ -906,7 +906,7 @@ void VLegend::createShapes( Reference< beans::XPropertySet >( xBorder, uno::UNO_QUERY )); //because of this name this border will be used for marking the legend - ShapeFactory(m_xShapeFactory).setShapeName( xBorder, C2U("MarkHandles") ); + ShapeFactory(m_xShapeFactory).setShapeName( xBorder, "MarkHandles" ); } // create entries @@ -977,10 +977,10 @@ void VLegend::changePosition( chart2::RelativePosition aRelativePosition; bool bAutoPosition = - ! (xLegendProp->getPropertyValue( C2U( "RelativePosition" )) >>= aRelativePosition); + ! (xLegendProp->getPropertyValue( "RelativePosition") >>= aRelativePosition); LegendPosition ePos = LegendPosition_CUSTOM; - xLegendProp->getPropertyValue( C2U( "AnchorPosition" )) >>= ePos; + xLegendProp->getPropertyValue( "AnchorPosition") >>= ePos; //calculate position if( bAutoPosition ) diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 24979bb30a59..a22cd9cffeb2 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -71,7 +71,7 @@ void lcl_setPropetiesToShape( ::chart::tAnySequence aPropValues; ::chart::PropertyMapper::getMultiPropertyListsFromValueMap( aPropNames, aPropValues, aValueMap ); - uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(aPropValues,aPropNames,C2U("LineWidth")); + uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(aPropValues,aPropNames,"LineWidth"); sal_Int32 nLineWidth = 0; if( pLineWidthAny && (*pLineWidthAny>>=nLineWidth) ) { @@ -104,7 +104,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( return xResult; xResult.set( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.GroupShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.GroupShape"), uno::UNO_QUERY ); xSymbolContainer->add( xResult ); Reference< drawing::XShapes > xResultGroup( xResult, uno::UNO_QUERY ); if( ! xResultGroup.is()) @@ -120,7 +120,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( if( eStyle == LegendSymbolStyle_LINE ) { Reference< drawing::XShape > xLine( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.LineShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.LineShape"), uno::UNO_QUERY ); if( xLine.is()) { xResultGroup->add( xLine ); @@ -141,7 +141,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( if( aSymbol.Style == chart2::SymbolStyle_STANDARD ) { // take series color as fill color - xLegendEntryProperties->getPropertyValue( C2U("Color")) >>= aSymbol.FillColor; + xLegendEntryProperties->getPropertyValue( "Color") >>= aSymbol.FillColor; // border of symbols always same as fill color aSymbol.BorderColor = aSymbol.FillColor; @@ -170,7 +170,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( else if( eStyle == LegendSymbolStyle_CIRCLE ) { Reference< drawing::XShape > xShape( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.EllipseShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.EllipseShape"), uno::UNO_QUERY ); if( xShape.is() ) { xResultGroup->add( xShape ); @@ -183,7 +183,7 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( else // eStyle == LegendSymbolStyle_BOX { Reference< drawing::XShape > xShape( xShapeFactory->createInstance( - C2U( "com.sun.star.drawing.RectangleShape" )), uno::UNO_QUERY ); + "com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY ); if( xShape.is() ) { xResultGroup->add( xShape ); diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx index f999388a4fd9..22c4155811d9 100644 --- a/chart2/source/view/main/VLineProperties.cxx +++ b/chart2/source/view/main/VLineProperties.cxx @@ -48,11 +48,11 @@ void VLineProperties::initFromPropertySet( const uno::Reference< beans::XPropert { if( bUseSeriesPropertyNames ) try { - this->Color = xProp->getPropertyValue( C2U( "BorderColor" ) ); - this->LineStyle = xProp->getPropertyValue( C2U( "BorderStyle" ) ); - this->Transparence = xProp->getPropertyValue( C2U( "BorderTransparency" ) ); - this->Width = xProp->getPropertyValue( C2U( "BorderWidth" ) ); - this->DashName = xProp->getPropertyValue( C2U( "BorderDashName" ) ); + this->Color = xProp->getPropertyValue( "BorderColor" ); + this->LineStyle = xProp->getPropertyValue( "BorderStyle" ); + this->Transparence = xProp->getPropertyValue( "BorderTransparency" ); + this->Width = xProp->getPropertyValue( "BorderWidth" ); + this->DashName = xProp->getPropertyValue( "BorderDashName" ); } catch( const uno::Exception& e ) { @@ -60,11 +60,11 @@ void VLineProperties::initFromPropertySet( const uno::Reference< beans::XPropert } else try { - this->Color = xProp->getPropertyValue( C2U( "LineColor" ) ); - this->LineStyle = xProp->getPropertyValue( C2U( "LineStyle" ) ); - this->Transparence = xProp->getPropertyValue( C2U( "LineTransparence" ) ); - this->Width = xProp->getPropertyValue( C2U( "LineWidth" ) ); - this->DashName = xProp->getPropertyValue( C2U( "LineDashName" ) ); + this->Color = xProp->getPropertyValue( "LineColor" ); + this->LineStyle = xProp->getPropertyValue( "LineStyle" ); + this->Transparence = xProp->getPropertyValue( "LineTransparence" ); + this->Width = xProp->getPropertyValue( "LineWidth" ); + this->DashName = xProp->getPropertyValue( "LineDashName" ); } catch( const uno::Exception& e ) { diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx index 4fb26a00410d..9fcd762d6fff 100644 --- a/chart2/source/view/main/VTitle.cxx +++ b/chart2/source/view/main/VTitle.cxx @@ -101,7 +101,7 @@ void VTitle::changePosition( const awt::Point& rPos ) ::basegfx::B2DHomMatrix aM; aM.rotate( -m_fRotationAngleDegree*F_PI/180.0 );//#i78696#->#i80521# aM.translate( m_nXPos, m_nYPos); - xShapeProp->setPropertyValue( C2U( "Transformation" ), uno::makeAny( B2DHomMatrixToHomogenMatrix3(aM) ) ); + xShapeProp->setPropertyValue( "Transformation", uno::makeAny( B2DHomMatrixToHomogenMatrix3(aM) ) ); } catch( const uno::Exception& e ) { @@ -124,8 +124,8 @@ void VTitle::createShapes( //create shape and add to page uno::Reference< drawing::XShape > xShape( - m_xShapeFactory->createInstance( C2U( - "com.sun.star.drawing.TextShape" ) ), uno::UNO_QUERY ); + m_xShapeFactory->createInstance( + "com.sun.star.drawing.TextShape" ), uno::UNO_QUERY ); m_xTarget->add(xShape); m_xShape = xShape; @@ -152,14 +152,14 @@ void VTitle::createShapes( drawing::TextHorizontalAdjust eHorizontalAdjust = drawing::TextHorizontalAdjust_CENTER; drawing::TextVerticalAdjust eVerticalAdjust = drawing::TextVerticalAdjust_CENTER; - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextHorizontalAdjust"), uno::makeAny(eHorizontalAdjust) ) ); // drawing::TextHorizontalAdjust - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextVerticalAdjust"), uno::makeAny(eVerticalAdjust) ) ); //drawing::TextVerticalAdjust - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowHeight"), uno::makeAny(sal_True) ) ); // sal_Bool - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( "TextHorizontalAdjust", uno::makeAny(eHorizontalAdjust) ) ); // drawing::TextHorizontalAdjust + aValueMap.insert( tPropertyNameValueMap::value_type( "TextVerticalAdjust", uno::makeAny(eVerticalAdjust) ) ); //drawing::TextVerticalAdjust + aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowHeight", uno::makeAny(sal_True) ) ); // sal_Bool + aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowWidth", uno::makeAny(sal_True) ) ); // sal_Bool //set name/classified ObjectID (CID) if( !m_aCID.isEmpty() ) - aValueMap.insert( tPropertyNameValueMap::value_type( C2U("Name"), uno::makeAny( m_aCID ) ) ); //CID rtl::OUString + aValueMap.insert( tPropertyNameValueMap::value_type( "Name", uno::makeAny( m_aCID ) ) ); //CID rtl::OUString } //set global title properties @@ -173,7 +173,7 @@ void VTitle::createShapes( sal_Bool bStackCharacters(sal_False); try { - xTitleProperties->getPropertyValue( C2U( "StackCharacters" ) ) >>= bStackCharacters; + xTitleProperties->getPropertyValue( "StackCharacters" ) >>= bStackCharacters; } catch( const uno::Exception& e ) { @@ -200,7 +200,7 @@ void VTitle::createShapes( // adapt font size according to page size awt::Size aOldRefSize; - if( xTitleProperties->getPropertyValue( C2U("ReferencePageSize")) >>= aOldRefSize ) + if( xTitleProperties->getPropertyValue( "ReferencePageSize") >>= aOldRefSize ) { RelativeSizeHelper::adaptFontSizes( xTargetProps, aOldRefSize, rReferenceSize ); } @@ -219,7 +219,7 @@ void VTitle::createShapes( } awt::Size aOldRefSize; bool bHasRefPageSize = - ( xTitleProperties->getPropertyValue( C2U("ReferencePageSize")) >>= aOldRefSize ); + ( xTitleProperties->getPropertyValue( "ReferencePageSize") >>= aOldRefSize ); if( aStringList.getLength()>0 ) { @@ -237,23 +237,23 @@ void VTitle::createShapes( // #i109336# Improve auto positioning in chart float fFontHeight = 0.0; - if ( xShapeProp.is() && ( xShapeProp->getPropertyValue( C2U( "CharHeight" ) ) >>= fFontHeight ) ) + if ( xShapeProp.is() && ( xShapeProp->getPropertyValue( "CharHeight" ) >>= fFontHeight ) ) { fFontHeight *= ( 2540.0f / 72.0f ); // pt -> 1/100 mm float fXFraction = 0.18f; sal_Int32 nXDistance = static_cast< sal_Int32 >( ::rtl::math::round( fFontHeight * fXFraction ) ); float fYFraction = 0.30f; sal_Int32 nYDistance = static_cast< sal_Int32 >( ::rtl::math::round( fFontHeight * fYFraction ) ); - xShapeProp->setPropertyValue( C2U( "TextLeftDistance" ), uno::makeAny( nXDistance ) ); - xShapeProp->setPropertyValue( C2U( "TextRightDistance" ), uno::makeAny( nXDistance ) ); - xShapeProp->setPropertyValue( C2U( "TextUpperDistance" ), uno::makeAny( nYDistance ) ); - xShapeProp->setPropertyValue( C2U( "TextLowerDistance" ), uno::makeAny( nYDistance ) ); + xShapeProp->setPropertyValue( "TextLeftDistance", uno::makeAny( nXDistance ) ); + xShapeProp->setPropertyValue( "TextRightDistance", uno::makeAny( nXDistance ) ); + xShapeProp->setPropertyValue( "TextUpperDistance", uno::makeAny( nYDistance ) ); + xShapeProp->setPropertyValue( "TextLowerDistance", uno::makeAny( nYDistance ) ); } try { double fAngleDegree = 0; - xTitleProperties->getPropertyValue( C2U( "TextRotation" ) ) >>= fAngleDegree; + xTitleProperties->getPropertyValue( "TextRotation" ) >>= fAngleDegree; m_fRotationAngleDegree += fAngleDegree; } catch( const uno::Exception& e ) @@ -268,7 +268,7 @@ void VTitle::createShapes( ::basegfx::B2DHomMatrix aM; aM.rotate( -m_fRotationAngleDegree*F_PI/180.0 );//#i78696#->#i80521# aM.translate( m_nXPos, m_nYPos ); - xShapeProp->setPropertyValue( C2U( "Transformation" ), uno::makeAny( B2DHomMatrixToHomogenMatrix3(aM) ) ); + xShapeProp->setPropertyValue( "Transformation", uno::makeAny( B2DHomMatrixToHomogenMatrix3(aM) ) ); } catch( const uno::Exception& e ) { |