diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-23 09:40:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-23 10:19:43 +0200 |
commit | b6fc1f033f3c23cac389ddaec32af04dc80cc1a2 (patch) | |
tree | cfacff6b9a391f6c3dfa3c6661d9968ecf5f8895 /lotuswordpro | |
parent | de0e1e7d4bc99be3e9b9355adf243677914de4c0 (diff) |
loplugin:constantparam in lotuswordpro
Change-Id: I09c2301adb674fbed68a2659f828c7501a90b0c6
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfont.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfribmark.cxx | 14 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfribtext.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjid.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjid.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpparastyle.cxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwptools.cxx | 8 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfborders.cxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfborders.hxx | 3 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdatestyle.hxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx | 16 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xffontdecl.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xffontdecl.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xftimestyle.hxx | 6 |
16 files changed, 50 insertions, 51 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index cd1dee6954c7..82e1fc5f9842 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -252,7 +252,7 @@ void LwpDrawObj::SetLineStyle(XFDrawStyle* pStyle, sal_uInt8 nWidth, sal_uInt8 n if (nLineStyle == LS_DOT) { - pStyle->SetLineDashStyle(enumXFLineDash, 1, 1, 0.05, 0.05, 0.05); + pStyle->SetLineDashStyle(enumXFLineDash, 0.05, 0.05, 0.05); } // line width @@ -317,11 +317,11 @@ void LwpDrawObj::SetArrowHead(XFDrawStyle* pOpenedObjStyle, sal_uInt8 nArrowFlag if (nLeftArrow) { - pOpenedObjStyle->SetArrowStart( GetArrowName(nLeftArrow), fArrowSize, true); + pOpenedObjStyle->SetArrowStart( GetArrowName(nLeftArrow), fArrowSize); } if (nRightArrow) { - pOpenedObjStyle->SetArrowEnd( GetArrowName(nRightArrow), fArrowSize, true); + pOpenedObjStyle->SetArrowEnd( GetArrowName(nRightArrow), fArrowSize); } } diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx index 8805533ba181..437a9620034b 100644 --- a/lotuswordpro/source/filter/lwpfont.cxx +++ b/lotuswordpro/source/filter/lwpfont.cxx @@ -236,7 +236,7 @@ void LwpFontTableEntry::RegisterFontDecl() { if(m_FaceName.str().isEmpty()) return; XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - XFFontDecl aFontDecl1( m_FaceName.str(), m_FaceName.str(), false ); + XFFontDecl aFontDecl1( m_FaceName.str(), m_FaceName.str() ); pXFStyleManager->AddFontDecl(aFontDecl1); } diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx index f562e38baf47..7b77d277eb76 100644 --- a/lotuswordpro/source/filter/lwpfribmark.cxx +++ b/lotuswordpro/source/filter/lwpfribmark.cxx @@ -436,7 +436,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) pDateStyle->AddText(":"); pDateStyle->AddMinute(); pDateStyle->AddText(":"); - pDateStyle->AddSecond(true,0); + pDateStyle->AddSecond(); } else if (sFormula == "%FLM/D/YY") { @@ -887,7 +887,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); pTimeStyle->AddText(":"); - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); } else if (sFormula == "%FLH:mm ampm") { @@ -912,7 +912,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); pTimeStyle->AddText(":"); - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(true); } @@ -923,7 +923,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); pTimeStyle->AddText(":"); - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); } else if (sFormula == "%FLH ampm") { @@ -945,7 +945,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) else if (sFormula == "%FLSS") { pTimeStyle = new XFTimeStyle; - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); } else if (sFormula == "%FLampm") { @@ -1002,7 +1002,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); pTimeStyle->AddText(":"); - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(true); } @@ -1020,7 +1020,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula) pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); pTimeStyle->AddText(":"); - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); } //other version end } diff --git a/lotuswordpro/source/filter/lwpfribtext.cxx b/lotuswordpro/source/filter/lwpfribtext.cxx index 50bd3f37e241..1d2c61ed4b84 100644 --- a/lotuswordpro/source/filter/lwpfribtext.cxx +++ b/lotuswordpro/source/filter/lwpfribtext.cxx @@ -194,7 +194,7 @@ void LwpFribDocVar::RegisterDefaultTimeStyle() pDateStyle->AddText(":"); pDateStyle->AddMinute(); pDateStyle->AddText(":"); - pDateStyle->AddSecond(true,0); + pDateStyle->AddSecond(); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); m_TimeStyle = pXFStyleManager->AddStyle(pDateStyle).m_pStyle->GetStyleName(); diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx index 22f4c2f1dd27..d9f844066738 100644 --- a/lotuswordpro/source/filter/lwpobjid.cxx +++ b/lotuswordpro/source/filter/lwpobjid.cxx @@ -63,8 +63,8 @@ #include "lwpobjfactory.hxx" #include "lwpglobalmgr.hxx" -LwpObjectID::LwpObjectID(sal_uInt32 low, sal_uInt16 high) - :m_nLow(low), m_nHigh(high), m_nIndex(0), m_bIsCompressed(false) +LwpObjectID::LwpObjectID() + :m_nLow(0), m_nHigh(0), m_nIndex(0), m_bIsCompressed(false) { } /** diff --git a/lotuswordpro/source/filter/lwpobjid.hxx b/lotuswordpro/source/filter/lwpobjid.hxx index b461682c4fba..ec276d329615 100644 --- a/lotuswordpro/source/filter/lwpobjid.hxx +++ b/lotuswordpro/source/filter/lwpobjid.hxx @@ -77,7 +77,7 @@ class LwpObject; class LwpObjectID { public: - LwpObjectID(sal_uInt32 low=0, sal_uInt16 high=0); + LwpObjectID(); private: sal_uInt32 m_nLow; sal_uInt16 m_nHigh; diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx index 6870785a4b6b..ef7ad928429d 100644 --- a/lotuswordpro/source/filter/lwpparastyle.cxx +++ b/lotuswordpro/source/filter/lwpparastyle.cxx @@ -271,20 +271,20 @@ void LwpParaStyle::ApplySubBorder(LwpBorderStuff* pBorderStuff, LwpBorderStuff:: break; case 0x15: //double , fall through! case 0x16: //thick double - pXFBorders->SetDoubleLine(eXFBorderSide, true, false); + pXFBorders->SetDoubleLine(eXFBorderSide); pXFBorders->SetWidthOuter(eXFBorderSide, static_cast<float>(fWidth*0.333)); pXFBorders->SetWidthSpace(eXFBorderSide, static_cast<float>(fWidth*0.334)); pXFBorders->SetWidthInner(eXFBorderSide, static_cast<float>(fWidth*0.333)); // pXFBorders->SetWidth(eXFBorderSide, fWidth); break; case 0x18: //thick-thin - pXFBorders->SetDoubleLine(eXFBorderSide, true, false); + pXFBorders->SetDoubleLine(eXFBorderSide); pXFBorders->SetWidthOuter(eXFBorderSide, static_cast<float>(fWidth*0.5)); pXFBorders->SetWidthInner(eXFBorderSide, static_cast<float>(fWidth*0.25)); pXFBorders->SetWidthSpace(eXFBorderSide, static_cast<float>(fWidth*0.25)); break; case 0x19: //thin-thick - pXFBorders->SetDoubleLine(eXFBorderSide, true, false); + pXFBorders->SetDoubleLine(eXFBorderSide); pXFBorders->SetWidthInner(eXFBorderSide, static_cast<float>(fWidth*0.7)); pXFBorders->SetWidthOuter(eXFBorderSide, static_cast<float>(fWidth*0.15)); pXFBorders->SetWidthSpace(eXFBorderSide, static_cast<float>(fWidth*0.15)); diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx index 8329eeb0151a..118848d4a72b 100644 --- a/lotuswordpro/source/filter/lwptools.cxx +++ b/lotuswordpro/source/filter/lwptools.cxx @@ -410,9 +410,9 @@ XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat) } } if (j==1) - pDateStyle->AddSecond(false,0); + pDateStyle->AddSecond(false); else - pDateStyle->AddSecond(true,0); + pDateStyle->AddSecond(); break; } case 'S': @@ -731,9 +731,9 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle() } } if (j==1) - pTimeStyle->AddSecond(false,0); + pTimeStyle->AddSecond(false); else - pTimeStyle->AddSecond(true,0); + pTimeStyle->AddSecond(); break; } case 'S': diff --git a/lotuswordpro/source/filter/xfilter/xfborders.cxx b/lotuswordpro/source/filter/xfilter/xfborders.cxx index ec406b949ac2..2d3ef738d5e9 100644 --- a/lotuswordpro/source/filter/xfilter/xfborders.cxx +++ b/lotuswordpro/source/filter/xfilter/xfborders.cxx @@ -227,21 +227,21 @@ void XFBorders::SetWidth(enumXFBorder side, double width) } } -void XFBorders::SetDoubleLine(enumXFBorder side, bool dual,bool bSameWidth) +void XFBorders::SetDoubleLine(enumXFBorder side) { switch(side) { case enumXFBorderLeft: - m_aBorderLeft.SetDoubleLine(dual,bSameWidth); + m_aBorderLeft.SetDoubleLine(true/*dual*/,false/*bSameWidth*/); break; case enumXFBorderRight: - m_aBorderRight.SetDoubleLine(dual,bSameWidth); + m_aBorderRight.SetDoubleLine(true/*dual*/,false/*bSameWidth*/); break; case enumXFBorderTop: - m_aBorderTop.SetDoubleLine(dual,bSameWidth); + m_aBorderTop.SetDoubleLine(true/*dual*/,false/*bSameWidth*/); break; case enumXFBorderBottom: - m_aBorderBottom.SetDoubleLine(dual,bSameWidth); + m_aBorderBottom.SetDoubleLine(true/*dual*/,false/*bSameWidth*/); break; default: break; diff --git a/lotuswordpro/source/filter/xfilter/xfborders.hxx b/lotuswordpro/source/filter/xfilter/xfborders.hxx index 57602c24f902..c537cb0a8dff 100644 --- a/lotuswordpro/source/filter/xfilter/xfborders.hxx +++ b/lotuswordpro/source/filter/xfilter/xfborders.hxx @@ -148,9 +148,8 @@ public: /** * @descr Set border side as double line. - * @param bSameWidth whether two borders are same width. */ - void SetDoubleLine(enumXFBorder side, bool dual,bool bSameWidth); + void SetDoubleLine(enumXFBorder side); /** * @descr Set inner border with of border side. diff --git a/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx b/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx index 1ae8acd191bf..f93af6ef340a 100644 --- a/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx @@ -101,7 +101,7 @@ public: void AddMinute( bool bLongFmt = true ); - void AddSecond( bool bLongFmt = true, sal_Int16 nDecimalPos = 2); + void AddSecond( bool bLongFmt = true ); void AddAmPm(); @@ -187,12 +187,12 @@ inline void XFDateStyle::AddMinute( bool bLongFmt ) m_aParts.AddStyle(part); } -inline void XFDateStyle::AddSecond( bool bLongFmt, sal_Int16 pos) +inline void XFDateStyle::AddSecond( bool bLongFmt ) { XFDatePart *part = new XFDatePart(); part->SetPartType(enumXFDateSecond); part->SetLongFmt(bLongFmt); - part->SetDecimalPos(pos); + part->SetDecimalPos(0); m_aParts.AddStyle(part); } diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx index 93ea54425586..e4f6038accfd 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx @@ -89,7 +89,7 @@ XFDrawStyle::~XFDrawStyle() } } -void XFDrawStyle::SetLineStyle(double width, XFColor color, sal_Int32 transparency) +void XFDrawStyle::SetLineStyle(double width, XFColor color) { if( !m_pLineStyle ) { @@ -98,10 +98,10 @@ void XFDrawStyle::SetLineStyle(double width, XFColor color, sal_Int32 transpa } m_pLineStyle->SetWidth(width); m_pLineStyle->SetColor(color); - m_pLineStyle->SetTransparency(transparency); + m_pLineStyle->SetTransparency(0); } -void XFDrawStyle::SetLineDashStyle(enumXFLineStyle style, int num1, int num2, double len1, double len2, double space ) +void XFDrawStyle::SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space ) { if( !m_pLineStyle ) { @@ -109,9 +109,9 @@ void XFDrawStyle::SetLineDashStyle(enumXFLineStyle style, int num1, int num2, m_pLineStyle->SetStyleName( XFGlobal::GenStrokeDashName()); } m_pLineStyle->SetLineStyle(style); - m_pLineStyle->SetDot1Number(num1); + m_pLineStyle->SetDot1Number(1); m_pLineStyle->SetDot1Length(len1); - m_pLineStyle->SetDot2Number(num2); + m_pLineStyle->SetDot2Number(1); m_pLineStyle->SetDot2Length(len2); m_pLineStyle->SetSpace(space); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx index 76cd5113ff00..9a4a3aff1b46 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx @@ -86,12 +86,12 @@ public: /** * @descr Set drawing object border line. */ - void SetLineStyle(double width, XFColor color = XFColor(0,0,0), sal_Int32 transparency = 0); + void SetLineStyle(double width, XFColor color = XFColor(0,0,0)); /** * @descr Set drawing object dash border style. */ - void SetLineDashStyle(enumXFLineStyle style, int num1, int num2, double len1, double len2, double space ); + void SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space ); /** * @descr Set drawing object area fill color. @@ -106,12 +106,12 @@ public: /** * @descr Set drawing object arrow start style,only lines can have arrows. */ - void SetArrowStart(const OUString& start, double size=0.3, bool center = false); + void SetArrowStart(const OUString& start, double size=0.3); /** * @descr Set drawing object arrow end style,only lines can have arrows. */ - void SetArrowEnd(const OUString& end, double size=0.3, bool center = false); + void SetArrowEnd(const OUString& end, double size=0.3); void SetFontWorkStyle(enumXFFWStyle eStyle, enumXFFWAdjust eAdjust); @@ -133,20 +133,20 @@ private: bool m_bArrowEndCenter; }; -inline void XFDrawStyle::SetArrowStart(const OUString& start, double size, bool center) +inline void XFDrawStyle::SetArrowStart(const OUString& start, double size) { assert(size>0); m_strArrowStart = start; m_fArrowStartSize = size; - m_bArrowStartCenter = center; + m_bArrowStartCenter = true; } -inline void XFDrawStyle::SetArrowEnd(const OUString& end, double size, bool center) +inline void XFDrawStyle::SetArrowEnd(const OUString& end, double size) { assert(size>0); m_strArrowEnd = end; m_fArrowEndSize = size; - m_bArrowEndCenter = center; + m_bArrowEndCenter = true; } #endif diff --git a/lotuswordpro/source/filter/xfilter/xffontdecl.cxx b/lotuswordpro/source/filter/xfilter/xffontdecl.cxx index fae8206e4993..64da24e1500a 100644 --- a/lotuswordpro/source/filter/xfilter/xffontdecl.cxx +++ b/lotuswordpro/source/filter/xfilter/xffontdecl.cxx @@ -59,11 +59,11 @@ ************************************************************************/ #include "xffontdecl.hxx" -XFFontDecl::XFFontDecl(const OUString& name, const OUString& family, bool fixed) +XFFontDecl::XFFontDecl(const OUString& name, const OUString& family) { m_strFontName = name; m_strFontFamily = family; - m_bPitchFixed = fixed; + m_bPitchFixed = false; } diff --git a/lotuswordpro/source/filter/xfilter/xffontdecl.hxx b/lotuswordpro/source/filter/xfilter/xffontdecl.hxx index 813033e783d2..d733bdc92563 100644 --- a/lotuswordpro/source/filter/xfilter/xffontdecl.hxx +++ b/lotuswordpro/source/filter/xfilter/xffontdecl.hxx @@ -71,7 +71,7 @@ class XFFontDecl { public: - XFFontDecl(const OUString& name, const OUString& family, bool fixed = false); + XFFontDecl(const OUString& name, const OUString& family); public: /** diff --git a/lotuswordpro/source/filter/xfilter/xftimestyle.hxx b/lotuswordpro/source/filter/xfilter/xftimestyle.hxx index dfdbac033b3d..e12f29fa5f41 100644 --- a/lotuswordpro/source/filter/xfilter/xftimestyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xftimestyle.hxx @@ -115,7 +115,7 @@ public: void AddMinute( bool bLongFmt = true ); - void AddSecond( bool bLongFmt = true, sal_Int16 nDecimalPos = 2); + void AddSecond( bool bLongFmt = true ); void SetAmPm(bool bAmPm); @@ -170,12 +170,12 @@ inline void XFTimeStyle::AddMinute( bool bLongFmt ) m_aParts.push_back(part); } -inline void XFTimeStyle::AddSecond( bool bLongFmt, sal_Int16 pos) +inline void XFTimeStyle::AddSecond( bool bLongFmt ) { XFTimePart part; part.SetPartType(enumXFDateSecond); part.SetLongFmt(bLongFmt); - part.SetDecimalPos(pos); + part.SetDecimalPos(0); m_aParts.push_back(part); } |