[Libreoffice-commits] core.git: vcl/backendtest vcl/headless vcl/source vcl/unx vcl/workben

Noel Grandin noel.grandin at collabora.co.uk
Thu Sep 14 06:30:15 UTC 2017


 vcl/backendtest/VisualBackendTest.cxx          |    2 
 vcl/headless/svpinst.cxx                       |    2 
 vcl/source/app/session.cxx                     |    2 
 vcl/source/app/svapp.cxx                       |    4 -
 vcl/source/control/button.cxx                  |   64 ++++++++++++-------------
 vcl/source/control/tabctrl.cxx                 |    2 
 vcl/source/control/throbber.cxx                |    2 
 vcl/source/edit/texteng.cxx                    |    6 +-
 vcl/source/filter/graphicfilter.cxx            |    2 
 vcl/source/fontsubset/sft.cxx                  |    2 
 vcl/source/gdi/CommonSalLayout.cxx             |    4 -
 vcl/source/gdi/gdimetafiletools.cxx            |    4 -
 vcl/source/gdi/oldprintadaptor.cxx             |    2 
 vcl/source/gdi/pdffontcache.cxx                |    2 
 vcl/source/gdi/pdfwriter_impl.cxx              |   58 +++++++++++-----------
 vcl/source/gdi/print.cxx                       |    2 
 vcl/source/gdi/print2.cxx                      |   10 +--
 vcl/source/image/ImplImageTree.cxx             |    8 +--
 vcl/source/outdev/font.cxx                     |    2 
 vcl/source/outdev/text.cxx                     |    2 
 vcl/source/uitest/uiobject.cxx                 |    8 +--
 vcl/source/window/builder.cxx                  |   36 +++++++-------
 vcl/source/window/debugevent.cxx               |    2 
 vcl/source/window/msgbox.cxx                   |    8 +--
 vcl/source/window/printdlg.cxx                 |   12 ++--
 vcl/source/window/scrwnd.cxx                   |   12 ++--
 vcl/source/window/stacking.cxx                 |    2 
 vcl/source/window/window.cxx                   |    4 -
 vcl/source/window/window2.cxx                  |    2 
 vcl/unx/generic/app/gendisp.cxx                |    2 
 vcl/unx/generic/app/saldata.cxx                |    2 
 vcl/unx/generic/app/saldisp.cxx                |    2 
 vcl/unx/generic/fontmanager/fontconfig.cxx     |    4 -
 vcl/unx/generic/print/common_gfx.cxx           |   18 +++----
 vcl/unx/generic/print/genprnpsp.cxx            |    2 
 vcl/unx/generic/print/text_gfx.cxx             |    2 
 vcl/unx/generic/printer/printerinfomanager.cxx |    4 -
 vcl/unx/gtk/gtksalframe.cxx                    |    2 
 vcl/unx/gtk/gtksys.cxx                         |    2 
 vcl/unx/gtk/salprn-gtk.cxx                     |    2 
 vcl/unx/gtk3/gtk3gtkframe.cxx                  |    2 
 vcl/workben/outdevgrind.cxx                    |    2 
 vcl/workben/vcldemo.cxx                        |    6 +-
 43 files changed, 159 insertions(+), 161 deletions(-)

New commits:
commit c856ae17aff5db258eb16713f56fce9f28400d47
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Sep 13 16:44:19 2017 +0200

    clang-tidy modernize-use-emplace in vcl
    
    Change-Id: Ie0a6d105b0167431275e628935df4f4c1a36d070
    Reviewed-on: https://gerrit.libreoffice.org/42259
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index a83d9be8417f..0c0584cad792 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -168,7 +168,7 @@ public:
                 long x2 = (x+1) * (nWidth  / nPartitionsX);
                 long y2 = (y+1) * (nHeight / nPartitionsY);
 
-                aRegions.push_back(tools::Rectangle(x1 + 1, y1 + 1, x2 - 2, y2 - 2));
+                aRegions.emplace_back(x1 + 1, y1 + 1, x2 - 2, y2 - 2);
             }
         }
         return aRegions;
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 4ebeac8f4a3c..20d92e55c82e 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -169,7 +169,7 @@ void SvpSalInstance::PostEvent(const SalFrame* pFrame, ImplSVEvent* pData, SalEv
 {
     {
         osl::MutexGuard g(m_aEventGuard);
-        m_aUserEvents.push_back( SalUserEvent( pFrame, pData, nEvent ) );
+        m_aUserEvents.emplace_back( pFrame, pData, nEvent );
     }
     Wakeup();
 }
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index d8f20efdfebb..23c60d7f8bb9 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -257,7 +257,7 @@ void SAL_CALL VCLSession::addSessionManagerListener( const css::uno::Reference<X
     osl::MutexGuard aGuard( m_aMutex );
 
     SAL_INFO("vcl.se.debug", "  m_aListeners.size() = " << m_aListeners.size() );
-    m_aListeners.push_back( Listener( xListener ) );
+    m_aListeners.emplace_back( xListener );
 }
 
 void SAL_CALL VCLSession::removeSessionManagerListener( const css::uno::Reference<XSessionManagerListener>& xListener )
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index fdbc5f9d9522..9e5a47097093 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -891,7 +891,7 @@ ImplSVEvent * Application::PostKeyEvent( VclEventId nEvent, vcl::Window *pWin, K
         if( nEventId )
         {
             pPostEventData->mnEventId = nEventId;
-            ImplGetSVData()->maAppData.maPostedEventList.push_back( ImplPostEventPair( pWin, pPostEventData ) );
+            ImplGetSVData()->maAppData.maPostedEventList.emplace_back( pWin, pPostEventData );
         }
         else
             delete pPostEventData;
@@ -924,7 +924,7 @@ ImplSVEvent * Application::PostMouseEvent( VclEventId nEvent, vcl::Window *pWin,
         if( nEventId )
         {
             pPostEventData->mnEventId = nEventId;
-            ImplGetSVData()->maAppData.maPostedEventList.push_back( ImplPostEventPair( pWin, pPostEventData ) );
+            ImplGetSVData()->maAppData.maPostedEventList.emplace_back( pWin, pPostEventData );
         }
         else
             delete pPostEventData;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 4d6d26b318f5..8aa2cebc4f1b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2211,7 +2211,7 @@ std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bInclud
         if( pFirst->GetType() == WindowType::RADIOBUTTON )
         {
             if( pFirst != this || bIncludeThis )
-                aGroup.push_back( static_cast<RadioButton*>(pFirst) );
+                aGroup.emplace_back(static_cast<RadioButton*>(pFirst) );
         }
         pFirst = pFirst->GetWindow( GetWindowType::Next );
     } while( pFirst && ( ( pFirst->GetStyle() & WB_GROUP ) == 0 ) );
@@ -2731,7 +2731,7 @@ static void LoadThemedImageList(const StyleSettings &rStyleSettings,
     {
         BitmapEx aBmpEx(a);
         aBmpEx.Replace(aColorAry1, aColorAry2, SAL_N_ELEMENTS(aColorAry1));
-        rList.push_back(Image(aBmpEx));
+        rList.emplace_back(aBmpEx);
     }
 }
 
@@ -2759,21 +2759,21 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, DrawButtonFlags
         std::vector<OUString> aResources;
         if (nStyle)
         {
-            aResources.push_back(SV_RESID_BITMAP_RADIOMONO1);
-            aResources.push_back(SV_RESID_BITMAP_RADIOMONO2);
-            aResources.push_back(SV_RESID_BITMAP_RADIOMONO3);
-            aResources.push_back(SV_RESID_BITMAP_RADIOMONO4);
-            aResources.push_back(SV_RESID_BITMAP_RADIOMONO5);
-            aResources.push_back(SV_RESID_BITMAP_RADIOMONO6);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO1);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO2);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO3);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO4);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO5);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO6);
         }
         else
         {
-            aResources.push_back(SV_RESID_BITMAP_RADIO1);
-            aResources.push_back(SV_RESID_BITMAP_RADIO2);
-            aResources.push_back(SV_RESID_BITMAP_RADIO3);
-            aResources.push_back(SV_RESID_BITMAP_RADIO4);
-            aResources.push_back(SV_RESID_BITMAP_RADIO5);
-            aResources.push_back(SV_RESID_BITMAP_RADIO6);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIO1);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIO2);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIO3);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIO4);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIO5);
+            aResources.emplace_back(SV_RESID_BITMAP_RADIO6);
         }
         LoadThemedImageList( rStyleSettings, pSVData->maCtrlData.maRadioImgList, aResources);
         pSVData->maCtrlData.mnRadioStyle = nStyle;
@@ -3583,27 +3583,27 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFl
         std::vector<OUString> aResources;
         if (nStyle)
         {
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO1);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO2);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO3);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO4);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO5);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO6);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO7);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO8);
-            aResources.push_back(SV_RESID_BITMAP_CHECKMONO9);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO1);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO2);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO3);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO4);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO5);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO6);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO7);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO8);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO9);
         }
         else
         {
-            aResources.push_back(SV_RESID_BITMAP_CHECK1);
-            aResources.push_back(SV_RESID_BITMAP_CHECK2);
-            aResources.push_back(SV_RESID_BITMAP_CHECK3);
-            aResources.push_back(SV_RESID_BITMAP_CHECK4);
-            aResources.push_back(SV_RESID_BITMAP_CHECK5);
-            aResources.push_back(SV_RESID_BITMAP_CHECK6);
-            aResources.push_back(SV_RESID_BITMAP_CHECK7);
-            aResources.push_back(SV_RESID_BITMAP_CHECK8);
-            aResources.push_back(SV_RESID_BITMAP_CHECK9);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK1);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK2);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK3);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK4);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK5);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK6);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK7);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK8);
+            aResources.emplace_back(SV_RESID_BITMAP_CHECK9);
         }
         LoadThemedImageList(rStyleSettings, pSVData->maCtrlData.maCheckImgList, aResources);
         pSVData->maCtrlData.mnCheckStyle = nStyle;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index aa6775d03570..f5d00639009c 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1634,7 +1634,7 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText,
     ImplTabItem* pItem = nullptr;
     if( nPos == TAB_APPEND || size_t(nPos) >= mpTabCtrlData->maItemList.size() )
     {
-        mpTabCtrlData->maItemList.push_back( ImplTabItem() );
+        mpTabCtrlData->maItemList.emplace_back( );
         pItem = &mpTabCtrlData->maItemList.back();
         if( mpTabCtrlData->mpListBox )
             mpTabCtrlData->mpListBox->InsertEntry( rText );
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 9201a75430a7..9bd549848393 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -85,7 +85,7 @@ namespace
             Reference< XGraphic > xGraphic;
             aMediaProperties.put( "URL", *imageURL );
             xGraphic.set( xGraphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
-            aImages.push_back( Image( xGraphic ) );
+            aImages.emplace_back( xGraphic );
         }
 
         return aImages;
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index f1f3a408afc1..cb4fa8798603 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2096,7 +2096,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
     // initialization
     if ( pTEParaPortion->GetLines().empty() )
     {
-        pTEParaPortion->GetLines().push_back( TextLine() );
+        pTEParaPortion->GetLines().emplace_back( );
     }
 
     const sal_Int32 nInvalidDiff = pTEParaPortion->GetInvalidDiff();
@@ -2789,7 +2789,7 @@ void TextEngine::ImpInitWritingDirections( sal_uInt32 nPara )
         for ( long nIdx = 0; nIdx < nCount; ++nIdx )
         {
             ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
-            rInfos.push_back( TEWritingDirectionInfo( nCurrDir, nStart, nEnd ) );
+            rInfos.emplace_back( nCurrDir, nStart, nEnd );
             nStart = nEnd;
         }
 
@@ -2798,7 +2798,7 @@ void TextEngine::ImpInitWritingDirections( sal_uInt32 nPara )
 
     // No infos mean no CTL and default dir is L2R...
     if ( rInfos.empty() )
-        rInfos.push_back( TEWritingDirectionInfo( 0, 0, pParaPortion->GetNode()->GetText().getLength() ) );
+        rInfos.emplace_back( 0, 0, pParaPortion->GetNode()->GetText().getLength() );
 
 }
 
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 377403057860..f040a6489676 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1378,7 +1378,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra
 
     for (const auto& pStream : rStreams)
     {
-        aContexts.push_back(GraphicImportContext());
+        aContexts.emplace_back();
         GraphicImportContext& rContext = aContexts.back();
 
         if (pStream)
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 864158aba8ec..a322848056ee 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -793,7 +793,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
         }
 
         if (ecflag) {
-            aPathList.push_back( PSPathElement(PS_CLOSEPATH) );
+            aPathList.emplace_back(PS_CLOSEPATH );
             scflag = 1;
             ecflag = false;
             cp = EndContour + 1;
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index c169030f8f2a..8e8565717932 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -289,8 +289,8 @@ namespace vcl {
                 nEnd);
             while (aScriptRun.next())
             {
-                runs.push_back(Run(aScriptRun.getScriptStart(),
-                    aScriptRun.getScriptEnd(), aScriptRun.getScriptCode()));
+                runs.emplace_back(aScriptRun.getScriptStart(),
+                    aScriptRun.getScriptEnd(), aScriptRun.getScriptCode());
             }
         }
     };
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index b826b2fa8a0c..542a9ef6c63c 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -274,10 +274,10 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
     std::vector< MapMode > aMapModes;
 
     // start with empty region
-    aClips.push_back(basegfx::B2DPolyPolygon());
+    aClips.emplace_back();
 
     // start with default MapMode (MapUnit::MapPixel)
-    aMapModes.push_back(MapMode());
+    aMapModes.emplace_back();
 
     for(sal_uLong i(0); i < nObjCount; ++i)
     {
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index d8e13aaede0b..a2b9d80dbe69 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -57,7 +57,7 @@ OldStylePrintAdaptor::~OldStylePrintAdaptor()
 void OldStylePrintAdaptor::StartPage()
 {
     Size aPaperSize( getPrinter()->PixelToLogic( getPrinter()->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) ) );
-    mpData->maPages.push_back( AdaptorPage() );
+    mpData->maPages.emplace_back( );
     mpData->maPages.back().maPageSize.Width = aPaperSize.getWidth();
     mpData->maPages.back().maPageSize.Height = aPaperSize.getHeight();
     getPrinter()->SetConnectMetaFile( &mpData->maPages.back().maPage );
diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx
index 67a8614db142..5aacdbab5ddf 100644
--- a/vcl/source/gdi/pdffontcache.cxx
+++ b/vcl/source/gdi/pdffontcache.cxx
@@ -44,7 +44,7 @@ PDFFontCache::FontData& PDFFontCache::getFont( const PhysicalFontFace* pFont, bo
     if( it != m_aFontToIndex.end() )
         return m_aFonts[ it->second ];
     m_aFontToIndex[ aId ] = sal_uInt32(m_aFonts.size());
-    m_aFonts.push_back( FontData() );
+    m_aFonts.emplace_back( );
     return m_aFonts.back();
 }
 
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d10671e50cb2..00a53d60f5f0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -718,7 +718,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
             {
                  // create new hierarchy field
                 sal_Int32 nNewWidget = m_aWidgets.size();
-                m_aWidgets.push_back( PDFWidget() );
+                m_aWidgets.emplace_back( );
                 m_aWidgets[nNewWidget].m_nObject = createObject();
                 m_aWidgets[nNewWidget].m_eType = PDFWriter::Hierarchy;
                 m_aWidgets[nNewWidget].m_aName = aPartialName;
@@ -1721,7 +1721,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
         doTestCode();
     }
 #endif
-    m_aStructure.push_back( PDFStructureElement() );
+    m_aStructure.emplace_back( );
     m_aStructure[0].m_nOwnElement       = 0;
     m_aStructure[0].m_nParentElement    = 0;
 
@@ -1808,7 +1808,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
     }
 
     // insert outline root
