loplugin:unusedmethods

Change-Id: Id3b5cd75d4357336ed592ef11a3f34d209f8e95f
Reviewed-on: https://gerrit.libreoffice.org/19636
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2015-10-29 12:40:04 +02:00 committed by Noel Grandin
parent efbde08e2a
commit c7e8f21a53
33 changed files with 1 additions and 342 deletions

View File

@ -62,45 +62,6 @@
using namespace ::com::sun::star;
namespace com { namespace sun { namespace star { namespace rendering
{
bool operator==( const RenderState& renderState1,
const RenderState& renderState2 )
{
if( renderState1.Clip != renderState2.Clip )
return false;
if( renderState1.DeviceColor != renderState2.DeviceColor )
return false;
if( renderState1.CompositeOperation != renderState2.CompositeOperation )
return false;
::basegfx::B2DHomMatrix mat1, mat2;
::canvas::tools::getRenderStateTransform( mat1, renderState1 );
::canvas::tools::getRenderStateTransform( mat2, renderState2 );
if( mat1 != mat2 )
return false;
return true;
}
bool operator==( const ViewState& viewState1,
const ViewState& viewState2 )
{
if( viewState1.Clip != viewState2.Clip )
return false;
::basegfx::B2DHomMatrix mat1, mat2;
::canvas::tools::getViewStateTransform( mat1, viewState1 );
::canvas::tools::getViewStateTransform( mat2, viewState2 );
if( mat1 != mat2 )
return false;
return true;
}
}}}}
namespace canvas
{
namespace tools

View File

@ -45,8 +45,6 @@ public:
void remove(Path const & path);
void clear() { root_.children.clear(); }
bool empty() const { return root_.children.empty(); }
Node const & getRoot() const { return root_;}

View File

@ -29,8 +29,6 @@ namespace connectivity
{
typedef connectivity::sdbcx::OTable OEvoabTable_TYPEDEF;
OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
class OEvoabTable : public OEvoabTable_TYPEDEF
{
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;

View File

@ -29,8 +29,6 @@ namespace connectivity
{
typedef connectivity::sdbcx::OTable KabTable_TYPEDEF;
OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
class KabTable : public KabTable_TYPEDEF
{
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;

View File

@ -29,8 +29,6 @@ namespace connectivity
{
typedef connectivity::sdbcx::OTable MacabTable_TYPEDEF;
OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
class MacabTable : public MacabTable_TYPEDEF
{
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;

View File

@ -29,8 +29,6 @@ namespace connectivity
namespace hsqldb
{
OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
class OHSQLTable;
typedef ::comphelper::OIdPropertyArrayUsageHelper< OHSQLTable > OHSQLTable_PROP;
class OHSQLTable : public OTableHelper

View File

@ -29,8 +29,6 @@ namespace connectivity
namespace mysql
{
OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
class OMySQLTable;
typedef ::comphelper::OIdPropertyArrayUsageHelper< OMySQLTable > OMySQLTable_PROP;
class OMySQLTable : public OTableHelper

View File

@ -318,11 +318,6 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
{
switch(eFunc)
{
case KeyFuncType::CUT:
bHandled = ( m_aCutHandler.IsSet() && !m_aSelectedEntries.empty() );
if ( bHandled )
m_aCutHandler.Call( NULL );
break;
case KeyFuncType::COPY:
bHandled = ( m_aCopyHandler.IsSet() && !m_aSelectedEntries.empty() );
if ( bHandled )

View File

@ -63,7 +63,6 @@ namespace dbaui
Link<SvTreeListEntry*,bool> m_aPreExpandHandler; // handler to be called before a node is expanded
Link<LinkParamNone*,void> m_aSelChangeHdl; // handler to be called (asynchronously) when the selection changes in any way
Link<LinkParamNone*,void> m_aCutHandler; // called when someone press CTRL+X
Link<LinkParamNone*,void> m_aCopyHandler; // called when someone press CTRL+C
Link<LinkParamNone*,void> m_aPasteHandler; // called when someone press CTRL+V
Link<LinkParamNone*,void> m_aDeleteHandler; // called when someone press DELETE Key
@ -90,7 +89,6 @@ namespace dbaui
void SetPreExpandHandler(const Link<SvTreeListEntry*,bool>& _rHdl) { m_aPreExpandHandler = _rHdl; }
void SetSelChangeHdl( const Link<LinkParamNone*,void>& _rHdl ) { m_aSelChangeHdl = _rHdl; }
void setCutHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aCutHandler = _rHdl; }
void setCopyHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aCopyHandler = _rHdl; }
void setPasteHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aPasteHandler = _rHdl; }
void setDeleteHandler(const Link<LinkParamNone*,void>& _rHdl) { m_aDeleteHandler = _rHdl; }

View File

@ -62,12 +62,6 @@ namespace com { namespace sun { namespace star { namespace rendering
struct Texture;
class XIntegerBitmapColorSpace;
class XPolyPolygon2D;
bool operator==( const RenderState& rLHS,
const RenderState& rRHS );
bool operator==( const ViewState& rLHS,
const ViewState& rRHS );
} } } }
namespace com { namespace sun { namespace star { namespace awt
@ -111,7 +105,6 @@ namespace canvas
// mickey's math tricks...
inline unsigned int pow2( unsigned int c ) { return 0x1 << c; }
inline unsigned int mask( unsigned int c ) { return ((unsigned int)(-1)) / (pow2(pow2(c)) + 1); }
inline unsigned int count( unsigned int x, unsigned int c ) { return ((x) & mask(c)) + (((x) >> (pow2(c))) & mask(c)); }
/** Round given floating point value down to next integer
*/

View File

@ -556,18 +556,6 @@ namespace canvas
}
}
/** Range checker, which throws css::lang::IndexOutOfBounds exception, when
index range is violated
*/
template< typename NumType > inline void verifyIndexRange( NumType arg, NumType lowerBound, NumType upperBound )
{
if( arg < lowerBound ||
arg > upperBound )
{
throw css::lang::IndexOutOfBoundsException();
}
}
/** Range checker, which throws css::lang::IndexOutOfBounds exception, when
index range is violated

View File

@ -35,15 +35,6 @@ newArray_null(size_t const n) throw()
return new (::std::nothrow) T[n];
}
template<typename T> T *
newArray_ex(size_t const n)
{
if (((::std::numeric_limits<size_t>::max)() / sizeof(T)) <= n) {
throw ::std::bad_alloc();
}
return new T[n];
}
} // namespace comphelper
#endif // INCLUDED_COMPHELPER_NEWARRAY_HXX

View File

@ -32,15 +32,6 @@ inline ::boost::optional<T> make_optional( T const& v )
return ::boost::optional<T>(v);
}
template <typename T>
inline ::boost::optional<T> make_optional( css::beans::Optional<T> const& o )
{
if (o.IsPresent)
return ::boost::optional<T>(o.Value);
else
return ::boost::optional<T>();
}
} // namespace comphelper
#endif // ! defined(INCLUDED_COMPHELPER_OPTIONAL_HXX)

View File

@ -146,7 +146,7 @@ public:
{
}
virtual void reset(T * p = 0)
virtual void reset(T * p = 0) override
{
SolarMutexGuard aGuard;
unique_disposing_ptr<T>::reset(p);

View File

@ -79,8 +79,6 @@ namespace dbtools
*/
CharsetIterator find(const OUString& _rIanaName, const IANA&) const;
std::size_t size() const { ensureConstructed( ); return m_aEncodings.size(); }
/// get access to the first element of the charset collection
CharsetIterator begin() const;
/// get access to the (last + 1st) element of the charset collection

View File

@ -215,7 +215,6 @@ namespace connectivity
::rtl::Reference<OSQLColumns> getGroupColumns() const { return m_aGroupColumns;}
::rtl::Reference<OSQLColumns> getOrderColumns() const { return m_aOrderColumns;}
::rtl::Reference<OSQLColumns> getParameters() const { return m_aParameters; }
::rtl::Reference<OSQLColumns> getCreateColumns() const { return m_aCreateColumns;}
/** return the columname and the table range
@param _pColumnRef

View File

@ -102,14 +102,11 @@ public:
explicit Matrix( size_type nWidth, size_type nHeight ) { this->resize( nWidth, nHeight ); }
explicit Matrix( size_type nWidth, size_type nHeight, const_reference rData ) { this->resize( nWidth, nHeight, rData ); }
size_type capacity() const { return maData.capacity(); }
bool empty() const { return maData.empty(); }
size_type size() const { return maData.size(); }
size_type width() const { return mnWidth; }
size_type height() const { return this->empty() ? 0 : (this->size() / this->width()); }
bool has( size_type nX, size_type nY ) const { return (nX < this->width()) && (nY < this->height()); }
void reserve( size_type nWidth, size_type nHeight ) { maData.reserve( nWidth * nHeight ); }
void clear() { this->resize( 0, 0 ); }
void resize( size_type nWidth, size_type nHeight ) { mnWidth = nWidth; maData.resize( nWidth * nHeight ); }
void resize( size_type nWidth, size_type nHeight, const_reference rData ) { mnWidth = nWidth; maData.resize( nWidth * nHeight, rData ); }
@ -125,11 +122,6 @@ public:
iterator end() { return maData.end(); }
const_iterator end() const { return maData.end(); }
reference front() { return maData.front(); }
const_reference front() const { return maData.front(); }
reference back() { return maData.back(); }
const_reference back() const { return maData.back(); }
iterator row_begin( size_type nY ) { return this->at( 0, nY ); }
const_iterator row_begin( size_type nY ) const { return this->at( 0, nY ); }
iterator row_end( size_type nY ) { return this->at( mnWidth, nY ); }
@ -137,10 +129,6 @@ public:
reference row_front( size_type nY ) { return (*this)( 0, nY ); }
const_reference row_front( size_type nY ) const { return (*this)( 0, nY ); }
reference row_back( size_type nY ) { return (*this)( mnWidth - 1, nY ); }
const_reference row_back( size_type nY ) const { return (*this)( mnWidth - 1, nY ); }
void swap( Matrix& rMatrix ) { maData.swap( rMatrix.maData ); }
private:
container_type maData;

View File

@ -42,11 +42,6 @@
#include <rtl/ustring.hxx>
inline bool operator==( const css::util::URL& aURL1, const css::util::URL& aURL2 )
{
return aURL1.Complete == aURL2.Complete;
}
class SfxAllItemSet ;
class SfxItemSet ;
class SfxSlot ;

View File

@ -117,16 +117,6 @@ typedef void* (*TypeId)();
*/
#define PTR_CAST( T, pObj ) rttiCast<T>(pObj, TYPE(T))
template<class T1, class T2>
inline T1* rttiCast(T2* pObj, const TypeId& rTypeId) {
return (pObj && pObj->IsA( rTypeId )) ? static_cast<T1*>(pObj) : 0;
};
template<class T1, class T2>
inline const T1* rttiCast(const T2* pObj, const TypeId& rTypeId) {
return (pObj && pObj->IsA( rTypeId )) ? static_cast<const T1*>(pObj) : 0;
};
/** Check whether object pObj has a Base Class T
(or if pObj is an instance of T) */
#define HAS_BASE( T, pObj ) \

View File

@ -71,9 +71,6 @@ public:
{ return nCol == r.nCol && nRow == r.nRow && nTab == r.nTab; }
bool operator!=( const ScBigAddress& r ) const
{ return !operator==( r ); }
friend inline SvStream& WriteScBigAddress( SvStream& rStream, const ScBigAddress& rAdr );
friend inline SvStream& ReadScBigAddress( SvStream& rStream, ScBigAddress& rAdr );
};
inline void ScBigAddress::PutInOrder( ScBigAddress& r )
@ -129,18 +126,6 @@ inline ScAddress ScBigAddress::MakeAddress() const
return ScAddress( nColA, nRowA, nTabA );
}
inline SvStream& WriteScBigAddress( SvStream& rStream, const ScBigAddress& rAdr )
{
rStream.WriteInt32( rAdr.nCol ).WriteInt32( rAdr.nRow ).WriteInt32( rAdr.nTab );
return rStream;
}
inline SvStream& ReadScBigAddress( SvStream& rStream, ScBigAddress& rAdr )
{
rStream.ReadInt32( rAdr.nCol ).ReadInt32( rAdr.nRow ).ReadInt32( rAdr.nTab );
return rStream;
}
class ScBigRange
{
public:

View File

@ -731,14 +731,6 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclTokenArray& rTokArr )
return rStrm;
}
XclImpStream& operator>>( XclImpStream& rStrm, XclTokenArrayRef& rxTokArr )
{
if( !rxTokArr )
rxTokArr.reset( new XclTokenArray );
rxTokArr->Read( rStrm );
return rStrm;
}
XclExpStream& operator<<( XclExpStream& rStrm, const XclTokenArray& rTokArr )
{
rTokArr.Write( rStrm );

View File

@ -68,13 +68,6 @@ bool operator==( const XclGuid& rCmp1, const XclGuid& rCmp2 )
return ::std::equal( rCmp1.mpnData, STATIC_ARRAY_END( rCmp1.mpnData ), rCmp2.mpnData );
}
bool operator<( const XclGuid& rCmp1, const XclGuid& rCmp2 )
{
return ::std::lexicographical_compare(
rCmp1.mpnData, STATIC_ARRAY_END( rCmp1.mpnData ),
rCmp2.mpnData, STATIC_ARRAY_END( rCmp2.mpnData ) );
}
XclImpStream& operator>>( XclImpStream& rStrm, XclGuid& rGuid )
{
rStrm.Read( rGuid.mpnData, 16 ); // mpnData always in little endian

View File

@ -138,16 +138,6 @@ struct BinRange
void read( BiffInputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false );
};
inline bool operator==( const BinRange& rL, const BinRange& rR )
{
return (rL.maFirst == rR.maFirst) && (rL.maLast == rR.maLast);
}
inline bool operator<( const BinRange& rL, const BinRange& rR )
{
return (rL.maFirst < rR.maFirst) || ((rL.maFirst == rR.maFirst) && (rL.maLast < rR.maLast));
}
inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, BinRange& orRange )
{
orRange.read( rStrm );

View File

@ -254,11 +254,6 @@ struct ScHTMLPos
{ return ScAddress( mnCol, mnRow, 0 ); }
};
inline bool operator==( const ScHTMLPos& rPos1, const ScHTMLPos& rPos2 )
{
return (rPos1.mnRow == rPos2.mnRow) && (rPos1.mnCol == rPos2.mnCol);
}
inline bool operator<( const ScHTMLPos& rPos1, const ScHTMLPos& rPos2 )
{
return (rPos1.mnRow < rPos2.mnRow) || ((rPos1.mnRow == rPos2.mnRow) && (rPos1.mnCol < rPos2.mnCol));
@ -277,11 +272,6 @@ struct ScHTMLSize
{ mnCols = nCols; mnRows = nRows; }
};
inline bool operator==( const ScHTMLSize& rSize1, const ScHTMLSize& rSize2 )
{
return (rSize1.mnRows == rSize2.mnRows) && (rSize1.mnCols == rSize2.mnCols);
}
/** A single entry containing a line of text or representing a table. */
struct ScHTMLEntry : public ScEEParseEntry
{

View File

@ -88,16 +88,6 @@ struct XclRange
void Write( XclExpStream& rStrm, bool bCol16Bit = true ) const;
};
inline bool operator==( const XclRange& rL, const XclRange& rR )
{
return (rL.maFirst == rR.maFirst) && (rL.maLast == rR.maLast);
}
inline bool operator<( const XclRange& rL, const XclRange& rR )
{
return (rL.maFirst < rR.maFirst) || ((rL.maFirst == rR.maFirst) && (rL.maLast < rR.maLast));
}
inline XclImpStream& operator>>( XclImpStream& rStrm, XclRange& rXclRange )
{
rXclRange.Read( rStrm );

View File

@ -342,16 +342,6 @@ inline XclImpStream& operator>>( XclImpStream& rStrm, XclObjAnchor& rAnchor )
return rStrm;
}
template< typename StreamType >
StreamType& operator<<( StreamType& rStrm, const XclObjAnchor& rAnchor )
{
return rStrm
<< rAnchor.maFirst.mnCol << rAnchor.mnLX
<< static_cast<sal_uInt16>(rAnchor.maFirst.mnRow) << static_cast<sal_uInt16>(rAnchor.mnTY)
<< rAnchor.maLast.mnCol << rAnchor.mnRX
<< static_cast<sal_uInt16>(rAnchor.maLast.mnRow) << static_cast<sal_uInt16>(rAnchor.mnBY);
}
inline SvStream& WriteXclObjAnchor( SvStream& rStrm, const XclObjAnchor& rAnchor )
{
return rStrm

View File

@ -418,8 +418,6 @@ typedef std::shared_ptr< XclTokenArray > XclTokenArrayRef;
/** Calls the Read() function at the passed token array. */
XclImpStream& operator>>( XclImpStream& rStrm, XclTokenArray& rTokArr );
/** Calls the Read() function at the passed token array. */
XclImpStream& operator>>( XclImpStream& rStrm, XclTokenArrayRef& rxTokArr );
/** Calls the Write() function at the passed token array. */
XclExpStream& operator<<( XclExpStream& rStrm, const XclTokenArray& rTokArr );
/** Calls the Write() function at the passed token array. */

View File

@ -69,8 +69,6 @@ struct XclGuid
};
bool operator==( const XclGuid& rCmp1, const XclGuid& rCmp2 );
inline bool operator!=( const XclGuid& rCmp1, const XclGuid& rCmp2 ) { return !(rCmp1 == rCmp2); }
bool operator<( const XclGuid& rCmp1, const XclGuid& rCmp2 );
XclImpStream& operator>>( XclImpStream& rStrm, XclGuid& rGuid );
XclExpStream& operator<<( XclExpStream& rStrm, const XclGuid& rGuid );

View File

@ -58,8 +58,6 @@ private:
ESelection maEditSel; /// Selection in edit mode.
};
bool operator==( const ScSelectionState& rL, const ScSelectionState& rR );
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -52,26 +52,4 @@ ScSelectionState::ScSelectionState( ScViewData& rViewData ) :
}
}
bool operator==( const ScSelectionState& rL, const ScSelectionState& rR )
{
bool bEqual = rL.GetSelectionType() == rR.GetSelectionType();
if( bEqual ) switch( rL.GetSelectionType() )
{
case SC_SELECTTYPE_EDITCELL:
bEqual &= rL.GetEditSelection().IsEqual( rR.GetEditSelection() );
// run through!
case SC_SELECTTYPE_SHEET:
bEqual &= rL.GetSheetSelection() == rR.GetSheetSelection();
// run through!
case SC_SELECTTYPE_NONE:
bEqual &= rL.GetCellCursor() == rR.GetCellCursor();
break;
default:
{
// added to avoid warnings
}
}
return bEqual;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -170,74 +170,6 @@ public:
"From and one of To or By, or To or By alone must be valid" );
}
virtual void startAnimation()
{
if (this->isDisposed() || !mpAnim)
return;
BaseType::startAnimation();
// start animation
mpAnim->start( BaseType::getShape(),
BaseType::getShapeAttributeLayer() );
// setup start and end value. Determine animation
// start value only when animation actually
// started up (this order is part of the Animation
// interface contract)
const ValueType aAnimationStartValue( mpAnim->getUnderlyingValue() );
// first of all, determine general type of
// animation, by inspecting which of the FromToBy values
// are actually valid.
// See http://www.w3.org/TR/smil20/animation.html#AnimationNS-FromToBy
// for a definition
if( maFrom )
{
// From-to or From-by animation. According to
// SMIL spec, the To value takes precedence
// over the By value, if both are specified
if( maTo )
{
// From-To animation
maStartValue = *maFrom;
maEndValue = *maTo;
}
else if( maBy )
{
// From-By animation
maStartValue = *maFrom;
maEndValue = maStartValue + *maBy;
}
}
else
{
maStartValue = aAnimationStartValue;
maStartInterpolationValue = maStartValue;
// By or To animation. According to SMIL spec,
// the To value takes precedence over the By
// value, if both are specified
if( maTo )
{
// To animation
// According to the SMIL spec
// (http://www.w3.org/TR/smil20/animation.html#animationNS-ToAnimation),
// the to animation interpolates between
// the _running_ underlying value and the to value (as the end value)
mbDynamicStartValue = true;
maPreviousValue = maStartValue;
maEndValue = *maTo;
}
else if( maBy )
{
// By animation
maStartValue = aAnimationStartValue;
maEndValue = maStartValue + *maBy;
}
}
}
virtual void endAnimation()
{
// end animation
@ -340,13 +272,6 @@ public:
}
}
/// Disposable:
virtual void dispose()
{
mpAnim.reset();
BaseType::dispose();
}
private:
const OptionalValueType maFrom;
const OptionalValueType maTo;
@ -523,17 +448,6 @@ public:
ENSURE_OR_THROW( !rValues.empty(), "Empty value vector" );
}
virtual void startAnimation()
{
if (this->isDisposed() || !mpAnim)
return;
BaseType::startAnimation();
// start animation
mpAnim->start( BaseType::getShape(),
BaseType::getShapeAttributeLayer() );
}
virtual void endAnimation()
{
// end animation

View File

@ -971,25 +971,4 @@ storeError OStorePageBIOS::flush()
return m_xLockBytes->flush();
}
/*
* size.
* Precond: initialized.
*/
storeError OStorePageBIOS::size (sal_uInt32 &rnSize)
{
// Acquire exclusive access.
osl::MutexGuard aGuard (m_aMutex);
// Initialize [out] param.
rnSize = 0;
// Check precond.
if (!m_xLockBytes.is())
return store_E_InvalidAccess;
// Obtain LockBytes size.
return m_xLockBytes->getSize (rnSize);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -124,10 +124,6 @@ public:
*/
storeError flush();
/** size.
*/
storeError size (sal_uInt32 &rnSize);
/** ScanContext.
*/
struct ScanContext
@ -142,9 +138,6 @@ public:
*/
inline ScanContext();
/** isValid.
*/
inline bool isValid() const;
};
protected:
@ -226,10 +219,6 @@ inline OStorePageBIOS::ScanContext::ScanContext()
: m_aDescr (0, 0, 0), m_nSize (0), m_nMagic (0)
{
}
inline bool OStorePageBIOS::ScanContext::isValid() const
{
return (m_aDescr.m_nAddr < m_nSize);
}
/*========================================================================
*