diff options
Diffstat (limited to 'dbaccess')
29 files changed, 69 insertions, 69 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 513f99105962..21c1ff0ef9a7 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -527,10 +527,10 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi ::dbtools::throwSQLException( DBA_RES( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); // now create end execute the prepared statement - executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),"",aIndexColumnPositions); + executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),u"",aIndexColumnPositions); } -void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const OUString& i_sSQL,const OUString& i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions) +void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const OUString& i_sSQL,std::u16string_view i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions) { // now create end execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL)); @@ -542,7 +542,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO // first the set values for (auto const& columnName : *m_pColumnNames) { - if ( i_sTableName.isEmpty() || columnName.second.sTableName == i_sTableName ) + if ( i_sTableName.empty() || columnName.second.sTableName == i_sTableName ) { sal_Int32 nPos = columnName.second.nPosition; if((*_rInsertRow)[nPos].isModified()) @@ -560,7 +560,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO // and then the values of the where condition for (auto const& keyColumnName : *m_pKeyColumnNames) { - if ( i_sTableName.isEmpty() || keyColumnName.second.sTableName == i_sTableName ) + if ( i_sTableName.empty() || keyColumnName.second.sTableName == i_sTableName ) { setParameter(i++,xParameter,(*_rOriginalRow)[keyColumnName.second.nPosition],keyColumnName.second.nType,keyColumnName.second.nScale); } @@ -621,10 +621,10 @@ void OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLT aValues[aValues.getLength() - 1] = ')'; aSql.append(aValues.makeStringAndClear()); // now create,fill and execute the prepared statement - executeInsert(_rInsertRow,aSql.makeStringAndClear(),"",bRefetch); + executeInsert(_rInsertRow,aSql.makeStringAndClear(),u"",bRefetch); } -void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQL,const OUString& i_sTableName,bool bRefetch ) +void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQL,std::u16string_view i_sTableName,bool bRefetch ) { // now create,fill and execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL)); @@ -633,7 +633,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ sal_Int32 i = 1; for (auto const& columnName : *m_pColumnNames) { - if ( i_sTableName.isEmpty() || columnName.second.sTableName == i_sTableName ) + if ( i_sTableName.empty() || columnName.second.sTableName == i_sTableName ) { const sal_Int32 nPos = columnName.second.nPosition; if((*_rInsertRow)[nPos].isModified()) @@ -703,7 +703,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ ::comphelper::disposeComponent(xPrep); - if ( i_sTableName.isEmpty() && !bAutoValuesFetched && m_bInserted ) + if ( i_sTableName.empty() && !bAutoValuesFetched && m_bInserted ) { // first check if all key column values were set const OUString sQuote = getIdentifierQuoteString(); diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index cc6175923063..e5d3c61ea5ac 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -136,8 +136,8 @@ namespace dbaccess /// @throws css::uno::RuntimeException bool doTryRefetch_throw(); void tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch); - void executeUpdate(const ORowSetRow& _rInsertRow, const ORowSetRow& _rOriginalRow, const OUString& i_sSQL, const OUString& i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions = std::vector<sal_Int32>()); - void executeInsert( const ORowSetRow& _rInsertRow, const OUString& i_sSQL, const OUString& i_sTableName, bool bRefetch = false); + void executeUpdate(const ORowSetRow& _rInsertRow, const ORowSetRow& _rOriginalRow, const OUString& i_sSQL, std::u16string_view i_sTableName,const std::vector<sal_Int32>& _aIndexColumnPositions = std::vector<sal_Int32>()); + void executeInsert( const ORowSetRow& _rInsertRow, const OUString& i_sSQL, std::u16string_view i_sTableName, bool bRefetch = false); void executeStatement(OUStringBuffer& io_aFilter, css::uno::Reference< css::sdb::XSingleSelectQueryComposer>& io_xAnalyzer); virtual ~OKeySet() override; diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 67fd18aaaea7..7db4ca08740b 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -336,7 +336,7 @@ void OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivity:: } } -void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const OUString& i_sSQL,const OUString& i_sTableName) +void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const OUString& i_sSQL,std::u16string_view i_sTableName) { // now create and execute the prepared statement Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(i_sSQL)); diff --git a/dbaccess/source/core/api/OptimisticSet.hxx b/dbaccess/source/core/api/OptimisticSet.hxx index d5c2c069579c..bf5e3a80370a 100644 --- a/dbaccess/source/core/api/OptimisticSet.hxx +++ b/dbaccess/source/core/api/OptimisticSet.hxx @@ -39,7 +39,7 @@ namespace dbaccess mutable bool m_bResultSetChanged; - void executeDelete(const ORowSetRow& _rDeleteRow,const OUString& i_sSQL,const OUString& i_sTableName); + void executeDelete(const ORowSetRow& _rDeleteRow,const OUString& i_sSQL,std::u16string_view i_sTableName); void fillJoinedColumns_throw(const std::vector< ::connectivity::TNodePair>& i_aJoinColumns); void fillJoinedColumns_throw(const OUString& i_sLeftColumn,const OUString& i_sRightColumn); protected: diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx index 3e9b59551546..6009653ce1a7 100644 --- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx +++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx @@ -131,7 +131,7 @@ namespace dbaccess ::utl::OConfigurationNode - impl_getNodeForName_nothrow(const OUString& _rName); + impl_getNodeForName_nothrow(std::u16string_view _rName); private: Reference<XComponentContext> m_aContext; @@ -155,7 +155,7 @@ namespace dbaccess { } - ::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_nothrow( const OUString& _rName ) + ::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_nothrow( std::u16string_view _rName ) { const Sequence< OUString > aNames( m_aConfigurationRoot.getNodeNames() ); for ( auto const & nodeName : aNames ) diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 3662148b9462..b44b11fc16f0 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -152,7 +152,7 @@ OUString ODsnTypeCollection::getMediaType(const OUString& _sURL) const return aFeatures.getOrDefault("MediaType",OUString()); } -OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _sMediaType,const OUString& _sExtension) +OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(std::u16string_view _sMediaType,std::u16string_view _sExtension) { OUString sURL, sFallbackURL; const uno::Sequence< OUString > aURLs = m_aDriverConfig.getURLs(); @@ -169,7 +169,7 @@ OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _s sURL = *pIter; break; } - if ( sFileExtension.isEmpty() && !_sExtension.isEmpty() ) + if ( sFileExtension.isEmpty() && !_sExtension.empty() ) sFallbackURL = *pIter; } } diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index 334b297b0bf5..38f8ba9213a0 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -135,7 +135,7 @@ public: OUString getMediaType(const OUString& _sURL) const; /// returns the dsn prefix for a given media type - OUString getDatasourcePrefixFromMediaType(const OUString& _sMediaType, const OUString& _sExtension ); + OUString getDatasourcePrefixFromMediaType(std::u16string_view _sMediaType, std::u16string_view _sExtension ); void extractHostNamePort(const OUString& _rDsn,OUString& _sDatabaseName,OUString& _rHostname,sal_Int32& _nPortNumber) const; diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 08df1dff0930..f2a81ecf98a1 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -508,10 +508,10 @@ namespace dbaui return true; } - bool SubComponentManager::closeSubFrames( const OUString& i_rName, const sal_Int32 _nComponentType ) + bool SubComponentManager::closeSubFrames( std::u16string_view i_rName, const sal_Int32 _nComponentType ) { ::osl::MutexGuard aGuard( m_pData->getMutex() ); - ENSURE_OR_RETURN_FALSE( !i_rName.isEmpty(), "SubComponentManager::closeSubFrames: illegal name!" ); + ENSURE_OR_RETURN_FALSE( !i_rName.empty(), "SubComponentManager::closeSubFrames: illegal name!" ); SubComponents aWorkingCopy( m_pData->m_aComponents ); for (auto const& elem : aWorkingCopy) diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx index b14e96d68116..402a3d593b90 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.hxx +++ b/dbaccess/source/ui/app/subcomponentmanager.hxx @@ -90,7 +90,7 @@ namespace dbaui exist. */ bool closeSubFrames( - const OUString& _rName, + std::u16string_view _rName, const sal_Int32 _nComponentType ); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index b05ad037377f..67ae3cac0f6d 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2783,7 +2783,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted(const ContainerEvent& rEvent SbaXDataBrowserController::elementInserted(rEvent); } -bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& rName, const weld::TreeIter& rContainer) +bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(std::u16string_view rName, const weld::TreeIter& rContainer) { if (!m_xCurrentlyDisplayed) return false; @@ -3758,7 +3758,7 @@ void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRe implAddDatasource( Event.Name, SharedConnection() ); } -void SbaTableQueryBrowser::impl_cleanupDataSourceEntry(const OUString& rDataSourceName) +void SbaTableQueryBrowser::impl_cleanupDataSourceEntry(std::u16string_view rDataSourceName) { // get the top-level representing the removed data source weld::TreeView& rTreeView = m_pTreeView->GetWidget(); diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index f0d9b9ee4468..8f3854f3740d 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -133,7 +133,7 @@ void OFieldDescControl::dispose() m_xBuilder.reset(); } -OUString OFieldDescControl::BoolStringPersistent(const OUString& rUIString) const +OUString OFieldDescControl::BoolStringPersistent(std::u16string_view rUIString) const { if (rUIString == aNo) return OUString('0'); diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index d63beff8c346..11215d56ac93 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -180,7 +180,7 @@ TreeListBox::~TreeListBox() { } -std::unique_ptr<weld::TreeIter> TreeListBox::GetEntryPosByName(const OUString& aName, const weld::TreeIter* pStart, const IEntryFilter* _pFilter) const +std::unique_ptr<weld::TreeIter> TreeListBox::GetEntryPosByName(std::u16string_view aName, const weld::TreeIter* pStart, const IEntryFilter* _pFilter) const { auto xEntry(m_xTreeView->make_iterator(pStart)); if (!pStart && !m_xTreeView->get_iter_first(*xEntry)) diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 011050e8f8cf..d66e48405d00 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -116,7 +116,7 @@ void ODbaseIndexDialog::implInsertIndex(const OTableIndex& _rIndex, TableIndexLi _rDisplay.select(0); } -OTableIndex ODbaseIndexDialog::RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName ) +OTableIndex ODbaseIndexDialog::RemoveTableIndex( std::u16string_view _rTableName, const OUString& _rIndexName ) { OTableIndex aReturn; @@ -130,7 +130,7 @@ OTableIndex ODbaseIndexDialog::RemoveTableIndex( const OUString& _rTableName, co return implRemoveIndex(_rIndexName, aTablePos->aIndexList, *m_xLB_TableIndexes, true/*_bMustExist*/); } -void ODbaseIndexDialog::InsertTableIndex( const OUString& _rTableName, const OTableIndex& _rIndex) +void ODbaseIndexDialog::InsertTableIndex( std::u16string_view _rTableName, const OTableIndex& _rIndex) { TableInfoList::iterator aTablePos = std::find_if(m_aTableInfoList.begin(), m_aTableInfoList.end(), [&] (const OTableInfo& arg) { return arg.aTableName == _rTableName; }); diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index 0349b6c58b75..53b75640e6f4 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -95,8 +95,8 @@ protected: OTableIndex RemoveFreeIndex( const OUString& _rName, bool _bMustExist ) { return implRemoveIndex(_rName, m_aFreeIndexList, *m_xLB_FreeIndexes, _bMustExist); } void InsertFreeIndex( const OTableIndex& _rIndex ) { implInsertIndex(_rIndex, m_aFreeIndexList, *m_xLB_FreeIndexes); } - OTableIndex RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName ); - void InsertTableIndex( const OUString& _rTableName, const OTableIndex& _rIndex ); + OTableIndex RemoveTableIndex( std::u16string_view _rTableName, const OUString& _rIndexName ); + void InsertTableIndex( std::u16string_view _rTableName, const OTableIndex& _rIndex ); void checkButtons(); diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 56db11946315..67df2db8ccdf 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -183,7 +183,7 @@ DlgFilterCrit::~DlgFilterCrit() #define LbText(x) ((x).get_active_text()) #define LbPos(x) ((x).get_active()) -sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const OUString& _rSelectedPredicate ) const +sal_Int32 DlgFilterCrit::GetOSQLPredicateType( std::u16string_view _rSelectedPredicate ) const { sal_Int32 nPredicateIndex = -1; for ( size_t i=0; i < m_aSTR_COMPARE_OPERATORS.size(); ++i) @@ -493,7 +493,7 @@ void DlgFilterCrit::SetLine( int nIdx, const PropertyValue& _rItem, bool _bOr ) pPredicateValueControl->set_text( aString ); } -void DlgFilterCrit::SelectField(weld::ComboBox& rBox, const OUString& rField) +void DlgFilterCrit::SelectField(weld::ComboBox& rBox, std::u16string_view rField) { const sal_Int32 nCnt = rBox.get_count(); diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index c467d4ca5402..f321276827b0 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -145,7 +145,7 @@ namespace dbaui virtual bool isAutoIncrementValueEnabled() const = 0; virtual OUString getAutoIncrementValue() const = 0; - OUString BoolStringPersistent(const OUString& rUIString) const; + OUString BoolStringPersistent(std::u16string_view rUIString) const; OUString BoolStringUI(const OUString& rPersistentString) const; const OPropColumnEditCtrl* getColumnCtrl() const { return m_xColumnName.get(); } diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx index 8bcb0f58e1a0..efef444e8670 100644 --- a/dbaccess/source/ui/inc/QueryDesignView.hxx +++ b/dbaccess/source/ui/inc/QueryDesignView.hxx @@ -105,12 +105,12 @@ namespace dbaui const OUString& getDecimalSeparator() const { return m_sDecimalSep;} SqlParseError InsertField( const OTableFieldDescRef& rInfo, bool bActivate = true); - bool HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef const & rInfo) const; + bool HasFieldByAliasName(std::u16string_view rFieldName, OTableFieldDescRef const & rInfo) const; // called when a table from tabview was deleted void TableDeleted(const OUString& rAliasName); sal_Int32 getColWidth( sal_uInt16 _nColPos) const; - void fillValidFields(const OUString& strTableName, weld::ComboBox& rFieldList); + void fillValidFields(std::u16string_view strTableName, weld::ComboBox& rFieldList); void SaveUIConfig(); void stopTimer(); diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx index 3d39d368307e..92ddceb37507 100644 --- a/dbaccess/source/ui/inc/TableCopyHelper.hxx +++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx @@ -96,7 +96,7 @@ namespace dbaui The name of the dest data source. */ void pasteTable( const TransferableDataHelper& _rTransData - ,const OUString& _sDestDataSourceName + ,std::u16string_view _sDestDataSourceName ,const SharedConnection& _xConnection); /** pastes a table into the data source @@ -109,7 +109,7 @@ namespace dbaui */ void pasteTable( SotClipboardFormatId _nFormatId ,const TransferableDataHelper& _rTransData - ,const OUString& _sDestDataSourceName + ,std::u16string_view _sDestDataSourceName ,const SharedConnection& _xConnection); /** copies a table which was constructed by tags like HTML or RTF @@ -133,7 +133,7 @@ namespace dbaui The connection */ void asyncCopyTagTable( DropDescriptor& _rDesc - ,const OUString& _sDestDataSourceName + ,std::u16string_view _sDestDataSourceName ,const SharedConnection& _xConnection); /** copies a table which was constructed by tags like HTML or RTF @@ -164,21 +164,21 @@ namespace dbaui */ void pasteTable( const svx::ODataAccessDescriptor& _rPasteData, - const OUString& _sDestDataSourceName, + std::u16string_view _sDestDataSourceName, const SharedConnection& _xDestConnection ); /** insert a table into the data source. The source can either be a table or a query */ void insertTable( - const OUString& i_rSourceDataSource, + std::u16string_view i_rSourceDataSource, const css::uno::Reference< css::sdbc::XConnection>& i_rSourceConnection, const OUString& i_rCommand, const sal_Int32 i_nCommandType, const css::uno::Reference< css::sdbc::XResultSet >& i_rSourceRows, const css::uno::Sequence< css::uno::Any >& i_rSelection, const bool i_bBookmarkSelection, - const OUString& i_rDestDataSource, + std::u16string_view i_rDestDataSource, const css::uno::Reference< css::sdbc::XConnection>& i_rDestConnection ); diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx index 405ac7f31c2b..706ccfd0371c 100644 --- a/dbaccess/source/ui/inc/WColumnSelect.hxx +++ b/dbaccess/source/ui/inc/WColumnSelect.hxx @@ -64,7 +64,7 @@ namespace dbaui void enableButtons(); sal_Int32 adjustColumnPosition(weld::TreeView const * _pLeft, - const OUString& _sColumnName, + std::u16string_view _sColumnName, ODatabaseExport::TColumnVector::size_type nCurrentPos, const ::comphelper::UStringMixEqual& _aCase); diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index af68b9e9b8d7..4838e5c74d10 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -90,7 +90,7 @@ namespace dbaui TreeListBox(std::unique_ptr<weld::TreeView> xTreeView, bool bSQLType); virtual ~TreeListBox(); - std::unique_ptr<weld::TreeIter> GetEntryPosByName(const OUString& rName, + std::unique_ptr<weld::TreeIter> GetEntryPosByName(std::u16string_view rName, const weld::TreeIter* pStart = nullptr, const IEntryFilter* pFilter = nullptr) const; diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx index 258dcc51ec08..396778f22997 100644 --- a/dbaccess/source/ui/inc/queryfilter.hxx +++ b/dbaccess/source/ui/inc/queryfilter.hxx @@ -75,13 +75,13 @@ namespace dbaui std::unique_ptr<weld::ComboBox> m_xLB_WHERECOMP3; std::unique_ptr<weld::Entry> m_xET_WHEREVALUE3; - static void SelectField(weld::ComboBox& rBox, const OUString& rField); + static void SelectField(weld::ComboBox& rBox, std::u16string_view rField); DECL_LINK(ListSelectHdl, weld::ComboBox&, void); DECL_LINK(ListSelectCompHdl, weld::ComboBox&, void); void SetLine( int nIdx, const css::beans::PropertyValue& _rItem, bool _bOr ); void EnableLines(); - sal_Int32 GetOSQLPredicateType( const OUString& _rSelectedPredicate ) const; + sal_Int32 GetOSQLPredicateType( std::u16string_view _rSelectedPredicate ) const; static sal_Int32 GetSelectionPos(sal_Int32 eType, const weld::ComboBox& rListBox); bool getCondition(const weld::ComboBox& _rField, const weld::ComboBox& _rComp, const weld::Entry& _rValue, css::beans::PropertyValue& _rFilter) const; void fillLines(int &i, const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& _aValues); diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index e147b44b9e02..637f173da20e 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -268,7 +268,7 @@ namespace dbaui void implAddDatasource( const OUString& _rDataSourceName, const SharedConnection& _rxConnection ); /// removes (and cleans up) the entry for the given data source - void impl_cleanupDataSourceEntry( const OUString& _rDataSourceName ); + void impl_cleanupDataSourceEntry( std::u16string_view _rDataSourceName ); /// clears the tree list box void clearTreeModel(); @@ -430,7 +430,7 @@ namespace dbaui @return <TRUE/> if it is the currently displayed otherwise <FALSE/> */ - bool isCurrentlyDisplayedChanged(const OUString& rName, const weld::TreeIter& rContainer); + bool isCurrentlyDisplayedChanged(std::u16string_view rName, const weld::TreeIter& rContainer); /** called whenever the content of the browser is used for preview, as the very last action of the load process diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index 36d7ab70fa14..7e944e4d9516 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -61,10 +61,10 @@ OTableCopyHelper::OTableCopyHelper(OGenericUnoController* _pController) { } -void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const Reference<XConnection>& i_rSourceConnection, +void OTableCopyHelper::insertTable( std::u16string_view i_rSourceDataSource, const Reference<XConnection>& i_rSourceConnection, const OUString& i_rCommand, const sal_Int32 i_nCommandType, const Reference< XResultSet >& i_rSourceRows, const Sequence< Any >& i_rSelection, const bool i_bBookmarkSelection, - const OUString& i_rDestDataSource, const Reference<XConnection>& i_rDestConnection) + std::u16string_view i_rDestDataSource, const Reference<XConnection>& i_rDestConnection) { if ( CommandType::QUERY != i_nCommandType && CommandType::TABLE != i_nCommandType ) { @@ -121,7 +121,7 @@ void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const R } } -void OTableCopyHelper::pasteTable( const svx::ODataAccessDescriptor& _rPasteData, const OUString& i_rDestDataSourceName, +void OTableCopyHelper::pasteTable( const svx::ODataAccessDescriptor& _rPasteData, std::u16string_view i_rDestDataSourceName, const SharedConnection& i_rDestConnection ) { OUString sSrcDataSourceName = _rPasteData.getDataSource(); @@ -166,7 +166,7 @@ void OTableCopyHelper::pasteTable( const svx::ODataAccessDescriptor& _rPasteData void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId ,const TransferableDataHelper& _rTransData - ,const OUString& i_rDestDataSource + ,std::u16string_view i_rDestDataSource ,const SharedConnection& _xConnection) { if ( _nFormatId == SotClipboardFormatId::DBACCESS_TABLE || _nFormatId == SotClipboardFormatId::DBACCESS_QUERY ) @@ -208,7 +208,7 @@ void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId } void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData - ,const OUString& i_rDestDataSource + ,std::u16string_view i_rDestDataSource ,const SharedConnection& _xConnection) { if ( _rTransData.HasFormat(SotClipboardFormatId::DBACCESS_TABLE) || _rTransData.HasFormat(SotClipboardFormatId::DBACCESS_QUERY) ) @@ -286,7 +286,7 @@ bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData } void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc - ,const OUString& i_rDestDataSource + ,std::u16string_view i_rDestDataSource ,const SharedConnection& _xConnection) { if ( _rDesc.aHtmlRtfStorage.is() ) diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 8941119e9234..544b79d03267 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -346,7 +346,7 @@ void OWizColumnSelect::moveColumn( weld::TreeView* _pRight, // been removed earlier and adjust accordingly. Based on the // algorithm employed in moveColumn(). sal_Int32 OWizColumnSelect::adjustColumnPosition(weld::TreeView const * _pLeft, - const OUString& _sColumnName, + std::u16string_view _sColumnName, ODatabaseExport::TColumnVector::size_type nCurrentPos, const ::comphelper::UStringMixEqual& _aCase) { diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 96e44ab6e68d..b8aa3f7c4b81 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2627,7 +2627,7 @@ void OQueryDesignView::TableDeleted(const OUString& rAliasName) static_cast<OQueryController&>(getController()).InvalidateFeature(ID_BROWSER_ADDTABLE); // inform the view again } -bool OQueryDesignView::HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef const & rInfo) const +bool OQueryDesignView::HasFieldByAliasName(std::u16string_view rFieldName, OTableFieldDescRef const & rInfo) const { return m_pSelectionBox->HasFieldByAliasName( rFieldName, rInfo); } @@ -2646,11 +2646,11 @@ sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const return nWidth; } -void OQueryDesignView::fillValidFields(const OUString& sAliasName, weld::ComboBox& rFieldList) +void OQueryDesignView::fillValidFields(std::u16string_view sAliasName, weld::ComboBox& rFieldList) { rFieldList.clear(); - bool bAllTables = sAliasName.isEmpty(); + bool bAllTables = sAliasName.empty(); OJoinTableView::OTableWindowMap& rTabWins = m_pTableView->GetTabWinMap(); OUString strCurrentPrefix; diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 22a456e81ea9..77ca793e5077 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -353,7 +353,7 @@ void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rA } // find the table which has a foreign key with this referencedTable name -static Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKeys,const OUString& _rReferencedTable) +static Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKeys,std::u16string_view _rReferencedTable) { if(!_rxKeys.is()) return Reference<XPropertySet>(); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 22e17c01ec36..fccd2e800814 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -554,14 +554,14 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, sal Controller()->SaveValue(); } -void OSelectionBrowseBox::notifyTableFieldChanged(const OUString& _sOldAlias, const OUString& _sAlias, bool& _bListAction, sal_uInt16 _nColumnId) +void OSelectionBrowseBox::notifyTableFieldChanged(const OUString& _sOldAlias, std::u16string_view _sAlias, bool& _bListAction, sal_uInt16 _nColumnId) { appendUndoAction(_sOldAlias,_sAlias,BROW_TABLE_ROW,_bListAction); if ( m_bVisibleRow[BROW_TABLE_ROW] ) RowModified(GetBrowseRow(BROW_TABLE_ROW), _nColumnId); } -void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFunctionName, const OUString& _sFunctionName, bool& _bListAction, sal_uInt16 _nColumnId) +void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFunctionName, std::u16string_view _sFunctionName, bool& _bListAction, sal_uInt16 _nColumnId) { appendUndoAction(_sOldFunctionName,_sFunctionName,BROW_FUNCTION_ROW,_bListAction); if ( !m_bVisibleRow[BROW_FUNCTION_ROW] ) @@ -1056,7 +1056,7 @@ bool OSelectionBrowseBox::SaveModified() // we have to change the visible flag, so we must append also an undo action pEntry->SetVisible(); m_pVisibleCell->GetBox().set_active(true); - appendUndoAction("0","1",BROW_VIS_ROW,bListAction); + appendUndoAction("0",u"1",BROW_VIS_ROW,bListAction); RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId()); } @@ -1197,7 +1197,7 @@ bool OSelectionBrowseBox::SaveModified() { // Default to visible pEntry->SetVisible(); - appendUndoAction("0","1",BROW_VIS_ROW,bListAction); + appendUndoAction("0",u"1",BROW_VIS_ROW,bListAction); RowModified(BROW_VIS_ROW, GetCurColumnId()); // if required add empty columns @@ -2461,7 +2461,7 @@ void OSelectionBrowseBox::copy() } } -void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue, const OUString& _rNewValue, sal_Int32 _nRow, bool& _bListAction) +void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue, std::u16string_view _rNewValue, sal_Int32 _nRow, bool& _bListAction) { if ( !m_bInUndoMode && _rNewValue != _rOldValue ) { @@ -2474,7 +2474,7 @@ void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue, const OUS } } -void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow) +void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue,std::u16string_view _rNewValue,sal_Int32 _nRow) { if ( !m_bInUndoMode && _rNewValue != _rOldValue ) { @@ -2691,7 +2691,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos ); } -bool OSelectionBrowseBox::HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef const & rInfo) const +bool OSelectionBrowseBox::HasFieldByAliasName(std::u16string_view rFieldName, OTableFieldDescRef const & rInfo) const { for (auto const& field : getFields()) { diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 8c2ea555a98e..c3cd5641d3e1 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -86,7 +86,7 @@ namespace dbaui void RemoveColumn( sal_uInt16 _nColumnId ); void DeleteFields( const OUString& rAliasName ); - bool HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef const & rInfo) const; + bool HasFieldByAliasName(std::u16string_view rFieldName, OTableFieldDescRef const & rInfo) const; // AddGroupBy:: inserts a field with function == grouping. If the fields already exists and uses an aggregate function, // the flag is not set @@ -219,8 +219,8 @@ namespace dbaui sal_Int32 GetRealRow(sal_Int32 nRow) const; sal_Int32 GetBrowseRow(sal_Int32 nRowId) const; bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); - void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow, bool& _bListAction); - void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow); + void appendUndoAction(const OUString& _rOldValue,std::u16string_view _rNewValue,sal_Int32 _nRow, bool& _bListAction); + void appendUndoAction(const OUString& _rOldValue,std::u16string_view _rNewValue,sal_Int32 _nRow); OTableFields& getFields() const; static void enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl); void setTextCellContext(const OTableFieldDescRef& _rEntry,const OUString& _sText,const OString& _sHelpId); @@ -281,7 +281,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias, bool& _bListAction,sal_uInt16 _nColumnId); + void notifyTableFieldChanged(const OUString& _sOldAlias,std::u16string_view _sAlias, bool& _bListAction,sal_uInt16 _nColumnId); /** append an undo action for the function field @param _sOldFunctionName @@ -291,7 +291,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName, bool& _bListAction,sal_uInt16 _nColumnId); + void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,std::u16string_view _sFunctionName, bool& _bListAction,sal_uInt16 _nColumnId); /** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action. E.q. AGGREGATE functions are only valid when the field name isn't an asterisk diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index 1e65397a70dd..9f15c1e1b90b 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -64,7 +64,7 @@ namespace dbaui void SetControlText( sal_uInt16 nControlId, const OUString& rText ) { m_xFieldControl->SetControlText(nControlId,rText); } - OUString BoolStringPersistent(const OUString& rUIString) const { return m_xFieldControl->BoolStringPersistent(rUIString); } + OUString BoolStringPersistent(std::u16string_view rUIString) const { return m_xFieldControl->BoolStringPersistent(rUIString); } OUString BoolStringUI(const OUString& rPersistentString) const { return m_xFieldControl->BoolStringUI(rPersistentString); } virtual bool HasChildPathFocus() const override; |