-    m_aOutline.push_back( PDFOutlineEntry() );
+    m_aOutline.emplace_back( );
 
     m_bIsPDF_A1 = (m_aContext.Version == PDFWriter::PDFVersion::PDF_A_1);
     if( m_bIsPDF_A1 )
@@ -2241,7 +2241,7 @@ void PDFWriterImpl::newPage( double nPageWidth, double nPageHeight, PDFWriter::O
 {
     endPage();
     m_nCurrentPage = m_aPages.size();
-    m_aPages.push_back( PDFPage(this, nPageWidth, nPageHeight, eOrientation ) );
+    m_aPages.emplace_back(this, nPageWidth, nPageHeight, eOrientation );
     m_aPages.back().beginStream();
 
     // setup global graphics state
@@ -2268,7 +2268,7 @@ void PDFWriterImpl::endPage()
         }
 
         m_aGraphicsStack.clear();
-        m_aGraphicsStack.push_back( GraphicsState() );
+        m_aGraphicsStack.emplace_back( );
 
         // this should pop the PDF graphics stack if necessary
         updateGraphicsState();
@@ -2507,7 +2507,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle )
                     writeBuffer( aRef.getStr(), aRef.getLength() );
                 }
 
-                i_rEle.m_aKids.push_back( PDFStructureElementKid( nRefObject ) );
+                i_rEle.m_aKids.emplace_back( nRefObject );
             }
             else
             {
@@ -6051,7 +6051,7 @@ void PDFWriterImpl::sortWidgets()
             if( rWidget.m_eType != PDFWriter::RadioButton )
             {
                 rCont.aObjects.insert( rWidget.m_nObject );
-                rCont.aSortedAnnots.push_back( AnnotationSortEntry( rWidget.m_nTabOrder, rWidget.m_nObject, nW ) );
+                rCont.aSortedAnnots.emplace_back( rWidget.m_nTabOrder, rWidget.m_nObject, nW );
             }
         }
     }
@@ -6062,7 +6062,7 @@ void PDFWriterImpl::sortWidgets()
         unsigned int nAnnots = rPage.m_aAnnotations.size();
         for( unsigned int nA = 0; nA < nAnnots; nA++ )
             if( it->second.aObjects.find( rPage.m_aAnnotations[nA] ) == it->second.aObjects.end())
-                it->second.aSortedAnnots.push_back( AnnotationSortEntry( 10000, rPage.m_aAnnotations[nA], -1 ) );
+                it->second.aSortedAnnots.emplace_back( 10000, rPage.m_aAnnotations[nA], -1 );
 
         AnnotSorterLess aLess( m_aWidgets );
         std::stable_sort( it->second.aSortedAnnots.begin(), it->second.aSortedAnnots.end(), aLess );
