Kaydet (Commit) 5437eb15 authored tarafından Arkadiy Illarionov's avatar Arkadiy Illarionov Kaydeden (comit) Noel Grandin

tdf#96099 Remove trivial std::map typedefs in [cd]*

Change-Id: I043d265d3d73a3e16f05d5ca7e29a09341651d82
Reviewed-on: https://gerrit.libreoffice.org/56639
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ff597693
...@@ -141,7 +141,6 @@ typedef std::unordered_map< ...@@ -141,7 +141,6 @@ typedef std::unordered_map<
uno_Mapping *, MappingEntry *, FctPtrHash > t_Mapping2Entry; uno_Mapping *, MappingEntry *, FctPtrHash > t_Mapping2Entry;
typedef set< uno_getMappingFunc > t_CallbackSet; typedef set< uno_getMappingFunc > t_CallbackSet;
typedef set< OUString > t_OUStringSet;
struct MappingsData struct MappingsData
...@@ -154,7 +153,7 @@ struct MappingsData ...@@ -154,7 +153,7 @@ struct MappingsData
t_CallbackSet aCallbacks; t_CallbackSet aCallbacks;
Mutex aNegativeLibsMutex; Mutex aNegativeLibsMutex;
t_OUStringSet aNegativeLibs; set<OUString> aNegativeLibs;
}; };
static MappingsData & getMappingsData() static MappingsData & getMappingsData()
...@@ -351,7 +350,7 @@ static inline bool loadModule(osl::Module & rModule, const OUString & rBridgeNam ...@@ -351,7 +350,7 @@ static inline bool loadModule(osl::Module & rModule, const OUString & rBridgeNam
{ {
MappingsData & rData = getMappingsData(); MappingsData & rData = getMappingsData();
MutexGuard aGuard( rData.aNegativeLibsMutex ); MutexGuard aGuard( rData.aNegativeLibsMutex );
const t_OUStringSet::const_iterator iFind( rData.aNegativeLibs.find( rBridgeName ) ); const auto iFind( rData.aNegativeLibs.find( rBridgeName ) );
bNeg = (iFind != rData.aNegativeLibs.end()); bNeg = (iFind != rData.aNegativeLibs.end());
} }
......
...@@ -104,17 +104,15 @@ protected: ...@@ -104,17 +104,15 @@ protected:
css::uno::Sequence< rtl::OUString > const & absentOptional, css::uno::Sequence< rtl::OUString > const & absentOptional,
std::vector< rtl::OUString > * handleNames) std::vector< rtl::OUString > * handleNames)
{ {
TypeSet seen; std::set<rtl::OUString> seen;
initProperties(type, absentOptional, handleNames, &seen); initProperties(type, absentOptional, handleNames, &seen);
} }
private: private:
typedef std::set< rtl::OUString > TypeSet;
void initProperties( void initProperties(
css::uno::Reference< css::reflection::XTypeDescription > const & type, css::uno::Reference< css::reflection::XTypeDescription > const & type,
css::uno::Sequence< rtl::OUString > const & absentOptional, css::uno::Sequence< rtl::OUString > const & absentOptional,
std::vector< rtl::OUString > * handleNames, TypeSet * seen); std::vector< rtl::OUString > * handleNames, std::set<rtl::OUString> * seen);
static css::uno::Reference< css::reflection::XTypeDescription > static css::uno::Reference< css::reflection::XTypeDescription >
resolveTypedefs( resolveTypedefs(
...@@ -135,7 +133,7 @@ Data::PropertyMap::const_iterator Data::get( ...@@ -135,7 +133,7 @@ Data::PropertyMap::const_iterator Data::get(
void Data::initProperties( void Data::initProperties(
css::uno::Reference< css::reflection::XTypeDescription > const & type, css::uno::Reference< css::reflection::XTypeDescription > const & type,
css::uno::Sequence< rtl::OUString > const & absentOptional, css::uno::Sequence< rtl::OUString > const & absentOptional,
std::vector< rtl::OUString > * handleNames, TypeSet * seen) std::vector< rtl::OUString > * handleNames, std::set<rtl::OUString> * seen)
{ {
css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc( css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc(
resolveTypedefs(type), css::uno::UNO_QUERY_THROW); resolveTypedefs(type), css::uno::UNO_QUERY_THROW);
......
...@@ -862,12 +862,11 @@ namespace ...@@ -862,12 +862,11 @@ namespace
void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyBag >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues ) void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyBag >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues )
{ {
// sequences are ugly to operate on // sequences are ugly to operate on
typedef std::set< OUString > StringSet; std::set<OUString> aToBeSetPropertyNames;
StringSet aToBeSetPropertyNames;
std::transform( std::transform(
_rAllNewPropertyValues.begin(), _rAllNewPropertyValues.begin(),
_rAllNewPropertyValues.end(), _rAllNewPropertyValues.end(),
std::insert_iterator< StringSet >( aToBeSetPropertyNames, aToBeSetPropertyNames.end() ), std::inserter( aToBeSetPropertyNames, aToBeSetPropertyNames.end() ),
SelectPropertyName() SelectPropertyName()
); );
......
...@@ -428,7 +428,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, ...@@ -428,7 +428,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature,
lcl_notifyMultipleStates( *xListener.get(), aEvent, aStates ); lcl_notifyMultipleStates( *xListener.get(), aEvent, aStates );
else else
{ // no -> iterate through all listeners responsible for the URL { // no -> iterate through all listeners responsible for the URL
StringBag aFeatureCommands; std::set<OUString> aFeatureCommands;
for( const auto& rFeature : m_aSupportedFeatures ) for( const auto& rFeature : m_aSupportedFeatures )
{ {
if( rFeature.second.nFeatureId == nFeat ) if( rFeature.second.nFeatureId == nFeat )
......
...@@ -309,7 +309,7 @@ namespace dbaui ...@@ -309,7 +309,7 @@ namespace dbaui
sal_Int32 count = list.getLength(); sal_Int32 count = list.getLength();
StringBag aProfiles; std::set<OUString> aProfiles;
for (sal_Int32 index=0; index < count; index++) for (sal_Int32 index=0; index < count; index++)
aProfiles.insert(pArray[index]); aProfiles.insert(pArray[index]);
......
...@@ -749,10 +749,10 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS ...@@ -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. // 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 // for this, we need a string-controlled quick access to m_aIndirectPropTranslator
StringSet aIndirectProps; std::set<OUString> aIndirectProps;
std::transform(m_aIndirectPropTranslator.begin(), std::transform(m_aIndirectPropTranslator.begin(),
m_aIndirectPropTranslator.end(), m_aIndirectPropTranslator.end(),
std::insert_iterator<StringSet>(aIndirectProps,aIndirectProps.begin()), std::inserter(aIndirectProps,aIndirectProps.begin()),
::o3tl::select2nd< MapInt2String::value_type >()); ::o3tl::select2nd< MapInt2String::value_type >());
// now check the to-be-preserved props // now check the to-be-preserved props
......
...@@ -64,7 +64,6 @@ namespace dbaui ...@@ -64,7 +64,6 @@ namespace dbaui
css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XModel > m_xModel;
css::uno::Any m_aDataSourceOrName; 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_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) MapInt2String m_aIndirectPropTranslator; /// translating property id's into names (indirect properties of a data source)
......
...@@ -123,7 +123,7 @@ namespace dbaui ...@@ -123,7 +123,7 @@ namespace dbaui
bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn, OUString const & _sCurr) bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn, OUString const & _sCurr)
{ {
// collect all ODBC data source names // collect all ODBC data source names
StringBag aOdbcDatasources; std::set<OUString> aOdbcDatasources;
OOdbcEnumeration aEnumeration; OOdbcEnumeration aEnumeration;
if (!aEnumeration.isLoaded()) if (!aEnumeration.isLoaded())
{ {
......
...@@ -41,7 +41,7 @@ using namespace ::com::sun::star::sdbcx; ...@@ -41,7 +41,7 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::ui::dialogs;
using namespace ::comphelper; using namespace ::comphelper;
ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const StringBag& _rDatasources) ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const std::set<OUString>& _rDatasources)
: ModalDialog(_pParent, "ChooseDataSourceDialog", : ModalDialog(_pParent, "ChooseDataSourceDialog",
"dbaccess/ui/choosedatasourcedialog.ui") "dbaccess/ui/choosedatasourcedialog.ui")
{ {
...@@ -120,7 +120,7 @@ IMPL_LINK_NOARG(ODatasourceSelectDialog, ManageClickHdl, Button*, void) ...@@ -120,7 +120,7 @@ IMPL_LINK_NOARG(ODatasourceSelectDialog, ManageClickHdl, Button*, void)
IMPL_LINK_NOARG( ODatasourceSelectDialog, ManageProcessFinished, void*, void ) IMPL_LINK_NOARG( ODatasourceSelectDialog, ManageProcessFinished, void*, void )
{ {
StringBag aOdbcDatasources; std::set<OUString> aOdbcDatasources;
OOdbcEnumeration aEnumeration; OOdbcEnumeration aEnumeration;
aEnumeration.getDatasourceNames( aOdbcDatasources ); aEnumeration.getDatasourceNames( aOdbcDatasources );
fillListBox( aOdbcDatasources ); fillListBox( aOdbcDatasources );
...@@ -132,7 +132,7 @@ IMPL_LINK_NOARG( ODatasourceSelectDialog, ManageProcessFinished, void*, void ) ...@@ -132,7 +132,7 @@ IMPL_LINK_NOARG( ODatasourceSelectDialog, ManageProcessFinished, void*, void )
} }
#endif #endif
void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources) void ODatasourceSelectDialog::fillListBox(const std::set<OUString>& _rDatasources)
{ {
OUString sSelected; OUString sSelected;
if (m_pDatasource->GetEntryCount()) if (m_pDatasource->GetEntryCount())
......
...@@ -50,7 +50,7 @@ class ODatasourceSelectDialog final : public ModalDialog ...@@ -50,7 +50,7 @@ class ODatasourceSelectDialog final : public ModalDialog
#endif #endif
public: public:
ODatasourceSelectDialog( vcl::Window* _pParent, const StringBag& _rDatasources ); ODatasourceSelectDialog( vcl::Window* _pParent, const std::set<OUString>& _rDatasources );
virtual ~ODatasourceSelectDialog() override; virtual ~ODatasourceSelectDialog() override;
virtual void dispose() override; virtual void dispose() override;
OUString GetSelected() const { OUString GetSelected() const {
...@@ -68,7 +68,7 @@ private: ...@@ -68,7 +68,7 @@ private:
DECL_LINK(ManageClickHdl, Button*, void); DECL_LINK(ManageClickHdl, Button*, void);
DECL_LINK( ManageProcessFinished, void*, void ); DECL_LINK( ManageProcessFinished, void*, void );
#endif #endif
void fillListBox(const StringBag& _rDatasources); void fillListBox(const std::set<OUString>& _rDatasources);
}; };
} // namespace dbaui } // namespace dbaui
......
...@@ -186,7 +186,7 @@ void OOdbcEnumeration::freeEnv() ...@@ -186,7 +186,7 @@ void OOdbcEnumeration::freeEnv()
#endif #endif
} }
void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames) void OOdbcEnumeration::getDatasourceNames(std::set<OUString>& _rNames)
{ {
OSL_ENSURE(isLoaded(), "OOdbcEnumeration::getDatasourceNames: not loaded!"); OSL_ENSURE(isLoaded(), "OOdbcEnumeration::getDatasourceNames: not loaded!");
if (!isLoaded()) if (!isLoaded())
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <osl/module.h> #include <osl/module.h>
#include <memory> #include <memory>
#include <set>
namespace dbaui namespace dbaui
{ {
...@@ -68,7 +69,7 @@ public: ...@@ -68,7 +69,7 @@ public:
#endif #endif
const OUString& getLibraryName() const { return m_sLibPath; } const OUString& getLibraryName() const { return m_sLibPath; }
void getDatasourceNames(StringBag& _rNames); void getDatasourceNames(std::set<OUString>& _rNames);
private: private:
oslGenericFunction loadSymbol(const sal_Char* _pFunctionName); oslGenericFunction loadSymbol(const sal_Char* _pFunctionName);
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <set>
#include <unotools/sharedunocomponent.hxx> #include <unotools/sharedunocomponent.hxx>
namespace com { namespace sun { namespace star { namespace com { namespace sun { namespace star {
...@@ -35,8 +33,6 @@ namespace com { namespace sun { namespace star { ...@@ -35,8 +33,6 @@ namespace com { namespace sun { namespace star {
namespace dbaui namespace dbaui
{ {
typedef std::set<OUString> StringBag;
typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection; typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection;
} // namespace dbaui } // namespace dbaui
......
...@@ -455,10 +455,9 @@ namespace ...@@ -455,10 +455,9 @@ namespace
} }
return BuildJoin(_xConnection, rRh, BuildTable(_xConnection,pLh), &data); return BuildJoin(_xConnection, rRh, BuildTable(_xConnection,pLh), &data);
} }
typedef std::set<OUString> tableNames_t;
void addConnectionTableNames( const Reference< XConnection>& _xConnection, void addConnectionTableNames( const Reference< XConnection>& _xConnection,
const OQueryTableConnection* const pEntryConn, const OQueryTableConnection* const pEntryConn,
tableNames_t &_rTableNames ) std::set<OUString> &_rTableNames )
{ {
// insert tables into table list to avoid double entries // insert tables into table list to avoid double entries
const OQueryTableWindow* const pEntryTabFrom = static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin()); const OQueryTableWindow* const pEntryTabFrom = static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin());
...@@ -470,7 +469,7 @@ namespace ...@@ -470,7 +469,7 @@ namespace
OQueryTableConnection* pEntryConn, OQueryTableConnection* pEntryConn,
OQueryTableWindow const * pEntryTabTo, OQueryTableWindow const * pEntryTabTo,
OUString &aJoin, OUString &aJoin,
tableNames_t &_rTableNames) std::set<OUString> &_rTableNames)
{ {
OQueryTableConnectionData* pEntryConnData = static_cast<OQueryTableConnectionData*>(pEntryConn->GetData().get()); OQueryTableConnectionData* pEntryConnData = static_cast<OQueryTableConnectionData*>(pEntryConn->GetData().get());
if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() ) if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() )
...@@ -973,7 +972,7 @@ namespace ...@@ -973,7 +972,7 @@ namespace
} }
void searchAndAppendName(const Reference< XConnection>& _xConnection, void searchAndAppendName(const Reference< XConnection>& _xConnection,
const OQueryTableWindow* _pTableWindow, const OQueryTableWindow* _pTableWindow,
tableNames_t& _rTableNames, std::set<OUString>& _rTableNames,
OUString& _rsTableListStr OUString& _rsTableListStr
) )
{ {
...@@ -992,7 +991,7 @@ namespace ...@@ -992,7 +991,7 @@ namespace
OUString aTableListStr; OUString aTableListStr;
// used to avoid putting a table twice in FROM clause // used to avoid putting a table twice in FROM clause
tableNames_t aTableNames; std::set<OUString> aTableNames;
// generate outer join clause in from // generate outer join clause in from
if(!rConnList.empty()) if(!rConnList.empty())
......
...@@ -181,8 +181,7 @@ void PackageRegistryImpl::insertBackend( ...@@ -181,8 +181,7 @@ void PackageRegistryImpl::insertBackend(
Reference<deployment::XPackageRegistry> const & xBackend ) Reference<deployment::XPackageRegistry> const & xBackend )
{ {
m_allBackends.insert( xBackend ); m_allBackends.insert( xBackend );
typedef std::unordered_set<OUString> t_stringset; std::unordered_set<OUString> ambiguousFilters;
t_stringset ambiguousFilters;
const Sequence< Reference<deployment::XPackageTypeInfo> > packageTypes( const Sequence< Reference<deployment::XPackageTypeInfo> > packageTypes(
xBackend->getSupportedPackageTypes() ); xBackend->getSupportedPackageTypes() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment