loplugin:staticmethods

Change-Id: Ib765ce5a61916b0598ebb42cb9445a5f09c8d37f
This commit is contained in:
Noel Grandin 2015-04-28 14:09:29 +02:00
parent e95b073790
commit 01c2626107
31 changed files with 54 additions and 54 deletions

View file

@ -33,7 +33,7 @@ public:
void testLoadStylesFromDocument();
private:
void checkStyleProperties(css::uno::Reference< css::style::XStyleFamiliesSupplier > xFamilySupplier);
static void checkStyleProperties(css::uno::Reference< css::style::XStyleFamiliesSupplier > xFamilySupplier);
protected:
~XStyleLoader() {}
@ -42,4 +42,4 @@ protected:
}
#endif // INCLUDED_TEST_SHEET_XSTYLELOADER_HXX
#endif // INCLUDED_TEST_SHEET_XSTYLELOADER_HXX

View file

@ -119,7 +119,7 @@ public:
void ConstructTree1();
void ConstructTree2();
void fillArray();
void ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen);
static void ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen);
};
#endif

View file

@ -145,7 +145,7 @@ public:
}
private:
void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray);
static void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray);
public:
void Read(LwpObjectStream *pStrm);

View file

@ -172,7 +172,7 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
for (sal_uInt8 nC = 1; nC < 11; nC++)
{
pListStyle->SetListBullet(nC, pSilverBullet->GetBulletChar(), pSilverBullet->GetBulletFontName(),
pSilverBullet->GetPrefix(), pSilverBullet->GetSuffix());
LwpSilverBullet::GetPrefix(), LwpSilverBullet::GetSuffix());
if (pIndent->GetMRest() > 0) /* note: used to be 0.001, no idea why */
{

View file

@ -117,8 +117,8 @@ protected:
OUString GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
void RegisterDefaultCell();
virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
static LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
static sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow){return nRow + 1; };
sal_uInt16 crowid;

View file

@ -100,7 +100,7 @@ public:
~LwpTextLanguage();
void Read(LwpObjectStream *pStrm);
private:
sal_uInt16 ConvertFrom96(sal_uInt16 orgLang);
static sal_uInt16 ConvertFrom96(sal_uInt16 orgLang);
sal_uInt16 m_nLanguage;
};

View file

@ -174,7 +174,7 @@ public:
private:
void MaxNumberOfPages(sal_uInt16& nNumPages);
void XFConvertFrameInPage(XFContentContainer* pCont);
void ChangeStyleName();
static void ChangeStyleName();
bool IsSkippedDivision();
};

View file

@ -176,8 +176,8 @@ private:
LtTm m_nLastRevisionTime;
LtTm m_nTotalEditTime;
private:
OUString DateTimeToOUString(LtTm& dt);
OUString TimeToOUString(LtTm& dt);
static OUString DateTimeToOUString(LtTm& dt);
static OUString TimeToOUString(LtTm& dt);
public:
void Read() SAL_OVERRIDE;

View file