@@ -6300,7 +6300,7 @@ void PDFWriterImpl::registerGlyphs( int nGlyphs,
             if( rSubset.m_aSubsets.empty()
             || (rSubset.m_aSubsets.back().m_aMapping.size() > 254) )
             {
-                rSubset.m_aSubsets.push_back( FontEmit( m_nNextFID++ ) );
+                rSubset.m_aSubsets.emplace_back( m_nNextFID++ );
             }
 
             // copy font id
@@ -6773,12 +6773,12 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
 
         for( int i = 0; i < nGlyphs; i++ )
         {
-            aGlyphs.push_back( PDFGlyph( aGNGlyphPos,
+            aGlyphs.emplace_back( aGNGlyphPos,
                                          pGlyphWidths[i],
                                          pGlyphs[i]->maGlyphId,
                                          pMappedFontObjects[i],
                                          pMappedGlyphs[i],
-                                         pGlyphs[i]->IsVertical() ) );
+                                         pGlyphs[i]->IsVertical() );
             if( bVertical )
                 aGNGlyphPos.Y() += pGlyphs[i]->mnNewWidth/rLayout.GetUnitsPerPixel();
             else
@@ -7781,7 +7781,7 @@ void PDFWriterImpl::drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uI
     }
 
     // create XObject
-    m_aTransparentObjects.push_back( TransparencyEmit() );
+    m_aTransparentObjects.emplace_back( );
     // FIXME: polygons with beziers may yield incorrect bound rect
     m_aTransparentObjects.back().m_aBoundRect     = rPolyPoly.GetBoundRect();
     // convert rectangle to default user space
@@ -7925,7 +7925,7 @@ void PDFWriterImpl::endTransparencyGroup( const tools::Rectangle& rBoundingBox,
     if( m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 )
     {
         // create XObject
-        m_aTransparentObjects.push_back( TransparencyEmit() );
+        m_aTransparentObjects.emplace_back( );
         m_aTransparentObjects.back().m_aBoundRect   = rBoundingBox;
         // convert rectangle to default user space
         m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
@@ -9713,7 +9713,7 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
     if (m_aContext.UseReferenceXObject)
     {
         // Store the original PDF data as an embedded file.
-        m_aEmbeddedFiles.push_back(PDFEmbeddedFile());
+        m_aEmbeddedFiles.emplace_back();
         m_aEmbeddedFiles.back().m_nObject = createObject();
         m_aEmbeddedFiles.back().m_aData = rGraphic.getPdfData();
 
@@ -10120,7 +10120,7 @@ void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpape
                 aTilingStream.append( aImageName );
                 aTilingStream.append( " Do\n" );
 
-                m_aTilings.push_back( TilingEmit() );
+                m_aTilings.emplace_back( );
                 m_aTilings.back().m_nObject         = createObject();
                 m_aTilings.back().m_aRectangle      = tools::Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
                 m_aTilings.back().m_pTilingStream   = new SvMemoryStream();
@@ -10438,7 +10438,7 @@ void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const PDFNote& rN
     if( nPageNr < 0 || nPageNr >= (sal_Int32)m_aPages.size() )
         return;
 
-    m_aNotes.push_back( PDFNoteEntry() );
+    m_aNotes.emplace_back( );
     m_aNotes.back().m_nObject       = createObject();
     m_aNotes.back().m_aContents     = rNote;
     m_aNotes.back().m_aRect         = rRect;
@@ -10459,7 +10459,7 @@ sal_Int32 PDFWriterImpl::createLink( const tools::Rectangle& rRect, sal_Int32 nP
 
     sal_Int32 nRet = m_aLinks.size();
 
-    m_aLinks.push_back( PDFLink() );
+    m_aLinks.emplace_back( );
     m_aLinks.back().m_nObject   = createObject();
     m_aLinks.back().m_nPage     = nPageNr;
     m_aLinks.back().m_aRect     = rRect;
@@ -10482,7 +10482,7 @@ sal_Int32 PDFWriterImpl::createScreen(const tools::Rectangle& rRect, sal_Int32 n
 
     sal_Int32 nRet = m_aScreens.size();
 
-    m_aScreens.push_back(PDFScreen());
+    m_aScreens.emplace_back();
     m_aScreens.back().m_nObject = createObject();
     m_aScreens.back().m_nPage = nPageNr;
     m_aScreens.back().m_aRect = rRect;
@@ -10505,7 +10505,7 @@ sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const tools
 
     sal_Int32 nRet = m_aNamedDests.size();
 
-    m_aNamedDests.push_back( PDFNamedDest() );
+    m_aNamedDests.emplace_back( );
     m_aNamedDests.back().m_aDestName = sDestName;
     m_aNamedDests.back().m_nPage = nPageNr;
     m_aNamedDests.back().m_eType = eType;
@@ -10526,7 +10526,7 @@ sal_Int32 PDFWriterImpl::createDest( const tools::Rectangle& rRect, sal_Int32 nP
 
     sal_Int32 nRet = m_aDests.size();
 
-    m_aDests.push_back( PDFDest() );
+    m_aDests.emplace_back( );
     m_aDests.back().m_nPage = nPageNr;
     m_aDests.back().m_eType = eType;
     m_aDests.back().m_aRect = rRect;
@@ -10600,7 +10600,7 @@ sal_Int32 PDFWriterImpl::createOutlineItem( sal_Int32 nParent, const OUString& r
 {
     // create new item
     sal_Int32 nNewItem = m_aOutline.size();
-    m_aOutline.push_back( PDFOutlineEntry() );
+    m_aOutline.emplace_back( );
 
     // set item attributes
     setOutlineItemParent( nNewItem, nParent );
@@ -10713,7 +10713,7 @@ void PDFWriterImpl::beginStructureElementMCSeq()
         SAL_INFO("vcl.pdfwriter", "beginning marked content id " << nMCID << " on page object "
                  << m_aPages[ m_nCurrentPage ].m_nPageObject << ", structure first page = "
                  << rEle.m_nFirstPageObject);
-        rEle.m_aKids.push_back( PDFStructureElementKid( nMCID, m_aPages[m_nCurrentPage].m_nPageObject ) );
+        rEle.m_aKids.emplace_back( nMCID, m_aPages[m_nCurrentPage].m_nPageObject );
         // update the page's mcid parent list
         m_aPages[ m_nCurrentPage ].m_aMCIDParents.push_back( rEle.m_nObject );
         // mark element MC sequence as open
@@ -10809,7 +10809,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType,
     }
 
     sal_Int32 nNewId = sal_Int32(m_aStructure.size());
-    m_aStructure.push_back( PDFStructureElement() );
+    m_aStructure.emplace_back( );
     PDFStructureElement& rEle = m_aStructure.back();
     rEle.m_eType            = eType;
     rEle.m_nOwnElement      = nNewId;
@@ -10850,7 +10850,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType,
     {
         rEle.m_nObject      = createObject();
         // update parent's kids list
-        m_aStructure[ rEle.m_nParentElement ].m_aKids.push_back(PDFStructureElementKid(rEle.m_nObject));
+        m_aStructure[ rEle.m_nParentElement ].m_aKids.emplace_back(rEle.m_nObject);
     }
     return nNewId;
 }
@@ -10954,7 +10954,7 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
                 {
                     sal_Int32 nCurrentStructElement = rEle.m_nOwnElement;
                     sal_Int32 nNewId = sal_Int32(m_aStructure.size());
-                    m_aStructure.push_back( PDFStructureElement() );
+                    m_aStructure.emplace_back( );
                     PDFStructureElement& rEleNew = m_aStructure.back();
                     rEleNew.m_aAlias            = aAliasName;
                     rEleNew.m_eType             = PDFWriter::Division; // a new Div type container
@@ -10964,7 +10964,7 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
                     rEleNew.m_nFirstPageObject  = m_aStructure[ rEle.m_aChildren.front() ].m_nFirstPageObject;
                     rEleNew.m_nObject           = createObject();//assign a PDF object number
                     //add the object to the kid list of the parent
-                    aNewKids.push_back( PDFStructureElementKid( rEleNew.m_nObject ) );
+                    aNewKids.emplace_back( rEleNew.m_nObject );
                     aNewChildren.push_back( nNewId );
 
                     std::list< sal_Int32 >::iterator aChildEndIt( rEle.m_aChildren.begin() );
@@ -11493,7 +11493,7 @@ sal_Int32 PDFWriterImpl::findRadioGroupWidget( const PDFWriter::RadioButtonWidge
             sal_Int32(m_aWidgets.size());
 
         // new group, insert the radiobutton
-        m_aWidgets.push_back( PDFWidget() );
+        m_aWidgets.emplace_back( );
         m_aWidgets.back().m_nObject     = createObject();
         m_aWidgets.back().m_nPage       = m_nCurrentPage;
         m_aWidgets.back().m_eType       = PDFWriter::RadioButton;
@@ -11518,7 +11518,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
 
     bool sigHidden(true);
     sal_Int32 nNewWidget = m_aWidgets.size();
-    m_aWidgets.push_back( PDFWidget() );
+    m_aWidgets.emplace_back( );
 
     m_aWidgets.back().m_nObject         = createObject();
     m_aWidgets.back().m_aRect           = rControl.Location;
@@ -11710,7 +11710,7 @@ void PDFWriterImpl::addStream( const OUString& rMimeType, PDFOutputStream* pStre
 {
     if( pStream )
     {
-        m_aAdditionalStreams.push_back( PDFAddStream() );
+        m_aAdditionalStreams.emplace_back( );
         PDFAddStream& rStream = m_aAdditionalStreams.back();
         rStream.m_aMimeType = !rMimeType.isEmpty()
                               ? rMimeType
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 5a3d1c2c4c70..515b12de1d4a 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -379,7 +379,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
     if( it == m_aNameToIndex.end() )
     {
         m_aNameToIndex[ pData->maPrinterName ] = m_aQueueInfos.size();
-        m_aQueueInfos.push_back( ImplPrnQueueData() );
+        m_aQueueInfos.emplace_back( );
         m_aQueueInfos.back().mpQueueInfo = nullptr;
         m_aQueueInfos.back().mpSalQueueInfo = pData;
         m_aPrinterList.push_back( pData->maPrinterName );
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 2ccb80ce2a36..d546825e7f50 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -853,9 +853,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
         {
             // up to and including last ink-generating background
             // action go to background component
-            aBackgroundComponent.aComponentList.push_back(
-                ::std::make_pair(
-                    pCurrAct, nActionNum) );
+            aBackgroundComponent.aComponentList.emplace_back(
+                    pCurrAct, nActionNum );
 
             // execute action to get correct MapModes etc.
             pCurrAct->Execute( aMapModeVDev.get() );
@@ -1051,9 +1050,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
 
             // set new bounds and add action to list
             aTotalComponents.aBounds = aTotalBounds;
-            aTotalComponents.aComponentList.push_back(
-                ::std::make_pair(
-                    pCurrAct, nActionNum) );
+            aTotalComponents.aComponentList.emplace_back(
+                    pCurrAct, nActionNum );
 
             // add aTotalComponents as a new entry to aCCList
             aCCList.push_back( aTotalComponents );
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 092888a9b8a5..dd3d91855c0d 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -203,14 +203,14 @@ std::vector<OUString> ImplImageTree::getPaths(OUString const & name, LanguageTag
         for (OUString& rFallback : rLanguageTag.getFallbackStrings(true))
         {
             OUString aFallbackName = getNameNoExtension(getRealImageName(createPath(name, pos, rFallback)));
-            sPaths.push_back(aFallbackName + ".png");
-            sPaths.push_back(aFallbackName + ".svg");
+            sPaths.emplace_back(aFallbackName + ".png");
+            sPaths.emplace_back(aFallbackName + ".svg");
         }
     }
 
     OUString aRealName = getNameNoExtension(getRealImageName(name));
-    sPaths.push_back(aRealName + ".png");
-    sPaths.push_back(aRealName + ".svg");
+    sPaths.emplace_back(aRealName + ".png");
+    sPaths.emplace_back(aRealName + ".svg");
 
     return sPaths;
 }
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 01bacb88f443..b7482c4ab677 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -697,7 +697,7 @@ void OutputDevice::AddFontSubstitute( const OUString& rFontName,
 void ImplDirectFontSubstitution::AddFontSubstitute( const OUString& rFontName,
     const OUString& rSubstFontName, AddFontSubstituteFlags nFlags )
 {
-    maFontSubstList.push_back( ImplFontSubstEntry( rFontName, rSubstFontName, nFlags ) );
+    maFontSubstList.emplace_back( rFontName, rSubstFontName, nFlags );
 }
 
 ImplFontSubstEntry::ImplFontSubstEntry( const OUString& rFontName,
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 658a7a157b53..0de51f0d3e2b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -2530,7 +2530,7 @@ bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
     rResultVector.reserve( aB2DPolyPolyVector.size() );
     basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin();
     for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
-        rResultVector.push_back(tools::PolyPolygon(*aIt)); // #i76339#
+        rResultVector.emplace_back(*aIt); // #i76339#
 
     return true;
 }
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index ed5a84ab5655..73c5aabcfab1 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -123,7 +123,7 @@ std::vector<KeyEvent> generate_key_events_from_text(const OUString& rStr)
     for (sal_Int32 i = 0, n = rStr.getLength();
             i != n; ++i)
     {
-        aEvents.push_back(KeyEvent(rStr[i], aCode));
+        aEvents.emplace_back(rStr[i], aCode);
     }
     return aEvents;
 }
@@ -222,13 +222,13 @@ std::vector<KeyEvent> generate_key_events_from_keycode(const OUString& rStr)
     if (isFunctionKey(aRemainingText, nFunctionKey))
     {
         vcl::KeyCode aCode(nFunctionKey, bShift, bMod1, bMod2, false);
-        aEvents.push_back(KeyEvent(0, aCode));
+        aEvents.emplace_back(0, aCode);
     }
     else if (aKeyMap.find(aRemainingText) != aKeyMap.end())
     {
         sal_uInt16 nKey = aKeyMap[aRemainingText];
         vcl::KeyCode aCode(nKey, bShift, bMod1, bMod2, false);
-        aEvents.push_back(KeyEvent( 'a', aCode));
+        aEvents.emplace_back( 'a', aCode);
     }
     else
     {
@@ -237,7 +237,7 @@ std::vector<KeyEvent> generate_key_events_from_keycode(const OUString& rStr)
             bool bShiftThroughKey = false;
             sal_uInt16 nKey = get_key(aRemainingText[i], bShiftThroughKey);
             vcl::KeyCode aCode(nKey, bShift || bShiftThroughKey, bMod1, bMod2, false);
-            aEvents.push_back(KeyEvent(aRemainingText[i], aCode));
+            aEvents.emplace_back(aRemainingText[i], aCode);
         }
     }
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 693e1771eaa2..d9501548a843 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -948,7 +948,7 @@ bool VclBuilder::extractGroup(const OString &id, stringmap &rMap)
         sal_Int32 nDelim = sID.indexOf(':');
         if (nDelim != -1)
             sID = sID.copy(0, nDelim);
-        m_pParserState->m_aGroupMaps.push_back(RadioButtonGroupMap(id, sID.toUtf8()));
+        m_pParserState->m_aGroupMaps.emplace_back(id, sID.toUtf8());
         rMap.erase(aFind);
         return true;
     }
@@ -958,19 +958,19 @@ bool VclBuilder::extractGroup(const OString &id, stringmap &rMap)
 void VclBuilder::connectNumericFormatterAdjustment(const OString &id, const OUString &rAdjustment)
 {
     if (!rAdjustment.isEmpty())
-        m_pParserState->m_aNumericFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment));
+        m_pParserState->m_aNumericFormatterAdjustmentMaps.emplace_back(id, rAdjustment);
 }
 
 void VclBuilder::connectTimeFormatterAdjustment(const OString &id, const OUString &rAdjustment)
 {
     if (!rAdjustment.isEmpty())
-        m_pParserState->m_aTimeFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment));
+        m_pParserState->m_aTimeFormatterAdjustmentMaps.emplace_back(id, rAdjustment);
 }
 
 void VclBuilder::connectDateFormatterAdjustment(const OString &id, const OUString &rAdjustment)
 {
     if (!rAdjustment.isEmpty())
-        m_pParserState->m_aDateFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment));
+        m_pParserState->m_aDateFormatterAdjustmentMaps.emplace_back(id, rAdjustment);
 }
 
 bool VclBuilder::extractAdjustmentToMap(const OString& id, VclBuilder::stringmap& rMap, std::vector<WidgetAdjustmentMap>& rAdjustmentMap)
@@ -978,7 +978,7 @@ bool VclBuilder::extractAdjustmentToMap(const OString& id, VclBuilder::stringmap
     VclBuilder::stringmap::iterator aFind = rMap.find(OString("adjustment"));
     if (aFind != rMap.end())
     {
-        rAdjustmentMap.push_back(WidgetAdjustmentMap(id, aFind->second));
+        rAdjustmentMap.emplace_back(id, aFind->second);
         rMap.erase(aFind);
         return true;
     }
@@ -1030,8 +1030,8 @@ bool VclBuilder::extractModel(const OString &id, stringmap &rMap)
     VclBuilder::stringmap::iterator aFind = rMap.find(OString("model"));
     if (aFind != rMap.end())
     {
-        m_pParserState->m_aModelMaps.push_back(ComboBoxModelMap(id, aFind->second,
-            extractActive(rMap)));
+        m_pParserState->m_aModelMaps.emplace_back(id, aFind->second,
+            extractActive(rMap));
         rMap.erase(aFind);
         return true;
     }
@@ -1043,7 +1043,7 @@ bool VclBuilder::extractBuffer(const OString &id, stringmap &rMap)
     VclBuilder::stringmap::iterator aFind = rMap.find(OString("buffer"));
     if (aFind != rMap.end())
     {
-        m_pParserState->m_aTextBufferMaps.push_back(TextBufferMap(id, aFind->second));
+        m_pParserState->m_aTextBufferMaps.emplace_back(id, aFind->second);
         rMap.erase(aFind);
         return true;
     }
@@ -1075,7 +1075,7 @@ bool VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRa
     VclBuilder::stringmap::iterator aFind = rMap.find(OString("image"));
     if (aFind != rMap.end())
     {
-        m_pParserState->m_aButtonImageWidgetMaps.push_back(ButtonImageWidgetMap(id, aFind->second, bRadio));
+        m_pParserState->m_aButtonImageWidgetMaps.emplace_back(id, aFind->second, bRadio);
         rMap.erase(aFind);
         return true;
     }
@@ -1091,7 +1091,7 @@ void VclBuilder::extractMnemonicWidget(const OString &rLabelID, stringmap &rMap)
         sal_Int32 nDelim = sID.indexOf(':');
         if (nDelim != -1)
             sID = sID.copy(0, nDelim);
-        m_pParserState->m_aMnemonicWidgetMaps.push_back(MnemonicWidgetMap(rLabelID, sID));
+        m_pParserState->m_aMnemonicWidgetMaps.emplace_back(rLabelID, sID);
         rMap.erase(aFind);
     }
 }
@@ -1153,14 +1153,14 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
             OString sTabPageId = get_by_window(pParent) +
                 OString("-page") +
                 OString::number(nNewPageCount);
-            m_aChildren.push_back(WinAndId(sTabPageId, pPage, false));
+            m_aChildren.emplace_back(sTabPageId, pPage, false);
             pPage->SetHelpId(m_sHelpRoot + sTabPageId);
 
             //And give the page one container as a child to make it a layout enabled
             //tab page
             VclPtrInstance<VclBin> pContainer(pPage);
             pContainer->Show();
-            m_aChildren.push_back(WinAndId(OString(), pContainer, false));
+            m_aChildren.emplace_back(OString(), pContainer, false);
             pContainer->SetHelpId(m_sHelpRoot + sTabPageId + OString("-bin"));
             pParent = pContainer;
 
@@ -1239,7 +1239,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
         else
         {
             xButton = extractStockAndBuildMenuButton(pParent, rMap);
-            m_pParserState->m_aButtonMenuMaps.push_back(ButtonMenuMap(id, sMenu));
+            m_pParserState->m_aButtonMenuMaps.emplace_back(id, sMenu);
         }
         xButton->SetImageAlign(ImageAlign::Left); //default to left
         setupFromActionName(xButton, rMap, m_xFrame);
@@ -1251,7 +1251,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
         OUString sMenu = BuilderUtils::extractCustomProperty(rMap);
         assert(sMenu.getLength() && "not implemented yet");
         xButton = extractStockAndBuildMenuToggleButton(pParent, rMap);
-        m_pParserState->m_aButtonMenuMaps.push_back(ButtonMenuMap(id, sMenu));
+        m_pParserState->m_aButtonMenuMaps.emplace_back(id, sMenu);
         xButton->SetImageAlign(ImageAlign::Left); //default to left
         setupFromActionName(xButton, rMap, m_xFrame);
         xWindow = xButton;
@@ -1647,7 +1647,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
                 {
                     OUString sMenu = BuilderUtils::extractCustomProperty(rMap);
                     if (!sMenu.isEmpty())
-                        m_pParserState->m_aButtonMenuMaps.push_back(ButtonMenuMap(id, sMenu));
+                        m_pParserState->m_aButtonMenuMaps.emplace_back(id, sMenu);
                     setupFromActionName(static_cast<Button*>(xWindow.get()), rMap, m_xFrame);
                 }
             }
@@ -1663,7 +1663,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
             xWindow->ImplGetWindowImpl()->mpRealParent.get() << "/" <<
             xWindow->ImplGetWindowImpl()->mpBorderWindow.get() << ") with helpid " <<
             xWindow->GetHelpId());
-        m_aChildren.push_back(WinAndId(id, xWindow, bVertical));
+        m_aChildren.emplace_back(id, xWindow, bVertical);
     }
     return xWindow;
 }
