summaryrefslogtreecommitdiff
path: root/cppcanvas/source/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'cppcanvas/source/wrapper')
-rw-r--r--cppcanvas/source/wrapper/implbitmap.cxx6
-rw-r--r--cppcanvas/source/wrapper/implbitmap.hxx12
-rw-r--r--cppcanvas/source/wrapper/implbitmapcanvas.cxx2
-rw-r--r--cppcanvas/source/wrapper/implbitmapcanvas.hxx10
-rw-r--r--cppcanvas/source/wrapper/implcanvas.cxx8
-rw-r--r--cppcanvas/source/wrapper/implcanvas.hxx13
-rw-r--r--cppcanvas/source/wrapper/implcustomsprite.cxx1
-rw-r--r--cppcanvas/source/wrapper/implcustomsprite.hxx10
-rw-r--r--cppcanvas/source/wrapper/implpolypolygon.cxx7
-rw-r--r--cppcanvas/source/wrapper/implpolypolygon.hxx14
-rw-r--r--cppcanvas/source/wrapper/implsprite.cxx11
-rw-r--r--cppcanvas/source/wrapper/implsprite.hxx16
-rw-r--r--cppcanvas/source/wrapper/implspritecanvas.hxx10
-rw-r--r--cppcanvas/source/wrapper/vclfactory.cxx2
14 files changed, 37 insertions, 85 deletions
diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx
index 9b7883f053a3..4b46ecb657b3 100644
--- a/cppcanvas/source/wrapper/implbitmap.cxx
+++ b/cppcanvas/source/wrapper/implbitmap.cxx
@@ -32,8 +32,7 @@ namespace cppcanvas::internal
ImplBitmap::ImplBitmap( const CanvasSharedPtr& rParentCanvas,
const uno::Reference< rendering::XBitmap >& rBitmap ) :
CanvasGraphicHelper( rParentCanvas ),
- mxBitmap( rBitmap ),
- mpBitmapCanvas()
+ mxBitmap( rBitmap )
{
OSL_ENSURE( mxBitmap.is(), "ImplBitmap::ImplBitmap: no valid bitmap" );
@@ -84,8 +83,7 @@ namespace cppcanvas::internal
}
rendering::RenderState aLocalState( getRenderState() );
- uno::Sequence<rendering::ARGBColor> aCol(1);
- aCol[0] = rendering::ARGBColor( nAlphaModulation, 1.0, 1.0, 1.0 );
+ uno::Sequence<rendering::ARGBColor> aCol { { nAlphaModulation, 1.0, 1.0, 1.0 } };
aLocalState.DeviceColor =
pCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace()->convertFromARGB(aCol);
diff --git a/cppcanvas/source/wrapper/implbitmap.hxx b/cppcanvas/source/wrapper/implbitmap.hxx
index aa8677501dab..1b6066949737 100644
--- a/cppcanvas/source/wrapper/implbitmap.hxx
+++ b/cppcanvas/source/wrapper/implbitmap.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAP_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAP_HXX
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/rendering/XBitmap.hpp>
@@ -29,11 +28,8 @@
/*Definition of ImplBitmap */
-namespace cppcanvas
+namespace cppcanvas::internal
{
-
- namespace internal
- {
// share partial CanvasGraphic implementation from CanvasGraphicHelper
class ImplBitmap : public virtual ::cppcanvas::Bitmap, protected CanvasGraphicHelper
{
@@ -60,9 +56,7 @@ namespace cppcanvas
const css::uno::Reference< css::rendering::XBitmap > mxBitmap;
BitmapCanvasSharedPtr mpBitmapCanvas;
};
- }
-}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAP_HXX
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.cxx b/cppcanvas/source/wrapper/implbitmapcanvas.cxx
index bb34f8e5aa3c..883ebb005a99 100644
--- a/cppcanvas/source/wrapper/implbitmapcanvas.cxx
+++ b/cppcanvas/source/wrapper/implbitmapcanvas.cxx
@@ -18,8 +18,6 @@
*/
-#include <com/sun/star/rendering/XCanvas.hpp>
-
#include <basegfx/utils/canvastools.hxx>
#include <osl/diagnose.h>
diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.hxx b/cppcanvas/source/wrapper/implbitmapcanvas.hxx
index afac7b9a8a65..62db8cc604da 100644
--- a/cppcanvas/source/wrapper/implbitmapcanvas.hxx
+++ b/cppcanvas/source/wrapper/implbitmapcanvas.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAPCANVAS_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAPCANVAS_HXX
+#pragma once
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XBitmap.hpp>
@@ -27,10 +26,8 @@
#include "implcanvas.hxx"
-namespace cppcanvas
+namespace cppcanvas::internal
{
- namespace internal
- {
// share Canvas implementation from ImplCanvas
class ImplBitmapCanvas : public virtual BitmapCanvas, protected virtual ImplCanvas
{
@@ -51,9 +48,6 @@ namespace cppcanvas
const css::uno::Reference< css::rendering::XBitmapCanvas > mxBitmapCanvas;
const css::uno::Reference< css::rendering::XBitmap > mxBitmap;
};
- }
}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAPCANVAS_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/implcanvas.cxx b/cppcanvas/source/wrapper/implcanvas.cxx
index 3a186404ce2e..81b5a3759fd6 100644
--- a/cppcanvas/source/wrapper/implcanvas.cxx
+++ b/cppcanvas/source/wrapper/implcanvas.cxx
@@ -21,10 +21,12 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/utils/canvastools.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/rendering/XCanvas.hpp>
#include <canvas/canvastools.hxx>
+#include <utility>
#include "implcanvas.hxx"
@@ -34,10 +36,8 @@ using namespace ::com::sun::star;
namespace cppcanvas::internal
{
- ImplCanvas::ImplCanvas( const uno::Reference< rendering::XCanvas >& xCanvas ) :
- maViewState(),
- maClipPolyPolygon(),
- mxCanvas( xCanvas )
+ ImplCanvas::ImplCanvas( uno::Reference< rendering::XCanvas > xCanvas ) :
+ mxCanvas(std::move( xCanvas ))
{
OSL_ENSURE( mxCanvas.is(), "Canvas::Canvas() invalid XCanvas" );
diff --git a/cppcanvas/source/wrapper/implcanvas.hxx b/cppcanvas/source/wrapper/implcanvas.hxx
index 2d20f4a6036c..cc49c819eeef 100644
--- a/cppcanvas/source/wrapper/implcanvas.hxx
+++ b/cppcanvas/source/wrapper/implcanvas.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLCANVAS_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLCANVAS_HXX
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/rendering/ViewState.hpp>
@@ -42,16 +41,13 @@ namespace com::sun::star::rendering
/* Definition of ImplCanvas */
-namespace cppcanvas
+namespace cppcanvas::internal
{
- namespace internal
- {
-
class ImplCanvas : public virtual Canvas
{
public:
- explicit ImplCanvas( const css::uno::Reference< css::rendering::XCanvas >& rCanvas );
+ explicit ImplCanvas( css::uno::Reference< css::rendering::XCanvas > xCanvas );
virtual ~ImplCanvas() override;
ImplCanvas(ImplCanvas const &) = default;
@@ -81,9 +77,6 @@ namespace cppcanvas
const css::uno::Reference< css::rendering::XCanvas > mxCanvas;
};
- }
}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLCANVAS_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/implcustomsprite.cxx b/cppcanvas/source/wrapper/implcustomsprite.cxx
index 71fe28a6682a..f6af05cf9e67 100644
--- a/cppcanvas/source/wrapper/implcustomsprite.cxx
+++ b/cppcanvas/source/wrapper/implcustomsprite.cxx
@@ -33,7 +33,6 @@ namespace cppcanvas::internal
ImplSprite( rParentCanvas,
rSprite,
rTransformArbiter ),
- mpLastCanvas(),
mxCustomSprite( rSprite )
{
OSL_ENSURE( rParentCanvas.is(), "ImplCustomSprite::ImplCustomSprite(): Invalid canvas" );
diff --git a/cppcanvas/source/wrapper/implcustomsprite.hxx b/cppcanvas/source/wrapper/implcustomsprite.hxx
index 0235e0a43803..7c698ac5b72c 100644
--- a/cppcanvas/source/wrapper/implcustomsprite.hxx
+++ b/cppcanvas/source/wrapper/implcustomsprite.hxx
@@ -17,18 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLCUSTOMSPRITE_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLCUSTOMSPRITE_HXX
+#pragma once
#include <cppcanvas/canvas.hxx>
#include <cppcanvas/customsprite.hxx>
#include "implsprite.hxx"
#include "implspritecanvas.hxx"
-namespace cppcanvas
+namespace cppcanvas::internal
{
- namespace internal
- {
// share Sprite implementation of ImplSprite
class ImplCustomSprite : public virtual CustomSprite, protected virtual ImplSprite
{
@@ -49,9 +46,6 @@ namespace cppcanvas
mutable CanvasSharedPtr mpLastCanvas;
const css::uno::Reference< css::rendering::XCustomSprite > mxCustomSprite;
};
- }
}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLCUSTOMSPRITE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/implpolypolygon.cxx b/cppcanvas/source/wrapper/implpolypolygon.cxx
index 308d3dace114..536bfa60a53b 100644
--- a/cppcanvas/source/wrapper/implpolypolygon.cxx
+++ b/cppcanvas/source/wrapper/implpolypolygon.cxx
@@ -27,6 +27,7 @@
#include "implpolypolygon.hxx"
#include <tools.hxx>
+#include <utility>
using namespace ::com::sun::star;
@@ -35,9 +36,9 @@ using namespace ::com::sun::star;
namespace cppcanvas::internal
{
ImplPolyPolygon::ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas,
- const uno::Reference< rendering::XPolyPolygon2D >& rPolyPoly ) :
+ uno::Reference< rendering::XPolyPolygon2D > xPolyPoly ) :
CanvasGraphicHelper( rParentCanvas ),
- mxPolyPoly( rPolyPoly ),
+ mxPolyPoly(std::move( xPolyPoly )),
maStrokeAttributes(1.0,
10.0,
uno::Sequence< double >(),
@@ -45,8 +46,6 @@ namespace cppcanvas::internal
rendering::PathCapType::ROUND,
rendering::PathCapType::ROUND,
rendering::PathJoinType::ROUND ),
- maFillColor(),
- maStrokeColor(),
mbFillColorSet( false ),
mbStrokeColorSet( false )
{
diff --git a/cppcanvas/source/wrapper/implpolypolygon.hxx b/cppcanvas/source/wrapper/implpolypolygon.hxx
index ab924373ff9d..a756b4400795 100644
--- a/cppcanvas/source/wrapper/implpolypolygon.hxx
+++ b/cppcanvas/source/wrapper/implpolypolygon.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLPOLYPOLYGON_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLPOLYPOLYGON_HXX
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
@@ -33,17 +32,15 @@ namespace com::sun::star::rendering
}
-namespace cppcanvas
+namespace cppcanvas::internal
{
- namespace internal
- {
class ImplPolyPolygon : public virtual ::cppcanvas::PolyPolygon, protected CanvasGraphicHelper
{
public:
ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas,
- const css::uno::Reference<
- css::rendering::XPolyPolygon2D >& rPolyPoly );
+ css::uno::Reference<
+ css::rendering::XPolyPolygon2D > xPolyPoly );
virtual ~ImplPolyPolygon() override;
@@ -73,9 +70,6 @@ namespace cppcanvas
bool mbStrokeColorSet;
};
- }
}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLPOLYPOLYGON_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/implsprite.cxx b/cppcanvas/source/wrapper/implsprite.cxx
index f7cd4eb77c97..d0b2d617944e 100644
--- a/cppcanvas/source/wrapper/implsprite.cxx
+++ b/cppcanvas/source/wrapper/implsprite.cxx
@@ -21,6 +21,8 @@
#include <basegfx/utils/canvastools.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <canvas/canvastools.hxx>
+#include <osl/diagnose.h>
+#include <utility>
#include "implsprite.hxx"
@@ -31,11 +33,10 @@ namespace cppcanvas::internal
{
ImplSprite::ImplSprite( const uno::Reference< rendering::XSpriteCanvas >& rParentCanvas,
- const uno::Reference< rendering::XSprite >& rSprite,
- const ImplSpriteCanvas::TransformationArbiterSharedPtr& rTransformArbiter ) :
- mxGraphicDevice(),
- mxSprite( rSprite ),
- mpTransformArbiter( rTransformArbiter )
+ uno::Reference< rendering::XSprite > rSprite,
+ ImplSpriteCanvas::TransformationArbiterSharedPtr xTransformArbiter ) :
+ mxSprite(std::move( rSprite )),
+ mpTransformArbiter(std::move( xTransformArbiter ))
{
// Avoiding ternary operator in initializer list (Solaris
// compiler bug, when function call and temporary is
diff --git a/cppcanvas/source/wrapper/implsprite.hxx b/cppcanvas/source/wrapper/implsprite.hxx
index aad786d4ccc8..d40fb0574a96 100644
--- a/cppcanvas/source/wrapper/implsprite.hxx
+++ b/cppcanvas/source/wrapper/implsprite.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLSPRITE_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLSPRITE_HXX
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
@@ -26,18 +25,16 @@
#include <cppcanvas/sprite.hxx>
#include "implspritecanvas.hxx"
-namespace cppcanvas
+namespace cppcanvas::internal
{
- namespace internal
- {
class ImplSprite : public virtual Sprite
{
public:
ImplSprite( const css::uno::Reference<
css::rendering::XSpriteCanvas >& rParentCanvas,
- const css::uno::Reference<
- css::rendering::XSprite >& rSprite,
- const ImplSpriteCanvas::TransformationArbiterSharedPtr& rTransformArbiter );
+ css::uno::Reference<
+ css::rendering::XSprite > xSprite,
+ ImplSpriteCanvas::TransformationArbiterSharedPtr xTransformArbiter );
virtual ~ImplSprite() override;
virtual void setAlpha( const double& rAlpha ) override;
@@ -61,9 +58,6 @@ namespace cppcanvas
const css::uno::Reference< css::rendering::XSprite > mxSprite;
ImplSpriteCanvas::TransformationArbiterSharedPtr mpTransformArbiter;
};
- }
}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLSPRITE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/implspritecanvas.hxx b/cppcanvas/source/wrapper/implspritecanvas.hxx
index 036022f48135..efad546624e4 100644
--- a/cppcanvas/source/wrapper/implspritecanvas.hxx
+++ b/cppcanvas/source/wrapper/implspritecanvas.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLSPRITECANVAS_HXX
-#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLSPRITECANVAS_HXX
+#pragma once
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <basegfx/vector/b2dsize.hxx>
@@ -26,10 +25,8 @@
#include <cppcanvas/spritecanvas.hxx>
#include "implcanvas.hxx"
-namespace cppcanvas
+namespace cppcanvas::internal
{
- namespace internal
- {
class ImplSpriteCanvas : public virtual SpriteCanvas, protected virtual ImplCanvas
{
public:
@@ -78,9 +75,6 @@ namespace cppcanvas
const css::uno::Reference< css::rendering::XSpriteCanvas > mxSpriteCanvas;
TransformationArbiterSharedPtr mpTransformArbiter;
};
- }
}
-#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLSPRITECANVAS_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index a750b2e88066..825368859d1e 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -45,7 +45,7 @@ namespace cppcanvas
SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow )
{
return std::make_shared<internal::ImplSpriteCanvas>(
- rVCLWindow.GetSpriteCanvas() );
+ rVCLWindow.GetOutDev()->GetSpriteCanvas() );
}
SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas )