loplugin:unusedmethods

Change-Id: Ia7981447e96d9ac87526ad1276585ab3077d7f08
Reviewed-on: https://gerrit.libreoffice.org/25707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2016-05-31 11:28:46 +02:00
committed by Noel Grandin
parent 3aaa90c36c
commit c150ac0787
8 changed files with 2 additions and 133 deletions

View File

@@ -61,16 +61,8 @@ public:
inline ColorMask& GetColorMask() const;
private:
BitmapInfoAccess()
{}
BitmapInfoAccess(const BitmapInfoAccess&)
{}
BitmapInfoAccess& operator=(const BitmapInfoAccess&)
{
return *this;
}
BitmapInfoAccess(const BitmapInfoAccess&) = delete;
BitmapInfoAccess& operator=(const BitmapInfoAccess&) = delete;
protected:
Bitmap maBitmap;

View File

@@ -120,35 +120,6 @@ private:
FuncT const m_func;
};
template <typename T>
class copy_back_wrapper
{
public:
operator T *() const { return &m_holder->m_value; }
operator T &() const { return m_holder->m_value; }
explicit copy_back_wrapper( T * p ) : m_holder( new data_holder(p) ) {}
// no thread-safe counting needed here, because calling thread blocks
// until solar thread has executed the functor.
copy_back_wrapper( copy_back_wrapper<T> const& r )
: m_holder(r.m_holder) { ++m_holder->m_refCount; }
~copy_back_wrapper() {
--m_holder->m_refCount;
if (m_holder->m_refCount == 0) {
delete m_holder;
}
}
private:
struct data_holder {
T m_value;
T * const m_ptr;
data_holder( T * p ) : m_value(*p), m_ptr(p) {}
~data_holder() { *m_ptr = m_value; }
};
data_holder * const m_holder;
};
} // namespace detail

View File

@@ -93,7 +93,6 @@ private:
protected:
XMLChildNode( XMLParentNode *pPar );
XMLChildNode(): m_pParent( nullptr ){};
XMLChildNode( const XMLChildNode& rObj);
XMLChildNode& operator=(const XMLChildNode& rObj);
public:

View File

@@ -334,8 +334,6 @@ public:
inline const ApiAlignmentData& getApiData() const { return maApiData; }
void fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs = false ) const;
/** Writes all alignment attributes to the passed property map. */
void writeToPropertyMap( PropertyMap& rPropMap ) const;
private:
::SvxCellHorJustify GetScHorAlign() const;
@@ -383,8 +381,6 @@ public:
/** Returns the converted API protection data struct. */
inline const ApiProtectionData& getApiData() const { return maApiData; }
/** Writes all protection attributes to the passed property map. */
void writeToPropertyMap( PropertyMap& rPropMap ) const;
void fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs = false ) const;
private:
ProtectionModel maModel; /// Protection model data.
@@ -881,17 +877,11 @@ public:
OUString createDxfStyle( sal_Int32 nDxfId ) const;
void writeFontToItemSet( SfxItemSet& rItemSet, sal_Int32 nFontId, bool bSkipPoolDefs = false ) const;
/** Writes the font attributes of the specified font data to the passed property map. */
void writeFontToPropertyMap( PropertyMap& rPropMap, sal_Int32 nFontId ) const;
sal_uLong writeNumFmtToItemSet( SfxItemSet& rItemSet, sal_Int32 nNumFmtId, bool bSkipPoolDefs = false ) const;
/** Writes the specified number format to the passed property map. */
void writeNumFmtToPropertyMap( PropertyMap& rPropMap, sal_Int32 nNumFmtId ) const;
void writeBorderToItemSet( SfxItemSet& rItemSet, sal_Int32 nBorderId, bool bSkipPoolDefs = false ) const;
/** Writes the border attributes of the specified border data to the passed property map. */
void writeBorderToPropertyMap( PropertyMap& rPropMap, sal_Int32 nBorderId ) const;
/** Writes the fill attributes of the specified fill data to the passed property map. */
void writeFillToItemSet( SfxItemSet& rItemSet, sal_Int32 nFillId, bool bSkipPoolDefs = false ) const;
void writeFillToPropertyMap( PropertyMap& rPropMap, sal_Int32 nFillId ) const;
/** Writes the cell formatting attributes of the specified XF to the passed property set. */
void writeCellXfToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange, sal_Int32 nXfId ) const;

View File

@@ -1346,20 +1346,6 @@ void Alignment::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_SHRINKTOFIT, maApiData.mbShrink ), bSkipPoolDefs );
}
void Alignment::writeToPropertyMap( PropertyMap& rPropMap ) const
{
rPropMap.setProperty( PROP_HoriJustify, maApiData.meHorJustify);
rPropMap.setProperty( PROP_HoriJustifyMethod, maApiData.mnHorJustifyMethod);
rPropMap.setProperty( PROP_VertJustify, maApiData.mnVerJustify);
rPropMap.setProperty( PROP_VertJustifyMethod, maApiData.mnVerJustifyMethod);
rPropMap.setProperty( PROP_WritingMode, maApiData.mnWritingMode);
rPropMap.setProperty( PROP_RotateAngle, maApiData.mnRotation);
rPropMap.setProperty( PROP_Orientation, maApiData.meOrientation);
rPropMap.setProperty( PROP_ParaIndent, maApiData.mnIndent);
rPropMap.setProperty( PROP_IsTextWrapped, maApiData.mbWrapText);
rPropMap.setProperty( PROP_ShrinkToFit, maApiData.mbShrink);
}
ProtectionModel::ProtectionModel() :
mbLocked( true ), // default in Excel and Calc
mbHidden( false )
@@ -1403,11 +1389,6 @@ void Protection::finalizeImport()
maApiData.maCellProt.IsFormulaHidden = maModel.mbHidden;
}
void Protection::writeToPropertyMap( PropertyMap& rPropMap ) const
{
rPropMap.setProperty( PROP_CellProtection, maApiData.maCellProt);
}
void Protection::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
{
ScfTools::PutItem( rItemSet, ScProtectionAttr( maApiData.maCellProt.IsLocked, maApiData.maCellProt.IsFormulaHidden ), bSkipPoolDefs );
@@ -3058,46 +3039,23 @@ void StylesBuffer::writeFontToItemSet( SfxItemSet& rItemSet, sal_Int32 nFontId,
pFont->fillToItemSet( rItemSet, false, bSkipPoolDefs );
}
void StylesBuffer::writeFontToPropertyMap( PropertyMap& rPropMap, sal_Int32 nFontId ) const
{
if( Font* pFont = maFonts.get( nFontId ).get() )
pFont->writeToPropertyMap( rPropMap, FONT_PROPTYPE_CELL );
}
sal_uLong StylesBuffer::writeNumFmtToItemSet( SfxItemSet& rItemSet, sal_Int32 nNumFmtId, bool bSkipPoolDefs ) const
{
return maNumFmts.fillToItemSet( rItemSet, nNumFmtId, bSkipPoolDefs );
}
void StylesBuffer::writeNumFmtToPropertyMap( PropertyMap& rPropMap, sal_Int32 nNumFmtId ) const
{
maNumFmts.writeToPropertyMap( rPropMap, nNumFmtId );
}
void StylesBuffer::writeBorderToItemSet( SfxItemSet& rItemSet, sal_Int32 nBorderId, bool bSkipPoolDefs ) const
{
if( Border* pBorder = maBorders.get( nBorderId ).get() )
pBorder->fillToItemSet( rItemSet, bSkipPoolDefs );
}
void StylesBuffer::writeBorderToPropertyMap( PropertyMap& rPropMap, sal_Int32 nBorderId ) const
{
if( Border* pBorder = maBorders.get( nBorderId ).get() )
pBorder->writeToPropertyMap( rPropMap );
}
void StylesBuffer::writeFillToItemSet( SfxItemSet& rItemSet, sal_Int32 nFillId, bool bSkipPoolDefs ) const
{
if( Fill* pFill = maFills.get( nFillId ).get() )
pFill->fillToItemSet( rItemSet, bSkipPoolDefs );
}
void StylesBuffer::writeFillToPropertyMap( PropertyMap& rPropMap, sal_Int32 nFillId ) const
{
if( Fill* pFill = maFills.get( nFillId ).get() )
pFill->writeToPropertyMap( rPropMap );
}
bool operator==( const XfModel& rXfModel1, const XfModel& rXfModel2 )
{
return ( rXfModel1.mbCellXf == rXfModel2.mbCellXf &&

View File

@@ -55,8 +55,6 @@ public:
void SetItalic(const FontItalic eItalic ) { meItalic = eItalic; }
void SetWeight(const FontWeight eWeight ) { meWeight = eWeight; }
void SetWidthType(const FontWidth eWidthType) { meWidthType = eWidthType; }
void SetAlignment(const TextAlign eAlignment) { meAlign = eAlignment; }
void SetCharSet( const rtl_TextEncoding );
void SetSymbolFlag(const bool );
@@ -69,13 +67,9 @@ public:
bool IsBuiltInFont() const { return mbDevice; }
bool CanEmbed() const { return mbEmbeddable; }
bool CanSubset() const { return mbSubsettable; }
bool CanRotate() const { return mbOrientation; }
bool HasMapNames() const { return (maMapNames.getLength() > 0); }
void SetQuality( int nQuality ) { mnQuality = nQuality; }
void IncreaseQualityBy( int nQualityAmount ) { mnQuality += nQualityAmount; }
void DecreaseQualityBy( int nQualityAmount ) { mnQuality -= nQualityAmount; }
void SetMapNames( OUString const & aMapNames ) { maMapNames = aMapNames; }
void AddMapName( OUString const& );
void SetBuiltInFontFlag( bool bIsBuiltInFont ) { mbDevice = bIsBuiltInFont; }
@@ -125,13 +119,6 @@ inline void FontAttributes::SetSymbolFlag( const bool bSymbolFlag )
}
}
inline void FontAttributes::SetCharSet( const rtl_TextEncoding aEncoding )
{
meCharSet = aEncoding;
mbSymbolFlag = meCharSet == RTL_TEXTENCODING_SYMBOL;
}
inline void FontAttributes::AddMapName( OUString const & aMapName )
{
if( maMapNames.getLength() > 0 )

View File

@@ -74,7 +74,6 @@ public:
// device dependent functions
int GetQuality() const { return mnQuality; }
const OUString& GetMapNames() const { return maMapNames; }
void SetQuality( int nQuality ) { mnQuality = nQuality; }
void IncreaseQualityBy( int nQualityAmount ) { mnQuality += nQualityAmount; }

View File

@@ -70,7 +70,6 @@ public:
void SetTrueTypeFlag(bool bTrueTypeFont) { mbTrueTypeFont = bTrueTypeFont; }
void SetKernableFlag(bool bKernable) { mbKernableFont = bKernable; }
void SetFullstopCenteredFlag(bool bFullstopCentered) { mbFullstopCentered = bFullstopCentered; }
void SetBulletOffset(long nBulletOffset) { mnBulletOffset = nBulletOffset; }
// font metrics that are usually derived from the measurements
long GetUnderlineSize() { return mnUnderlineSize; }
@@ -99,32 +98,6 @@ public:
long GetDoubleStrikeoutOffset1() { return mnDStrikeoutOffset1; }
long GetDoubleStrikeoutOffset2() { return mnDStrikeoutOffset2; }
void SetUnderlineSize( long nUnderlineSize ) { mnUnderlineSize = nUnderlineSize; }
void SetUnderlineOffset( long nUnderlineOffset ) { mnUnderlineOffset = nUnderlineOffset; }
void SetBoldUnderlineSize( long nBUnderlineSize ) { mnBUnderlineSize = nBUnderlineSize; }
void SetBoldUnderlineOffset( long nBUnderlineOffset ) { mnBUnderlineOffset = nBUnderlineOffset; }
void SetDoubleUnderlineSize( long nDUnderlineSize ) { mnDUnderlineSize = nDUnderlineSize; }
void SetDoubleUnderlineOffset1( long nDUnderlineOffset1 ) { mnDUnderlineOffset1 = nDUnderlineOffset1; }
void SetDoubleUnderlineOffset2( long nDUnderlineOffset2 ) { mnDUnderlineOffset2 = nDUnderlineOffset2; }
void SetWavelineUnderlineSize( long nWUnderlineSize ) { mnWUnderlineSize = nWUnderlineSize; }
void SetWavelineUnderlineOffset( long nWUnderlineOffset ) { mnWUnderlineOffset = nWUnderlineOffset; }
void SetAboveUnderlineSize( long nAboveUnderlineSize ) { mnAboveUnderlineSize = nAboveUnderlineSize; }
void SetAboveUnderlineOffset( long nAboveUnderlineOffset ) { mnAboveUnderlineOffset = nAboveUnderlineOffset; }
void SetAboveBoldUnderlineSize( long nAboveBUnderlineSize ) { mnAboveBUnderlineSize = nAboveBUnderlineSize; }
void SetAboveBoldUnderlineOffset( long nAboveBUnderlineOffset ) { mnAboveBUnderlineOffset = nAboveBUnderlineOffset; }
void SetAboveDoubleUnderlineSize( long nAboveDUnderlineSize ) { mnAboveDUnderlineSize = nAboveDUnderlineSize; }
void SetAboveDoubleUnderlineOffset1( long nAboveDUnderlineOffset1 ) { mnAboveDUnderlineOffset1 = nAboveDUnderlineOffset1; }
void SetAboveDoubleUnderlineOffset2( long nAboveDUnderlineOffset2 ) { mnAboveDUnderlineOffset2 = nAboveDUnderlineOffset2; }
void SetAboveWavelineUnderlineSize( long nAboveWUnderlineSize ) { mnAboveWUnderlineSize = nAboveWUnderlineSize; }
void SetAboveWavelineUnderlineOffset( long nAboveWUnderlineOffset ) { mnAboveWUnderlineOffset = nAboveWUnderlineOffset; }
void SetStrikeoutSize( long nStrikeoutSize ) { mnStrikeoutSize = nStrikeoutSize; }
void SetStrikeoutOffset( long nStrikeoutOffset ) { mnStrikeoutOffset = nStrikeoutOffset; }
void SetBoldStrikeoutSize( long nBStrikeoutSize ) { mnBStrikeoutSize = nBStrikeoutSize; }
void SetBoldStrikeoutOffset( long nBStrikeoutOffset ) { mnBStrikeoutOffset = nBStrikeoutOffset; }
void SetDoubleStrikeoutSize( long nDStrikeoutSize ) { mnDStrikeoutSize = nDStrikeoutSize; }
void SetDoubleStrikeoutOffset1( long nDStrikeoutOffset1 ) { mnDStrikeoutOffset1 = nDStrikeoutOffset1; }
void SetDoubleStrikeoutOffset2( long nDStrikeoutOffset2 ) { mnDStrikeoutOffset2 = nDStrikeoutOffset2; }
void ImplInitTextLineSize( const OutputDevice* pDev );
void ImplInitAboveTextLineSize();