summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 12:00:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 13:15:40 +0200
commit48b200a0a2aa70a7dfc0aad8a4964690ae11d42e (patch)
treec23ca5f8d827ba2e99783d80fac21073dd242147 /svtools
parent65b756f6058697ccb787506c3cc32e1e818bcc37 (diff)
clang-tidy modernize-use-emplace in svgio..svtools
Change-Id: I4f3b0762e197d5397e723aba1dc43e3c857be145 Reviewed-on: https://gerrit.libreoffice.org/42193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/fileview.cxx4
-rw-r--r--svtools/source/control/collatorres.cxx24
-rw-r--r--svtools/source/control/indexentryres.cxx20
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx2
-rw-r--r--svtools/source/dialogs/insdlg.cxx2
-rw-r--r--svtools/source/misc/dialogcontrolling.cxx2
-rw-r--r--svtools/source/misc/langtab.cxx4
-rw-r--r--svtools/source/svhtml/parhtml.cxx2
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx4
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx2
-rw-r--r--svtools/source/uno/unoimap.cxx2
11 files changed, 34 insertions, 34 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 5b429bc5a406..55f2488444e6 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -146,7 +146,7 @@ void FilterMatch::createWildCardFilterList(const OUString& _rFilterList,::std::v
sToken = _rFilterList.getToken( 0, ';', nIndex );
if ( !sToken.isEmpty() )
{
- _rFilters.push_back( WildCard( sToken.toAsciiUpperCase() ) );
+ _rFilters.emplace_back( sToken.toAsciiUpperCase() );
}
}
while ( nIndex >= 0 );
@@ -154,7 +154,7 @@ void FilterMatch::createWildCardFilterList(const OUString& _rFilterList,::std::v
else
{
// no filter is given -> match all
- _rFilters.push_back( WildCard("*") );
+ _rFilters.emplace_back("*" );
}
}
diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx
index 2b707859a62e..c2db6b4e9570 100644
--- a/svtools/source/control/collatorres.cxx
+++ b/svtools/source/control/collatorres.cxx
@@ -24,18 +24,18 @@
// implementation of the collator-algorithm-name translation
CollatorResource::CollatorResource()
{
- m_aData.push_back(CollatorResourceData("alphanumeric", SvtResId(STR_SVT_COLLATE_ALPHANUMERIC)));
- m_aData.push_back(CollatorResourceData("charset", SvtResId(STR_SVT_COLLATE_CHARSET)));
- m_aData.push_back(CollatorResourceData("dict", SvtResId(STR_SVT_COLLATE_DICTIONARY)));
- m_aData.push_back(CollatorResourceData("normal", SvtResId(STR_SVT_COLLATE_NORMAL)));
- m_aData.push_back(CollatorResourceData("pinyin", SvtResId(STR_SVT_COLLATE_PINYIN)));
- m_aData.push_back(CollatorResourceData("radical", SvtResId(STR_SVT_COLLATE_RADICAL)));
- m_aData.push_back(CollatorResourceData("stroke", SvtResId(STR_SVT_COLLATE_STROKE)));
- m_aData.push_back(CollatorResourceData("unicode", SvtResId(STR_SVT_COLLATE_UNICODE)));
- m_aData.push_back(CollatorResourceData("zhuyin", SvtResId(STR_SVT_COLLATE_ZHUYIN)));
- m_aData.push_back(CollatorResourceData("phonebook", SvtResId(STR_SVT_COLLATE_PHONEBOOK)));
- m_aData.push_back(CollatorResourceData("phonetic (alphanumeric first)", SvtResId(STR_SVT_COLLATE_PHONETIC_F)));
- m_aData.push_back(CollatorResourceData("phonetic (alphanumeric last)", SvtResId(STR_SVT_COLLATE_PHONETIC_L)));
+ m_aData.emplace_back("alphanumeric", SvtResId(STR_SVT_COLLATE_ALPHANUMERIC));
+ m_aData.emplace_back("charset", SvtResId(STR_SVT_COLLATE_CHARSET));
+ m_aData.emplace_back("dict", SvtResId(STR_SVT_COLLATE_DICTIONARY));
+ m_aData.emplace_back("normal", SvtResId(STR_SVT_COLLATE_NORMAL));
+ m_aData.emplace_back("pinyin", SvtResId(STR_SVT_COLLATE_PINYIN));
+ m_aData.emplace_back("radical", SvtResId(STR_SVT_COLLATE_RADICAL));
+ m_aData.emplace_back("stroke", SvtResId(STR_SVT_COLLATE_STROKE));
+ m_aData.emplace_back("unicode", SvtResId(STR_SVT_COLLATE_UNICODE));
+ m_aData.emplace_back("zhuyin", SvtResId(STR_SVT_COLLATE_ZHUYIN));
+ m_aData.emplace_back("phonebook", SvtResId(STR_SVT_COLLATE_PHONEBOOK));
+ m_aData.emplace_back("phonetic (alphanumeric first)", SvtResId(STR_SVT_COLLATE_PHONETIC_F));
+ m_aData.emplace_back("phonetic (alphanumeric last)", SvtResId(STR_SVT_COLLATE_PHONETIC_L));
}
const OUString&
diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx
index cb8391f0aeeb..9420a37b278f 100644
--- a/svtools/source/control/indexentryres.cxx
+++ b/svtools/source/control/indexentryres.cxx
@@ -25,16 +25,16 @@
// implementation of the indexentry-algorithm-name translation
IndexEntryResource::IndexEntryResource()
{
- m_aData.push_back(IndexEntryResourceData("alphanumeric", SvtResId(STR_SVT_INDEXENTRY_ALPHANUMERIC)));
- m_aData.push_back(IndexEntryResourceData("dict", SvtResId(STR_SVT_INDEXENTRY_DICTIONARY)));
- m_aData.push_back(IndexEntryResourceData("pinyin", SvtResId(STR_SVT_INDEXENTRY_PINYIN)));
- m_aData.push_back(IndexEntryResourceData("radical", SvtResId(STR_SVT_INDEXENTRY_RADICAL)));
- m_aData.push_back(IndexEntryResourceData("stroke", SvtResId(STR_SVT_INDEXENTRY_STROKE)));
- m_aData.push_back(IndexEntryResourceData("zhuyin", SvtResId(STR_SVT_INDEXENTRY_ZHUYIN)));
- m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric first) (grouped by syllable)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_FS)));
- m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric first) (grouped by consonant)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_FC)));
- m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric last) (grouped by syllable)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_LS)));
- m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric last) (grouped by consonant)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_LC)));
+ m_aData.emplace_back("alphanumeric", SvtResId(STR_SVT_INDEXENTRY_ALPHANUMERIC));
+ m_aData.emplace_back("dict", SvtResId(STR_SVT_INDEXENTRY_DICTIONARY));
+ m_aData.emplace_back("pinyin", SvtResId(STR_SVT_INDEXENTRY_PINYIN));
+ m_aData.emplace_back("radical", SvtResId(STR_SVT_INDEXENTRY_RADICAL));
+ m_aData.emplace_back("stroke", SvtResId(STR_SVT_INDEXENTRY_STROKE));
+ m_aData.emplace_back("zhuyin", SvtResId(STR_SVT_INDEXENTRY_ZHUYIN));
+ m_aData.emplace_back("phonetic (alphanumeric first) (grouped by syllable)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_FS));
+ m_aData.emplace_back("phonetic (alphanumeric first) (grouped by consonant)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_FC));
+ m_aData.emplace_back("phonetic (alphanumeric last) (grouped by syllable)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_LS));
+ m_aData.emplace_back("phonetic (alphanumeric last) (grouped by consonant)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_LC));
}
const OUString& IndexEntryResource::GetTranslation(const OUString &r_Algorithm)
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 6a815779425d..99389a084066 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -583,7 +583,7 @@ void AssignmentPersistentData::ImplCommit()
// force a even number of known fields
m_pImpl->bOddFieldNumber = (m_pImpl->aFieldLabels.size() % 2) != 0;
if (m_pImpl->bOddFieldNumber)
- m_pImpl->aFieldLabels.push_back( OUString() );
+ m_pImpl->aFieldLabels.emplace_back( );
// limit the scrollbar range accordingly
sal_Int32 nOverallFieldPairs = m_pImpl->aFieldLabels.size() / 2;
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index 323075200693..a16bdc4c0bf9 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -163,7 +163,7 @@ void SvObjectServerList::FillInsertObjects()
{
if( !Get( aClassName ) )
// not entered yet
- aObjectServerList.push_back( SvObjectServer( aClassName, aUIName ) );
+ aObjectServerList.emplace_back( aClassName, aUIName );
}
}
}
diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx
index 4766e3540feb..a6ae0b394583 100644
--- a/svtools/source/misc/dialogcontrolling.cxx
+++ b/svtools/source/misc/dialogcontrolling.cxx
@@ -94,7 +94,7 @@ namespace svt
void DialogController::addDependentWindow( vcl::Window& _rWindow )
{
- m_pImpl->aConcernedWindows.push_back( &_rWindow );
+ m_pImpl->aConcernedWindows.emplace_back(&_rWindow );
VclWindowEvent aEvent( &_rWindow, VclEventId::NONE, nullptr );
impl_update( aEvent, _rWindow );
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index d714a29599a1..db835cc3a1b6 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -51,7 +51,7 @@ public:
LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const;
sal_uInt32 AddItem(const OUString& rLanguage, const LanguageType eType)
{
- m_aStrings.push_back(std::make_pair(rLanguage, eType));
+ m_aStrings.emplace_back(rLanguage, eType);
return m_aStrings.size();
}
LanguageType GetValue(sal_uInt32 nIndex) const
@@ -154,7 +154,7 @@ SvtLanguageTableImpl::SvtLanguageTableImpl()
{
for (size_t i = 0; i < SAL_N_ELEMENTS(STR_ARR_SVT_LANGUAGE_TABLE); ++i)
{
- m_aStrings.push_back(std::make_pair(SvtResId(STR_ARR_SVT_LANGUAGE_TABLE[i].first), STR_ARR_SVT_LANGUAGE_TABLE[i].second));
+ m_aStrings.emplace_back(SvtResId(STR_ARR_SVT_LANGUAGE_TABLE[i].first), STR_ARR_SVT_LANGUAGE_TABLE[i].second);
}
auto xNA = officecfg::VCL::ExtraLanguages::get();
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 0458e5225c9d..1ec0aa655c5f 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1523,7 +1523,7 @@ const HTMLOptions& HTMLParser::GetOptions( HtmlOptionId const *pNoConvertToken )
}
// Token is known and can be saved
- maOptions.push_back(HTMLOption(nToken, sName, aValue));
+ maOptions.emplace_back(nToken, sName, aValue);
}
else
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 5bdb7678b6ea..78825ccb1400 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -772,7 +772,7 @@ namespace svt { namespace table
if ( flexibility > 0 )
++flexibleColumnCount;
- effectiveColumnLimits.push_back( ::std::pair< long, long >( effectiveMin, effectiveMax ) );
+ effectiveColumnLimits.emplace_back( effectiveMin, effectiveMax );
accumulatedMinWidth += effectiveMin;
accumulatedMaxWidth += effectiveMax;
}
@@ -1028,7 +1028,7 @@ namespace svt { namespace table
{
const long columnStart = accumulatedWidthPixel;
const long columnEnd = columnStart + newWidthsPixel[col];
- m_aColumnWidths.push_back( MutableColumnMetrics( columnStart, columnEnd ) );
+ m_aColumnWidths.emplace_back( columnStart, columnEnd );
accumulatedWidthPixel = columnEnd;
// and don't forget to forward this to the column models
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index b4ebeb666c70..247e0dc07618 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -613,7 +613,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createSelectionEnumeration()
UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.FirstSelected() );
while( pEntry && nSelectionCount )
{
- aSelection.push_back( Any( pEntry->mxNode ) );
+ aSelection.emplace_back( pEntry->mxNode );
pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.NextSelected( pEntry ) );
--nSelectionCount;
}
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index 096a141cc658..58f95496182f 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -579,7 +579,7 @@ void SAL_CALL SvUnoImageMap::insertByIndex( sal_Int32 nIndex, const Any& Element
throw IndexOutOfBoundsException();
if( nIndex == nCount )
- maObjectList.push_back( pObject );
+ maObjectList.emplace_back(pObject );
else
{
auto aIter = maObjectList.begin();