summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 08:54:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 09:42:55 +0200
commit9c5c905680f7cb58eb3d0fbf25725a50c17896da (patch)
treed15a5bade5d44301a6292649a23ff65e219a8adb /framework
parentba7492ebe6f943976fc41274672ec41c035b4fbb (diff)
clang-tidy modernize-use-emplace in editeng..framework
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx24
-rw-r--r--framework/source/services/autorecovery.cxx6
2 files changed, 15 insertions, 15 deletions
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;