@@ -2466,7 +2466,7 @@ void VclBuilder::handleMenu(xmlreader::XmlReader &reader, const OString &rID)
             break;
     }
 
-    m_aMenus.push_back(MenuAndId(rID, pCurrentMenu));
+    m_aMenus.emplace_back(rID, pCurrentMenu);
 }
 
 void VclBuilder::handleMenuChild(PopupMenu *pParent, xmlreader::XmlReader &reader)
@@ -2580,7 +2580,7 @@ void VclBuilder::handleMenuObject(PopupMenu *pParent, xmlreader::XmlReader &read
 
 void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader)
 {
-    m_pParserState->m_aSizeGroups.push_back(SizeGroup());
+    m_pParserState->m_aSizeGroups.emplace_back();
     SizeGroup &rSizeGroup = m_pParserState->m_aSizeGroups.back();
 
     int nLevel = 1;
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index b47532891c24..80438d07f481 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -65,7 +65,7 @@ static void CollectMenuItemIds( Menu *pMenu, std::vector< SalMenuEvent > &rIds )
     for (sal_uInt16 i = 0; i < nItems; i++)
     {
         if (pMenu->GetItemType( i ) != MenuItemType::SEPARATOR || getRandom() < 0.01)
-            rIds.push_back( SalMenuEvent( pMenu->GetItemId( i ), pMenu ) );
+            rIds.emplace_back( pMenu->GetItemId( i ), pMenu );
         PopupMenu *pPopup = pMenu->GetPopupMenu( i );
         if (pPopup)
             CollectMenuItemIds( pPopup, rIds );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 096ad1f57d28..8b9f4b515130 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -39,10 +39,10 @@ static void ImplInitMsgBoxImageList()
     ImplSVData* pSVData = ImplGetSVData();
     if (pSVData->maWinData.maMsgBoxImgList.empty())
     {
-        pSVData->maWinData.maMsgBoxImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_ERRORBOX)));
-        pSVData->maWinData.maMsgBoxImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_QUERYBOX)));
-        pSVData->maWinData.maMsgBoxImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_WARNINGBOX)));
-        pSVData->maWinData.maMsgBoxImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_INFOBOX)));
+        pSVData->maWinData.maMsgBoxImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_ERRORBOX));
+        pSVData->maWinData.maMsgBoxImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_QUERYBOX));
+        pSVData->maWinData.maMsgBoxImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_WARNINGBOX));
+        pSVData->maWinData.maMsgBoxImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_INFOBOX));
     }
 }
 
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 984f48bae11a..f8e29b94fa82 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1001,7 +1001,7 @@ void PrintDialog::setupOptionalUI()
             maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != nullptr );
             maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) );
 
