diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:53:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:54:52 +0100 |
commit | a3f32769fc4bb23c64168b412dd10ec769a3854d (patch) | |
tree | 92bb435946dcfc422c9816bc05c150069a2da3c3 /reportdesign | |
parent | 35539318cecddc9ccb2904573a894ea05adc432c (diff) |
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.
Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Diffstat (limited to 'reportdesign')
3 files changed, 19 insertions, 19 deletions
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 1136de1e4ea9..9a1cda5fb721 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -195,7 +195,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const { m_bCountColumnHeader = true; } - else if ( m_bCountColumnHeader && _sName.startsWith("table:table-cell") ) + else if ( m_bCountColumnHeader && _sName == "table:table-cell" ) { ++m_nColumnCount; } @@ -207,7 +207,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const m_bTableRowsStarted = true; m_bFirstRowExported = true; } - else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.startsWith("table:table-row") || _sName.startsWith("table:table-cell")) ) + else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName == "table:table-row" || _sName == "table:table-cell") ) bExport = false; else if ( _sName == "chart:plot-area" ) { @@ -224,13 +224,13 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const static OUString s_sCellAddress(lcl_createAttribute(XML_NP_CHART,XML_VALUES_CELL_RANGE_ADDRESS)); lcl_correctCellAddress(s_sCellAddress,xAttribs); } - else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName.startsWith("table:table-cell") ) + else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName == "table:table-cell" ) { SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs); static OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE)); pList->RemoveAttribute(s_sValue); } - else if ( m_bTableRowsStarted && _sName.startsWith("text:p") ) + else if ( m_bTableRowsStarted && _sName == "text:p" ) { bExport = false; } @@ -258,11 +258,11 @@ void SAL_CALL ExportDocumentHandler::endElement(const OUString & _sName) throw ( } else if ( _sName == "table:table-rows" ) m_bTableRowsStarted = false; - else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.startsWith("table:table-row") || _sName.startsWith("table:table-cell")) ) + else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName == "table:table-row" || _sName == "table:table-cell") ) bExport = false; - else if ( m_bTableRowsStarted && _sName.startsWith("table:table-row") ) + else if ( m_bTableRowsStarted && _sName == "table:table-row" ) m_bFirstRowExported = true; - else if ( m_bTableRowsStarted && _sName.startsWith("text:p") ) + else if ( m_bTableRowsStarted && _sName == "text:p" ) { bExport = !m_bFirstRowExported; } diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 88fe4339e7a3..1763b025b9e6 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -249,11 +249,11 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const } bExport = false; } - else if ( _sName.startsWith("rpt:detail") - || _sName.startsWith("rpt:formatted-text") - || _sName.startsWith("rpt:master-detail-fields") - || _sName.startsWith("rpt:report-component") - || _sName.startsWith("rpt:report-element")) + else if ( _sName == "rpt:detail" + || _sName == "rpt:formatted-text" + || _sName == "rpt:master-detail-fields" + || _sName == "rpt:report-component" + || _sName == "rpt:report-element") bExport = false; else if ( _sName == "chart:plot-area" ) { @@ -274,7 +274,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const if ( sLocalName == "data-source-has-labels" ) { const OUString sValue = _xAttrList->getValueByIndex( i ); - bHasCategories = sValue.startsWith("both"); + bHasCategories = sValue == "both"; break; } } @@ -316,11 +316,11 @@ void SAL_CALL ImportDocumentHandler::endElement(const OUString & _sName) throw ( m_xDatabaseDataProvider->setDetailFields(uno::Sequence< OUString>(&*m_aDetailFields.begin(),m_aDetailFields.size())); bExport = false; } - else if ( _sName.startsWith("rpt:detail") - || _sName.startsWith("rpt:formatted-text") - || _sName.startsWith("rpt:master-detail-field") - || _sName.startsWith("rpt:report-component") - || _sName.startsWith("rpt:report-element")) + else if ( _sName == "rpt:detail" + || _sName == "rpt:formatted-text" + || _sName == "rpt:master-detail-field" + || _sName == "rpt:report-component" + || _sName == "rpt:report-element") bExport = false; if ( bExport ) diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index a81f390d8a6e..b5af9542cfee 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -180,7 +180,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments m_aStates.insert(TCommandState::value_type(OUString(".uno:CharFontName"),sal_True)); m_pToolbarController = TToolbarHelper::createFromQuery(new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox)); } - else if ( m_aCommandURL.startsWith(".uno:FontColor") || m_aCommandURL.startsWith(".uno:Color") ) + else if ( m_aCommandURL == ".uno:FontColor" || m_aCommandURL == ".uno:Color" ) { m_aStates.insert(TCommandState::value_type(OUString(".uno:FontColor"),sal_True)); m_aStates.insert(TCommandState::value_type(OUString(".uno:Color"),sal_True)); |