diff options
author | Noel Grandin <noel@peralex.com> | 2013-12-09 12:51:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-12-09 12:53:18 +0200 |
commit | c5b7a5fd191a8ec65a64980fe3197832dba1ffae (patch) | |
tree | a4da3b16cd52626274819345cfbac480b04eef52 /xmloff | |
parent | aefd8ff742f8952327f1bddc37e62317d69ffb7d (diff) |
fix equalsAscii conversion. Noticed in fdo#72391
In commit 363cc397172f2b0a94d9c4dc44fc8d95072795a3
"convert equalsAsciiL calls to startWith calls where possible"
I incorrectly converted equalsAsciiL calls to startsWith calls.
This commit fixes those places to use the == OUString operator.
Change-Id: If76993baf73e3d8fb3bbcf6e8314e59fdc1207b6
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/XMLImageMapExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/script/XMLEventExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 64 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 3 |
4 files changed, 35 insertions, 36 deletions
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index 02bc33a7e843..2a0bfbae72fd 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.cxx @@ -193,7 +193,7 @@ void XMLImageMapExport::ExportMapEntry( mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, - sTargt.startsWith( "_blank" ) ? XML_NEW : XML_REPLACE ); + sTargt == "_blank" ? XML_NEW : XML_REPLACE ); } // name diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index 4d496a7b5940..6a303e6189ab 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -242,7 +242,7 @@ void XMLEventExport::ExportEvent( } else { - if (! sType.startsWith("None")) + if ( sType != "None" ) { OSL_FAIL("unknown event type returned by API"); // unknown type -> error (ignore) diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index af4e9d2eda73..e52160f9f2e1 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2716,7 +2716,7 @@ void XMLTextFieldExport::ProcessBibliographyData( sal_Int32 nLength = aValues.getLength(); for (sal_Int32 i = 0; i < nLength; i++) { - if (aValues[i].Name.startsWith("BibiliographicType")) + if( aValues[i].Name == "BibiliographicType" ) { sal_Int16 nTypeId = 0; aValues[i].Value >>= nTypeId; @@ -3327,127 +3327,127 @@ enum XMLTokenEnum XMLTextFieldExport::MapBibliographyFieldName(OUString sName) { enum XMLTokenEnum eName = XML_TOKEN_INVALID; - if (sName.startsWith("Identifier")) + if( sName == "Identifier" ) { eName = XML_IDENTIFIER; } - else if (sName.startsWith("BibiliographicType")) + else if( sName == "BibiliographicType" ) { eName = XML_BIBLIOGRAPHY_TYPE; } - else if (sName.startsWith("Address")) + else if( sName == "Address" ) { eName = XML_ADDRESS; } - else if (sName.startsWith("Annote")) + else if( sName == "Annote" ) { eName = XML_ANNOTE; } - else if (sName.startsWith("Author")) + else if( sName == "Author" ) { eName = XML_AUTHOR; } - else if (sName.startsWith("Booktitle")) + else if( sName == "Booktitle" ) { eName = XML_BOOKTITLE; } - else if (sName.startsWith("Chapter")) + else if( sName == "Chapter" ) { eName = XML_CHAPTER; } - else if (sName.startsWith("Edition")) + else if( sName == "Edition" ) { eName = XML_EDITION; } - else if (sName.startsWith("Editor")) + else if( sName == "Editor" ) { eName = XML_EDITOR; } - else if (sName.startsWith("Howpublished")) + else if( sName == "Howpublished" ) { eName = XML_HOWPUBLISHED; } - else if (sName.startsWith("Institution")) + else if( sName == "Institution" ) { eName = XML_INSTITUTION; } - else if (sName.startsWith("Journal")) + else if( sName == "Journal" ) { eName = XML_JOURNAL; } - else if (sName.startsWith("Month")) + else if( sName =="Month" ) { eName = XML_MONTH; } - else if (sName.startsWith("Note")) + else if( sName == "Note" ) { eName = XML_NOTE; } - else if (sName.startsWith("Number")) + else if( sName == "Number" ) { eName = XML_NUMBER; } - else if (sName.startsWith("Organizations")) + else if( sName == "Organizations" ) { eName = XML_ORGANIZATIONS; } - else if (sName.startsWith("Pages")) + else if( sName == "Pages" ) { eName = XML_PAGES; } - else if (sName.startsWith("Publisher")) + else if( sName == "Publisher" ) { eName = XML_PUBLISHER; } - else if (sName.startsWith("School")) + else if( sName == "School" ) { eName = XML_SCHOOL; } - else if (sName.startsWith("Series")) + else if( sName == "Series" ) { eName = XML_SERIES; } - else if (sName.startsWith("Title")) + else if( sName == "Title" ) { eName = XML_TITLE; } - else if (sName.startsWith("Report_Type")) + else if( sName == "Report_Type" ) { eName = XML_REPORT_TYPE; } - else if (sName.startsWith("Volume")) + else if( sName == "Volume" ) { eName = XML_VOLUME; } - else if (sName.startsWith("Year")) + else if( sName == "Year" ) { eName = XML_YEAR; } - else if (sName.startsWith("URL")) + else if( sName == "URL" ) { eName = XML_URL; } - else if (sName.startsWith("Custom1")) + else if( sName == "Custom1" ) { eName = XML_CUSTOM1; } - else if (sName.startsWith("Custom2")) + else if( sName == "Custom2" ) { eName = XML_CUSTOM2; } - else if (sName.startsWith("Custom3")) + else if( sName == "Custom3" ) { eName = XML_CUSTOM3; } - else if (sName.startsWith("Custom4")) + else if( sName == "Custom4" ) { eName = XML_CUSTOM4; } - else if (sName.startsWith("Custom5")) + else if( sName == "Custom5" ) { eName = XML_CUSTOM5; } - else if (sName.startsWith("ISBN")) + else if( sName == "ISBN" ) { eName = XML_ISBN; } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 8ee117da5d49..4b5dead0108d 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3304,8 +3304,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes( { GetExport().AddAttribute( XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, sTargetFrame ); - enum XMLTokenEnum eTok = - sTargetFrame.startsWith( "_blank" ) ? XML_NEW : XML_REPLACE; + enum XMLTokenEnum eTok = sTargetFrame == "_blank" ? XML_NEW : XML_REPLACE; GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, eTok ); } |