diff options
author | Xisco Fauli <anistenis@gmail.com> | 2011-04-06 16:53:52 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-04-06 20:46:25 +0300 |
commit | 34327e6727d63d312ff82aa3c9bbd74da91e1259 (patch) | |
tree | bdb26db82beb172a7252ad1e23adab01910fa759 /xmloff | |
parent | 34d4fb1fe53d819880561b4062b71dedca770095 (diff) |
use RTL_CONSTASCII_USTRINGPARAM
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.cxx | 88 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLChartContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLLegendContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 2 |
5 files changed, 51 insertions, 51 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 5b9fb7c56b0f..0084d1751f07 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -178,18 +178,18 @@ Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() { case SCH_XML_AXIS_X: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii( "HasXAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxisTitle" )); else - aPropName = OUString::createFromAscii( "HasSecondaryXAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryXAxisTitle" )); break; case SCH_XML_AXIS_Y: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii( "HasYAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasYAxisTitle" )); else - aPropName = OUString::createFromAscii( "HasSecondaryYAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxisTitle" )); break; case SCH_XML_AXIS_Z: - aPropName = OUString::createFromAscii( "HasZAxisTitle" ); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM( "HasZAxisTitle" )); break; case SCH_XML_AXIS_UNDEF: OSL_TRACE( "Invalid axis" ); @@ -212,21 +212,21 @@ void SchXMLAxisContext::CreateGrid( OUString sAutoStyleName, bool bIsMajor ) { case SCH_XML_AXIS_X: if( bIsMajor ) - aPropName = OUString::createFromAscii("HasXAxisGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxisGrid")); else - aPropName = OUString::createFromAscii("HasXAxisHelpGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxisHelpGrid")); break; case SCH_XML_AXIS_Y: if( bIsMajor ) - aPropName = OUString::createFromAscii("HasYAxisGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxisGrid")); else - aPropName = OUString::createFromAscii("HasYAxisHelpGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxisHelpGrid")); break; case SCH_XML_AXIS_Z: if( bIsMajor ) - aPropName = OUString::createFromAscii("HasZAxisGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasZAxisGrid")); else - aPropName = OUString::createFromAscii("HasZAxisHelpGrid"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasZAxisHelpGrid")); break; case SCH_XML_AXIS_UNDEF: OSL_TRACE( "Invalid axis" ); @@ -418,21 +418,21 @@ void SchXMLAxisContext::CreateAxis() { case SCH_XML_AXIS_X: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii("HasXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxis")); else - aPropName = OUString::createFromAscii("HasSecondaryXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryXAxis")); break; case SCH_XML_AXIS_Y: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii("HasYAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxis")); else - aPropName = OUString::createFromAscii("HasSecondaryYAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryYAxis")); break; case SCH_XML_AXIS_Z: if( m_aCurrentAxis.nAxisIndex == 0 ) - aPropName = OUString::createFromAscii("HasXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxis")); else - aPropName = OUString::createFromAscii("HasSecondaryXAxis"); + aPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryXAxis")); break; case SCH_XML_AXIS_UNDEF: OSL_TRACE( "Invalid axis" ); @@ -468,7 +468,7 @@ void SchXMLAxisContext::CreateAxis() { try { - xDiaProp->setPropertyValue( OUString::createFromAscii( "HasXAxis" ), uno::makeAny(sal_True) ); + xDiaProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "HasXAxis" )), uno::makeAny(sal_True) ); } catch( beans::UnknownPropertyException & ) { @@ -486,13 +486,13 @@ void SchXMLAxisContext::CreateAxis() m_xAxisProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), uno::makeAny( COL_BLACK )); - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "DisplayLabels" ), aFalseBool ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "DisplayLabels" )), aFalseBool ); // #88077# AutoOrigin 'on' is default - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "AutoOrigin" ), aTrueBool ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoOrigin" )), aTrueBool ); if( m_bAxisTypeImported ) - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "AxisType" ), uno::makeAny(m_nAxisType) ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "AxisType" )), uno::makeAny(m_nAxisType) ); if( m_aAutoStyleName.getLength()) { @@ -548,7 +548,7 @@ void SchXMLAxisContext::CreateAxis() Reference< beans::XPropertySet > xNewAxisProp( xAxis, uno::UNO_QUERY ); if( xNewAxisProp.is() ) { - xNewAxisProp->setPropertyValue( OUString::createFromAscii("LineStyle") + xNewAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")) , uno::makeAny(drawing::LineStyle_NONE)); } } @@ -794,31 +794,31 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc chart2::ScaleData aMainXScale = xMainXAxis->getScaleData(); if( 0 == rChartTypeServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ScatterChartType" ) ) ) { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) ); double fCrossoverValue = 0.0; aMainXScale.Origin >>= fCrossoverValue; - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverValue") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverValue")) , uno::makeAny( fCrossoverValue ) ); if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END) ); - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START) ); - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } @@ -826,48 +826,48 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc { if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } chart2::ScaleData aMainYScale = xMainYAxis->getScaleData(); - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) ); double fCrossoverValue = 0.0; aMainYScale.Origin >>= fCrossoverValue; - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverValue") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverValue")) , uno::makeAny( fCrossoverValue ) ); if( aMainYScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END) ); - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryXAxisProp.is() ) - xSecondaryXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("LabelPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LabelPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START) ); - xMainXAxisProp->setPropertyValue( OUString::createFromAscii("MarkPosition") + xMainXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MarkPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryXAxisProp.is() ) - xSecondaryXAxisProp->setPropertyValue( OUString::createFromAscii("CrossoverPosition") + xSecondaryXAxisProp->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CrossoverPosition")) , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } @@ -990,7 +990,7 @@ void DateScaleContext::StartElement( const Reference< xml::sax::XAttributeList > bool bSetNewIncrement=false; chart::TimeIncrement aIncrement; - m_xAxisProps->getPropertyValue( OUString::createFromAscii( "TimeIncrement" )) >>= aIncrement; + m_xAxisProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "TimeIncrement" ))) >>= aIncrement; for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -1047,7 +1047,7 @@ void DateScaleContext::StartElement( const Reference< xml::sax::XAttributeList > } if( bSetNewIncrement ) - m_xAxisProps->setPropertyValue( OUString::createFromAscii( "TimeIncrement" ), uno::makeAny( aIncrement ) ); + m_xAxisProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "TimeIncrement" )), uno::makeAny( aIncrement ) ); } // ======================================== diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 131b7a97e73e..ccce0fc6bb33 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -683,7 +683,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram( -1, uno::makeAny( bHasCateories ), beans::PropertyState_DIRECT_VALUE ); aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("UseCategoriesAsX"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCategoriesAsX")), -1, uno::makeAny( sal_False ),//categories in ODF files are not to be used as x values (independent from what is offered in our ui) beans::PropertyState_DIRECT_VALUE ); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f42026fb6d72..f87160839d03 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2316,7 +2316,7 @@ void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XProperty return; chart::TimeIncrement aIncrement; - if( (xAxisProps->getPropertyValue( OUString::createFromAscii( "TimeIncrement" )) >>= aIncrement) ) + if( (xAxisProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "TimeIncrement" ))) >>= aIncrement) ) { sal_Int32 nTimeResolution = ::com::sun::star::chart::TimeUnit::DAY; if( aIncrement.TimeResolution >>= nTimeResolution ) @@ -2440,7 +2440,7 @@ void SchXMLExportHelper_Impl::exportAxis( bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent ) { - static const OUString sNumFormat( OUString::createFromAscii( "NumberFormat" )); + static const OUString sNumFormat( OUString(RTL_CONSTASCII_USTRINGPARAM( "NumberFormat" ))); std::vector< XMLPropertyState > aPropertyStates; SvXMLElementExport* pAxis = NULL; diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx index e97214645c62..c85353d7ca36 100644 --- a/xmloff/source/chart/SchXMLLegendContext.cxx +++ b/xmloff/source/chart/SchXMLLegendContext.cxx @@ -114,7 +114,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu { try { - xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), uno::makeAny( sal_True ) ); + xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasLegend" )), uno::makeAny( sal_True ) ); } catch( beans::UnknownPropertyException ) { @@ -160,7 +160,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu try { if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) ) - xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny ); + xLegendProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Alignment" )), aAny ); } catch( beans::UnknownPropertyException ) { @@ -205,7 +205,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu xLegendShape->setPosition( aLegendPos ); if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM ) - xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Expansion" ), uno::makeAny(nLegendExpansion) ); + xLegendProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Expansion" )), uno::makeAny(nLegendExpansion) ); else if( bHasHeight && bHasWidth ) xLegendShape->setSize( aLegendSize ); diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index db606730354f..eef2f7b972ff 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -582,7 +582,7 @@ void SchXMLSeries2Context::EndElement() } else if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.getLength() ) { - DomainInfo aDomainInfo( OUString::createFromAscii("values-y"), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ; + DomainInfo aDomainInfo( OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ; aDomainInfos.push_back( aDomainInfo ); } } |