summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-12-28 13:36:36 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-12-28 13:37:02 +0100
commit4fd5136cbd1baa86361e84e3e3b146ba29d7d316 (patch)
treeedc62a6215616af420adf6f1701024bbedd2128a /xmloff
parentc3b0f13546b30e5db3aecd311c7178e4e0933208 (diff)
xmloff: mostly kill CONSTASCII_STRINGPARAM usage
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx3
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx4
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx50
-rw-r--r--xmloff/source/draw/animationimport.cxx2
-rw-r--r--xmloff/source/draw/eventimp.cxx4
-rw-r--r--xmloff/source/draw/shapeexport2.cxx4
-rw-r--r--xmloff/source/forms/elementimport.cxx2
-rw-r--r--xmloff/source/forms/propertyexport.cxx3
-rw-r--r--xmloff/source/style/xmlnumfi.cxx4
-rw-r--r--xmloff/source/text/txtflde.cxx6
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx4
-rw-r--r--xmloff/source/transform/TransformerBase.cxx4
15 files changed, 47 insertions, 49 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index 3ddf60b4b9c9..b14618fefa42 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -779,7 +779,7 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
if( xMainXAxisProp.is() && xMainYAxisProp.is() )
{
chart2::ScaleData aMainXScale = xMainXAxis->getScaleData();
- if( 0 == rChartTypeServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ScatterChartType" ) ) )
+ if( 0 == rChartTypeServiceName.reverseCompareTo( "com.sun.star.chart2.ScatterChartType" ) )
{
xMainYAxisProp->setPropertyValue( OUString("CrossoverPosition")
, uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) );
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 608c3422d716..0632b6b84fd4 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -862,7 +862,7 @@ void SchXMLChartContext::EndElement()
bool bLinesOn = true;
if( (maSeriesDefaultsAndStyles.maLinesOnProperty >>= bLinesOn) && !bLinesOn )
{
- if( 0 == maChartTypeServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ScatterChartType" ) ) )
+ if( 0 == maChartTypeServiceName.reverseCompareTo( "com.sun.star.chart2.ScatterChartType" ) )
{
bSwitchOffLinesForScatter = true;
SchXMLSeries2Context::switchSeriesLinesOff( maSeriesDefaultsAndStyles.maSeriesStyleList );
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index a84f714c5761..e15819bf91ec 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2088,7 +2088,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
// stock-chart elements
OUString sChartType ( xDiagram->getDiagramType());
- if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.StockDiagram" )))
+ if( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.StockDiagram" ))
{
Reference< chart::XStatisticDisplay > xStockPropProvider( xDiagram, uno::UNO_QUERY );
if( xStockPropProvider.is())
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 0697e8e89593..8d10bf134e2d 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -598,8 +598,7 @@ void SchXMLPlotAreaContext::EndElement()
}
// #i32366# stock has volume
- if( ( 0 == mxDiagram->getDiagramType().reverseCompareToAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.StockDiagram" ))) &&
+ if( ( 0 == mxDiagram->getDiagramType().reverseCompareTo("com.sun.star.chart.StockDiagram" )) &&
mbStockHasVolume )
{
try
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index e3188b945a6a..2764efc8ebf8 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -275,9 +275,9 @@ SchXMLSeries2Context::SchXMLSeries2Context(
mbSymbolSizeIsMissingInFile(false),
maChartSize( rChartSize )
{
- if( 0 == aGlobalChartTypeName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.DonutChartType" ) ) )
+ if( 0 == aGlobalChartTypeName.reverseCompareTo( "com.sun.star.chart2.DonutChartType" ) )
{
- maSeriesChartTypeName = ::rtl::OUString("com.sun.star.chart2.PieChartType" );
+ maSeriesChartTypeName = "com.sun.star.chart2.PieChartType";
maGlobalChartTypeName = maSeriesChartTypeName;
}
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 2c83c3e9d208..974a6c57b17e 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -223,58 +223,58 @@ OUString GetChartTypeByClassName(
bool bInternalType = false;
if( bUseOldNames )
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart."));
+ aResultBuffer.append( "com.sun.star.chart.");
else
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2."));
+ aResultBuffer.append( "com.sun.star.chart2.");
bInternalType = true;
if( IsXMLToken( rClassName, XML_LINE ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Line"));
+ aResultBuffer.append("Line");
else if( IsXMLToken( rClassName, XML_AREA ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Area"));
+ aResultBuffer.append("Area");
else if( IsXMLToken( rClassName, XML_BAR ))
{
if( bUseOldNames )
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Bar"));
+ aResultBuffer.append("Bar");
else
{
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Column"));
+ aResultBuffer.append("Column");
// @todo: might be Bar
}
}
else if( IsXMLToken( rClassName, XML_CIRCLE ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Pie"));
+ aResultBuffer.append("Pie");
else if( IsXMLToken( rClassName, XML_RING ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Donut"));
+ aResultBuffer.append("Donut");
else if( IsXMLToken( rClassName, XML_SCATTER ))
{
if( bUseOldNames )
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("XY"));
+ aResultBuffer.append("XY");
else
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Scatter"));
+ aResultBuffer.append("Scatter");
}
else if( IsXMLToken( rClassName, XML_BUBBLE ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Bubble"));
+ aResultBuffer.append("Bubble");
else if( IsXMLToken( rClassName, XML_RADAR ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Net"));
+ aResultBuffer.append("Net");
else if( IsXMLToken( rClassName, XML_FILLED_RADAR ))
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("FilledNet"));
+ aResultBuffer.append("FilledNet");
else if( IsXMLToken( rClassName, XML_STOCK ))
{
if( bUseOldNames )
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Stock"));
+ aResultBuffer.append("Stock");
else
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("CandleStick"));
+ aResultBuffer.append("CandleStick");
}
else if( IsXMLToken( rClassName, XML_SURFACE ))
{
//@todo change this if a surface chart is available
if( bUseOldNames )
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Bar"));
+ aResultBuffer.append("Bar");
else
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Column"));
+ aResultBuffer.append("Column");
}
else
bInternalType = false;
@@ -283,9 +283,9 @@ OUString GetChartTypeByClassName(
return OUString();
if( bUseOldNames )
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("Diagram"));
+ aResultBuffer.append("Diagram");
else
- aResultBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM("ChartType"));
+ aResultBuffer.append("ChartType");
return aResultBuffer.makeStringAndClear();
@@ -322,15 +322,15 @@ XMLTokenEnum getTokenByChartType(
eResult = XML_LINE;
else if ( aServiceName == "Area" )
eResult = XML_AREA;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bar")) ||
- (!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Column"))))
+ else if( aServiceName == "Bar" ||
+ (!bUseOldNames && aServiceName == "Column"))
eResult = XML_BAR;
else if ( aServiceName == "Pie" )
eResult = XML_CIRCLE;
else if ( aServiceName == "Donut" )
eResult = XML_RING;
- else if( (bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("XY"))) ||
- (!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Scatter"))))
+ else if( (bUseOldNames && aServiceName == "XY") ||
+ (!bUseOldNames && aServiceName == "Scatter"))
eResult = XML_SCATTER;
else if ( aServiceName == "Bubble" )
eResult = XML_BUBBLE;
@@ -338,8 +338,8 @@ XMLTokenEnum getTokenByChartType(
eResult = XML_RADAR;
else if ( aServiceName == "FilledNet" )
eResult = XML_FILLED_RADAR;
- else if( (bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Stock"))) ||
- (!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CandleStick"))))
+ else if( (bUseOldNames && aServiceName == "Stock") ||
+ (!bUseOldNames && aServiceName == "CandleStick"))
eResult = XML_STOCK;
}
}
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index d123a650d6b2..6949a0476d8e 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -1164,7 +1164,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< :
if( xIter.is() )
{
double fInterval = 0.0;
- if( rValue.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("P")) )
+ if( rValue.match("P") )
{
::com::sun::star::util::Duration aDuration;
if (::sax::Converter::convertDuration(aDuration, rValue))
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 785268c9559e..a6d51803b1eb 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -331,7 +331,7 @@ void SdXMLEventContext::EndElement()
nPropertyCount += 1;
break;
case ClickAction_MACRO:
- if ( msLanguage.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("starbasic")) )
+ if ( msLanguage.equalsIgnoreAsciiCase("starbasic") )
nPropertyCount += 1;
break;
@@ -351,7 +351,7 @@ void SdXMLEventContext::EndElement()
if( ClickAction_MACRO == meClickAction )
{
- if ( msLanguage.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("starbasic")) )
+ if ( msLanguage.equalsIgnoreAsciiCase("starbasic") )
{
OUString sLibrary;
const OUString& rApp = GetXMLToken( XML_APPLICATION );
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx
index 2ebd96a244f5..6e0218aaad94 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -510,8 +510,8 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
if( nFound & FOUND_LIBRARY )
{
OUString sLocation( GetXMLToken(
- (aStrLibrary.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("StarOffice")) ||
- aStrLibrary.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("application")) ) ? XML_APPLICATION
+ (aStrLibrary.equalsIgnoreAsciiCase("StarOffice") ||
+ aStrLibrary.equalsIgnoreAsciiCase("application") ) ? XML_APPLICATION
: XML_DOCUMENT ) );
OUStringBuffer sTmp( sLocation.getLength() + aStrMacro.getLength() + 1 );
sTmp = sLocation;
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index e855c507af63..907390f5fe6a 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1444,7 +1444,7 @@ namespace xmloff
SvXMLImportContext* OTextLikeImport::CreateChildContext( sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName,
const Reference< XAttributeList >& _rxAttrList )
{
- if ( ( XML_NAMESPACE_TEXT == _nPrefix ) && _rLocalName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("p")) )
+ if ( ( XML_NAMESPACE_TEXT == _nPrefix ) && _rLocalName.equalsIgnoreAsciiCase("p") )
{
OSL_ENSURE( m_eElementType == OControlElement::TEXT_AREA,
"OTextLikeImport::CreateChildContext: text paragraphs in a non-text-area?" );
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 2af7199c184c..c148ca36df1b 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -698,8 +698,7 @@ namespace xmloff
// the property must exist
if (!m_xPropertyInfo->hasPropertyByName(_rPropertyName))
{
- rtl::OStringBuffer aBuf(RTL_CONSTASCII_STRINGPARAM(
- "OPropertyExport::dbg_implCheckProperty: no property with the name "));
+ rtl::OStringBuffer aBuf("OPropertyExport::dbg_implCheckProperty: no property with the name ");
aBuf.append(rtl::OUStringToOString(_rPropertyName, RTL_TEXTENCODING_ASCII_US)).append('!');
OSL_FAIL(aBuf.getStr());
return;
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 28a4ec62b4a7..7b0799cc80cc 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1381,7 +1381,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
if ( pFormatter )
{
sal_Int32 nNatNum = pFormatter->GetNatNum()->convertFromXmlAttributes( aNatNumAttr );
- aFormatCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "[NatNum" ) );
+ aFormatCode.append( "[NatNum" );
aFormatCode.append( nNatNum, 10 );
LanguageType eLang = LanguageTag( aNatNumAttr.Locale ).getLanguageType( false);
@@ -1389,7 +1389,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
eLang = LANGUAGE_SYSTEM; //! error handling for invalid locales?
if ( eLang != nFormatLang && eLang != LANGUAGE_SYSTEM )
{
- aFormatCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "][$-" ) );
+ aFormatCode.append( "][$-" );
// language code in upper hex:
aFormatCode.append(rtl::OUString::valueOf(sal_Int32(eLang), 16).toAsciiUpperCase());
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index ea806cce151a..6c1da2c24a60 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -411,15 +411,15 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
if( !sFieldName.isEmpty() )
{
- if( sFieldName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "Header" ) ) == 0 )
+ if( sFieldName.reverseCompareTo( "Header" ) == 0 )
{
return FIELD_ID_DRAW_HEADER;
}
- else if( sFieldName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "Footer" ) ) == 0 )
+ else if( sFieldName.reverseCompareTo( "Footer" ) == 0 )
{
return FIELD_ID_DRAW_FOOTER;
}
- else if( sFieldName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateTime" ) ) == 0 )
+ else if( sFieldName.reverseCompareTo( "DateTime" ) == 0 )
{
return FIELD_ID_DRAW_DATE_TIME;
}
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index a6027c96dfc9..dc582a444708 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -174,7 +174,7 @@ bool ParseURLAsString(
}
} while ( params >= 0 );
- if ( aLanguage.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("basic")) )
+ if ( aLanguage.equalsIgnoreAsciiCase("basic") )
{
return sal_True;
}
@@ -204,7 +204,7 @@ bool ParseURL(
{
OUString aLanguage = xUrl->getParameter( aLanguageKey );
- if ( aLanguage.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("basic")) )
+ if ( aLanguage.equalsIgnoreAsciiCase("basic") )
{
*pName = xUrl->getName();
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index 0dcdcdf0c329..4d3eaf426e68 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -497,9 +497,9 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments
static sal_Int16 lcl_getUnit( const OUString& rValue )
{
- if( rValue.endsWithIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "cm" ) ) )
+ if( rValue.endsWithIgnoreAsciiCase( "cm" ) )
return util::MeasureUnit::CM;
- else if ( rValue.endsWithIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "mm" ) ) )
+ else if ( rValue.endsWithIgnoreAsciiCase( "mm" ) )
return util::MeasureUnit::MM;
else
return util::MeasureUnit::INCH;