Kaydet (Commit) 644487a1 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods

Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 1b4dff2c
......@@ -59,7 +59,7 @@ protected:
// ____ XEventListener (base of all listeners) ____
virtual void SAL_CALL disposing(
const ::com::sun::star::lang::EventObject& Source )
throw (::com::sun::star::uno::RuntimeException)
throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
{
::com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener > xEventListener =
......
......@@ -80,20 +80,6 @@ css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumb
sal_Int32 getStandardFormat(
const css::uno::Reference<css::util::XNumberFormatter>& xFormatter,
sal_Int16 nType,
const css::lang::Locale& _rLocale)
{
css::uno::Reference<css::util::XNumberFormatsSupplier> xSupplier( xFormatter.is() ? xFormatter->getNumberFormatsSupplier() : css::uno::Reference<css::util::XNumberFormatsSupplier>(NULL));
css::uno::Reference<css::util::XNumberFormats> xFormats( xSupplier.is() ? xSupplier->getNumberFormats() : css::uno::Reference<css::util::XNumberFormats>(NULL));
css::uno::Reference<css::util::XNumberFormatTypes> xTypes(xFormats, css::uno::UNO_QUERY);
OSL_ENSURE(xTypes.is(), "getStandardFormat : no format types !");
return xTypes.is() ? xTypes->getStandardFormat(nType, _rLocale) : 0;
}
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::beans;
......
......@@ -251,7 +251,7 @@ bool UnusedMethods::VisitFunctionDecl( const FunctionDecl* functionDecl )
if (isa<CXXConstructorDecl>(functionDecl)) {
return true;
}
if (methodDecl && methodDecl->isDeleted()) {
if (functionDecl && functionDecl->isDeleted()) {
return true;
}
......
......@@ -7,6 +7,7 @@ import io
definitionSet = set()
definitionToSourceLocationMap = dict()
callSet = set()
sourceLocationSet = set()
# things we need to exclude for reasons like :
# - it's a weird template thingy that confuses the plugin
exclusionSet = set([
......@@ -101,6 +102,8 @@ exclusionSet = set([
"void ImportXE(class SwDoc &,class SwPaM &,const class rtl::OUString &)",
"_Bool TestImportDOC(const class rtl::OUString &,const class rtl::OUString &)",
"class vcl::Window * CreateWindow(class VCLXWindow **,const struct com::sun::star::awt::WindowDescriptor *,class vcl::Window *,long)",
# only used when the ODBC driver is enabled
"_Bool getImplementation(type-parameter-?-? *&,const class com::sun::star::uno::Reference<class com::sun::star::uno::XInterface> &)",
])
# clang does not always use exactly the same numbers in the type-parameter vars it generates
......@@ -123,6 +126,18 @@ with io.open(sys.argv[1], "rb", buffering=1024*1024) as txt:
idx1 = line.find("\t",6)
callSet.add((normalizeTypeParams(line[6:idx1]), normalizeTypeParams(line[idx1+1:].strip())))
# Invert the definitionToSourceLocationMap
# If we see more than one method at the same sourceLocation, it's being autogenerated as part of a template
# and we should just ignore
sourceLocationToDefinitionMap = {}
for k, v in definitionToSourceLocationMap.iteritems():
sourceLocationToDefinitionMap[v] = sourceLocationToDefinitionMap.get(v, [])
sourceLocationToDefinitionMap[v].append(k)
for k, definitions in sourceLocationToDefinitionMap.iteritems():
if len(definitions) > 1:
for d in definitions:
definitionSet.remove(d)
tmp1set = set()
for d in definitionSet:
clazz = d[0] + " " + d[1]
......@@ -199,6 +214,8 @@ for d in definitionSet:
# ignore methods used to dump objects to stream - normally used for debugging
if d[0] == "class std::basic_ostream<char> &" and d[1].startswith("operator<<(class std::basic_ostream<char> &"):
continue
if d[0] == "basic_ostream<type-parameter-?-?, type-parameter-?-?> &" and d[1].startswith("operator<<(basic_ostream<type-parameter-?-?"):
continue
tmp1set.add((clazz, definitionToSourceLocationMap[d]))
......
......@@ -61,7 +61,6 @@ namespace connectivity
return xOut;
}
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > Map2XNameAccess(JNIEnv *pEnv,jobject _pMap);
jobject convertTypeMapToJavaMap(JNIEnv *pEnv,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & _rMap);
/** return if a exception occurred
......
......@@ -449,63 +449,6 @@ void OFieldDescControl::SetReadOnly( bool bReadOnly )
}
}
OUString OFieldDescControl::GetControlText( sal_uInt16 nControlId )
{
// Read out the Controls' texts
switch( nControlId )
{
case FIELD_PROPERTY_BOOL_DEFAULT:
if (pBoolDefault)
return pBoolDefault->GetSelectEntry();
break;
case FIELD_PROPERTY_DEFAULT:
if (pDefault)
return pDefault->GetText();
break;
case FIELD_PROPERTY_REQUIRED:
if (pRequired)
return pRequired->GetSelectEntry();
break;
case FIELD_PROPERTY_TEXTLEN:
if (pTextLen)
return OUString::number(pTextLen->GetValue());
break;
case FIELD_PROPERTY_NUMTYPE:
if (pNumType)
return pNumType->GetSelectEntry();
break;
case FIELD_PROPERTY_AUTOINC:
if (pAutoIncrement)
return pAutoIncrement->GetSelectEntry();
break;
case FIELD_PROPERTY_LENGTH:
if (pLength)
return pLength->GetText();
break;
case FIELD_PROPERTY_SCALE:
if (pScale)
return pScale->GetText();
break;
case FIELD_PROPERTY_FORMAT:
if (pFormatSample)
return pFormatSample->GetText();
break;
case FIELD_PROPERTY_COLUMNNAME:
if(m_pColumnName)
return m_pColumnName->GetText();
break;
case FIELD_PROPERTY_TYPE:
if(m_pType)
return m_pType->GetSelectEntry();
break;
case FIELD_PROPERTY_AUTOINCREMENT:
if(m_pAutoIncrementValue)
return m_pAutoIncrementValue->GetText();
}
return OUString();
}
void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const OUString& rText )
{
// Set the Controls' texts
......
......@@ -182,7 +182,6 @@ namespace dbaui
void SaveData( OFieldDescription* pFieldDescr );
void SetControlText( sal_uInt16 nControlId, const OUString& rText );
OUString GetControlText( sal_uInt16 nControlId );
void SetReadOnly( bool bReadOnly );
// when resize is called
......
......@@ -289,15 +289,6 @@ sal_Int32 ExtensionBox_Impl::getSelIndex() const
}
void ExtensionBox_Impl::checkIndex( sal_Int32 nIndex ) const
{
if ( nIndex < 0 )
throw lang::IllegalArgumentException( "The list index starts with 0",0, 0 );
if ( static_cast< sal_uInt32 >( nIndex ) >= m_vEntries.size())
throw lang::IllegalArgumentException( "There is no element at the provided position. The position exceeds the number of available list entries",0, 0 );
}
// Title + description
void ExtensionBox_Impl::CalcActiveHeight( const long nPos )
{
......
......@@ -165,11 +165,6 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void );
//Index starts with 1.
//Throws an css::lang::IllegalArgumentException, when the index is invalid.
void checkIndex(sal_Int32 pos) const;
void Init();
public:
explicit ExtensionBox_Impl(vcl::Window* pParent);
......
......@@ -104,20 +104,6 @@ css::uno::Reference< css::datatransfer::XTransferable > TextChainingUtils::Creat
}
/* Helper functions for *OverflowingText classes */
ESelection getLastPositionSel(const EditTextObject *pTObj)
{
sal_Int32 nLastPara = pTObj->GetParagraphCount()-1;
// If text is empty
if (nLastPara < 0 )
nLastPara = 0;
sal_Int32 nLen = pTObj->GetText(nLastPara).getLength();
ESelection aEndPos(nLastPara, nLen, nLastPara, nLen);
return aEndPos;
}
// class OverflowingText
OverflowingText::OverflowingText(css::uno::Reference< css::datatransfer::XTransferable > xOverflowingContent) :
......@@ -127,12 +113,6 @@ OverflowingText::OverflowingText(css::uno::Reference< css::datatransfer::XTransf
}
ESelection OverflowingText::GetInsertionPointSel()
{
assert(false && "You should never get here");
return getLastPositionSel(NULL);
}
// class NonOverflowingText
NonOverflowingText::NonOverflowingText(const EditTextObject * /*pTObj*/, bool bLastParaInterrupted)
......
......@@ -234,11 +234,11 @@ namespace xforms
protected:
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE;
// XPropertySet
virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(css::uno::RuntimeException);
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(css::uno::RuntimeException) SAL_OVERRIDE;
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
};
class OBooleanType;
......
......@@ -112,24 +112,6 @@ namespace canvas
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)); }
template<typename T>
inline unsigned int bitcount( T c ) {
unsigned int nByteIndex = 0;
unsigned int nNumBytes = sizeof(T)<<2;
do {
c=count(c,nByteIndex++);
nNumBytes >>= 1;
} while(nNumBytes);
return c;
}
inline sal_uInt32 bitcount32( sal_uInt32 c ) {
c=count(c,0);
c=count(c,1);
c=count(c,2);
c=count(c,3);
c=count(c,4);
return c;
}
/** Round given floating point value down to next integer
*/
......
......@@ -38,13 +38,6 @@ namespace comphelper
/// returns the decimals of the given numeric number formatunder the given formats
COMPHELPER_DLLPUBLIC css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumberFormats>& xFormats, sal_Int32 nKey);
/** returns the standard format for the given type and the given _rLocale
*/
sal_Int32 getStandardFormat(
const css::uno::Reference<css::util::XNumberFormatter>& xFormatter,
sal_Int16 nType,
const css::lang::Locale& _rLocale);
/** retrieves a the value of a given property for a given format key, relating to a given formatter
*/
COMPHELPER_DLLPUBLIC css::uno::Any getNumberFormatProperty(
......
......@@ -222,12 +222,6 @@ namespace detail
@return rBuf;
*/
inline OStringBuffer& truncateToLength(
OStringBuffer& rBuffer, sal_Int32 nLength)
{
return detail::truncateToLength(rBuffer, nLength);
}
inline OUStringBuffer& truncateToLength(
OUStringBuffer& rBuffer, sal_Int32 nLength)
{
......
......@@ -73,8 +73,6 @@ namespace connectivity
};
typedef connectivity::sdbcx::OTable OTable_TYPEDEF;
OOO_DLLPUBLIC_DBTOOLS OUString getTypeString(const css::uno::Reference< css::beans::XPropertySet >& xColProp);
typedef std::map<OUString, sdbcx::TKeyProperties> TKeyMap;
struct OTableHelperImpl;
......
......@@ -69,11 +69,6 @@ namespace cppcanvas
return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|(nAlpha);
}
inline sal_Int32 unMakeColor( sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
{
return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|(nBlue);
}
inline sal_Int32 makeColorARGB( sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
{
return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|(nBlue);
......
......@@ -71,7 +71,6 @@ class OverflowingText
public:
OutlinerParaObject *JuxtaposeParaObject(Outliner *, OutlinerParaObject *);
OutlinerParaObject *DeeplyMergeParaObject(Outliner *, OutlinerParaObject *);
static ESelection GetInsertionPointSel();
private:
friend class Outliner;
......
......@@ -69,36 +69,6 @@ JVMACCESS_DLLPUBLIC jobjectArray translateToUrls(
css::uno::Reference<css::uno::XComponentContext> const & context,
JNIEnv * environment, OUString const & classPath);
/**
loads a class via a java.net.URLClassLoader.
@param context
a component context; must not be null.
@param environment
a JNI environment; must not be null.
@param classPath
a list of zero or more internal (see the
com.sun.star.uri.ExternalUriReferenceTranslator service) URI references,
where any space characters (U+0020) are ignored (and, in particular, separate
adjacent URI references). Any vnd.sun.star.expand URL references in the list
are expanded using the com.sun.star.util.theMacroExpander singleton of the
given context.
@param name
the Java binary name of the class to load.
@returns
a local reference to a java.lang.Class instance. If null, a (still pending)
JNI exception occurred.
@throws com::sun::star::uno::RuntimeException
*/
JVMACCESS_DLLPUBLIC jclass loadClass(
css::uno::Reference<css::uno::XComponentContext> const & context,
JNIEnv * environment, OUString const & classPath, OUString const & name);
}
}
......
......@@ -726,30 +726,6 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getUserClassPath(rtl_uString **
*/
JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_addJRELocation(rtl_uString * sLocation);
/** obtains an array containing paths to JRE installations.
<p>
It is not guaranteed that the returned paths represent
a valid JRE. One can use <code>jfw_getJavaInfoByPath</code> to check this.
</p>
@param parLocations
[out] on return it contains the array of paths.
@param pSize
[out] on return it contains the size of the array <code>parLocations</code>.
@return
JFW_E_NONE function ran successfully.<br/>
JFW_E_INVALIDARG parLocation is NULL or pSize is NULL.<br/>
JFW_E_ERROR An error occurred.<br/>
JFW_E_CONFIGURATION mode was not properly set or their prerequisites
were not met.<br/>
JFW_E_DIRECT_MODE the function cannot be used in this mode.
*/
JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getJRELocations(
rtl_uString *** parLocations, sal_Int32 * pSize);
/** checks if the installation of the jre still exists.
This function checks if the JRE described by pInfo still
......
......@@ -240,36 +240,18 @@ public:
static const typename VectorType::value_type&
getVectorElement( const VectorType& rVector, sal_Int32 nIndex, const typename VectorType::value_type& rDefault );
/** Returns the reference to an existing element of the passed vector, or
the passed default value, if the passed index is out of bounds. */
template< typename VectorType >
static typename VectorType::value_type&
getVectorElementAccess( VectorType& rVector, sal_Int32 nIndex, typename VectorType::value_type& rDefault );
/** Returns the pointer to an existing element of the passed map, or a null
pointer, if an element with the passed key does not exist. */
template< typename MapType >
static const typename MapType::mapped_type*
getMapElement( const MapType& rMap, const typename MapType::key_type& rKey );
/** Returns the pointer to an existing element of the passed map, or a null
pointer, if an element with the passed key does not exist. */
template< typename MapType >
static typename MapType::mapped_type*
getMapElementAccess( MapType& rMap, const typename MapType::key_type& rKey );
/** Returns the reference to an existing element of the passed map, or the
passed default value, if an element with the passed key does not exist. */
template< typename MapType >
static const typename MapType::mapped_type&
getMapElement( const MapType& rMap, const typename MapType::key_type& rKey, const typename MapType::mapped_type& rDefault );
/** Returns the reference to an existing element of the passed map, or the
passed default value, if an element with the passed key does not exist. */
template< typename MapType >
static typename MapType::mapped_type&
getMapElementAccess( MapType& rMap, const typename MapType::key_type& rKey, typename MapType::mapped_type& rDefault );
// vector/map/matrix to UNO sequence --------------------------------------
/** Creates a UNO sequence from a std::vector with copies of all elements.
......@@ -316,12 +298,6 @@ template< typename VectorType >
return ((0 <= nIndex) && (static_cast< size_t >( nIndex ) < rVector.size())) ? rVector[ static_cast< size_t >( nIndex ) ] : rDefault;
}
template< typename VectorType >
/*static*/ typename VectorType::value_type& ContainerHelper::getVectorElementAccess( VectorType& rVector, sal_Int32 nIndex, typename VectorType::value_type& rDefault )
{
return ((0 <= nIndex) && (static_cast< size_t >( nIndex ) < rVector.size())) ? rVector[ static_cast< size_t >( nIndex ) ] : rDefault;
}
template< typename MapType >
/*static*/ const typename MapType::mapped_type* ContainerHelper::getMapElement( const MapType& rMap, const typename MapType::key_type& rKey )
{
......@@ -329,13 +305,6 @@ template< typename MapType >
return (aIt == rMap.end()) ? 0 : &aIt->second;
}
template< typename MapType >
/*static*/ typename MapType::mapped_type* ContainerHelper::getMapElementAccess( MapType& rMap, const typename MapType::key_type& rKey )
{
typename MapType::iterator aIt = rMap.find( rKey );
return (aIt == rMap.end()) ? 0 : &aIt->second;
}
template< typename MapType >
/*static*/ const typename MapType::mapped_type& ContainerHelper::getMapElement( const MapType& rMap, const typename MapType::key_type& rKey, const typename MapType::mapped_type& rDefault )
{
......@@ -343,13 +312,6 @@ template< typename MapType >
return (aIt == rMap.end()) ? rDefault : aIt->second;
}
template< typename MapType >
/*static*/ typename MapType::mapped_type& ContainerHelper::getMapElementAccess( MapType& rMap, const typename MapType::key_type& rKey, typename MapType::mapped_type& rDefault )
{
typename MapType::iterator aIt = rMap.find( rKey );
return (aIt == rMap.end()) ? rDefault : aIt->second;
}
template< typename VectorType >
/*static*/ css::uno::Sequence< typename VectorType::value_type > ContainerHelper::vectorToSequence( const VectorType& rVector )
{
......
......@@ -166,19 +166,6 @@ inline void setFlag( Type& ornBitField, Type nMask, bool bSet = true )
if( bSet ) ornBitField |= nMask; else ornBitField &= ~nMask;
}
/** Inserts a value into a bitfield.
Inserts the lower nBitCount bits of nValue into ornBitField, starting
there at bit nStartBit. Other contents of ornBitField keep unchanged.
*/
template< typename Type, typename InsertType >
void insertValue( Type& ornBitField, InsertType nValue, sal_uInt8 nStartBit, sal_uInt8 nBitCount )
{
sal_uInt64 nMask = 1; nMask <<= nBitCount; --nMask;
Type nNewValue = static_cast< Type >( nValue & nMask );
(ornBitField &= ~(nMask << nStartBit)) |= (nNewValue << nStartBit);
}
/** Optional value, similar to ::boost::optional<>, with convenience accessors.
......@@ -198,7 +185,6 @@ public:
const Type& get() const { return maValue; }
const Type& get( const Type& rDefValue ) const { return mbHasValue ? maValue : rDefValue; }
void reset() { mbHasValue = false; }
void set( const Type& rValue ) { maValue = rValue; mbHasValue = true; }
Type& use() { mbHasValue = true; return maValue; }
......@@ -256,13 +242,6 @@ public:
#endif
/** Reads a value from memory, assuming memory buffer in little-endian.
@param ornValue (out-parameter) Contains the value read from memory.
@param pSrcBuffer The memory buffer to read the value from.
*/
template< typename Type >
inline static void readLittleEndian( Type& ornValue, const void* pSrcBuffer );
/** Writes a value to memory, while converting it to little-endian.
@param pDstBuffer The memory buffer to write the value to.
@param nValue The value to be written to memory in little-endian.
......@@ -280,13 +259,6 @@ private:
template< typename Type >
inline void ByteOrderConverter::readLittleEndian( Type& ornValue, const void* pSrcBuffer )
{
memcpy( &ornValue, pSrcBuffer, sizeof( Type ) );
convertLittleEndian( ornValue );
}
template< typename Type >
inline void ByteOrderConverter::writeLittleEndian( void* pDstBuffer, Type nValue )
{
......
......@@ -80,14 +80,6 @@ public:
forEach( ::boost::bind( pFunc, _1 ) );
}
/** Calls the passed member function of ObjType on every contained object,
automatically skips all elements that are empty references. */
template< typename FuncType, typename ParamType >
void forEachMem( FuncType pFunc, ParamType aParam ) const
{
forEach( ::boost::bind( pFunc, _1, aParam ) );
}
/** Calls the passed member function of ObjType on every contained object,
automatically skips all elements that are empty references. */
template< typename FuncType, typename ParamType1, typename ParamType2 >
......@@ -104,14 +96,6 @@ public:
forEach( ::boost::bind( pFunc, _1, aParam1, aParam2, aParam3 ) );
}
/** Calls the passed member function of ObjType on every contained object,
automatically skips all elements that are empty references. */
template< typename FuncType, typename ParamType1, typename ParamType2, typename ParamType3, typename ParamType4 >
void forEachMem( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2, ParamType3 aParam3, ParamType4 aParam4 ) const
{
forEach( ::boost::bind( pFunc, _1, aParam1, aParam2, aParam3, aParam4 ) );
}
/** Calls the passed functor for every contained object. Passes the key as
first argument and the object reference as second argument to rFunctor. */
......@@ -129,29 +113,6 @@ public:
forEachWithKey( ::boost::bind( pFunc, _2, _1 ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the object key as first argument to the member function. */
template< typename FuncType, typename ParamType >
void forEachMemWithKey( FuncType pFunc, ParamType aParam ) const
{
forEachWithKey( ::boost::bind( pFunc, _2, _1, aParam ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the object key as first argument to the member function. */
template< typename FuncType, typename ParamType1, typename ParamType2 >
void forEachMemWithKey( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2 ) const
{
forEachWithKey( ::boost::bind( pFunc, _2, _1, aParam1, aParam2 ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the object key as first argument to the member function. */
template< typename FuncType, typename ParamType1, typename ParamType2, typename ParamType3 >
void forEachMemWithKey( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2, ParamType3 aParam3 ) const
{
forEachWithKey( ::boost::bind( pFunc, _2, _1, aParam1, aParam2, aParam3 ) );
}
private:
template< typename FunctorType >
......
......@@ -54,10 +54,6 @@ public:
return value_type();
}
/** Returns the index of the last element, or -1, if the vector is empty.
Does *not* check whether the last element is an empty reference. */
sal_Int32 getLastIndex() const { return static_cast< sal_Int32 >( this->size() ) - 1; }
/** Calls the passed functor for every contained object, automatically
skips all elements that are empty references. */
template< typename FunctorType >
......@@ -106,22 +102,6 @@ public:
::std::for_each( this->begin(), this->end(), ForEachFunctorWithIndex< FunctorType >( rFunctor ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the vector index to the member function. */
template< typename FuncType >
void forEachMemWithIndex( FuncType pFunc ) const
{
forEachWithIndex( ::boost::bind( pFunc, _2, _1 ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the vector index as first argument to the member function. */
template< typename FuncType, typename ParamType >
void forEachMemWithIndex( FuncType pFunc, ParamType aParam ) const
{
forEachWithIndex( ::boost::bind( pFunc, _2, _1, aParam ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the vector index as first argument to the member function. */
template< typename FuncType, typename ParamType1, typename ParamType2 >
......@@ -130,14 +110,6 @@ public:
forEachWithIndex( ::boost::bind( pFunc, _2, _1, aParam1, aParam2 ) );
}
/** Calls the passed member function of ObjType on every contained object.
Passes the vector index as first argument to the member function. */
template< typename FuncType, typename ParamType1, typename ParamType2, typename ParamType3 >
void forEachMemWithIndex( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2, ParamType3 aParam3 ) const
{
forEachWithIndex( ::boost::bind( pFunc, _2, _1, aParam1, aParam2, aParam3 ) );
}
/** Searches for an element by using the passed functor that takes a
constant reference of the object type (const ObjType&). */
template< typename FunctorType >
......
......@@ -59,9 +59,6 @@ public:
/** Aligns the stream according to the passed type and reads a value. */
template< typename Type >
void writeAligned( Type nVal ) { align( sizeof( Type ) ); writeValue( nVal ); }
/** Aligns the stream according to the passed type and skips the size of the type. */
template< typename Type >
void padAligned() { align( sizeof( Type ) ); pad( sizeof( Type ) ); }
private:
BinaryOutputStream* mpOutStrm; ///< The wrapped input stream.
......
......@@ -75,10 +75,6 @@ public:
@param bDeep True = searches in all group shapes too. */
const ShapeBase* getShapeById( const OUString& rShapeId, bool bDeep ) const;
/** Searches for a shape type by using the passed functor that takes a
constant reference of a ShapeType object. */
template< typename Functor >
const ShapeType* findShapeType( const Functor& rFunctor ) const;
/** Searches for a shape by using the passed functor that takes a constant
reference of a ShapeBase object. */
template< typename Functor >
......@@ -131,12 +127,6 @@ ShapeT& ShapeContainer::createShape()
return *xShape;
}