summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-12 12:25:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-12 12:25:35 +0100
commit513108bd57bc64091f1faaa640c0f026b7d91001 (patch)
tree2b7ab263dab57c8e7f6d699067ad65113b21ca05 /xmloff
parent554ba09f76ca1b7b29c0fc19aa4df443840b02d3 (diff)
xmloff: Use appropriate OUString functions on string constants
Change-Id: Idbe6ac27a4125bd9d9acb01ac42b60396abf0c81
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx6
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx6
-rw-r--r--xmloff/source/core/xmlmultiimagehelper.cxx16
-rw-r--r--xmloff/source/draw/XMLImageMapExport.cxx14
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx24
-rw-r--r--xmloff/source/draw/ximpshap.cxx34
-rw-r--r--xmloff/source/forms/layerimport.cxx2
-rw-r--r--xmloff/source/forms/propertyexport.cxx2
-rw-r--r--xmloff/source/style/xmlnumfi.cxx4
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx8
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx17
-rw-r--r--xmloff/source/text/txtflde.cxx11
-rw-r--r--xmloff/source/text/txtimp.cxx6
-rw-r--r--xmloff/source/text/txtparae.cxx2
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx9
17 files changed, 74 insertions, 91 deletions
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 4e60385ff4b1..f49e9383a27a 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -376,7 +376,7 @@ void XMLDocumentSettingsContext::EndElement()
bool bFound(false);
while((i >= 0) && !bFound)
{
- if (aSeqViewProps[i].Name.equalsAscii("Views"))
+ if (aSeqViewProps[i].Name == "Views")
{
bFound = true;
uno::Reference<container::XIndexAccess> xIndexAccess;
@@ -404,13 +404,13 @@ void XMLDocumentSettingsContext::EndElement()
{
OUString sProp( aSeqConfigProps[i].Name );
- if ( sProp.equalsAscii("PrinterName") )
+ if ( sProp == "PrinterName" )
{
OUString sEmpty;
aSeqConfigProps[i].Value = uno::makeAny( sEmpty );
nFound++;
}
- else if ( sProp.equalsAscii("PrinterSetup") )
+ else if ( sProp == "PrinterSetup" )
{
uno::Sequence< sal_Int8 > aEmpty;
aSeqConfigProps[i].Value = uno::makeAny( aEmpty );
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 81ef976b1eef..61b716925e74 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -247,7 +247,7 @@ RDFaReader::ReadURIOrSafeCURIE(OUString const & i_rURIOrSafeCURIE) const
}
else
{
- if (i_rURIOrSafeCURIE.matchAsciiL("_:", 2)) // blank node
+ if (i_rURIOrSafeCURIE.startsWith("_:")) // blank node
{
SAL_INFO("xmloff.core", "ReadURIOrSafeCURIE: invalid URI: scheme is _" );
return OUString();
@@ -273,7 +273,7 @@ RDFaInserter::LookupBlankNode(OUString const & i_rNodeId )
uno::Reference< rdf::XURI >
RDFaInserter::MakeURI( OUString const & i_rURI) const
{
- if (i_rURI.matchAsciiL("_:", 2)) // blank node
+ if (i_rURI.startsWith("_:")) // blank node
{
SAL_INFO("xmloff.core", "MakeURI: cannot create URI for blank node");
return 0;
@@ -295,7 +295,7 @@ RDFaInserter::MakeURI( OUString const & i_rURI) const
uno::Reference< rdf::XResource>
RDFaInserter::MakeResource( OUString const & i_rResource)
{
- if (i_rResource.matchAsciiL("_:", 2)) // blank node
+ if (i_rResource.startsWith("_:")) // blank node
{
// we cannot use the blank node label as-is: it must be distinct
// from labels in other graphs, so create fresh ones per XML stream
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index 8ada292e9545..b0607a2fddd1 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -29,37 +29,37 @@ namespace
sal_uInt32 nRetval(0);
// pixel formats first
- if(rString.endsWithAsciiL(".bmp", 4))
+ if(rString.endsWith(".bmp"))
{
return 10;
}
- if(rString.endsWithAsciiL(".gif", 4))
+ if(rString.endsWith(".gif"))
{
return 20;
}
- if(rString.endsWithAsciiL(".jpg", 4))
+ if(rString.endsWith(".jpg"))
{
return 30;
}
- if(rString.endsWithAsciiL(".png", 4))
+ if(rString.endsWith(".png"))
{
return 40;
}
// vector formats, prefer always
- if(rString.endsWithAsciiL(".svm", 4))
+ if(rString.endsWith(".svm"))
{
return 1000;
}
- if(rString.endsWithAsciiL(".wmf", 4))
+ if(rString.endsWith(".wmf"))
{
return 1010;
}
- if(rString.endsWithAsciiL(".emf", 4))
+ if(rString.endsWith(".emf"))
{
return 1020;
}
- else if(rString.endsWithAsciiL(".svg", 4))
+ if(rString.endsWith(".svg"))
{
return 1030;
}
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index b1f33257e350..b1a4b71d64e1 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -53,11 +53,6 @@ using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::lang::XServiceInfo;
using ::com::sun::star::drawing::PointSequence;
-
-const sal_Char sAPI_ImageMapRectangleObject[] = "com.sun.star.image.ImageMapRectangleObject";
-const sal_Char sAPI_ImageMapCircleObject[] = "com.sun.star.image.ImageMapCircleObject";
-const sal_Char sAPI_ImageMapPolygonObject[] = "com.sun.star.image.ImageMapPolygonObject";
-
XMLImageMapExport::XMLImageMapExport(SvXMLExport& rExp) :
msBoundary("Boundary"),
msCenter("Center"),
@@ -144,20 +139,17 @@ void XMLImageMapExport::ExportMapEntry(
{
OUString& rName = sServiceNames[i];
- if ( rName.equalsAsciiL(sAPI_ImageMapRectangleObject,
- sizeof(sAPI_ImageMapRectangleObject)-1) )
+ if ( rName == "com.sun.star.image.ImageMapRectangleObject" )
{
eType = XML_AREA_RECTANGLE;
break;
}
- else if ( rName.equalsAsciiL(sAPI_ImageMapCircleObject,
- sizeof(sAPI_ImageMapCircleObject)-1) )
+ else if ( rName == "com.sun.star.image.ImageMapCircleObject" )
{
eType = XML_AREA_CIRCLE;
break;
}
- else if ( rName.equalsAsciiL(sAPI_ImageMapPolygonObject,
- sizeof(sAPI_ImageMapPolygonObject)-1))
+ else if ( rName == "com.sun.star.image.ImageMapPolygonObject" )
{
eType = XML_AREA_POLYGON;
break;
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 3efaba0a7350..09ba163f611a 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -195,7 +195,7 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement
if( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 )
{
OUString aType( xShape->getShapeType() );
- if( aType.equalsAscii( "com.sun.star.drawing.CustomShape" ) )
+ if( aType == "com.sun.star.drawing.CustomShape" )
{
uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY );
if( xSet.is() )
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index b6b0db95bfcf..8015a4b797ad 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -226,62 +226,62 @@ bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter& rP
else if ( rParaString[ nIndex ] > '9' )
{
bNumberRequired = false;
- if ( rParaString.matchIgnoreAsciiCaseAsciiL( "left", 4, nIndex ) )
+ if ( rParaString.matchIgnoreAsciiCase( "left", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::LEFT;
nIndex += 4;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "top", 3, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "top", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::TOP;
nIndex += 3;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "right", 5, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "right", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::RIGHT;
nIndex += 5;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "bottom", 6, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "bottom", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::BOTTOM;
nIndex += 6;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "xstretch", 8, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "xstretch", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::XSTRETCH;
nIndex += 8;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "ystretch", 8, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "ystretch", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::YSTRETCH;
nIndex += 8;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "hasstroke", 9, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "hasstroke", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::HASSTROKE;
nIndex += 9;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "hasfill", 7, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "hasfill", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::HASFILL;
nIndex += 7;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "width", 5, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "width", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::WIDTH;
nIndex += 5;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "height", 6, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "height", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::HEIGHT;
nIndex += 6;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "logwidth", 8, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "logwidth", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::LOGWIDTH;
nIndex += 8;
}
- else if ( rParaString.matchIgnoreAsciiCaseAsciiL( "logheight", 9, nIndex ) )
+ else if ( rParaString.matchIgnoreAsciiCase( "logheight", nIndex ) )
{
rParameter.Type = com::sun::star::drawing::EnhancedCustomShapeParameterType::LOGHEIGHT;
nIndex += 9;
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 6a8c77a39b66..bc0ee6184675 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -128,7 +128,7 @@ static bool ImpIsEmptyURL( const OUString& rURL )
// #i13140# Also compare against 'toplevel' URLs. which also
// result in empty filename strings.
- if( rURL.equalsAscii( "#./" ) )
+ if( rURL == "#./" )
return true;
return false;
@@ -3068,10 +3068,10 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( aLocalName, XML_MIME_TYPE ) )
{
- if( xAttrList->getValueByIndex( n ).equalsAscii( "application/vnd.sun.star.media" ) )
+ if( xAttrList->getValueByIndex( n ) == "application/vnd.sun.star.media" )
mbMedia = true;
#if HAVE_FEATURE_GLTF
- if( xAttrList->getValueByIndex( n ).equalsAscii( "model/vnd.gltf+json" ) )
+ if( xAttrList->getValueByIndex( n ) == "model/vnd.gltf+json" )
mbMedia = true;
#endif
// leave this loop
@@ -3220,49 +3220,49 @@ void SdXMLPluginShapeContext::EndElement()
{
const OUString& rName = maParams[ nParam ].Name;
- if( rName.equalsAscii( "Loop" ) )
+ if( rName == "Loop" )
{
OUString aValueStr;
maParams[ nParam ].Value >>= aValueStr;
xProps->setPropertyValue("Loop",
- uno::makeAny( aValueStr.equalsAscii( "true" ) ) );
+ uno::makeAny( aValueStr == "true" ) );
}
- else if( rName.equalsAscii( "Mute" ) )
+ else if( rName == "Mute" )
{
OUString aValueStr;
maParams[ nParam ].Value >>= aValueStr;
xProps->setPropertyValue("Mute",
- uno::makeAny( aValueStr.equalsAscii( "true" ) ) );
+ uno::makeAny( aValueStr == "true" ) );
}
- else if( rName.equalsAscii( "VolumeDB" ) )
+ else if( rName == "VolumeDB" )
{
OUString aValueStr;
maParams[ nParam ].Value >>= aValueStr;
xProps->setPropertyValue("VolumeDB",
uno::makeAny( static_cast< sal_Int16 >( aValueStr.toInt32() ) ) );
}
- else if( rName.equalsAscii( "Zoom" ) )
+ else if( rName == "Zoom" )
{
OUString aZoomStr;
media::ZoomLevel eZoomLevel;
maParams[ nParam ].Value >>= aZoomStr;
- if( aZoomStr.equalsAscii( "25%" ) )
+ if( aZoomStr == "25%" )
eZoomLevel = media::ZoomLevel_ZOOM_1_TO_4;
- else if( aZoomStr.equalsAscii( "50%" ) )
+ else if( aZoomStr == "50%" )
eZoomLevel = media::ZoomLevel_ZOOM_1_TO_2;
- else if( aZoomStr.equalsAscii( "100%" ) )
+ else if( aZoomStr == "100%" )
eZoomLevel = media::ZoomLevel_ORIGINAL;
- else if( aZoomStr.equalsAscii( "200%" ) )
+ else if( aZoomStr == "200%" )
eZoomLevel = media::ZoomLevel_ZOOM_2_TO_1;
- else if( aZoomStr.equalsAscii( "400%" ) )
+ else if( aZoomStr == "400%" )
eZoomLevel = media::ZoomLevel_ZOOM_4_TO_1;
- else if( aZoomStr.equalsAscii( "fit" ) )
+ else if( aZoomStr == "fit" )
eZoomLevel = media::ZoomLevel_FIT_TO_WINDOW;
- else if( aZoomStr.equalsAscii( "fixedfit" ) )
+ else if( aZoomStr == "fixedfit" )
eZoomLevel = media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT;
- else if( aZoomStr.equalsAscii( "fullscreen" ) )
+ else if( aZoomStr == "fullscreen" )
eZoomLevel = media::ZoomLevel_FULLSCREEN;
else
eZoomLevel = media::ZoomLevel_NOT_AVAILABLE;
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 125abd40a852..47f62fc00300 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -484,7 +484,7 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nP
const Reference< xml::sax::XAttributeList >&)
{
SvXMLImportContext* pContext = NULL;
- if ( _rLocalName.equalsAscii( "form" ) )
+ if ( _rLocalName == "form" )
{
if ( m_xCurrentPageFormsSupp.is() )
pContext = new OFormImport(*this, *this, _nPrefix, _rLocalName, m_xCurrentPageFormsSupp->getForms() );
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index bc41ab43d8c7..501c88a2227c 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -391,7 +391,7 @@ namespace xmloff
DBG_CHECK_PROPERTY( PROPERTY_TARGETFRAME, OUString );
OUString sTargetFrame = comphelper::getString(m_xProps->getPropertyValue(PROPERTY_TARGETFRAME));
- if( ! sTargetFrame.equalsAscii("_blank") )
+ if( sTargetFrame != "_blank" )
{ // an empty string and "_blank" have the same meaning and don't have to be written
AddAttribute(OAttributeMetaData::getCommonControlAttributeNamespace(CCA_TARGET_FRAME)
,OAttributeMetaData::getCommonControlAttributeName(CCA_TARGET_FRAME)
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 6c84c5ab4ad8..71b982284fde 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1885,7 +1885,7 @@ void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType
bAutomatic = true;
}
}
- else if ( nLang == LANGUAGE_SYSTEM && aSymbol.equalsAscii("CCC") )
+ else if ( nLang == LANGUAGE_SYSTEM && aSymbol == "CCC" )
{
// "CCC" is used for automatic long symbol
bAutomatic = true;
@@ -2057,7 +2057,7 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
//! collect all conditions first and adjust default to >=0, >0 or <0 depending on count
//! allow blanks in conditions
- if ( aConditions.isEmpty() && aMyConditions.size() == 1 && sRealCond.equalsAscii( ">=0" ) )
+ if ( aConditions.isEmpty() && aMyConditions.size() == 1 && sRealCond == ">=0" )
bDefaultCond = true;
if ( nType == XML_TOK_STYLES_TEXT_STYLE && nIndex == 2 )
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 67f5308ec10b..c2912a5e0c89 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -1617,8 +1617,6 @@ void XMLSectionExport::ExportBoolean(
const sal_Char sAPI_FieldMaster_Bibliography[] =
"com.sun.star.text.FieldMaster.Bibliography";
-const sal_Char sAPI_SortKey[] = "SortKey";
-const sal_Char sAPI_IsSortAscending[] = "IsSortAscending";
void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
{
@@ -1708,8 +1706,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
{
PropertyValue& rValue = rKey[nPropertyKey];
- if (rValue.Name.equalsAsciiL(sAPI_SortKey,
- sizeof(sAPI_SortKey)-1))
+ if (rValue.Name == "SortKey")
{
sal_Int16 nKey = 0;
rValue.Value >>= nKey;
@@ -1721,8 +1718,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
sBuf.makeStringAndClear());
}
}
- else if (rValue.Name.equalsAsciiL(sAPI_IsSortAscending,
- sizeof(sAPI_IsSortAscending)-1))
+ else if (rValue.Name == "IsSortAscending")
{
bool bTmp = *(sal_Bool*)rValue.Value.getValue();
rExport.AddAttribute(XML_NAMESPACE_TEXT,
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index baf62f6c062b..58ed9b39f827 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1526,7 +1526,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( aLocalName, XML_MIME_TYPE ) )
{
- if( xAttrList->getValueByIndex( n ).equalsAscii( "application/vnd.sun.star.media" ) )
+ if( xAttrList->getValueByIndex( n ) == "application/vnd.sun.star.media" )
bMedia = true;
// leave this loop
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 0c312d17e159..ba4b2d822ed0 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -132,13 +132,13 @@ static const char *lcl_getFormFieldmarkName(OUString &name)
{
static const char sCheckbox[]=ODF_FORMCHECKBOX;
static const char sFormDropDown[]=ODF_FORMDROPDOWN;
- if (name.equalsAscii("msoffice.field.FORMCHECKBOX") ||
- name.equalsAscii("ecma.office-open-xml.field.FORMCHECKBOX") )
+ if (name == "msoffice.field.FORMCHECKBOX" ||
+ name == "ecma.office-open-xml.field.FORMCHECKBOX")
return sCheckbox;
- else if (name.equalsAscii(ODF_FORMCHECKBOX) )
+ else if (name == ODF_FORMCHECKBOX)
return sCheckbox;
- if (name.equalsAscii(ODF_FORMDROPDOWN) ||
- name.equalsAscii("ecma.office-open-xml.field.FORMDROPDOWN") )
+ if (name == ODF_FORMDROPDOWN ||
+ name == "ecma.office-open-xml.field.FORMDROPDOWN")
return sFormDropDown;
else
return NULL;
@@ -146,10 +146,9 @@ static const char *lcl_getFormFieldmarkName(OUString &name)
static OUString lcl_getFieldmarkName(OUString const& name)
{
- static const char sFormtext[]=ODF_FORMTEXT;
- if (name.equalsAscii("msoffice.field.FORMTEXT") ||
- name.equalsAscii("ecma.office-open-xml.field.FORMTEXT") )
- return OUString::createFromAscii(sFormtext);
+ if (name == "msoffice.field.FORMTEXT" ||
+ name == "ecma.office-open-xml.field.FORMTEXT")
+ return OUString(ODF_FORMTEXT);
else
return name;
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index f1f8442dce8b..805e0e6ab399 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1930,9 +1930,8 @@ void XMLTextFieldExport::ExportFieldDeclarations(
OUString sFieldMaster = aFieldMasters[i];
// workaround for #no-bug#
- static const sal_Char sDB[] =
- "com.sun.star.text.FieldMaster.DataBase.";
- if ( sFieldMaster.matchIgnoreAsciiCaseAsciiL( sDB, sizeof(sDB)-1) )
+ if ( sFieldMaster.startsWithIgnoreAsciiCase(
+ "com.sun.star.text.FieldMaster.DataBase.") )
{
continue;
}
@@ -1948,7 +1947,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
aAny >>= xPropSet;
// save interesting field masters
- if (sFieldMasterType.equalsAscii(FIELD_SERVICE_SETEXP))
+ if (sFieldMasterType == FIELD_SERVICE_SETEXP)
{
sal_Int32 nType = GetIntProperty(sPropertySubType, xPropSet);
@@ -1962,11 +1961,11 @@ void XMLTextFieldExport::ExportFieldDeclarations(
aVarName.push_back( sFieldMaster );
}
}
- else if (sFieldMasterType.equalsAscii(FIELD_SERVICE_USER))
+ else if (sFieldMasterType == FIELD_SERVICE_USER)
{
aUserName.push_back( sFieldMaster );
}
- else if (sFieldMasterType.equalsAscii(FIELD_SERVICE_DDE))
+ else if (sFieldMasterType == FIELD_SERVICE_DDE)
{
aDdeName.push_back( sFieldMaster );
}
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index e1e454195c1f..3d9b54776ba7 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -846,17 +846,17 @@ namespace
pCurrent != m_pInParams->end();
++pCurrent)
{
- if(pCurrent->first.equalsAscii(ODF_FORMDROPDOWN_RESULT))
+ if(pCurrent->first == ODF_FORMDROPDOWN_RESULT)
{
// sal_Int32
vOutParams[pCurrent->first] = makeAny(pCurrent->second.toInt32());
}
- else if(pCurrent->first.equalsAscii(ODF_FORMCHECKBOX_RESULT))
+ else if(pCurrent->first == ODF_FORMCHECKBOX_RESULT)
{
// bool
vOutParams[pCurrent->first] = makeAny(pCurrent->second.toBoolean());
}
- else if(pCurrent->first.equalsAscii(ODF_FORMDROPDOWN_LISTENTRY))
+ else if(pCurrent->first == ODF_FORMDROPDOWN_LISTENTRY)
{
// sequence
vListEntries.push_back(pCurrent->second);
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index cdc468cdc57e..de920891bd22 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -387,7 +387,7 @@ void FieldParamExporter::Export()
aValue >>= sValue;
ExportParameter(*pCurrent,sValue);
- if ( pCurrent->equalsAscii( ODF_OLE_PARAM ) )
+ if ( *pCurrent == ODF_OLE_PARAM )
{
// Save the OLE object
Reference< embed::XStorage > xTargetStg = m_pExport->GetTargetStorage();
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index 3b2ee5f8a8bf..519f39d71757 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -1490,14 +1490,11 @@ void XMLConfigItemTContext_Impl::StartElement(
if ( IsXMLToken( aLocalName, XML_NAME ) )
{
const OUString& rValue = xAttrList->getValueByIndex( i );
- const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
- const sal_Char sCursorX[] = "CursorPositionX";
- const sal_Char sCursorY[] = "CursorPositionY";
- if( rValue.equalsAsciiL( sRedlineProtectionKey, sizeof(sRedlineProtectionKey)-1 ) )
+ if( rValue == "RedlineProtectionKey" )
m_bIsRedlineProtectionKey = true;
- else if( rValue.equalsAsciiL( sCursorX, sizeof(sCursorX)-1 ) )
+ else if( rValue == "CursorPositionX" )
m_bIsCursorX = true;
- else if( rValue.equalsAsciiL( sCursorY, sizeof(sCursorY)-1 ) )
+ else if( rValue == "CursorPositionY" )
m_bIsCursorY = true;
break;