summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-20 12:38:10 +0200
committerNoel Grandin <noel@peralex.com>2015-01-26 08:42:28 +0200
commitb44cbb26efe1d0b0950b1e1613e131b506dc3876 (patch)
tree9b4d5d99e5dad0971079b997a02a6d96536709ca /lotuswordpro
parent26ad60aec69310fecd918f1c2e09056aa4782320 (diff)
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpcelllayout.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.hxx2
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx29
-rw-r--r--lotuswordpro/source/filter/lwplayout.hxx64
-rw-r--r--lotuswordpro/source/filter/lwplaypiece.hxx2
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx10
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframe.hxx2
-rw-r--r--lotuswordpro/source/filter/xfilter/xflist.hxx4
8 files changed, 55 insertions, 60 deletions
diff --git a/lotuswordpro/source/filter/lwpcelllayout.hxx b/lotuswordpro/source/filter/lwpcelllayout.hxx
index a6123a42f565..d162c209c524 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.hxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.hxx
@@ -118,7 +118,7 @@ protected:
void RegisterDefaultCell();
virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
- virtual sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
+ sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow){return nRow + 1; };
sal_uInt16 crowid;
diff --git a/lotuswordpro/source/filter/lwpfribtable.hxx b/lotuswordpro/source/filter/lwpfribtable.hxx
index f7d0acbef49e..7c24562e838b 100644
--- a/lotuswordpro/source/filter/lwpfribtable.hxx
+++ b/lotuswordpro/source/filter/lwpfribtable.hxx
@@ -67,7 +67,7 @@ public:
void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) SAL_OVERRIDE;
LwpSuperTableLayout* GetSuperTable();
void RegisterNewStyle();
- virtual void XFConvert(XFContentContainer* pCont);
+ void XFConvert(XFContentContainer* pCont);
private:
LwpObjectID m_objTable;
};
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 594a375147b6..69ad38e423d9 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -1644,26 +1644,21 @@ XFColumnSep* LwpLayout::GetColumnSep()
return NULL;
}
- LwpBorderStuff* pBorderStuff = pLayoutGutters->GetBorderStuff();
+ LwpBorderStuff& pBorderStuff = pLayoutGutters->GetBorderStuff();
- if(pBorderStuff)
- {
- LwpBorderStuff::BorderType eType = LwpBorderStuff::LEFT;
- LwpColor aColor = pBorderStuff->GetSideColor(eType);
- double fWidth = pBorderStuff->GetSideWidth(eType);
- //sal_uInt16 nType = pBorderStuff->GetSideType(eType);
-
- XFColumnSep* pColumnSep = new XFColumnSep();
- XFColor aXFColor(aColor.To24Color());
- pColumnSep->SetColor(aXFColor);
- pColumnSep->SetWidth(fWidth);
- pColumnSep->SetRelHeight(100);
- pColumnSep->SetVerticalAlign(enumXFAlignTop);
+ LwpBorderStuff::BorderType eType = LwpBorderStuff::LEFT;
+ LwpColor aColor = pBorderStuff.GetSideColor(eType);
+ double fWidth = pBorderStuff.GetSideWidth(eType);
+ //sal_uInt16 nType = pBorderStuff->GetSideType(eType);
- return pColumnSep;
- }
- return NULL;
+ XFColumnSep* pColumnSep = new XFColumnSep();
+ XFColor aXFColor(aColor.To24Color());
+ pColumnSep->SetColor(aXFColor);
+ pColumnSep->SetWidth(fWidth);
+ pColumnSep->SetRelHeight(100);
+ pColumnSep->SetVerticalAlign(enumXFAlignTop);
+ return pColumnSep;
}
/**
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx
index e1ffb4fc8b87..9d6488d09da3 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -111,43 +111,43 @@ public:
virtual bool IsAutoGrowDown(){ return false;}
virtual bool IsAutoGrowLeft(){ return false;}
virtual bool IsAutoGrowRight(){ return false;}
- virtual bool IsFitGraphic();
- virtual bool IsAutoGrowWidth();
- virtual bool IsInlineToMargin();
+ bool IsFitGraphic();
+ bool IsAutoGrowWidth();
+ bool IsInlineToMargin();
virtual sal_uInt8 GetContentOrientation(){ return TEXT_ORIENT_LRTB;}
virtual bool HonorProtection();
virtual bool IsProtected();
- virtual bool HasProtection();
- virtual OUString GetStyleName(){ return m_StyleName;}
- virtual bool IsComplex();
+ bool HasProtection();
+ OUString GetStyleName(){ return m_StyleName;}
+ bool IsComplex();
virtual bool IsAnchorPage(){ return false;}
virtual bool IsAnchorFrame(){ return false;}
virtual bool IsAnchorCell(){ return false;}
- virtual bool IsPage();
- virtual bool IsHeader();
- virtual bool IsFooter();
- virtual bool IsFrame();
- virtual bool IsCell();
- virtual bool IsSuperTable();
- virtual bool IsGroupHead();
+ bool IsPage();
+ bool IsHeader();
+ bool IsFooter();
+ bool IsFrame();
+ bool IsCell();
+ bool IsSuperTable();
+ bool IsGroupHead();
virtual sal_uInt8 GetRelativeType();
- virtual bool IsRelativeAnchored();
- virtual LwpUseWhen* GetUseWhen();
+ bool IsRelativeAnchored();
+ LwpUseWhen* GetUseWhen();
virtual LwpUseWhen* VirtualGetUseWhen(){ return NULL;}
virtual bool IsUseOnAllPages(){ return false;}
virtual bool IsUseOnAllEvenPages(){ return false;}
virtual bool IsUseOnAllOddPages(){ return false;}
virtual bool IsUseOnPage(){ return false;}
virtual sal_Int32 GetPageNumber(sal_uInt16 /*nLayoutNumber*/ = 0){ return -1;}
- virtual bool IsMinimumHeight();
+ bool IsMinimumHeight();
virtual bool IsForWaterMark(){ return false;}
virtual LwpPara* GetLastParaOfPreviousStory() { return NULL; }
- virtual LwpVirtualLayout* GetParentLayout();
+ LwpVirtualLayout* GetParentLayout();
virtual LwpVirtualLayout* GetContainerLayout(){ return NULL;}
- virtual void RegisterChildStyle();
- virtual bool NoContentReference();
- virtual bool IsStyleLayout();
- virtual enumXFAlignType GetVerticalAlignmentType()
+ void RegisterChildStyle();
+ bool NoContentReference();
+ bool IsStyleLayout();
+ enumXFAlignType GetVerticalAlignmentType()
{
if (m_nAttributes & STYLE_CENTEREDVERTICALLY)
{
@@ -159,7 +159,7 @@ public:
}
return enumXFAlignTop;
};
- virtual void SetStyleName(const OUString & str){ m_StyleName = str;}
+ void SetStyleName(const OUString & str){ m_StyleName = str;}
virtual double GetWidth(){return -1;}
//Check whether there are contents in the layout
@@ -219,7 +219,7 @@ protected:
enum {SHIFT_UP = 0, SHIFT_DOWN = 4, SHIFT_LEFT = 8, SHIFT_RIGHT =12};
public:
virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_VIRTUAL_LAYOUT;}
- virtual LwpVirtualLayout* FindChildByType(LWP_LAYOUT_TYPE eType);
+ LwpVirtualLayout* FindChildByType(LWP_LAYOUT_TYPE eType);
};
class LwpAssociatedLayouts
@@ -298,9 +298,9 @@ public:
virtual sal_uInt8 GetContentOrientation() SAL_OVERRIDE;
virtual bool HonorProtection() SAL_OVERRIDE;
virtual bool IsProtected() SAL_OVERRIDE;
- virtual LwpVirtualLayout* GetWaterMarkLayout();
+ LwpVirtualLayout* GetWaterMarkLayout();
XFBGImage* GetXFBGImage();
- virtual bool GetUsePrinterSettings();
+ bool GetUsePrinterSettings();
LwpLayoutScale* GetLayoutScale(){return dynamic_cast<LwpLayoutScale*>(m_LayScale.obj().get());}
sal_uInt16 GetScaleMode(void);
@@ -312,12 +312,12 @@ public:
bool CanSizeRight(void);
virtual double GetWidth() SAL_OVERRIDE;
- virtual sal_Int32 GetMinimumWidth();
+ sal_Int32 GetMinimumWidth();
bool IsSizeRightToContent(void);
bool IsSizeRightToContainer(void);
sal_Int32 DetermineWidth();
virtual double GetHeight();
- virtual LwpPoint GetOrigin();
+ LwpPoint GetOrigin();
bool IsPatternFill();
XFBGImage* GetFillPattern();
@@ -377,7 +377,7 @@ public:
virtual sal_uInt16 GetNumCols() SAL_OVERRIDE;
virtual double GetColWidth(sal_uInt16 nIndex) SAL_OVERRIDE;
virtual double GetColGap(sal_uInt16 nIndex) SAL_OVERRIDE;
- virtual sal_uInt16 GetUsePage();
+ sal_uInt16 GetUsePage();
public:
enum UseWhenType
{
@@ -388,7 +388,7 @@ public:
StartOnEvenPage
};
public:
- virtual UseWhenType GetUseWhenType();
+ UseWhenType GetUseWhenType();
virtual bool IsUseOnAllPages() SAL_OVERRIDE;
virtual bool IsUseOnAllEvenPages() SAL_OVERRIDE;
virtual bool IsUseOnAllOddPages() SAL_OVERRIDE;
@@ -402,10 +402,10 @@ class LwpPlacableLayout : public LwpLayout
public:
LwpPlacableLayout( LwpObjectHeader &objHdr, LwpSvStream* pStrm );
virtual ~LwpPlacableLayout();
- virtual sal_uInt8 GetWrapType();
- virtual LwpLayoutRelativity* GetRelativityPiece();
+ sal_uInt8 GetWrapType();
+ LwpLayoutRelativity* GetRelativityPiece();
virtual sal_uInt8 GetRelativeType() SAL_OVERRIDE;
- virtual sal_Int32 GetBaseLineOffset();
+ sal_Int32 GetBaseLineOffset();
virtual bool IsAnchorPage() SAL_OVERRIDE;
virtual bool IsAnchorFrame() SAL_OVERRIDE;
virtual bool IsAnchorCell() SAL_OVERRIDE;
diff --git a/lotuswordpro/source/filter/lwplaypiece.hxx b/lotuswordpro/source/filter/lwplaypiece.hxx
index 20e3a3d83240..306101aa153c 100644
--- a/lotuswordpro/source/filter/lwplaypiece.hxx
+++ b/lotuswordpro/source/filter/lwplaypiece.hxx
@@ -248,7 +248,7 @@ class LwpLayoutGutters : public LwpVirtualPiece
public:
LwpLayoutGutters(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
- inline virtual LwpBorderStuff* GetBorderStuff(){return &m_BorderBuffer;}
+ inline LwpBorderStuff& GetBorderStuff() { return m_BorderBuffer; }
protected:
virtual void Read() SAL_OVERRIDE;
protected:
diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx
index c05c9d7e46fa..d6f3c9998149 100644
--- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx
@@ -89,14 +89,14 @@ public:
*/
virtual void Add(XFContent *pContent);
- virtual void InsertAtBegin(XFContent *pContent);
- virtual void RemoveAt(sal_uInt32 nPos);
- virtual rtl::Reference<XFContent> GetLastContent();
- virtual void RemoveLastContent();
+ void InsertAtBegin(XFContent *pContent);
+ void RemoveAt(sal_uInt32 nPos);
+ rtl::Reference<XFContent> GetLastContent();
+ void RemoveLastContent();
/**
* @descr convience function for add text content.
*/
- virtual void Add(const OUString& text);
+ void Add(const OUString& text);
/**
* @descr return the number of contents in the container.
diff --git a/lotuswordpro/source/filter/xfilter/xfframe.hxx b/lotuswordpro/source/filter/xfilter/xfframe.hxx
index bed0aad8032b..aeb2efb2c06f 100644
--- a/lotuswordpro/source/filter/xfilter/xfframe.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfframe.hxx
@@ -159,7 +159,7 @@ public:
/**
* @descr Get the frame type. image, drawing or text-box.
*/
- virtual enumXFFrameType GetFrameType();
+ enumXFFrameType GetFrameType();
/**
* @descr Get content type, enumXFContentFrame.
diff --git a/lotuswordpro/source/filter/xfilter/xflist.hxx b/lotuswordpro/source/filter/xfilter/xflist.hxx
index 1fa175377023..05531cccd858 100644
--- a/lotuswordpro/source/filter/xfilter/xflist.hxx
+++ b/lotuswordpro/source/filter/xfilter/xflist.hxx
@@ -92,9 +92,9 @@ public:
*/
virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE;
- virtual void StartList(IXFStream *pStrm, bool bContinueNumber = false);
+ void StartList(IXFStream *pStrm, bool bContinueNumber = false);
- virtual void EndList(IXFStream *pStrm);
+ void EndList(IXFStream *pStrm);
private:
bool m_bOrdered;