@ -317,11 +317,11 @@ void LwpDrawObj::SetArrowHead(XFDrawStyle* pOpenedObjStyle, sal_uInt8 nArrowFlag
if (nLeftArrow)
{
pOpenedObjStyle->SetArrowStart( this->GetArrowName(nLeftArrow), fArrowSize, true);
pOpenedObjStyle->SetArrowStart( GetArrowName(nLeftArrow), fArrowSize, true);
}
if (nRightArrow)
{
pOpenedObjStyle->SetArrowEnd( this->GetArrowName(nRightArrow), fArrowSize, true);
pOpenedObjStyle->SetArrowEnd( GetArrowName(nRightArrow), fArrowSize, true);
}
}
@ -440,10 +440,10 @@ OUString LwpDrawLine::RegisterStyle()
XFDrawStyle* pStyle = new XFDrawStyle();
// set line style
this->SetLineStyle(pStyle, m_aLineRec.nLineWidth, m_aLineRec.nLineStyle, m_aLineRec.aPenColor);
SetLineStyle(pStyle, m_aLineRec.nLineWidth, m_aLineRec.nLineStyle, m_aLineRec.aPenColor);
// set arrow head
this->SetArrowHead(pStyle, m_aLineRec.nLineEnd, m_aLineRec.nLineWidth);
SetArrowHead(pStyle, m_aLineRec.nLineEnd, m_aLineRec.nLineWidth);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
return (pXFStyleManager->AddStyle(pStyle)).m_pStyle->GetStyleName();
@ -522,11 +522,11 @@ OUString LwpDrawPolyLine::RegisterStyle()
XFDrawStyle* pStyle = new XFDrawStyle();
// set line style
this->SetLineStyle(pStyle, m_aPolyLineRec.nLineWidth, m_aPolyLineRec.nLineStyle,
SetLineStyle(pStyle, m_aPolyLineRec.nLineWidth, m_aPolyLineRec.nLineStyle,
m_aPolyLineRec.aPenColor);
// set arrow head
this->SetArrowHead(pStyle, m_aPolyLineRec.nLineEnd, m_aPolyLineRec.nLineWidth);
SetArrowHead(pStyle, m_aPolyLineRec.nLineEnd, m_aPolyLineRec.nLineWidth);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
return pXFStyleManager->AddStyle(pStyle).m_pStyle->GetStyleName();
@ -608,7 +608,7 @@ OUString LwpDrawPolygon::RegisterStyle()
XFDrawStyle* pStyle = new XFDrawStyle();
// set line style
this->SetLineStyle(pStyle, m_aClosedObjStyleRec.nLineWidth, m_aClosedObjStyleRec.nLineStyle,
SetLineStyle(pStyle, m_aClosedObjStyleRec.nLineWidth, m_aClosedObjStyleRec.nLineStyle,
m_aClosedObjStyleRec.aPenColor);
// set fill style
@ -688,7 +688,7 @@ OUString LwpDrawRectangle::RegisterStyle()
XFDrawStyle* pStyle = new XFDrawStyle();
// set line style
this->SetLineStyle(pStyle, m_aClosedObjStyleRec.nLineWidth, m_aClosedObjStyleRec.nLineStyle,
SetLineStyle(pStyle, m_aClosedObjStyleRec.nLineWidth, m_aClosedObjStyleRec.nLineStyle,
m_aClosedObjStyleRec.aPenColor);
// set fill style
@ -847,7 +847,7 @@ OUString LwpDrawEllipse::RegisterStyle()
XFDrawStyle* pStyle = new XFDrawStyle();
// set line style
this->SetLineStyle(pStyle, m_aClosedObjStyleRec.nLineWidth, m_aClosedObjStyleRec.nLineStyle,
SetLineStyle(pStyle, m_aClosedObjStyleRec.nLineWidth, m_aClosedObjStyleRec.nLineStyle,
m_aClosedObjStyleRec.aPenColor);
// set fill style
@ -926,11 +926,11 @@ OUString LwpDrawArc::RegisterStyle()
XFDrawStyle* pStyle = new XFDrawStyle();
// set line style
this->SetLineStyle(pStyle, m_aArcRec.nLineWidth, m_aArcRec.nLineStyle,
SetLineStyle(pStyle, m_aArcRec.nLineWidth, m_aArcRec.nLineStyle,
m_aArcRec.aPenColor);
// set arrow head
this->SetArrowHead(pStyle, m_aArcRec.nLineEnd, m_aArcRec.nLineWidth);
SetArrowHead(pStyle, m_aArcRec.nLineEnd, m_aArcRec.nLineWidth);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
return pXFStyleManager->AddStyle(pStyle).m_pStyle->GetStyleName();

View file

@ -95,11 +95,11 @@ private:
protected:
void ReadClosedObjStyle();
void SetFillStyle(XFDrawStyle* pStyle);
void SetLineStyle(XFDrawStyle* pStyle, sal_uInt8 nWidth, sal_uInt8 nLineStyle,
static void SetLineStyle(XFDrawStyle* pStyle, sal_uInt8 nWidth, sal_uInt8 nLineStyle,
const SdwColor& rColor);
void SetPosition(XFFrame* pObj);
void SetArrowHead(XFDrawStyle* pOpenedObjStyle, sal_uInt8 nArrowFlag, sal_uInt8 nLineWidth);
OUString GetArrowName(sal_uInt8 nArrowStyle);
static void SetArrowHead(XFDrawStyle* pOpenedObjStyle, sal_uInt8 nArrowFlag, sal_uInt8 nLineWidth);
static OUString GetArrowName(sal_uInt8 nArrowStyle);
protected:
/**

View file

@ -280,8 +280,8 @@ public:
private:
void Override(sal_uInt32 fontID, rtl::Reference<XFFont> const & pFont);
inline sal_uInt16 GetFontNameIndex(sal_uInt32 fontID);
inline sal_uInt16 GetFontAttrIndex(sal_uInt32 fontID);
static inline sal_uInt16 GetFontNameIndex(sal_uInt32 fontID);
static inline sal_uInt16 GetFontAttrIndex(sal_uInt32 fontID);
};
sal_uInt16 LwpFontManager::GetFontNameIndex(sal_uInt32 fontID)

View file

@ -111,7 +111,7 @@ void LwpFoundry::Read(LwpObjectStream *pStrm)
{
if (!m_pDoc->IsChildDoc())
{
m_VerMgr.Read(pStrm);
LwpVersionManager::Read(pStrm);
}
m_ObjMgr.Read(pStrm);

View file

@ -86,8 +86,8 @@ public:
LwpVersionManager(){}
~LwpVersionManager(){}
public:
void Read(LwpObjectStream *pStrm);
void Skip(LwpObjectStream *pStrm);
static void Read(LwpObjectStream *pStrm);
static void Skip(LwpObjectStream *pStrm);
};
class LwpObjectManager

View file

@ -144,7 +144,7 @@ private:
void ConvertDocFieldEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark);
void ConvertDateTimeStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark);
void ConvertDateTimeEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark);
void ConvertCrossRefEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark);
static void ConvertCrossRefEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark);
void ConvertCrossRefStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark);
};

View file

@ -82,7 +82,7 @@ private:
LwpFrib* m_pFribs;
XFParagraph* m_pXFPara;//for parse ,add by 1-17 //Current XFPara used for frib parsing
LwpPara* m_pPara;//for get foundry, add by 1-17
void ProcessDropcap(LwpStory* pStory,LwpFrib* pFrib,sal_uInt32 nLen);
static void ProcessDropcap(LwpStory* pStory,LwpFrib* pFrib,sal_uInt32 nLen);
public:
// String GetText();
void XFConvert();

View file

@ -308,7 +308,7 @@ void LwpGraphicObject::CreateDrawObjects()
// get graphic object's bento objet name
LwpObjectID& rMyID = this->GetObjectID();
std::string aGrfObjName;
this->GetBentoNamebyID(rMyID, aGrfObjName);
GetBentoNamebyID(rMyID, aGrfObjName);
// get bento stream by the name
pBentoContainer->CreateGraphicStream(pDrawObjStream, aGrfObjName.c_str());
@ -360,7 +360,7 @@ sal_uInt32 LwpGraphicObject::GetRawGrafData(sal_uInt8*& pGrafData)
// get graphic object's bento objet name
LwpObjectID& rMyID = this->GetObjectID();
std::string aGrfObjName;
this->GetBentoNamebyID(rMyID, aGrfObjName);
GetBentoNamebyID(rMyID, aGrfObjName);
// get bento stream by the name
pBentoContainer->CreateGraphicStream(pGrafStream, aGrfObjName.c_str());
@ -403,7 +403,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(sal_uInt8*& pGrafData)
// get graphic object's bento objet name
LwpObjectID& rMyID = this->GetObjectID();
std::string aGrfObjName;
this->GetBentoNamebyID(rMyID, aGrfObjName);
GetBentoNamebyID(rMyID, aGrfObjName);
char sDName[64]="";
sprintf(sDName, "%s-D", aGrfObjName.c_str());

View file

@ -124,7 +124,7 @@ public:
// add by , 03/25/2005
void CreateDrawObjects();
void CreateGrafObject();
void GetBentoNamebyID(LwpObjectID& rMyID, std::string& rName);
static void GetBentoNamebyID(LwpObjectID& rMyID, std::string& rName);
sal_uInt32 GetRawGrafData(sal_uInt8*& pGrafData);
sal_uInt32 GetGrafData(sal_uInt8*& pGrafData);
void GetGrafOrgSize(long& rWidth, long& rHeight) { rWidth = m_Cache.Width; rHeight = m_Cache.Height; }

View file

@ -282,7 +282,7 @@ private:
void GetCurrencyStr(LwpNumericFormatSubset aNumber, OUString& aPrefix, OUString& aSuffix, bool bNegtive=false);
void SetNumberType(XFNumberStyle* pStyle);
OUString reencode(const OUString& sCode);
static OUString reencode(const OUString& sCode);
};
inline bool

View file

@ -114,7 +114,7 @@ private:
void ReadStream();
void Read2Buffer();
sal_uInt8* AllocBuffer(sal_uInt16 size);
sal_uInt16 DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, sal_uInt16 Size);
static sal_uInt16 DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, sal_uInt16 Size);
void ReleaseBuffer();
};

View file

@ -276,7 +276,7 @@ protected:
private:
virtual ~LwpPara();
void OverrideAlignment(LwpAlignmentOverride* base,LwpAlignmentOverride* over,XFParaStyle* pOverStyle);//add by 1-24
static void OverrideAlignment(LwpAlignmentOverride* base,LwpAlignmentOverride* over,XFParaStyle* pOverStyle);//add by 1-24
void OverrideIndent(LwpIndentOverride* base,LwpIndentOverride* over,XFParaStyle* pOverStyle);
void OverrideSpacing(LwpSpacingOverride* base,LwpSpacingOverride* over,XFParaStyle* pOverStyle);
void OverrideParaBorder(LwpParaProperty* pProps, XFParaStyle* pOverStyle);

View file

@ -369,7 +369,7 @@ void LwpPara::OverrideParaBorder(LwpParaProperty* pProps, XFParaStyle* pOverStyl
pLocalBorder->Override(pFinalBorder.get());
}
pParaStyle->ApplyParaBorder(pOverStyle, pFinalBorder.get());
LwpParaStyle::ApplyParaBorder(pOverStyle, pFinalBorder.get());
}
/**
* @short: Override parabreaks style.

View file

@ -194,7 +194,7 @@ void LwpParaStyle::Apply(XFParaStyle *pParaStyle)
LwpParaBorderOverride *pBorder = dynamic_cast<LwpParaBorderOverride*>(pPiece->GetOverride());
if( pBorder )
{
this->ApplyParaBorder(pParaStyle, pBorder);
ApplyParaBorder(pParaStyle, pBorder);
}
}

View file

@ -86,8 +86,8 @@ public:
virtual void Apply(XFParaStyle *pStrm);
// 01/26/2005
void ApplyParaBorder(XFParaStyle* pParaStyle, LwpParaBorderOverride* pBorder);
void ApplyBreaks(XFParaStyle* pParaStyle, LwpBreaksOverride* pBreaks);
static void ApplyParaBorder(XFParaStyle* pParaStyle, LwpParaBorderOverride* pBorder);
static void ApplyBreaks(XFParaStyle* pParaStyle, LwpBreaksOverride* pBreaks);
//end
static void ApplyAlignment(XFParaStyle* pParaStyle, LwpAlignmentOverride* pAlign);
static void ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpIndentOverride* pIndent);

View file

@ -87,8 +87,8 @@ private:
LwpAtomHolder m_SelectedPages;
public:
void Read(LwpObjectStream* pStrm);
void Skip(LwpObjectStream *pStrm);
static void Read(LwpObjectStream* pStrm);
static void Skip(LwpObjectStream *pStrm);
};
#endif

View file

@ -109,9 +109,9 @@ public:
UChar32 GetBulletChar();
OUString GetPrefix() { return OUString(); }
static OUString GetPrefix() { return OUString(); }
OUString GetSuffix() { return OUString(); }
static OUString GetSuffix() { return OUString(); }
inline OUString GetNumberingName();
@ -121,7 +121,7 @@ public:
static OUString GetNumCharByStyleID(LwpFribParaNumber* pParaNumber);
inline bool IsPosCumulative(sal_uInt16 nHideLevels);
static inline bool IsPosCumulative(sal_uInt16 nHideLevels);
inline bool IsLesserLevel(sal_uInt16 nPos);
inline bool IsNewSection(sal_uInt16 nPos);

View file

@ -141,7 +141,7 @@ private:
sal_uInt8 nEndCol,sal_uInt16 nRowID);
void ConvertColumn(XFTable *pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol);
sal_uInt16 ConvertHeadingRow(XFTable* pXFTable,sal_uInt16 nStartHeadRow,sal_uInt16 nEndHeadRow);
bool FindSplitColMark(XFTable* pXFTable,sal_uInt8* pCellMark,sal_uInt8& nMaxColSpan);
static bool FindSplitColMark(XFTable* pXFTable,sal_uInt8* pCellMark,sal_uInt8& nMaxColSpan);
void SplitRowToCells(XFTable* pTmpTable,XFTable* pXFTable,
sal_uInt8 nFirstColSpann,sal_uInt8* pCellMark);

View file

@ -85,7 +85,7 @@ protected:
bool GetUsePageNumber(sal_uInt16 index);
sal_uInt16 GetSeparatorType(sal_uInt16 index);
LwpTocLevelData * GetSearchLevelPtr(sal_uInt16 index);
LwpTocLevelData * GetNextSearchLevelPtr(sal_uInt16 index, LwpTocLevelData * pCurData);
static LwpTocLevelData * GetNextSearchLevelPtr(sal_uInt16 index, LwpTocLevelData * pCurData);
void AddSourceStyle(XFIndex* pToc, LwpTocLevelData * pLevel, LwpFoundry * pFoundry);
private:
enum {MAX_LEVELS = 9};

View file

@ -75,7 +75,7 @@ LwpUIDocument::~LwpUIDocument()
void LwpUIDocument::Read(LwpObjectStream *pStrm)
{
m_NamedProps.Read(pStrm);
LwpNamedProperties::Read(pStrm);
m_ARMacroOpts.Read(pStrm);
m_MergedOpts.Read(pStrm);
m_SheetFullPath.ReadPathAtom(pStrm);

View file

@ -83,7 +83,7 @@ public:
LwpNamedProperties(){}
~LwpNamedProperties(){}
public:
void Read(LwpObjectStream *pStrm);
static void Read(LwpObjectStream *pStrm);
};
/**
* @brief macro options contained in UIDocument structure

View file

@ -76,7 +76,7 @@ public:
LwpUserDictFiles(){}
LwpUserDictFiles(LwpObjectStream *pStrm);
~LwpUserDictFiles(){}
void Read(LwpObjectStream *pStrm);
static void Read(LwpObjectStream *pStrm);
};
#endif

View file

@ -174,7 +174,7 @@ public:
private:
void StartFrame(IXFStream *pStrm);
void EndFrame(IXFStream *pStrm);
static void EndFrame(IXFStream *pStrm);
void AdjustZIndex();