From 9c5c905680f7cb58eb3d0fbf25725a50c17896da Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Sep 2017 08:54:58 +0200 Subject: clang-tidy modernize-use-emplace in editeng..framework Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/layoutmanager/toolbarlayoutmanager.cxx | 24 +++++++++++----------- framework/source/services/autorecovery.cxx | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'framework') diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 9599f8fecbfc..dd29eecba748 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1951,11 +1951,11 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); - rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - awt::Rectangle( rElement.m_aDockedData.m_aPos.X, + rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.emplace_back( + rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y, aPosSize.Width, - aPosSize.Height )); + aPosSize.Height ); if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height ) rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height; if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) @@ -2009,11 +2009,11 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow ); rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName ); - rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back( - awt::Rectangle( rElement.m_aDockedData.m_aPos.X, + rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.emplace_back( + rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y, aPosSize.Width, - aPosSize.Height )); + aPosSize.Height ); if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width ) rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width; if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT ) @@ -2101,9 +2101,9 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D nLastPos = rElement.m_aDockedData.m_aPos.X + aPosSize.Width; - rRowColumnWindowData.aRowColumnWindowSizes.push_back( - awt::Rectangle( rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y, - aPosSize.Width, aPosSize.Height )); + rRowColumnWindowData.aRowColumnWindowSizes.emplace_back( + rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y, + aPosSize.Width, aPosSize.Height ); if ( rRowColumnWindowData.nStaticSize < aPosSize.Height ) rRowColumnWindowData.nStaticSize = aPosSize.Height; rRowColumnWindowData.nVarSize += aPosSize.Width; @@ -2119,9 +2119,9 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D nLastPos = rElement.m_aDockedData.m_aPos.Y + aPosSize.Height; - rRowColumnWindowData.aRowColumnWindowSizes.push_back( - awt::Rectangle( rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y, - aPosSize.Width, aPosSize.Height )); + rRowColumnWindowData.aRowColumnWindowSizes.emplace_back( + rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y, + aPosSize.Width, aPosSize.Height ); if ( rRowColumnWindowData.nStaticSize < aPosSize.Width ) rRowColumnWindowData.nStaticSize = aPosSize.Width; rRowColumnWindowData.nVarSize += aPosSize.Height; diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index bde4a609c068..8273e53542bf 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -3352,7 +3352,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , // create a new document of the desired type Reference< XModel2 > xModel(m_xContext->getServiceManager()->createInstanceWithContext( rInfo.FactoryService, m_xContext), UNO_QUERY_THROW); - aCleanup.push_back( xModel.get() ); + aCleanup.emplace_back(xModel.get() ); // put the filter name into the descriptor - we're not going to involve any type detection, so // the document might be lost without the FilterName property @@ -3392,7 +3392,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , ::std::copy( rInfo.ViewNames.begin(), rInfo.ViewNames.end(), aViewsToRestore.begin() ); // if we don't have views for whatever reason, then create a default-view, at least if ( aViewsToRestore.empty() ) - aViewsToRestore.push_back( OUString() ); + aViewsToRestore.emplace_back( ); for ( ::std::vector< OUString >::const_iterator viewName = aViewsToRestore.begin(); viewName != aViewsToRestore.end(); @@ -3401,7 +3401,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , { // create a frame Reference< XFrame > xTargetFrame = xDesktop->findFrame( SPECIALTARGET_BLANK, 0 ); - aCleanup.push_back( xTargetFrame.get() ); + aCleanup.emplace_back(xTargetFrame.get() ); // create a view to the document Reference< XController2 > xController; -- cgit