summaryrefslogtreecommitdiff
path: root/cppcanvas/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-08 16:55:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 08:40:57 +0200
commit4c09f8e087cae598efbb78759110c03ed10e3a3a (patch)
tree963bf5ef462eacc2195ffb23d22c6e7e5fd0d627 /cppcanvas/source
parent58edb05341494dfaa3d3ce33505b97961d5f2ea9 (diff)
clang-tidy modernize-use-emplace in c*
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas/source')
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx25
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx115
2 files changed, 57 insertions, 83 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 7a9c2b96c3b4..7c2312954917 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -538,10 +538,9 @@ namespace cppcanvas
{
SAL_INFO("cppcanvas.emf", "EMF+\t\tadd poly action");
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPolyAction,
- rParms.mrCurrActionIndex ) );
+ rParms.mrCurrActionIndex );
rParms.mrCurrActionIndex += pPolyAction->getActionCount()-1;
}
@@ -583,7 +582,7 @@ namespace cppcanvas
std::shared_ptr<Action> pAction2(internal::PolyPolyActionFactory::createPolyPolyAction(aArrow, rParms.mrCanvas, rState));
if (pAction2)
{
- maActions.push_back(MtfAction(pAction2, rParms.mrCurrActionIndex));
+ maActions.emplace_back(pAction2, rParms.mrCurrActionIndex);
rParms.mrCurrActionIndex += pAction2->getActionCount()-1;
}
rState.isFillColorSet = bWasFillColorSet;
@@ -593,7 +592,7 @@ namespace cppcanvas
std::shared_ptr<Action> pAction(internal::PolyPolyActionFactory::createPolyPolyAction(aArrow, rParms.mrCanvas, rState, rAttributes));
if (pAction)
{
- maActions.push_back(MtfAction(pAction, rParms.mrCurrActionIndex));
+ maActions.emplace_back(pAction, rParms.mrCurrActionIndex);
rParms.mrCurrActionIndex += pAction->getActionCount()-1;
}
}
@@ -688,7 +687,7 @@ namespace cppcanvas
std::shared_ptr<Action> pPolyAction(internal::PolyPolyActionFactory::createPolyPolyAction(aFinalPolyPolygon, rParms.mrCanvas, rState, aPolygonAttributes));
if( pPolyAction )
{
- maActions.push_back(MtfAction(pPolyAction, rParms.mrCurrActionIndex));
+ maActions.emplace_back(pPolyAction, rParms.mrCurrActionIndex);
rParms.mrCurrActionIndex += pPolyAction->getActionCount()-1;
}
}
@@ -1243,8 +1242,8 @@ namespace cppcanvas
rState));
if( pBmpAction ) {
- maActions.push_back( MtfAction( pBmpAction,
- rFactoryParms.mrCurrActionIndex ) );
+ maActions.emplace_back( pBmpAction,
+ rFactoryParms.mrCurrActionIndex );
rFactoryParms.mrCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -1316,10 +1315,9 @@ namespace cppcanvas
{
SAL_INFO("cppcanvas.emf", "EMF+\t\tadd text action");
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pTextAction,
- rFactoryParms.mrCurrActionIndex ) );
+ rFactoryParms.mrCurrActionIndex );
rFactoryParms.mrCurrActionIndex += pTextAction->getActionCount()-1;
}
@@ -1632,10 +1630,9 @@ namespace cppcanvas
{
SAL_INFO("cppcanvas.emf", "EMF+\t\tadd text action");
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pTextAction,
- rFactoryParms.mrCurrActionIndex ) );
+ rFactoryParms.mrCurrActionIndex );
rFactoryParms.mrCurrActionIndex += pTextAction->getActionCount()-1;
}
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0df7f6a9032e..418bd5e2478d 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -397,10 +397,9 @@ namespace cppcanvas
if( pPolyAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPolyAction,
- rParms.mrCurrActionIndex ) );
+ rParms.mrCurrActionIndex );
rParms.mrCurrActionIndex += pPolyAction->getActionCount()-1;
}
@@ -703,10 +702,9 @@ namespace cppcanvas
if( pPolyAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPolyAction,
- rParms.mrCurrActionIndex ) );
+ rParms.mrCurrActionIndex );
rParms.mrCurrActionIndex += pPolyAction->getActionCount()-1;
}
@@ -1018,17 +1016,15 @@ namespace cppcanvas
if( pTextAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pTextAction,
- rParms.mrCurrActionIndex ) );
+ rParms.mrCurrActionIndex );
if ( pStrikeoutTextAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pStrikeoutTextAction,
- rParms.mrCurrActionIndex ) );
+ rParms.mrCurrActionIndex );
}
rParms.mrCurrActionIndex += pTextAction->getActionCount()-1;
@@ -1739,10 +1735,9 @@ namespace cppcanvas
if( pPolyAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPolyAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pPolyAction->getActionCount()-1;
}
@@ -1805,10 +1800,9 @@ namespace cppcanvas
if( pPointAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPointAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pPointAction->getActionCount()-1;
}
@@ -1831,10 +1825,9 @@ namespace cppcanvas
if( pPointAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPointAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pPointAction->getActionCount()-1;
}
@@ -1870,10 +1863,9 @@ namespace cppcanvas
if( pLineAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pLineAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pLineAction->getActionCount()-1;
}
@@ -1901,10 +1893,9 @@ namespace cppcanvas
if( pLineAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pLineAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pLineAction->getActionCount()-1;
}
@@ -2055,10 +2046,9 @@ namespace cppcanvas
if( pLineAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pLineAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pLineAction->getActionCount()-1;
}
@@ -2081,10 +2071,9 @@ namespace cppcanvas
if( pLineAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pLineAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pLineAction->getActionCount()-1;
}
@@ -2127,10 +2116,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2153,10 +2141,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2186,10 +2173,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2210,10 +2196,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2236,10 +2221,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2269,10 +2253,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2299,10 +2282,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2331,10 +2313,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2369,10 +2350,9 @@ namespace cppcanvas
if( pBmpAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pBmpAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pBmpAction->getActionCount()-1;
}
@@ -2407,10 +2387,9 @@ namespace cppcanvas
if( pPolyAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPolyAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pPolyAction->getActionCount()-1;
}
@@ -2444,10 +2423,9 @@ namespace cppcanvas
if( pFloatTransAction )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pFloatTransAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pFloatTransAction->getActionCount()-1;
}
@@ -2522,10 +2500,9 @@ namespace cppcanvas
if( pPolyAction.get() )
{
- maActions.push_back(
- MtfAction(
+ maActions.emplace_back(
pPolyAction,
- io_rCurrActionIndex ) );
+ io_rCurrActionIndex );
io_rCurrActionIndex += pPolyAction->getActionCount()-1;
}