-            maPropertyToWindowMap[ aPropertyName ].push_back( maNUpPage.mpBrochureBtn );
+            maPropertyToWindowMap[ aPropertyName ].emplace_back(maNUpPage.mpBrochureBtn );
             maControlToPropertyMap[maNUpPage.mpBrochureBtn] = aPropertyName;
 
             // set help id
@@ -1029,7 +1029,7 @@ void PrintDialog::setupOptionalUI()
             pNewBox->Check( bVal );
             pNewBox->SetToggleHdl( LINK( this, PrintDialog, UIOption_CheckHdl ) );
 
-            maPropertyToWindowMap[ aPropertyName ].push_back( pNewBox );
+            maPropertyToWindowMap[ aPropertyName ].emplace_back(pNewBox );
             maControlToPropertyMap[pNewBox] = aPropertyName;
 
             // set help id
@@ -1062,7 +1062,7 @@ void PrintDialog::setupOptionalUI()
                 if( aChoicesDisabled.getLength() > m && aChoicesDisabled[m] )
                     pBtn->Enable( false );
                 pBtn->Show();
-                maPropertyToWindowMap[ aPropertyName ].push_back( pBtn );
+                maPropertyToWindowMap[ aPropertyName ].emplace_back(pBtn );
                 maControlToPropertyMap[pBtn] = aPropertyName;
                 maControlToNumValMap[pBtn] = m;
 
@@ -1101,7 +1101,7 @@ void PrintDialog::setupOptionalUI()
             // set help text
             setHelpText( pList, aHelpTexts, 0 );
 
-            maPropertyToWindowMap[ aPropertyName ].push_back( pList );
+            maPropertyToWindowMap[ aPropertyName ].emplace_back(pList );
             maControlToPropertyMap[pList] = aPropertyName;
         }
         else if ( aCtrlType == "Range" )
@@ -1132,7 +1132,7 @@ void PrintDialog::setupOptionalUI()
             // set help text
             setHelpText( pField, aHelpTexts, 0 );
 
-            maPropertyToWindowMap[ aPropertyName ].push_back( pField );
+            maPropertyToWindowMap[ aPropertyName ].emplace_back(pField );
             maControlToPropertyMap[pField] = aPropertyName;
         }
         else if (aCtrlType == "Edit")
@@ -1157,7 +1157,7 @@ void PrintDialog::setupOptionalUI()
             // set help text
             setHelpText( pField, aHelpTexts, 0 );
 
-            maPropertyToWindowMap[ aPropertyName ].push_back( pField );
+            maPropertyToWindowMap[ aPropertyName ].emplace_back(pField );
             maControlToPropertyMap[pField] = aPropertyName;
         }
         else
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 5e88bef81649..7077b800db3a 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -117,12 +117,12 @@ void ImplWheelWindow::ImplSetRegion( const Bitmap& rRegionBmp )
 
 void ImplWheelWindow::ImplCreateImageList()
 {
-    maImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_SCROLLVH)));
-    maImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_SCROLLV)));
-    maImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_SCROLLH)));
-    maImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_WHEELVH)));
-    maImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_WHEELV)));
-    maImgList.push_back(Image(BitmapEx(SV_RESID_BITMAP_WHEELH)));
+    maImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_SCROLLVH));
+    maImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_SCROLLV));
+    maImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_SCROLLH));
+    maImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_WHEELVH));
+    maImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_WHEELV));
+    maImgList.emplace_back(BitmapEx(SV_RESID_BITMAP_WHEELH));
 }
 
 void ImplWheelWindow::ImplSetWheelMode( WheelMode nWheelMode )
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index cb7c6ebf2b51..a3a238ee2c7c 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -999,7 +999,7 @@ void Window::SetParent( vcl::Window* pNewParent )
         pNewSysWin->GetTaskPaneList()->AddWindow( this );
 
     if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame )
-        ImplGetOwnerDrawList().push_back( this );
+        ImplGetOwnerDrawList().emplace_back(this );
 
     if ( bVisible )
         Show( true, ShowFlags::NoFocusChange | ShowFlags::NoActivate );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 283ee5712c09..4da4f2cbb0ca 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1074,7 +1074,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
         if ( pRealParent && IsTopWindow() )
         {
             ImplWinData* pParentWinData = pRealParent->ImplGetWinData();
-            pParentWinData->maTopWindowChildren.push_back( this );
+            pParentWinData->maTopWindowChildren.emplace_back(this );
         }
     }
 
@@ -1104,7 +1104,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
         // add ownerdraw decorated frame windows to list in the top-most frame window
         // so they can be hidden on lose focus
         if( nStyle & WB_OWNERDRAWDECORATION )
-            ImplGetOwnerDrawList().push_back( this );
+            ImplGetOwnerDrawList().emplace_back(this );
 
         // delay settings initialization until first "real" frame
         // this relies on the IntroWindow not needing any system settings
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 94d14441e22c..60d27fb5fa1e 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1957,7 +1957,7 @@ void Window::add_mnemonic_label(FixedText *pLabel)
     std::vector<VclPtr<FixedText> >& v = mpWindowImpl->m_aMnemonicLabels;
     if (std::find(v.begin(), v.end(), VclPtr<FixedText>(pLabel)) != v.end())
         return;
-    v.push_back(pLabel);
+    v.emplace_back(pLabel);
     pLabel->set_mnemonic_widget(this);
 }
 
diff --git a/vcl/unx/generic/app/gendisp.cxx b/vcl/unx/generic/app/gendisp.cxx
index c1cd5a23112e..edaf0e6ffb95 100644
--- a/vcl/unx/generic/app/gendisp.cxx
+++ b/vcl/unx/generic/app/gendisp.cxx
@@ -92,7 +92,7 @@ void SalGenericDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, SalEve
 {
     osl::MutexGuard g( m_aEventGuard );
 
-    m_aUserEvents.push_back( SalUserEvent( pFrame, pData, nEvent ) );
+    m_aUserEvents.emplace_back( pFrame, pData, nEvent );
 
     PostUserEvent(); // wakeup the concrete mainloop
 }
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index fb5131473e5a..e753184b0bef 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -305,7 +305,7 @@ bool X11SalData::ErrorTrapPop( bool bIgnoreError )
 
 void X11SalData::PushXErrorLevel( bool bIgnore )
 {
-    m_aXErrorHandlerStack.push_back( XErrorStackEntry() );
+    m_aXErrorHandlerStack.emplace_back( );
     XErrorStackEntry& rEnt = m_aXErrorHandlerStack.back();
     rEnt.m_bWas = false;
     rEnt.m_bIgnore = bIgnore;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index b73c5046a3d2..d6958f9c407a 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2281,7 +2281,7 @@ void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nW
         }
     }
     m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size();
