Kaydet (Commit) 1b61d041 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedmethods

Change-Id: I7c780be3e2740fd9b03c39ebe16935d61caf4f7e
Reviewed-on: https://gerrit.libreoffice.org/51257Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f95afd85
...@@ -888,16 +888,6 @@ namespace canvas ...@@ -888,16 +888,6 @@ namespace canvas
return aLayout; return aLayout;
} }
::Color stdIntSequenceToColor( const uno::Sequence<sal_Int8>& rColor )
{
#ifdef OSL_BIGENDIAN
const sal_Int8* pCols( rColor.getConstArray() );
return ::Color( pCols[3], pCols[0], pCols[1], pCols[2] );
#else
return ::Color( *reinterpret_cast< const ::sal_uInt32* >(rColor.getConstArray()) );
#endif
}
uno::Sequence<sal_Int8> colorToStdIntSequence( const ::Color& rColor ) uno::Sequence<sal_Int8> colorToStdIntSequence( const ::Color& rColor )
{ {
uno::Sequence<sal_Int8> aRet(4); uno::Sequence<sal_Int8> aRet(4);
......
...@@ -133,9 +133,6 @@ for d in definitionSet: ...@@ -133,9 +133,6 @@ for d in definitionSet:
# alone if the other one is in use. # alone if the other one is in use.
if d[1] == "begin() const" or d[1] == "begin()" or d[1] == "end()" or d[1] == "end() const": if d[1] == "begin() const" or d[1] == "begin()" or d[1] == "end()" or d[1] == "end() const":
continue continue
# There is lots of macro magic going on in SRCDIR/include/sax/fshelper.hxx that should be using C++11 varargs templates
if d[1].startswith("sax_fastparser::FastSerializerHelper::"):
continue
# used by Windows build # used by Windows build
if any(x in d[1] for x in ["DdeTopic::", "DdeData::", "DdeService::", "DdeTransaction::", "DdeConnection::", "DdeLink::", "DdeItem::", "DdeGetPutItem::"]): if any(x in d[1] for x in ["DdeTopic::", "DdeData::", "DdeService::", "DdeTransaction::", "DdeConnection::", "DdeLink::", "DdeItem::", "DdeGetPutItem::"]):
continue continue
......
...@@ -72,7 +72,6 @@ $(eval $(call gb_Library_add_exception_objects,cppcanvas,\ ...@@ -72,7 +72,6 @@ $(eval $(call gb_Library_add_exception_objects,cppcanvas,\
cppcanvas/source/wrapper/implbitmapcanvas \ cppcanvas/source/wrapper/implbitmapcanvas \
cppcanvas/source/wrapper/implcanvas \ cppcanvas/source/wrapper/implcanvas \
cppcanvas/source/wrapper/implcustomsprite \ cppcanvas/source/wrapper/implcustomsprite \
cppcanvas/source/wrapper/implfont \
cppcanvas/source/wrapper/implpolypolygon \ cppcanvas/source/wrapper/implpolypolygon \
cppcanvas/source/wrapper/implsprite \ cppcanvas/source/wrapper/implsprite \
cppcanvas/source/wrapper/implspritecanvas \ cppcanvas/source/wrapper/implspritecanvas \
......
...@@ -56,7 +56,6 @@ namespace cppcanvas ...@@ -56,7 +56,6 @@ namespace cppcanvas
// for our clients // for our clients
// =============== // ===============
const CanvasSharedPtr& getCanvas() const { return mpCanvas; } const CanvasSharedPtr& getCanvas() const { return mpCanvas; }
const css::uno::Reference< css::rendering::XGraphicDevice >& getGraphicDevice() const { return mxGraphicDevice; }
const css::rendering::RenderState& getRenderState() const; const css::rendering::RenderState& getRenderState() const;
private: private:
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <canvas/canvastools.hxx> #include <canvas/canvastools.hxx>
#include <cppcanvas/polypolygon.hxx> #include <cppcanvas/polypolygon.hxx>
#include "implfont.hxx"
#include "implcanvas.hxx" #include "implcanvas.hxx"
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "implfont.hxx"
#include <canvas/canvastools.hxx>
using namespace ::com::sun::star;
/* Definition of Font class */
namespace cppcanvas
{
namespace internal
{
ImplFont::ImplFont( const uno::Reference< rendering::XCanvas >& rCanvas,
const OUString& rFontName,
const double& rCellSize ) :
mxCanvas( rCanvas ),
mxFont( nullptr )
{
OSL_ENSURE( mxCanvas.is(), "ImplFont::ImplFont(): Invalid Canvas" );
rendering::FontRequest aFontRequest;
aFontRequest.FontDescription.FamilyName = rFontName;
aFontRequest.CellSize = rCellSize;
geometry::Matrix2D aFontMatrix;
::canvas::tools::setIdentityMatrix2D( aFontMatrix );
mxFont = mxCanvas->createFont( aFontRequest,
uno::Sequence< beans::PropertyValue >(),
aFontMatrix );
}
ImplFont::~ImplFont()
{
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLFONT_HXX
#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLFONT_HXX
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/rendering/XCanvas.hpp>
#include <cppcanvas/font.hxx>
namespace com { namespace sun { namespace star { namespace rendering
{
class XCanvasFont;
} } } }
/* Definition of Font class */
namespace cppcanvas
{
namespace internal
{
class ImplFont : public Font
{
public:
ImplFont( const css::uno::Reference< css::rendering::XCanvas >& rCanvas,
const OUString& rFontName,
const double& rCellSize );
virtual ~ImplFont() override;
private:
css::uno::Reference< css::rendering::XCanvas > mxCanvas;
css::uno::Reference< css::rendering::XCanvasFont > mxFont;
};
}
}
#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLFONT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -155,11 +155,6 @@ namespace canvas ...@@ -155,11 +155,6 @@ namespace canvas
} }
} }
const css::uno::Reference< css::awt::XWindow2 >& getWindow() const
{
return mxWindow;
}
css::uno::Any getXWindow() const css::uno::Any getXWindow() const
{ {
return css::uno::makeAny(mxWindow); return css::uno::makeAny(mxWindow);
......
...@@ -114,24 +114,9 @@ namespace canvas ...@@ -114,24 +114,9 @@ namespace canvas
*/ */
bool isContentFullyOpaque() const { return mbIsContentFullyOpaque; } bool isContentFullyOpaque() const { return mbIsContentFullyOpaque; }
/// Returns true, if transformation has changed since last transformUpdated() call
bool hasAlphaChanged() const { return mbAlphaDirty; }
/// Returns true, if transformation has changed since last transformUpdated() call
bool hasPositionChanged() const { return mbPositionDirty; }
/// Returns true, if transformation has changed since last transformUpdated() call /// Returns true, if transformation has changed since last transformUpdated() call
bool hasTransformChanged() const { return mbTransformDirty; } bool hasTransformChanged() const { return mbTransformDirty; }
/// Returns true, if transformation has changed since last transformUpdated() call
bool hasClipChanged() const { return mbClipDirty; }
/// Returns true, if transformation has changed since last transformUpdated() call
bool hasPrioChanged() const { return mbPrioDirty; }
/// Returns true, if transformation has changed since last transformUpdated() call
bool hasVisibilityChanged() const { return mbVisibilityDirty; }
/// Retrieve current alpha value /// Retrieve current alpha value
double getAlpha() const { return mfAlpha; } double getAlpha() const { return mfAlpha; }
...@@ -145,22 +130,6 @@ namespace canvas ...@@ -145,22 +130,6 @@ namespace canvas
bool isActive() const { return mbActive; } bool isActive() const { return mbActive; }
protected: protected:
/** Notifies that caller is again in sync with current alpha
const, but modifies state visible to derived
classes. beware of passing this information to the
outside!
*/
void alphaUpdated() const { mbAlphaDirty=false; }
/** Notifies that caller is again in sync with current position
const, but modifies state visible to derived
classes. beware of passing this information to the
outside!
*/
void positionUpdated() const { mbPositionDirty=false; }
/** Notifies that caller is again in sync with current transformation /** Notifies that caller is again in sync with current transformation
const, but modifies state visible to derived const, but modifies state visible to derived
...@@ -169,30 +138,6 @@ namespace canvas ...@@ -169,30 +138,6 @@ namespace canvas
*/ */
void transformUpdated() const { mbTransformDirty=false; } void transformUpdated() const { mbTransformDirty=false; }
/** Notifies that caller is again in sync with current clip
const, but modifies state visible to derived
classes. beware of passing this information to the
outside!
*/
void clipUpdated() const { mbClipDirty=false; }
/** Notifies that caller is again in sync with current priority
const, but modifies state visible to derived
classes. beware of passing this information to the
outside!
*/
void prioUpdated() const { mbPrioDirty=false; }
/** Notifies that caller is again in sync with current visibility
const, but modifies state visible to derived
classes. beware of passing this information to the
outside!
*/
void visibilityUpdated() const { mbVisibilityDirty=false; }
private: private:
CanvasCustomSpriteHelper( const CanvasCustomSpriteHelper& ) = delete; CanvasCustomSpriteHelper( const CanvasCustomSpriteHelper& ) = delete;
CanvasCustomSpriteHelper& operator=( const CanvasCustomSpriteHelper& ) = delete; CanvasCustomSpriteHelper& operator=( const CanvasCustomSpriteHelper& ) = delete;
......
...@@ -347,9 +347,6 @@ namespace canvas ...@@ -347,9 +347,6 @@ namespace canvas
CANVASTOOLS_DLLPUBLIC css::rendering::IntegerBitmapLayout getStdMemoryLayout( CANVASTOOLS_DLLPUBLIC css::rendering::IntegerBitmapLayout getStdMemoryLayout(
const css::geometry::IntegerSize2D& rBitmapSize ); const css::geometry::IntegerSize2D& rBitmapSize );
/// Convert standard 8888 RGBA color to vcl color
CANVASTOOLS_DLLPUBLIC ::Color stdIntSequenceToColor( const css::uno::Sequence<sal_Int8>& rColor );
/// Convert standard 8888 RGBA color to vcl color /// Convert standard 8888 RGBA color to vcl color
CANVASTOOLS_DLLPUBLIC css::uno::Sequence<sal_Int8> colorToStdIntSequence( const ::Color& rColor ); CANVASTOOLS_DLLPUBLIC css::uno::Sequence<sal_Int8> colorToStdIntSequence( const ::Color& rColor );
......
...@@ -144,14 +144,6 @@ namespace canvas ...@@ -144,14 +144,6 @@ namespace canvas
{ {
enum class ChangeType { none=0, move, update }; enum class ChangeType { none=0, move, update };
SpriteChangeRecord() :
meChangeType( ChangeType::none ),
mpAffectedSprite(),
maOldPos(),
maUpdateArea()
{
}
SpriteChangeRecord( const Sprite::Reference& rSprite, SpriteChangeRecord( const Sprite::Reference& rSprite,
const ::basegfx::B2DPoint& rOldPos, const ::basegfx::B2DPoint& rOldPos,
const ::basegfx::B2DPoint& rNewPos, const ::basegfx::B2DPoint& rNewPos,
......
...@@ -87,13 +87,6 @@ BitmapEx VCL_DLLPUBLIC CreateFromData( RawBitmap && data ); ...@@ -87,13 +87,6 @@ BitmapEx VCL_DLLPUBLIC CreateFromData( RawBitmap && data );
VCL_DLLPUBLIC BitmapEx* CreateFromCairoSurface(Size size, cairo_surface_t* pSurface); VCL_DLLPUBLIC BitmapEx* CreateFromCairoSurface(Size size, cairo_surface_t* pSurface);
#endif #endif
VCL_DLLPUBLIC BitmapEx CanvasBitmapHelperSetPixel( const css::uno::Sequence< sal_Int8 >& color,
const css::geometry::IntegerPoint2D& pos,
BitmapEx & rBitmapEx );
VCL_DLLPUBLIC BitmapEx CanvasBitmapHelperSetData( const css::uno::Sequence< sal_Int8 >& data,
const css::geometry::IntegerRectangle2D& rect,
BitmapEx & rBitmapEx);
VCL_DLLPUBLIC BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, VCL_DLLPUBLIC BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap,
const ::basegfx::B2DHomMatrix& rTransform, const ::basegfx::B2DHomMatrix& rTransform,
::basegfx::B2DRectangle const & rDestRect, ::basegfx::B2DRectangle const & rDestRect,
......
...@@ -402,10 +402,6 @@ public: ...@@ -402,10 +402,6 @@ public:
css::uno::Reference<css::graphic::XGraphic> loadGraphicByURL(OUString const & rURL); css::uno::Reference<css::graphic::XGraphic> loadGraphicByURL(OUString const & rURL);
css::uno::Reference<css::graphic::XGraphic> loadGraphicFromBase64(css::uno::Reference<css::io::XOutputStream> const & rxOutputStream); css::uno::Reference<css::graphic::XGraphic> loadGraphicFromBase64(css::uno::Reference<css::io::XOutputStream> const & rxOutputStream);
// Convert a local package URL into either a graphic manager or a
// internal package URL. The later one happens only if bLoadURL is true
OUString ResolveGraphicObjectURL( const OUString& rURL, bool bLoadOnDemand );
css::uno::Reference< css::io::XOutputStream > GetStreamForGraphicObjectURLFromBase64(); css::uno::Reference< css::io::XOutputStream > GetStreamForGraphicObjectURLFromBase64();
bool IsPackageURL( const OUString& rURL ) const; bool IsPackageURL( const OUString& rURL ) const;
......
...@@ -2678,7 +2678,6 @@ cppcanvas/source/wrapper/implcanvas.hxx ...@@ -2678,7 +2678,6 @@ cppcanvas/source/wrapper/implcanvas.hxx
cppcanvas/source/wrapper/implcustomsprite.cxx cppcanvas/source/wrapper/implcustomsprite.cxx
cppcanvas/source/wrapper/implcustomsprite.hxx cppcanvas/source/wrapper/implcustomsprite.hxx
cppcanvas/source/wrapper/implfont.cxx cppcanvas/source/wrapper/implfont.cxx
cppcanvas/source/wrapper/implfont.hxx
cppcanvas/source/wrapper/implpolypolygon.cxx cppcanvas/source/wrapper/implpolypolygon.cxx
cppcanvas/source/wrapper/implpolypolygon.hxx cppcanvas/source/wrapper/implpolypolygon.hxx
cppcanvas/source/wrapper/implsprite.cxx cppcanvas/source/wrapper/implsprite.cxx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment