summaryrefslogtreecommitdiff
path: root/include/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-04 15:53:01 +0200
committerNoel Grandin <noel@peralex.com>2015-03-19 10:45:01 +0200
commitd07bf4aad4d2edda19d9806afd6d694b873aff41 (patch)
tree17171c19eff72cd3234f02875db2d6e641cf9ff1 /include/canvas
parent900e49cd27f23d2f991f902e81f471eb49232076 (diff)
loplugin:constantfunction: canvas
Change-Id: I2fb2c4ec0e9467d7ced05b0e815e0d5bd2ba74c3
Diffstat (limited to 'include/canvas')
-rw-r--r--include/canvas/base/bitmapcanvasbase.hxx14
-rw-r--r--include/canvas/base/bufferedgraphicdevicebase.hxx7
-rw-r--r--include/canvas/base/canvasbase.hxx18
-rw-r--r--include/canvas/base/graphicdevicebase.hxx24
-rw-r--r--include/canvas/base/integerbitmapbase.hxx10
-rw-r--r--include/canvas/propertysethelper.hxx4
6 files changed, 11 insertions, 66 deletions
diff --git a/include/canvas/base/bitmapcanvasbase.hxx b/include/canvas/base/bitmapcanvasbase.hxx
index b7a788796ed3..78859d398fd5 100644
--- a/include/canvas/base/bitmapcanvasbase.hxx
+++ b/include/canvas/base/bitmapcanvasbase.hxx
@@ -77,9 +77,7 @@ namespace canvas
virtual sal_Bool SAL_CALL hasAlpha( ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
{
- typename BaseType::MutexType aGuard( BaseType::m_aMutex );
-
- return BaseType::maCanvasHelper.hasAlpha();
+ return sal_True;
}
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > SAL_CALL getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
@@ -120,16 +118,6 @@ namespace canvas
typename BaseType::BaseType::MutexType aGuard( BaseType::m_aMutex );
BaseType::BaseType::mbSurfaceDirty = true;
- BaseType::BaseType::maCanvasHelper.modifying();
-
- BaseType::BaseType::maCanvasHelper.copyRect( this,
- sourceCanvas,
- sourceRect,
- sourceViewState,
- sourceRenderState,
- destRect,
- destViewState,
- destRenderState );
}
};
}
diff --git a/include/canvas/base/bufferedgraphicdevicebase.hxx b/include/canvas/base/bufferedgraphicdevicebase.hxx
index 108bef64063e..102f0482f434 100644
--- a/include/canvas/base/bufferedgraphicdevicebase.hxx
+++ b/include/canvas/base/bufferedgraphicdevicebase.hxx
@@ -105,16 +105,11 @@ namespace canvas
{
tools::verifyRange( nBuffers, (sal_Int32)1 );
- MutexType aGuard( BaseType::m_aMutex );
-
- return BaseType::maDeviceHelper.createBuffers( nBuffers );
+ return 1;
}
virtual void SAL_CALL destroyBuffers( ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
{
- MutexType aGuard( BaseType::m_aMutex );
-
- BaseType::maDeviceHelper.destroyBuffers();
}
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll )
diff --git a/include/canvas/base/canvasbase.hxx b/include/canvas/base/canvasbase.hxx
index 420517a168e7..4d710a537dde 100644
--- a/include/canvas/base/canvasbase.hxx
+++ b/include/canvas/base/canvasbase.hxx
@@ -127,7 +127,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
maCanvasHelper.clear();
}
@@ -146,9 +145,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
-
- maCanvasHelper.drawPoint( this, aPoint, viewState, renderState );
}
virtual void SAL_CALL drawLine(const css::geometry::RealPoint2D& aStartPoint,
@@ -166,7 +162,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
maCanvasHelper.drawLine( this, aStartPoint, aEndPoint, viewState, renderState );
}
@@ -186,7 +181,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
maCanvasHelper.drawBezier( this, aBezierSegment, aEndPoint, viewState, renderState );
}
@@ -206,7 +200,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.drawPolyPolygon( this, xPolyPolygon, viewState, renderState );
}
@@ -227,7 +220,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.strokePolyPolygon( this, xPolyPolygon, viewState, renderState, strokeAttributes );
}
@@ -247,7 +239,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.strokeTexturedPolyPolygon( this, xPolyPolygon, viewState, renderState, textures, strokeAttributes );
}
@@ -268,7 +259,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.strokeTextureMappedPolyPolygon( this, xPolyPolygon, viewState, renderState, textures, xMapping, strokeAttributes );
}
@@ -287,7 +277,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.queryStrokeShapes( this, xPolyPolygon, viewState, renderState, strokeAttributes );
}
@@ -307,7 +296,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.fillPolyPolygon( this, xPolyPolygon, viewState, renderState );
}
@@ -328,7 +316,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.fillTexturedPolyPolygon( this, xPolyPolygon, viewState, renderState, textures );
}
@@ -347,7 +334,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.fillTextureMappedPolyPolygon( this, xPolyPolygon, viewState, renderState, textures, xMapping );
}
@@ -407,7 +393,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.drawText( this, text, xFont, viewState, renderState, textDirection );
}
@@ -428,7 +413,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.drawTextLayout( this, laidOutText, viewState, renderState );
}
@@ -446,7 +430,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.drawBitmap( this, xBitmap, viewState, renderState );
}
@@ -463,7 +446,6 @@ namespace canvas
MutexType aGuard( BaseType::m_aMutex );
mbSurfaceDirty = true;
- maCanvasHelper.modifying();
return maCanvasHelper.drawBitmapModulated( this, xBitmap, viewState, renderState );
}
diff --git a/include/canvas/base/graphicdevicebase.hxx b/include/canvas/base/graphicdevicebase.hxx
index a28fc068eefc..e7c75c80c552 100644
--- a/include/canvas/base/graphicdevicebase.hxx
+++ b/include/canvas/base/graphicdevicebase.hxx
@@ -246,16 +246,12 @@ namespace canvas
virtual sal_Bool SAL_CALL hasFullScreenMode( ) throw (css::uno::RuntimeException) SAL_OVERRIDE
{
- MutexType aGuard( BaseType::m_aMutex );
-
- return maDeviceHelper.hasFullScreenMode();
+ return sal_False;
}
- virtual sal_Bool SAL_CALL enterFullScreenMode( sal_Bool bEnter ) throw (css::uno::RuntimeException) SAL_OVERRIDE
+ virtual sal_Bool SAL_CALL enterFullScreenMode( sal_Bool ) throw (css::uno::RuntimeException) SAL_OVERRIDE
{
- MutexType aGuard( BaseType::m_aMutex );
-
- return maDeviceHelper.enterFullScreenMode( bEnter );
+ return false;
}
// XMultiServiceFactory
@@ -329,14 +325,11 @@ namespace canvas
xListener );
}
- virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
- const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw (css::beans::UnknownPropertyException,
+ virtual void SAL_CALL removePropertyChangeListener( const OUString& ,
+ const css::uno::Reference< css::beans::XPropertyChangeListener >& ) throw (css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
css::uno::RuntimeException) SAL_OVERRIDE
{
- MutexType aGuard( BaseType::m_aMutex );
- maPropHelper.removePropertyChangeListener( aPropertyName,
- xListener );
}
virtual void SAL_CALL addVetoableChangeListener( const OUString& aPropertyName,
@@ -349,14 +342,11 @@ namespace canvas
xListener );
}
- virtual void SAL_CALL removeVetoableChangeListener( const OUString& aPropertyName,
- const css::uno::Reference< css::beans::XVetoableChangeListener >& xListener ) throw (css::beans::UnknownPropertyException,
+ virtual void SAL_CALL removeVetoableChangeListener( const OUString& ,
+ const css::uno::Reference< css::beans::XVetoableChangeListener >& ) throw (css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
css::uno::RuntimeException) SAL_OVERRIDE
{
- MutexType aGuard( BaseType::m_aMutex );
- maPropHelper.removeVetoableChangeListener( aPropertyName,
- xListener );
}
protected:
diff --git a/include/canvas/base/integerbitmapbase.hxx b/include/canvas/base/integerbitmapbase.hxx
index 0acd079ba647..54956b37be5f 100644
--- a/include/canvas/base/integerbitmapbase.hxx
+++ b/include/canvas/base/integerbitmapbase.hxx
@@ -55,7 +55,7 @@ namespace canvas
rect );
}
- virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
+ virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< sal_Int8 >&,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
@@ -67,12 +67,9 @@ namespace canvas
typename Base::MutexType aGuard( Base::m_aMutex );
Base::mbSurfaceDirty = true;
- Base::maCanvasHelper.modifying();
-
- Base::maCanvasHelper.setData( data, bitmapLayout, rect );
}
- virtual void SAL_CALL setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
+ virtual void SAL_CALL setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >&,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
@@ -84,9 +81,6 @@ namespace canvas
typename Base::MutexType aGuard( Base::m_aMutex );
Base::mbSurfaceDirty = true;
- Base::maCanvasHelper.modifying();
-
- Base::maCanvasHelper.setPixel( color, bitmapLayout, pos );
}
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
diff --git a/include/canvas/propertysethelper.hxx b/include/canvas/propertysethelper.hxx
index d555cfcd9208..37aea9313f4a 100644
--- a/include/canvas/propertysethelper.hxx
+++ b/include/canvas/propertysethelper.hxx
@@ -134,12 +134,8 @@ namespace canvas
::com::sun::star::uno::Any getPropertyValue( const OUString& PropertyName ) const;
void addPropertyChangeListener( const OUString& aPropertyName,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener );
- void removePropertyChangeListener( const OUString& aPropertyName,
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener );
void addVetoableChangeListener( const OUString& aPropertyName,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& xListener );
- void removeVetoableChangeListener( const OUString& aPropertyName,
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& xListener );
private:
std::unique_ptr<MapType> mpMap;