diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-22 14:08:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-23 14:00:08 +0100 |
commit | ec1c4c49301758c54394f9943252e192ad54638b (patch) | |
tree | b53af3cb9154a388495b1af35c3f8ff41d6ebe1f /reportdesign | |
parent | db0f2c29bf3a6ad5a08f8524ea0e65aa90792bb2 (diff) |
O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins
Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/Group.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/core/api/Section.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/api/Tools.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/core/inc/Tools.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlGroup.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Formula.cxx | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx index 5a60997d5bf0..165214513bbe 100644 --- a/reportdesign/source/core/api/Group.cxx +++ b/reportdesign/source/core/api/Group.cxx @@ -171,7 +171,7 @@ uno::Reference< report::XSection > SAL_CALL OGroup::getFooter() void SAL_CALL OGroup::setGroupOn( ::sal_Int16 _groupon ) { if ( _groupon < report::GroupOn::DEFAULT || _groupon > report::GroupOn::INTERVAL ) - throwIllegallArgumentException("css::report::GroupOn" + throwIllegallArgumentException(u"css::report::GroupOn" ,*this ,1); set(PROPERTY_GROUPON,_groupon,m_aProps.m_nGroupOn); @@ -197,7 +197,7 @@ void SAL_CALL OGroup::setGroupInterval( ::sal_Int32 _groupinterval ) void SAL_CALL OGroup::setKeepTogether( ::sal_Int16 _keeptogether ) { if ( _keeptogether < report::KeepTogether::NO || _keeptogether > report::KeepTogether::WITH_FIRST_DETAIL ) - throwIllegallArgumentException("css::report::KeepTogether" + throwIllegallArgumentException(u"css::report::KeepTogether" ,*this ,1); set(PROPERTY_KEEPTOGETHER,_keeptogether,m_aProps.m_nKeepTogether); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index ad35f9e34354..39785167d6c0 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -762,7 +762,7 @@ void SAL_CALL OReportDefinition::setCaption( const OUString& _caption ) void SAL_CALL OReportDefinition::setGroupKeepTogether( ::sal_Int16 _groupkeeptogether ) { if ( _groupkeeptogether < report::GroupKeepTogether::PER_PAGE || _groupkeeptogether > report::GroupKeepTogether::PER_COLUMN ) - throwIllegallArgumentException("css::report::GroupKeepTogether" + throwIllegallArgumentException(u"css::report::GroupKeepTogether" ,*this ,1); set(PROPERTY_GROUPKEEPTOGETHER,_groupkeeptogether,m_pImpl->m_nGroupKeepTogether); @@ -777,7 +777,7 @@ void SAL_CALL OReportDefinition::setGroupKeepTogether( ::sal_Int16 _groupkeeptog void SAL_CALL OReportDefinition::setPageHeaderOption( ::sal_Int16 _pageheaderoption ) { if ( _pageheaderoption < report::ReportPrintOption::ALL_PAGES || _pageheaderoption > report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER ) - throwIllegallArgumentException("css::report::ReportPrintOption" + throwIllegallArgumentException(u"css::report::ReportPrintOption" ,*this ,1); set(PROPERTY_PAGEHEADEROPTION,_pageheaderoption,m_pImpl->m_nPageHeaderOption); @@ -792,7 +792,7 @@ void SAL_CALL OReportDefinition::setPageHeaderOption( ::sal_Int16 _pageheaderopt void SAL_CALL OReportDefinition::setPageFooterOption( ::sal_Int16 _pagefooteroption ) { if ( _pagefooteroption < report::ReportPrintOption::ALL_PAGES || _pagefooteroption > report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER ) - throwIllegallArgumentException("css::report::ReportPrintOption" + throwIllegallArgumentException(u"css::report::ReportPrintOption" ,*this ,1); set(PROPERTY_PAGEFOOTEROPTION,_pagefooteroption,m_pImpl->m_nPageFooterOption); @@ -818,7 +818,7 @@ void SAL_CALL OReportDefinition::setCommand( const OUString& _command ) void SAL_CALL OReportDefinition::setCommandType( ::sal_Int32 _commandtype ) { if ( _commandtype < sdb::CommandType::TABLE || _commandtype > sdb::CommandType::COMMAND ) - throwIllegallArgumentException("css::sdb::CommandType" + throwIllegallArgumentException(u"css::sdb::CommandType" ,*this ,1); set(PROPERTY_COMMANDTYPE,_commandtype,m_pImpl->m_nCommandType); @@ -1920,7 +1920,7 @@ void SAL_CALL OReportDefinition::setMimeType( const OUString& _mimetype ) ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); const uno::Sequence< OUString > aList = getAvailableMimeTypes(); if ( ::std::find(aList.begin(), aList.end(), _mimetype) == aList.end() ) - throwIllegallArgumentException("getAvailableMimeTypes()" + throwIllegallArgumentException(u"getAvailableMimeTypes()" ,*this ,1); set(PROPERTY_MIMETYPE,_mimetype,m_pImpl->m_sMimeType); diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index bed193b3242f..62795c756ab2 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -303,7 +303,7 @@ void OSection::checkNotPageHeaderFooter() void SAL_CALL OSection::setForceNewPage( ::sal_Int16 _forcenewpage ) { if ( _forcenewpage < report::ForceNewPage::NONE || _forcenewpage > report::ForceNewPage::BEFORE_AFTER_SECTION ) - throwIllegallArgumentException("css::report::ForceNewPage" + throwIllegallArgumentException(u"css::report::ForceNewPage" ,*this ,1); checkNotPageHeaderFooter(); @@ -320,7 +320,7 @@ void SAL_CALL OSection::setForceNewPage( ::sal_Int16 _forcenewpage ) void SAL_CALL OSection::setNewRowOrCol( ::sal_Int16 _newroworcol ) { if ( _newroworcol < report::ForceNewPage::NONE || _newroworcol > report::ForceNewPage::BEFORE_AFTER_SECTION ) - throwIllegallArgumentException("css::report::ForceNewPage" + throwIllegallArgumentException(u"css::report::ForceNewPage" ,*this ,1); checkNotPageHeaderFooter(); diff --git a/reportdesign/source/core/api/Tools.cxx b/reportdesign/source/core/api/Tools.cxx index 5d21217cc450..8f066a68d668 100644 --- a/reportdesign/source/core/api/Tools.cxx +++ b/reportdesign/source/core/api/Tools.cxx @@ -40,7 +40,7 @@ uno::Reference< report::XSection> lcl_getSection(const uno::Reference< uno::XInt return xRet; } -void throwIllegallArgumentException( const OUString& _sTypeName +void throwIllegallArgumentException( std::u16string_view _sTypeName ,const uno::Reference< uno::XInterface >& ExceptionContext_ ,sal_Int16 ArgumentPosition_ ) diff --git a/reportdesign/source/core/inc/Tools.hxx b/reportdesign/source/core/inc/Tools.hxx index 004d4cc4f77a..3e0a699cef21 100644 --- a/reportdesign/source/core/inc/Tools.hxx +++ b/reportdesign/source/core/inc/Tools.hxx @@ -45,7 +45,7 @@ namespace reportdesign * \param ExceptionContext_ The exception context. * \param ArgumentPosition_ The argument position. */ - void throwIllegallArgumentException(const OUString& _sTypeName + void throwIllegallArgumentException(std::u16string_view _sTypeName ,const css::uno::Reference< css::uno::XInterface >& ExceptionContext_ ,sal_Int16 ArgumentPosition_); diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index d9a673e81250..222bb423e79e 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1041,7 +1041,7 @@ void ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDefinit sal_Int32 nIndex = sExpression.indexOf('"'); while ( nIndex > -1 ) { - sExpression = sExpression.replaceAt(nIndex, 1, "\"\""); + sExpression = sExpression.replaceAt(nIndex, 1, u"\"\""); nIndex = sExpression.indexOf('"',nIndex+2); } diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index 1c8681494217..355ed8feab8f 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -91,7 +91,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport sal_Int32 nIndex = sValue.indexOf(s_sQuote,nPos); while ( nIndex > -1 ) { - sValue = sValue.replaceAt(nIndex,2, "\""); + sValue = sValue.replaceAt(nIndex,2, u"\""); nIndex = sValue.indexOf(s_sQuote,nIndex+2); } nLen = sValue.getLength() - 1; diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index f1b95f953c62..f2b95e0df1b7 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -152,7 +152,7 @@ void FormulaDialog::setCurrentFormula(const OUString& _sReplacement) const sal_Int32 nOldLen = m_nEnd - m_nStart; const sal_Int32 nNewLen = _sReplacement.getLength(); if (nOldLen) - m_sFormula = m_sFormula.replaceAt( m_nStart, nOldLen, "" ); + m_sFormula = m_sFormula.replaceAt( m_nStart, nOldLen, u"" ); if (nNewLen) m_sFormula = m_sFormula.replaceAt( m_nStart, 0, _sReplacement ); m_nEnd = m_nStart + nNewLen; |