diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-12 09:45:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-12 10:33:27 +0200 |
commit | a185ea4ec12898574d52ebdf4a1017005745df7d (patch) | |
tree | d6a88042cb6be1d75f3a12a11f0b918eeb6fa403 /sdext | |
parent | e609ac1e5ffe1a6882551660256d9625b630d346 (diff) |
clang-tidy modernize-use-emplace in sd
Change-Id: I2e3000f7bd0f3beed8309e0e3dd18e6ed4b8feee
Reviewed-on: https://gerrit.libreoffice.org/42184
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/configurationaccess.cxx | 4 | ||||
-rw-r--r-- | sdext/source/minimizer/optimizerdialogcontrols.cxx | 4 | ||||
-rw-r--r-- | sdext/source/pdfimport/sax/saxattrlist.cxx | 2 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterAccessibility.cxx | 3 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterTextView.cxx | 4 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterTheme.cxx | 12 |
6 files changed, 14 insertions, 15 deletions
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index d9b58d0a7fc8..4387e9bc0df5 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -147,7 +147,7 @@ ConfigurationAccess::ConfigurationAccess( const Reference< uno::XComponentContex mxContext( rxContext ) { LoadStrings(); - maSettings.push_back( OptimizerSettings() ); + maSettings.emplace_back( ); maSettings.back().maName = "LastUsedSettings"; LoadConfiguration(); maInitialSettings = maSettings; @@ -224,7 +224,7 @@ void ConfigurationAccess::LoadConfiguration() Reference< container::XNameAccess > xTemplates( GetConfigurationNode( xRoot, aPath ), UNO_QUERY ); if ( xTemplates.is() ) { - maSettings.push_back( OptimizerSettings() ); + maSettings.emplace_back( ); maSettings.back().LoadSettingsFromConfiguration( xTemplates ); } } diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index 9c942d832b16..dd3045a3c795 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -777,7 +777,7 @@ void OptimizerDialog::UpdateControlStatesPage4() } } while( aSummaryStrings.size() < 3 ) - aSummaryStrings.push_back( OUString() ); + aSummaryStrings.emplace_back( ); setControlProperty( "FixedText4Pg4", "Label", Any( aSummaryStrings[ 0 ] ) ); setControlProperty( "FixedText5Pg4", "Label", Any( aSummaryStrings[ 1 ] ) ); setControlProperty( "FixedText6Pg4", "Label", Any( aSummaryStrings[ 2 ] ) ); @@ -864,7 +864,7 @@ void OptimizerDialog::InitPage4() aControlList.push_back( InsertRadioButton( *this, "RadioButton0Pg4", mxItemListener, getString( STR_APPLY_TO_CURRENT ), PAGE_POS_X + 6, PAGE_POS_Y + 78, PAGE_WIDTH - 12, 8, false, mnTabIndex++ ) ); aControlList.push_back( InsertRadioButton( *this, "RadioButton1Pg4", mxItemListener, getString( STR_SAVE_AS ), PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 8, false, mnTabIndex++ ) ); aControlList.push_back( InsertFixedText( *this, "FixedText1Pg4", OUString(), PAGE_POS_X + 6, DIALOG_HEIGHT - 87, PAGE_WIDTH - 12, 8, true, false, mnTabIndex++ ) ); - aControlList.push_back( "Progress" ); + aControlList.emplace_back("Progress" ); aControlList.push_back( InsertSeparator( *this, "Separator1Pg4", 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 58, PAGE_WIDTH - 12, 1 ) ); aControlList.push_back( InsertCheckBox( *this, "CheckBox1Pg4", mxItemListener, getString( STR_SAVE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 47, 100, 8, mnTabIndex++ ) ); aControlList.push_back( InsertComboBox( *this, "ComboBox0Pg4", xTextListener, true, aItemList, PAGE_POS_X + 106, DIALOG_HEIGHT - 48, 100, 12, mnTabIndex++ ) ); diff --git a/sdext/source/pdfimport/sax/saxattrlist.cxx b/sdext/source/pdfimport/sax/saxattrlist.cxx index 5b65cd9cd531..f2cf5fc16de3 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.cxx +++ b/sdext/source/pdfimport/sax/saxattrlist.cxx @@ -32,7 +32,7 @@ SaxAttrList::SaxAttrList( const std::unordered_map< OUString, OUString, OUString it != rMap.end(); ++it ) { m_aIndexMap[ it->first ] = m_aAttributes.size(); - m_aAttributes.push_back( AttrEntry( it->first, it->second ) ); + m_aAttributes.emplace_back( it->first, it->second ); } } diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index a2764c1b7d2e..21ae24d542dd 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -1719,8 +1719,7 @@ void AccessibleNotes::SetTextView ( Reference<awt::XWindow>(mxContentWindow, UNO_QUERY), Reference<awt::XWindow>(mxBorderWindow, UNO_QUERY)); pParagraph->SetAccessibleParent(this); - aChildren.push_back( - rtl::Reference<PresenterAccessible::AccessibleObject>(pParagraph.get())); + aChildren.emplace_back(pParagraph.get()); } maChildren.swap(aChildren); FireAccessibleEvent(AccessibleEventId::INVALIDATE_ALL_CHILDREN, Any(), Any()); diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 39ad5591c4b9..c6fef6764269 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -1057,10 +1057,10 @@ void PresenterTextParagraph::SetupCellArray ( rpFont->mxFont->createTextLayout(aContext, nTextDirection, 0)); css::geometry::RealRectangle2D aCharacterBox (xLayout->queryTextBounds()); - maCells.push_back(Cell( + maCells.emplace_back( nPosition, nNewPosition-nPosition, - aCharacterBox.X2-aCharacterBox.X1)); + aCharacterBox.X2-aCharacterBox.X1); nPosition = nNewPosition; } diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx index 295bf8e1550d..3836838c72d9 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -822,12 +822,12 @@ void PaneStyleContainer::Read ( { ::std::vector<OUString> aProperties; aProperties.reserve(6); - aProperties.push_back("StyleName"); - aProperties.push_back("ParentStyle"); - aProperties.push_back("TitleFont"); - aProperties.push_back("InnerBorderSize"); - aProperties.push_back("OuterBorderSize"); - aProperties.push_back("BorderBitmapList"); + aProperties.emplace_back("StyleName"); + aProperties.emplace_back("ParentStyle"); + aProperties.emplace_back("TitleFont"); + aProperties.emplace_back("InnerBorderSize"); + aProperties.emplace_back("OuterBorderSize"); + aProperties.emplace_back("BorderBitmapList"); PresenterConfigurationAccess::ForAll( xPaneStyleList, aProperties, |