summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx5
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx12
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx8
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx14
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx8
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx6
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx8
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx2
-rw-r--r--xmloff/source/meta/xmlmetae.cxx4
-rw-r--r--xmloff/source/style/xmlnumfe.cxx2
-rw-r--r--xmloff/source/table/XMLTableExport.cxx2
-rw-r--r--xmloff/source/text/txtparai.cxx4
-rw-r--r--xmloff/source/text/txtvfldi.cxx3
-rw-r--r--xmloff/source/transform/TransformerBase.cxx2
15 files changed, 31 insertions, 51 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index 4067e2c4de57..fa94162508e6 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -766,9 +766,8 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
const OUString& rODFVersionOfFile,
bool bAxisPositionAttributeImported )
{
- if( ( rODFVersionOfFile.isEmpty() || rODFVersionOfFile.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1.0"))
- || rODFVersionOfFile.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1.1"))
- || ( rODFVersionOfFile.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1.2")) && !bAxisPositionAttributeImported ) ) )
+ if( ( rODFVersionOfFile.isEmpty() || rODFVersionOfFile == "1.0" || rODFVersionOfFile == "1.1"
+ || ( rODFVersionOfFile == "1.2" && !bAxisPositionAttributeImported ) ) )
{
try
{
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 20f11839676d..ff70d98b783d 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -581,8 +581,7 @@ bool lcl_SpecialHandlingForDonutChartNeeded(
const SvXMLImport & rImport )
{
bool bResult = false;
- if( rServiceName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.DonutChartType" )))
+ if( rServiceName == "com.sun.star.chart2.DonutChartType" )
{
bResult = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( rImport.GetModel() );
}
@@ -758,9 +757,9 @@ void SchXMLChartContext::EndElement()
return;
bool bHasOwnData = false;
- if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) ) //data comes from the chart itself
+ if( m_aXLinkHRefAttributeToIndicateDataProvider == "." ) //data comes from the chart itself
bHasOwnData = true;
- else if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application
+ else if( m_aXLinkHRefAttributeToIndicateDataProvider == ".." ) //data comes from the parent application
bHasOwnData = false;
else if( !m_aXLinkHRefAttributeToIndicateDataProvider.isEmpty() ) //not supported so far to get the data by sibling objects -> fall back to chart itself if data are available
bHasOwnData = m_bHasTableElement;
@@ -769,7 +768,7 @@ void SchXMLChartContext::EndElement()
if( xNewDoc->hasInternalDataProvider())
{
- if( !m_bHasTableElement && !m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) )
+ if( !m_bHasTableElement && m_aXLinkHRefAttributeToIndicateDataProvider != "." )
{
//#i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area
bool bSwitchSuccessful = SchXMLTools::switchBackToDataProviderFromParent( xNewDoc, maLSequencesPerIndex );
@@ -939,8 +938,7 @@ void SchXMLChartContext::MergeSeriesForStockChart()
uno::Sequence< uno::Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes());
for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx )
{
- if( aChartTypes[nCTIdx]->getChartType().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")))
+ if( aChartTypes[nCTIdx]->getChartType() == "com.sun.star.chart2.CandleStickChartType" )
{
xDSContainer.set( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xCTProp( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW );
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 60cb7d867bec..bb8011c2ef57 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2904,8 +2904,8 @@ void SchXMLExportHelper_Impl::exportSeries(
// domain elements
if( bExportContent )
{
- bool bIsScatterChart = aChartType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.ScatterChartType"));
- bool bIsBubbleChart = aChartType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType"));
+ bool bIsScatterChart = aChartType == "com.sun.star.chart2.ScatterChartType";
+ bool bIsBubbleChart = aChartType == "com.sun.star.chart2.BubbleChartType";
Reference< chart2::data::XDataSequence > xYValuesForBubbleChart;
if( bIsBubbleChart )
{
@@ -3684,9 +3684,7 @@ void SchXMLExport::_ExportContent()
// range string, as this is our only indicator for having own or
// external data. @todo: fix this in the file format!
Reference< lang::XServiceInfo > xDPServiceInfo( xNewDoc->getDataProvider(), uno::UNO_QUERY );
- if( ! (xDPServiceInfo.is() &&
- xDPServiceInfo->getImplementationName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "com.sun.star.comp.chart.InternalDataProvider" ))))
+ if( ! (xDPServiceInfo.is() && xDPServiceInfo->getImplementationName() == "com.sun.star.comp.chart.InternalDataProvider" ))
{
bIncludeTable = sal_False;
}
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 167e9e8bca0b..50eabc70d19e 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -365,8 +365,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
if( xProp.is() && ( xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Dim3D"))) >>= bIs3d ) &&
bIs3d )
{
- if( maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.PieChartType" ))
- || maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.DonutChartType" )) )
+ if( maChartTypeServiceName == "com.sun.star.chart2.PieChartType" || maChartTypeServiceName == "com.sun.star.chart2.DonutChartType" )
{
::rtl::OUString aPropName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartingAngle")) );
uno::Any aAStartingAngle( SchXMLTools::getPropertyFromContext( aPropName, pPropStyleContext, pStylesCtxt ) );
@@ -415,8 +414,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
if( ( xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Dim3D"))) >>= bIs3d ) &&
bIs3d )
{
- if( maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.AreaChartType" )) ||
- maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LineChartType" )) )
+ if( maChartTypeServiceName == "com.sun.star.chart2.AreaChartType" || maChartTypeServiceName == "com.sun.star.chart2.LineChartType" )
{
aDeepProperty <<= uno::makeAny( true );
}
@@ -440,9 +438,9 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
//
bool bCreateInternalDataProvider = false;
- if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) ) //data comes from the chart itself
+ if( m_rXLinkHRefAttributeToIndicateDataProvider == "." ) //data comes from the chart itself
bCreateInternalDataProvider = true;
- else if( m_rXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application
+ else if( m_rXLinkHRefAttributeToIndicateDataProvider == ".." ) //data comes from the parent application
bCreateInternalDataProvider = false;
else if( !m_rXLinkHRefAttributeToIndicateDataProvider.isEmpty() ) //not supported so far to get the data by sibling objects -> fall back to chart itself
bCreateInternalDataProvider = true;
@@ -595,9 +593,7 @@ void SchXMLPlotAreaContext::EndElement()
}
// set correct number of lines at series
- if( ! m_aGlobalSeriesImportInfo.rbAllRangeAddressesAvailable &&
- mnNumOfLinesProp > 0 &&
- maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ColumnChartType" )))
+ if( ! m_aGlobalSeriesImportInfo.rbAllRangeAddressesAvailable && mnNumOfLinesProp > 0 && maChartTypeServiceName == "com.sun.star.chart2.ColumnChartType" )
{
try
{
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 42f9032e3c56..d9f9c09a96ee 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -374,10 +374,10 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
if( m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable && ! bHasRange )
m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable = sal_False;
- bool bIsCandleStick = maGlobalChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType"));
+ bool bIsCandleStick = maGlobalChartTypeName == "com.sun.star.chart2.CandleStickChartType";
if( !maSeriesChartTypeName.isEmpty() )
{
- bIsCandleStick = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType"));
+ bIsCandleStick = maSeriesChartTypeName == "com.sun.star.chart2.CandleStickChartType";
}
else
{
@@ -509,8 +509,8 @@ void SchXMLSeries2Context::EndElement()
// special handling for different chart types. This is necessary as the
// roles are not yet saved in the file format
sal_Int32 nDomainCount = maDomainAddresses.size();
- bool bIsScatterChart = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.ScatterChartType"));
- bool bIsBubbleChart = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType"));
+ bool bIsScatterChart = maSeriesChartTypeName == "com.sun.star.chart2.ScatterChartType";
+ bool bIsBubbleChart = maSeriesChartTypeName == "com.sun.star.chart2.BubbleChartType";
bool bDeleteSeries = false;
std::vector< DomainInfo > aDomainInfos;
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index c25fba0a4fe8..de5bad54585c 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -472,8 +472,7 @@ void CreateCategories(
{
OUString aConvertedRange( rRangeAddress );
bool bRangeConverted = false;
- if( ! (xNewDoc->hasInternalDataProvider() &&
- aConvertedRange.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("categories"))))
+ if( ! (xNewDoc->hasInternalDataProvider() && aConvertedRange == "categories"))
{
Reference< chart2::data::XRangeXMLConversion > xXMLConv( xDataProvider, uno::UNO_QUERY );
if( xXMLConv.is())
@@ -636,8 +635,7 @@ Reference< chart2::XRegressionCurve > getRegressionCurve(
if( xServiceName.is())
{
OUString aServiceName( xServiceName->getServiceName());
- if( aServiceName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.MeanValueRegressionCurve" )))
+ if( aServiceName == "com.sun.star.chart2.MeanValueRegressionCurve" )
continue;
}
// take first non-empty curve
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 3628e1ec2c54..6b08e12dcf8d 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -711,12 +711,8 @@ void XMLConfigItemContext::ManipulateConfigItem()
mrAny <<= nTmp;
}
- else if( (mrItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ColorTableURL" ) ) ) ||
- (mrItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LineEndTableURL" ) ) ) ||
- (mrItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HatchTableURL" ) ) ) ||
- (mrItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DashTableURL" ) ) ) ||
- (mrItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GradientTableURL") ) ) ||
- (mrItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BitmapTableURL" ) ) ) )
+ else if( (mrItemName == "ColorTableURL") || (mrItemName == "LineEndTableURL") || (mrItemName == "HatchTableURL")
+ || (mrItemName == "DashTableURL") || (mrItemName == "GradientTableURL") || (mrItemName == "BitmapTableURL") )
{
if( GetImport().getServiceFactory().is() ) try
{
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index f40ebea041cc..e70a24ce4b0b 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2121,7 +2121,7 @@ sal_Bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
sFilterService = OUString( pEntry->sFilterService,
pEntry->nFilterServiceLen,
RTL_TEXTENCODING_ASCII_US );
- bIsChart = sModelService.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( XML_MODEL_SERVICE_CHART ));
+ bIsChart = sModelService == XML_MODEL_SERVICE_CHART;
break;
}
pEntry++;
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 63d113a2d294..d1f960c50dd1 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -418,7 +418,7 @@ void SAL_CALL SdXMLImport::setTargetDocument( const uno::Reference< lang::XCompo
const OUString* pSNS( sSNS.getConstArray() );
while( --n > 0 )
{
- if( (*pSNS++).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape") ) )
+ if( (*pSNS++) == "com.sun.star.drawing.TableShape" )
{
mbIsTableShapeSupported = true;
break;
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
index 8a6a850cdee2..590368f5c541 100644
--- a/xmloff/source/meta/xmlmetae.cxx
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -203,9 +203,7 @@ void SvXMLMetaExport::_MExport()
sDefTarget );
//! define strings for xlink:show values
- const XMLTokenEnum eShow =
- sDefTarget.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("_blank"))
- ? XML_NEW : XML_REPLACE;
+ const XMLTokenEnum eShow = sDefTarget == "_blank" ? XML_NEW : XML_REPLACE;
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, eShow );
SvXMLElementExport aElem( mrExport,
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 77bbd772e847..714dcda08a79 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -847,7 +847,7 @@ OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLa
sal_Bool bFound = sal_False;
for ( sal_Int32 j=0; j < nCnt && !bFound; j++ )
{
- if ( !aCals[j].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("gregorian") ) )
+ if ( aCals[j] != "gregorian" )
{
aCalendar = aCals[j];
bFound = sal_True;
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 992a7c4355b3..bd773beacc55 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -158,7 +158,7 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp
const OUString* pSNS( sSNS.getConstArray() );
while( --n > 0 )
{
- if( (*pSNS++).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape") ) )
+ if( (*pSNS++) == "com.sun.star.drawing.TableShape" )
{
mbExportTables = true;
break;
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 14a1b9bf7fd7..73b681e525ec 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2385,9 +2385,7 @@ XMLNumberedParaContext::XMLNumberedParaContext(
i_rImport.GetTextImport()->GetTextListHelper() );
if (m_ListId.isEmpty())
{
- OSL_ENSURE( ! i_rImport.GetODFVersion().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("1.2") ),
- "invalid numbered-paragraph: no list-id (1.2)");
+ OSL_ENSURE( i_rImport.GetODFVersion() != "1.2", "invalid numbered-paragraph: no list-id (1.2)" );
m_ListId = rTextListsHelper.GetNumberedParagraphListId(m_Level,
StyleName);
OSL_ENSURE(!m_ListId.isEmpty(), "numbered-paragraph: no ListId");
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 6ab8937e9a5a..bbf1fd533cf5 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -740,8 +740,7 @@ void XMLTableFormulaImportContext::ProcessAttribute(
aValueHelper.ProcessAttribute( nAttrToken, sAttrValue );
break;
case XML_TOK_TEXTFIELD_DISPLAY:
- if ( sAttrValue.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("formula")) )
+ if ( sAttrValue == "formula" )
bIsShowFormula = sal_True;
break;
default:
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index e3a33042816d..4872a74fa6b6 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -239,7 +239,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName,
{
SvXMLNamespaceMap *pRewindMap = 0;
- bool bRect = rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "presentation:show-shape" ) );
+ bool bRect = rName == "presentation:show-shape";
(void)bRect;
// Process namespace attributes. This must happen before creating the