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<
uno_Mapping *, MappingEntry *, FctPtrHash > t_Mapping2Entry;
typedef set< uno_getMappingFunc > t_CallbackSet;
typedef set< OUString > t_OUStringSet;
struct MappingsData
......@@ -154,7 +153,7 @@ struct MappingsData
t_CallbackSet aCallbacks;
Mutex aNegativeLibsMutex;
t_OUStringSet aNegativeLibs;
set<OUString> aNegativeLibs;
};
static MappingsData & getMappingsData()
......@@ -351,7 +350,7 @@ static inline bool loadModule(osl::Module & rModule, const OUString & rBridgeNam
{
MappingsData & rData = getMappingsData();
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());
}
......
......@@ -104,17 +104,15 @@ protected:
css::uno::Sequence< rtl::OUString > const & absentOptional,
std::vector< rtl::OUString > * handleNames)
{
TypeSet seen;
std::set<rtl::OUString> seen;
initProperties(type, absentOptional, handleNames, &seen);
}
private:
typedef std::set< rtl::OUString > TypeSet;
void initProperties(
css::uno::Reference< css::reflection::XTypeDescription > const & type,
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 >
resolveTypedefs(
......@@ -135,7 +133,7 @@ Data::PropertyMap::const_iterator Data::get(
void Data::initProperties(
css::uno::Reference< css::reflection::XTypeDescription > const & type,
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(
resolveTypedefs(type), css::uno::UNO_QUERY_THROW);
......
......@@ -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()
);
......
......@@ -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 )
......
......@@ -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]);
......
......@@ -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
......
......@@ -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)
......
......@@ -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())
{
......
......@@ -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())
......
......@@ -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
......
......@@ -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())
......
......@@ -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);
......
......@@ -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
......
......@@ -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())
......
......@@ -181,8 +181,7 @@ void PackageRegistryImpl::insertBackend(
Reference<deployment::XPackageRegistry> const & xBackend )
{
m_allBackends.insert( xBackend );
typedef std::unordered_set<OUString> t_stringset;
t_stringset ambiguousFilters;
std::unordered_set<OUString> ambiguousFilters;
const Sequence< Reference<deployment::XPackageTypeInfo> > packageTypes(
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