summaryrefslogtreecommitdiff
path: root/vcl/source/image
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-01-23 21:55:40 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-01-24 11:36:48 +0100
commit578a4dedaa1f296f78ca5408abf2d889830ae149 (patch)
tree13b31936cea121e6560d5f6f99b337de436ef120 /vcl/source/image
parent38aa12075432cc6b4e6de60de84c04c1f480768d (diff)
Cleanup and simplify Image.{cxx,hxx}
no functional change Change-Id: I8d7171913d14ccb81b88c82362cfa997f9b9964a Reviewed-on: https://gerrit.libreoffice.org/66823 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/image')
-rw-r--r--vcl/source/image/Image.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index e22f5f814304..af0b0eae0176 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -38,6 +38,8 @@
#include <rtl/strbuf.hxx>
#endif
+using namespace css;
+
Image::Image()
{
}
@@ -47,7 +49,7 @@ Image::Image(const BitmapEx& rBitmapEx)
ImplInit(rBitmapEx);
}
-Image::Image(const css::uno::Reference< css::graphic::XGraphic >& rxGraphic)
+Image::Image(uno::Reference<graphic::XGraphic> const & rxGraphic)
{
const Graphic aGraphic(rxGraphic);
ImplInit(aGraphic.GetBitmapEx());
@@ -58,7 +60,7 @@ Image::Image(const OUString & rFileUrl)
sal_Int32 nIndex = 0;
if (rFileUrl.getToken( 0, '/', nIndex ) == "private:graphicrepository")
{
- mpImplData.reset(new ImplImage(rFileUrl.copy(nIndex)));
+ mpImplData = std::make_shared<ImplImage>(rFileUrl.copy(nIndex));
}
else
{
@@ -71,14 +73,14 @@ Image::Image(const OUString & rFileUrl)
}
Image::Image(StockImage, const OUString & rFileUrl)
- : mpImplData(new ImplImage(rFileUrl))
+ : mpImplData(std::make_shared<ImplImage>(rFileUrl))
{
}
void Image::ImplInit(const BitmapEx& rBitmapEx)
{
if (!rBitmapEx.IsEmpty())
- mpImplData.reset(new ImplImage(rBitmapEx));
+ mpImplData = std::make_shared<ImplImage>(rBitmapEx);
}
Size Image::GetSizePixel() const