summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-01-17 18:35:37 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-21 07:36:04 +0100
commit979aed6b38f4963ea37c39de090d4487a12ba2ba (patch)
treea5cf6cfe464f00f8654140a514e0f418210b6f69 /drawinglayer
parent3b16e997f69efe2e3f6cdf64fe8fb2727b6ebaa7 (diff)
o3tl::make_unique -> std::make_unique in dbaccess...framework
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e Reviewed-on: https://gerrit.libreoffice.org/66545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/animation/animationtiming.cxx9
-rw-r--r--drawinglayer/source/processor2d/processor2dtools.cxx5
-rw-r--r--drawinglayer/source/processor2d/processorfromoutputdevice.cxx5
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx23
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx49
5 files changed, 43 insertions, 48 deletions
diff --git a/drawinglayer/source/animation/animationtiming.cxx b/drawinglayer/source/animation/animationtiming.cxx
index f3ffa88b35c8..0ab3d98b1ba2 100644
--- a/drawinglayer/source/animation/animationtiming.cxx
+++ b/drawinglayer/source/animation/animationtiming.cxx
@@ -21,7 +21,6 @@
#include <drawinglayer/animation/animationtiming.hxx>
#include <basegfx/numeric/ftools.hxx>
-#include <o3tl/make_unique.hxx>
namespace drawinglayer
{
@@ -50,7 +49,7 @@ namespace drawinglayer
std::unique_ptr<AnimationEntry> AnimationEntryFixed::clone() const
{
- return o3tl::make_unique<AnimationEntryFixed>(mfDuration, mfState);
+ return std::make_unique<AnimationEntryFixed>(mfDuration, mfState);
}
bool AnimationEntryFixed::operator==(const AnimationEntry& rCandidate) const
@@ -99,7 +98,7 @@ namespace drawinglayer
std::unique_ptr<AnimationEntry> AnimationEntryLinear::clone() const
{
- return o3tl::make_unique<AnimationEntryLinear>(mfDuration, mfFrequency, mfStart, mfStop);
+ return std::make_unique<AnimationEntryLinear>(mfDuration, mfFrequency, mfStart, mfStop);
}
bool AnimationEntryLinear::operator==(const AnimationEntry& rCandidate) const
@@ -184,7 +183,7 @@ namespace drawinglayer
std::unique_ptr<AnimationEntry> AnimationEntryList::clone() const
{
- std::unique_ptr<AnimationEntryList> pNew(o3tl::make_unique<AnimationEntryList>());
+ std::unique_ptr<AnimationEntryList> pNew(std::make_unique<AnimationEntryList>());
for(const auto &i : maEntries)
{
@@ -277,7 +276,7 @@ namespace drawinglayer
std::unique_ptr<AnimationEntry> AnimationEntryLoop::clone() const
{
- std::unique_ptr<AnimationEntryLoop> pNew(o3tl::make_unique<AnimationEntryLoop>(mnRepeat));
+ std::unique_ptr<AnimationEntryLoop> pNew(std::make_unique<AnimationEntryLoop>(mnRepeat));
for(const auto &i : maEntries)
{
diff --git a/drawinglayer/source/processor2d/processor2dtools.cxx b/drawinglayer/source/processor2d/processor2dtools.cxx
index 1149e5271b9e..aa672cde80d0 100644
--- a/drawinglayer/source/processor2d/processor2dtools.cxx
+++ b/drawinglayer/source/processor2d/processor2dtools.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <drawinglayer/processor2d/processor2dtools.hxx>
-#include <o3tl/make_unique.hxx>
#include <vcl/gdimtf.hxx>
#include "vclpixelprocessor2d.hxx"
#include "vclmetafileprocessor2d.hxx"
@@ -35,7 +34,7 @@ namespace drawinglayer
const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
{
// create Pixel Vcl-Processor
- return o3tl::make_unique<VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
}
std::unique_ptr<BaseProcessor2D> createProcessor2DFromOutputDevice(
@@ -48,7 +47,7 @@ namespace drawinglayer
if(bOutputToRecordingMetaFile)
{
// create MetaFile Vcl-Processor and process
- return o3tl::make_unique<VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
}
else
{
diff --git a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
index ce81ce4b8f88..2f33b1bf0dec 100644
--- a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
+++ b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
@@ -26,7 +26,6 @@
#include "vclmetafileprocessor2d.hxx"
#include "vclpixelprocessor2d.hxx"
#include <vcl/window.hxx>
-#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
@@ -44,12 +43,12 @@ namespace drawinglayer
if(bOutputToRecordingMetaFile)
{
// create MetaFile Vcl-Processor and process
- return o3tl::make_unique<drawinglayer::processor2d::VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<drawinglayer::processor2d::VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
}
else
{
// create Pixel Vcl-Processor
- return o3tl::make_unique<drawinglayer::processor2d::VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<drawinglayer::processor2d::VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
}
}
} // end of namespace processor2d
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index ee4ba1f6f9b9..518920afaed2 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -42,7 +42,6 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <sal/log.hxx>
-#include <o3tl/make_unique.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -458,7 +457,7 @@ namespace emfplushelper
if (pen->GetColor().GetTransparency() == 0)
{
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D>(
polygon,
lineAttribute,
aStrokeAttribute));
@@ -472,7 +471,7 @@ namespace emfplushelper
aStrokeAttribute));
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
drawinglayer::primitive2d::Primitive2DContainer { aPrimitive },
pen->GetColor().GetTransparency() / 255.0));
}
@@ -501,7 +500,7 @@ namespace emfplushelper
{
// not transparent
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
polygon,
color.getBColor()));
}
@@ -513,7 +512,7 @@ namespace emfplushelper
color.getBColor()));
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
drawinglayer::primitive2d::Primitive2DContainer { aPrimitive },
color.GetTransparency() / 255.0));
}
@@ -574,7 +573,7 @@ namespace emfplushelper
// temporal solution: create a solid colored polygon
// TODO create a 'real' hatching primitive
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
polygon,
fillColor.getBColor()));
}
@@ -683,7 +682,7 @@ namespace emfplushelper
// create the same one used for SVG
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::SvgLinearGradientPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::SvgLinearGradientPrimitive2D>(
aTextureTransformation,
polygon,
aVector,
@@ -699,7 +698,7 @@ namespace emfplushelper
// create the same one used for SVG
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::SvgRadialGradientPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::SvgRadialGradientPrimitive2D>(
aTextureTransformation,
polygon,
aVector,
@@ -1261,7 +1260,7 @@ namespace emfplushelper
if (aSize.Width() > 0 && aSize.Height() > 0)
{
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(aBmp, aTransformMatrix));
+ std::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(aBmp, aTransformMatrix));
}
else
{
@@ -1274,7 +1273,7 @@ namespace emfplushelper
GDIMetaFile aGDI(image.graphic.GetGDIMetaFile());
aGDI.Clip(aSource);
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::MetafilePrimitive2D>(aTransformMatrix, aGDI));
+ std::make_unique<drawinglayer::primitive2d::MetafilePrimitive2D>(aTransformMatrix, aGDI));
}
}
else
@@ -1409,7 +1408,7 @@ namespace emfplushelper
}
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
maMapTransform,
drawinglayer::primitive2d::Primitive2DContainer { aPrimitiveText } ));
}
@@ -1845,7 +1844,7 @@ namespace emfplushelper
color.GetTransparency() / 255.0);
}
mrTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
maMapTransform,
drawinglayer::primitive2d::Primitive2DContainer { aPrimitiveText } ));
}
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 2fd174b9d595..6cecb1bba031 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -43,7 +43,6 @@
#include <drawinglayer/primitive2d/textlineprimitive2d.hxx>
#include <drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx>
#include <drawinglayer/primitive2d/epsprimitive2d.hxx>
-#include <o3tl/make_unique.hxx>
#include <sal/log.hxx>
#include <tools/fract.hxx>
#include <tools/stream.hxx>
@@ -449,7 +448,7 @@ namespace wmfemfhelper
if(rProperties.getTransformation().isIdentity())
{
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::PointArrayPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PointArrayPrimitive2D>(
rPositions,
rBColor));
}
@@ -463,7 +462,7 @@ namespace wmfemfhelper
}
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::PointArrayPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PointArrayPrimitive2D>(
aPositions,
rBColor));
}
@@ -481,7 +480,7 @@ namespace wmfemfhelper
basegfx::B2DPolygon aLinePolygon(rLinePolygon);
aLinePolygon.transform(rProperties.getTransformation());
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::PolygonHairlinePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolygonHairlinePrimitive2D>(
aLinePolygon,
rProperties.getLineColor()));
}
@@ -498,7 +497,7 @@ namespace wmfemfhelper
basegfx::B2DPolyPolygon aFillPolyPolygon(rFillPolyPolygon);
aFillPolyPolygon.transform(rProperties.getTransformation());
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
aFillPolyPolygon,
rProperties.getFillColor()));
}
@@ -551,7 +550,7 @@ namespace wmfemfhelper
fAccumulated);
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::PolygonStrokePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolygonStrokePrimitive2D>(
aLinePolygon,
aLineAttribute,
aStrokeAttribute));
@@ -559,7 +558,7 @@ namespace wmfemfhelper
else
{
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::PolygonStrokePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolygonStrokePrimitive2D>(
aLinePolygon,
aLineAttribute));
}
@@ -626,7 +625,7 @@ namespace wmfemfhelper
aPoint = rProperties.getTransformation() * aPoint;
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::DiscreteBitmapPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::DiscreteBitmapPrimitive2D>(
rBitmapEx,
aPoint));
}
@@ -652,7 +651,7 @@ namespace wmfemfhelper
aObjectTransform = rProperties.getTransformation() * aObjectTransform;
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::BitmapPrimitive2D>(
rBitmapEx,
aObjectTransform));
}
@@ -849,7 +848,7 @@ namespace wmfemfhelper
if(!aSubContent.empty())
{
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::GroupPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::GroupPrimitive2D>(
aSubContent));
}
}
@@ -896,7 +895,7 @@ namespace wmfemfhelper
{
// force content to black
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::ModifiedColorPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::ModifiedColorPrimitive2D>(
aSubContent,
basegfx::BColorModifierSharedPtr(
new basegfx::BColorModifier_replace(
@@ -906,7 +905,7 @@ namespace wmfemfhelper
{
// invert content
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::InvertPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::InvertPrimitive2D>(
aSubContent));
}
}
@@ -934,7 +933,7 @@ namespace wmfemfhelper
basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(rRange));
aOutline.transform(rPropertyHolder.getTransformation());
- return o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
+ return std::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
basegfx::B2DPolyPolygon(aOutline),
rColor);
}
@@ -1039,7 +1038,7 @@ namespace wmfemfhelper
const drawinglayer::primitive2d::Primitive2DReference xPrim(pBitmapWallpaperFill);
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
rProperty.getTransformation(),
drawinglayer::primitive2d::Primitive2DContainer { xPrim }));
}
@@ -1295,7 +1294,7 @@ namespace wmfemfhelper
const drawinglayer::primitive2d::Primitive2DReference aReference(pResult);
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
rProperty.getTransformation(),
drawinglayer::primitive2d::Primitive2DContainer { aReference }));
}
@@ -1423,7 +1422,7 @@ namespace wmfemfhelper
}
rTarget.append(
- o3tl::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
rProperty.getTransformation(),
xTargets));
}
@@ -1976,7 +1975,7 @@ namespace wmfemfhelper
{
// add with transformation
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransformPrimitive2D>(
rPropertyHolders.Current().getTransformation(),
xSubContent));
}
@@ -2164,7 +2163,7 @@ namespace wmfemfhelper
// when a MetaGradientAction is executed
aOutline.transform(rPropertyHolders.Current().getTransformation());
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::MaskPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::MaskPrimitive2D>(
aOutline,
xGradient));
}
@@ -2194,7 +2193,7 @@ namespace wmfemfhelper
aAttribute));
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::MaskPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::MaskPrimitive2D>(
aOutline,
drawinglayer::primitive2d::Primitive2DContainer { aFillHatch }));
}
@@ -2708,7 +2707,7 @@ namespace wmfemfhelper
if(!aSubContent.empty())
{
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
aSubContent,
nTransparence * 0.01));
}
@@ -2742,7 +2741,7 @@ namespace wmfemfhelper
// embed using EpsPrimitive
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::EpsPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::EpsPrimitive2D>(
aObjectTransform,
pA->GetLink(),
pA->GetSubstitute()));
@@ -2862,7 +2861,7 @@ namespace wmfemfhelper
{
// not really a gradient; create UnifiedTransparencePrimitive2D
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>(
xSubContent,
aAttribute.getStartColor().luminance()));
}
@@ -2880,7 +2879,7 @@ namespace wmfemfhelper
// create transparence primitive
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::TransparencePrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::TransparencePrimitive2D>(
xSubContent,
drawinglayer::primitive2d::Primitive2DContainer { xTransparence }));
}
@@ -2982,7 +2981,7 @@ namespace wmfemfhelper
{
// not really a gradient
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>(
aPolyPolygon,
aAttribute.getStartColor()));
}
@@ -2990,7 +2989,7 @@ namespace wmfemfhelper
{
// really a gradient
rTargetHolders.Current().append(
- o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D>(
+ std::make_unique<drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D>(
aPolyPolygon,
aAttribute));
}