diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-06-28 23:32:05 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-29 08:46:34 +0200 |
commit | 5437eb15ad3975b11c6eefe77dfd6687e0e73f81 (patch) | |
tree | 3d2e1996415ed9e27a50366b6ef5f8e5767b8e05 /dbaccess | |
parent | ff597693035d0f60dc53f884e3c456b1048d92ab (diff) |
tdf#96099 Remove trivial std::map typedefs in [cd]*
Change-Id: I043d265d3d73a3e16f05d5ca7e29a09341651d82
Reviewed-on: https://gerrit.libreoffice.org/56639
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dsselect.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dsselect.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/odbcconfig.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/odbcconfig.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/commontypes.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 9 |
12 files changed, 19 insertions, 25 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 7993d7f2c866..29d5816bc043 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -862,12 +862,11 @@ namespace void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyBag >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues ) { // sequences are ugly to operate on - typedef std::set< OUString > StringSet; - StringSet aToBeSetPropertyNames; + std::set<OUString> aToBeSetPropertyNames; std::transform( _rAllNewPropertyValues.begin(), _rAllNewPropertyValues.end(), - std::insert_iterator< StringSet >( aToBeSetPropertyNames, aToBeSetPropertyNames.end() ), + std::inserter( aToBeSetPropertyNames, aToBeSetPropertyNames.end() ), SelectPropertyName() ); diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index d911c15f1a01..8a667865f4c0 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -428,7 +428,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, lcl_notifyMultipleStates( *xListener.get(), aEvent, aStates ); else { // no -> iterate through all listeners responsible for the URL - StringBag aFeatureCommands; + std::set<OUString> aFeatureCommands; for( const auto& rFeature : m_aSupportedFeatures ) { if( rFeature.second.nFeatureId == nFeat ) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index e78cde9de379..8de2b38f75d5 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -309,7 +309,7 @@ namespace dbaui sal_Int32 count = list.getLength(); - StringBag aProfiles; + std::set<OUString> aProfiles; for (sal_Int32 index=0; index < count; index++) aProfiles.insert(pArray[index]); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index a0318b05d6be..f113f15f50ee 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -749,10 +749,10 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS // These settings have to be removed: If they're not relevant, we have no UI for changing them. // for this, we need a string-controlled quick access to m_aIndirectPropTranslator - StringSet aIndirectProps; + std::set<OUString> aIndirectProps; std::transform(m_aIndirectPropTranslator.begin(), m_aIndirectPropTranslator.end(), - std::insert_iterator<StringSet>(aIndirectProps,aIndirectProps.begin()), + std::inserter(aIndirectProps,aIndirectProps.begin()), ::o3tl::select2nd< MapInt2String::value_type >()); // now check the to-be-preserved props diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx index 790a7b204649..2912619bdd5d 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx @@ -64,7 +64,6 @@ namespace dbaui css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Any m_aDataSourceOrName; - typedef std::set< OUString > StringSet; MapInt2String m_aDirectPropTranslator; /// translating property id's into names (direct properties of a data source) MapInt2String m_aIndirectPropTranslator; /// translating property id's into names (indirect properties of a data source) diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index f2129bd5acc8..31275fd1aa9d 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -123,7 +123,7 @@ namespace dbaui bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn, OUString const & _sCurr) { // collect all ODBC data source names - StringBag aOdbcDatasources; + std::set<OUString> aOdbcDatasources; OOdbcEnumeration aEnumeration; if (!aEnumeration.isLoaded()) { diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index 5b4ee249b4b1..2f049502c6e8 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::ui::dialogs; using namespace ::comphelper; -ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const StringBag& _rDatasources) +ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const std::set<OUString>& _rDatasources) : ModalDialog(_pParent, "ChooseDataSourceDialog", "dbaccess/ui/choosedatasourcedialog.ui") { @@ -120,7 +120,7 @@ IMPL_LINK_NOARG(ODatasourceSelectDialog, ManageClickHdl, Button*, void) IMPL_LINK_NOARG( ODatasourceSelectDialog, ManageProcessFinished, void*, void ) { - StringBag aOdbcDatasources; + std::set<OUString> aOdbcDatasources; OOdbcEnumeration aEnumeration; aEnumeration.getDatasourceNames( aOdbcDatasources ); fillListBox( aOdbcDatasources ); @@ -132,7 +132,7 @@ IMPL_LINK_NOARG( ODatasourceSelectDialog, ManageProcessFinished, void*, void ) } #endif -void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources) +void ODatasourceSelectDialog::fillListBox(const std::set<OUString>& _rDatasources) { OUString sSelected; if (m_pDatasource->GetEntryCount()) diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx index 43d4293f7da1..0ab598c8bcc9 100644 --- a/dbaccess/source/ui/dlg/dsselect.hxx +++ b/dbaccess/source/ui/dlg/dsselect.hxx @@ -50,7 +50,7 @@ class ODatasourceSelectDialog final : public ModalDialog #endif public: - ODatasourceSelectDialog( vcl::Window* _pParent, const StringBag& _rDatasources ); + ODatasourceSelectDialog( vcl::Window* _pParent, const std::set<OUString>& _rDatasources ); virtual ~ODatasourceSelectDialog() override; virtual void dispose() override; OUString GetSelected() const { @@ -68,7 +68,7 @@ private: DECL_LINK(ManageClickHdl, Button*, void); DECL_LINK( ManageProcessFinished, void*, void ); #endif - void fillListBox(const StringBag& _rDatasources); + void fillListBox(const std::set<OUString>& _rDatasources); }; } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index 5cb07ab2ca2e..136a4d9adcc9 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -186,7 +186,7 @@ void OOdbcEnumeration::freeEnv() #endif } -void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames) +void OOdbcEnumeration::getDatasourceNames(std::set<OUString>& _rNames) { OSL_ENSURE(isLoaded(), "OOdbcEnumeration::getDatasourceNames: not loaded!"); if (!isLoaded()) diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index ae6abcc945d7..6ed5b6b5b93d 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -34,6 +34,7 @@ #include <osl/module.h> #include <memory> +#include <set> namespace dbaui { @@ -68,7 +69,7 @@ public: #endif const OUString& getLibraryName() const { return m_sLibPath; } - void getDatasourceNames(StringBag& _rNames); + void getDatasourceNames(std::set<OUString>& _rNames); private: oslGenericFunction loadSymbol(const sal_Char* _pFunctionName); diff --git a/dbaccess/source/ui/inc/commontypes.hxx b/dbaccess/source/ui/inc/commontypes.hxx index 74402d59bcd7..40cd3c4fb1d3 100644 --- a/dbaccess/source/ui/inc/commontypes.hxx +++ b/dbaccess/source/ui/inc/commontypes.hxx @@ -22,8 +22,6 @@ #include <sal/config.h> -#include <set> - #include <unotools/sharedunocomponent.hxx> namespace com { namespace sun { namespace star { @@ -35,8 +33,6 @@ namespace com { namespace sun { namespace star { namespace dbaui { - typedef std::set<OUString> StringBag; - typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection; } // namespace dbaui diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index abce427f98e7..68ffb367abb7 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -455,10 +455,9 @@ namespace } return BuildJoin(_xConnection, rRh, BuildTable(_xConnection,pLh), &data); } - typedef std::set<OUString> tableNames_t; void addConnectionTableNames( const Reference< XConnection>& _xConnection, const OQueryTableConnection* const pEntryConn, - tableNames_t &_rTableNames ) + std::set<OUString> &_rTableNames ) { // insert tables into table list to avoid double entries const OQueryTableWindow* const pEntryTabFrom = static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin()); @@ -470,7 +469,7 @@ namespace OQueryTableConnection* pEntryConn, OQueryTableWindow const * pEntryTabTo, OUString &aJoin, - tableNames_t &_rTableNames) + std::set<OUString> &_rTableNames) { OQueryTableConnectionData* pEntryConnData = static_cast<OQueryTableConnectionData*>(pEntryConn->GetData().get()); if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() ) @@ -973,7 +972,7 @@ namespace } void searchAndAppendName(const Reference< XConnection>& _xConnection, const OQueryTableWindow* _pTableWindow, - tableNames_t& _rTableNames, + std::set<OUString>& _rTableNames, OUString& _rsTableListStr ) { @@ -992,7 +991,7 @@ namespace OUString aTableListStr; // used to avoid putting a table twice in FROM clause - tableNames_t aTableNames; + std::set<OUString> aTableNames; // generate outer join clause in from if(!rConnList.empty()) |