-    m_aXineramaScreens.push_back( tools::Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
+    m_aXineramaScreens.emplace_back( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) );
 }
 
 void SalDisplay::InitXinerama()
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 65e5be8c244e..37f45aeac71c 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -342,7 +342,7 @@ FcResult FontCfgWrapper::LocalizedElementFromPattern(FcPattern const * pPattern,
         if (FcPatternGetString( pPattern, elementlangtype, 0, &elementlang ) == FcResultMatch)
         {
             std::vector< lang_and_element > lang_and_elements;
-            lang_and_elements.push_back(lang_and_element(elementlang, *element));
+            lang_and_elements.emplace_back(elementlang, *element);
             int k = 1;
             while (true)
             {
@@ -350,7 +350,7 @@ FcResult FontCfgWrapper::LocalizedElementFromPattern(FcPattern const * pPattern,
                     break;
                 if (FcPatternGetString( pPattern, elementtype, k, element ) != FcResultMatch)
                     break;
-                lang_and_elements.push_back(lang_and_element(elementlang, *element));
+                lang_and_elements.emplace_back(elementlang, *element);
                 ++k;
             }
 
diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx
index 9b9f5dd8abb8..6fee6f53b485 100644
--- a/vcl/unx/generic/print/common_gfx.cxx
+++ b/vcl/unx/generic/print/common_gfx.cxx
@@ -103,7 +103,7 @@ PrinterGfx::PrinterGfx()
     maVirtualStatus.mnTextHeight = 12;
     maVirtualStatus.mnTextWidth = 0;
 
-    maGraphicsStack.push_back( GraphicsStatus() );
+    maGraphicsStack.emplace_back( );
 }
 
 PrinterGfx::~PrinterGfx()
@@ -131,7 +131,7 @@ PrinterGfx::Clear()
 
     maClipRegion.clear();
     maGraphicsStack.clear();
-    maGraphicsStack.push_back( GraphicsStatus() );
+    maGraphicsStack.emplace_back( );
 }
 
 /*
@@ -156,7 +156,7 @@ void
 PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY)
 {
     if( nDX && nDY )
-        maClipRegion.push_back (tools::Rectangle(Point(nX,nY ), Size(nDX,nDY)));
+        maClipRegion.emplace_back(Point(nX,nY ), Size(nDX,nDY));
 }
 
 bool
@@ -171,8 +171,8 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator&
     std::list< Point > leftside, rightside;
 
     tools::Rectangle aLastRect( *it );
-    leftside.push_back( Point( it->Left(), it->Top() ) );
-    rightside.push_back( Point( it->Right()+1, it->Top() ) );
+    leftside.emplace_back( it->Left(), it->Top() );
+    rightside.emplace_back( it->Right()+1, it->Top() );
     while( nextit != maClipRegion.end() )
     {
         tempit = nextit;
@@ -192,8 +192,8 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator&
                     std::abs( aLastRect.Right() - nextit->Right() ) > 2
                     )
                 {
-                    leftside.push_back( Point( aLastRect.Left(), aLastRect.Bottom()+1 ) );
-                    rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) );
+                    leftside.emplace_back( aLastRect.Left(), aLastRect.Bottom()+1 );
+                    rightside.emplace_back( aLastRect.Right()+1, aLastRect.Bottom()+1 );
                 }
                 aLastRect = *nextit;
                 leftside.push_back( aLastRect.TopLeft() );
@@ -206,8 +206,8 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator&
     if( leftside.size() > 1 )
     {
         // push the last coordinates
-        leftside.push_back( Point( aLastRect.Left(), aLastRect.Bottom()+1 ) );
-        rightside.push_back( Point( aLastRect.Right()+1, aLastRect.Bottom()+1 ) );
+        leftside.emplace_back( aLastRect.Left(), aLastRect.Bottom()+1 );
+        rightside.emplace_back( aLastRect.Right()+1, aLastRect.Bottom()+1 );
 
         // cool, we can concatenate rectangles
         const int nDX = -65536, nDY = 65536;
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 20b6d1484c01..8adcd655c762 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -1119,7 +1119,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
                 }
                 // save current file and paper format
                 aLastParm = aNewParm;
-                aPDFFiles.push_back( PDFPrintFile( aPDFUrl, aNewParm ) );
+                aPDFFiles.emplace_back( aPDFUrl, aNewParm );
                 // update context
                 aContext.URL = aPDFUrl;
 
diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx
index bbb8adede54f..24747ae119db 100644
--- a/vcl/unx/generic/print/text_gfx.cxx
+++ b/vcl/unx/generic/print/text_gfx.cxx
@@ -78,7 +78,7 @@ void PrinterGfx::drawGlyph(const Point& rPoint,
     // not found ? create a new one
     if (aIter == maPS3Font.end())
     {
-        maPS3Font.push_back (GlyphSet(mnFontID, mbTextVertical));
+        maPS3Font.emplace_back(mnFontID, mbTextVertical);
         maPS3Font.back().DrawGlyph (*this, rPoint, aGlyphId, nDelta);
     }
 }
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 0f0a64e707b4..842f11deea22 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -1093,7 +1093,7 @@ static void standardSysQueueTokenHandler(
                 // do not insert duplicates (e.g. lpstat tends to produce such lines)
                 if( aUniqueSet.find( aSysQueue ) == aUniqueSet.end() )
                 {
-                    o_rQueues.push_back( PrinterInfoManager::SystemPrintQueue() );
+                    o_rQueues.emplace_back( );
                     o_rQueues.back().m_aQueue = aSysQueue;
                     o_rQueues.back().m_aLocation = aSysQueue;
                     aUniqueSet.insert( aSysQueue );
@@ -1138,7 +1138,7 @@ void SystemQueueInfo::run()
         if( (pPipe = popen( aCmdLine.getStr(), "r" )) )
         {
             while( fgets( pBuffer, 1024, pPipe ) )
-                aLines.push_back( OString( pBuffer ) );
+                aLines.emplace_back( pBuffer );
             if( ! pclose( pPipe ) )
             {
                 std::vector< PrinterInfoManager::SystemPrintQueue > aSysPrintQueues;
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 8bd532eea78c..789556a7f76f 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -3432,7 +3432,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
         // event has a matching key press event in this list, we swallow
         // the key release because some GTK Input Methods don't swallow it
         // for us.
-        m_aPrevKeyPresses.push_back( PreviousKeyPress(pEvent) );
+        m_aPrevKeyPresses.emplace_back(pEvent );
         m_nPrevKeyPresses++;
 
         // Also pop off the earliest key press event if there are more than 10
diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx
index 7e46498e6461..d01eaa1f6873 100644
--- a/vcl/unx/gtk/gtksys.cxx
+++ b/vcl/unx/gtk/gtksys.cxx
@@ -119,7 +119,7 @@ GtkSalSystem::countScreenMonitors()
                     GdkRectangleCoincident()));
             nMonitors = std::distance(aGeometries.begin(), aUniqueEnd);
         }
-        maScreenMonitors.push_back(std::make_pair(pScreen, nMonitors));
+        maScreenMonitors.emplace_back(pScreen, nMonitors);
     }
 }
 
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index 09c26aab4aab..a60a68e50843 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -537,7 +537,7 @@ GtkPrintDialog::impl_initCustomTab()
             lcl_setHelpText(pCurTabPage, aHelpTexts, 0);
 
             pCurParent = pCurTabPage;
-            aCustomTabs.push_back(std::make_pair(pCurTabPage, aText));
+            aCustomTabs.emplace_back(pCurTabPage, aText);
         }
         else if (aCtrlType == "Subgroup")
         {
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 11d6c8cffed8..39be49496f06 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3748,7 +3748,7 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
         // event has a matching key press event in this list, we swallow
         // the key release because some GTK Input Methods don't swallow it
         // for us.
-        m_aPrevKeyPresses.push_back( PreviousKeyPress(pEvent) );
+        m_aPrevKeyPresses.emplace_back(pEvent );
         m_nPrevKeyPresses++;
 
         // Also pop off the earliest key press event if there are more than 10
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 1470a06b58b5..3e92d6cb5784 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -82,7 +82,7 @@ template< typename Functor > void add( functor_vector_type& res,
                                        const char*          pStr,
                                        const Functor&       func )
 {
-    res.push_back( std::make_pair(pStr,functor_type(func)) );
+    res.emplace_back(pStr,functor_type(func) );
 }
 
 void setupMethodStubs( functor_vector_type& res )
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 3033860d79dd..d6ea287da761 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1199,7 +1199,7 @@ public:
             for (size_t i = 0; i < SAL_N_ELEMENTS(pNames); i++)
             {
                 maIconNames.push_back(OUString::createFromAscii(pNames[i]));
-                maIcons.push_back(BitmapEx(maIconNames[i]));
+                maIcons.emplace_back(maIconNames[i]);
             }
         }
 
@@ -1217,7 +1217,7 @@ public:
                 if (aAllIcons[i].endsWithIgnoreAsciiCase("svg"))
                     continue; // too slow to load.
                 maIconNames.push_back(aAllIcons[i]);
-                maIcons.push_back(BitmapEx(aAllIcons[i]));
+                maIcons.emplace_back(aAllIcons[i]);
             }
         }
 
@@ -1491,7 +1491,7 @@ public:
             drawThumbs(rDev, aWholeWin, bVDev);
     }
     std::vector<VclPtr<vcl::Window> > maInvalidates;
-    void addInvalidate(vcl::Window *pWindow) { maInvalidates.push_back(pWindow); };
+    void addInvalidate(vcl::Window *pWindow) { maInvalidates.emplace_back(pWindow); };
     void removeInvalidate(vcl::Window *pWindow)
     {
         for (auto aIt = maInvalidates.begin(); aIt != maInvalidates.end(); ++aIt)


More information about the Libreoffice-commits mailing list