xmloff/source/chart/SchXMLAxisContext.cxx      |    2 -
 xmloff/source/chart/SchXMLChartContext.cxx     |    2 -
 xmloff/source/chart/SchXMLExport.cxx           |    2 -
 xmloff/source/chart/SchXMLPlotAreaContext.cxx  |    3 -
 xmloff/source/chart/SchXMLSeries2Context.cxx   |    4 +-
 xmloff/source/chart/SchXMLTools.cxx            |   50 ++++++++++++-------------
 xmloff/source/draw/animationimport.cxx         |    2 -
 xmloff/source/draw/eventimp.cxx                |    4 +-
 xmloff/source/draw/shapeexport2.cxx            |    4 +-
 xmloff/source/forms/elementimport.cxx          |    2 -
 xmloff/source/forms/propertyexport.cxx         |    3 -
 xmloff/source/style/xmlnumfi.cxx               |    4 +-
 xmloff/source/text/txtflde.cxx                 |    6 +--
 xmloff/source/transform/EventOASISTContext.cxx |    4 +-
 xmloff/source/transform/TransformerBase.cxx    |    4 +-
 15 files changed, 47 insertions(+), 49 deletions(-)

New commits:
commit 4fd5136cbd1baa86361e84e3e3b146ba29d7d316
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Fri Dec 28 13:36:36 2012 +0100

    xmloff: mostly kill CONSTASCII_STRINGPARAM usage

diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx 
b/xmloff/source/chart/SchXMLAxisContext.cxx
index 3ddf60b..b14618f 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 608c342..0632b6b 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 a84f714..e15819b 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 0697e8e..8d10bf1 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 e3188b9..2764efc 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 2c83c3e..974a6c5 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 d123a65..6949a04 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 785268c..a6d5180 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 2ebd96a..6e0218a 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 e855c50..907390f 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 2af7199..c148ca3 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 28a4ec6..7b0799c 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 ea806cc..6c1da2c 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 a6027c9..dc582a4 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 0dcdcdf..4d3eaf4 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to