diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-22 10:58:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-22 11:47:35 +0200 |
commit | 9585c8b8c8d8724cc1bad4a2060c828c15599929 (patch) | |
tree | 170c8fc738aa1ebfdd554b1faa0aac47e2dc4f64 /sw/inc | |
parent | 23391fdb5cffb62006415ad1f4c96b6ed5d50cf8 (diff) |
loplugin:constantparam in sw
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentDeviceAccess.hxx | 9 | ||||
-rw-r--r-- | sw/inc/IDocumentListItems.hxx | 4 | ||||
-rw-r--r-- | sw/inc/crsskip.hxx | 35 | ||||
-rw-r--r-- | sw/inc/dbmgr.hxx | 5 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 7 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtcol.hxx | 3 | ||||
-rw-r--r-- | sw/inc/htmltbl.hxx | 17 | ||||
-rw-r--r-- | sw/inc/node.hxx | 3 | ||||
-rw-r--r-- | sw/inc/numrule.hxx | 6 | ||||
-rw-r--r-- | sw/inc/pagepreviewlayout.hxx | 8 | ||||
-rw-r--r-- | sw/inc/pch/precompiled_sw.hxx | 1 | ||||
-rw-r--r-- | sw/inc/postithelper.hxx | 3 | ||||
-rw-r--r-- | sw/inc/swabstdlg.hxx | 3 | ||||
-rw-r--r-- | sw/inc/swcrsr.hxx | 17 | ||||
-rw-r--r-- | sw/inc/swtable.hxx | 3 | ||||
-rw-r--r-- | sw/inc/txatritr.hxx | 5 | ||||
-rw-r--r-- | sw/inc/view.hxx | 3 |
18 files changed, 38 insertions, 96 deletions
diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx index 18fddaea9fd1..7f515e7a6296 100644 --- a/sw/inc/IDocumentDeviceAccess.hxx +++ b/sw/inc/IDocumentDeviceAccess.hxx @@ -73,13 +73,10 @@ public: @param pVd [in] the new virtual device. - @param bDeleteOld - [in] if set, the old virtual device will be deleted. - - @param bCallVirDevDataChanged - [in] if set, triggers all necessary invalidations. + The old virtual device will be deleted. + Triggers all necessary invalidations. */ - virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ) = 0; + virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd ) = 0; /** Returns the current reference device diff --git a/sw/inc/IDocumentListItems.hxx b/sw/inc/IDocumentListItems.hxx index 6868fa9d700e..e0e1679814ac 100644 --- a/sw/inc/IDocumentListItems.hxx +++ b/sw/inc/IDocumentListItems.hxx @@ -34,9 +34,7 @@ public: virtual void addListItem( const SwNodeNum& rNodeNum ) = 0; virtual void removeListItem( const SwNodeNum& rNodeNum ) = 0; - virtual OUString getListItemText( const SwNodeNum& rNodeNum, - const bool bWithNumber = true, - const bool bWithSpacesForLevel = false ) const = 0; + virtual OUString getListItemText( const SwNodeNum& rNodeNum ) const = 0; /** get vector of all list items, which are numbered */ diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx deleted file mode 100644 index 97ec004df2ee..000000000000 --- a/sw/inc/crsskip.hxx +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SW_INC_CRSSKIP_HXX -#define INCLUDED_SW_INC_CRSSKIP_HXX - -#include <tools/solar.h> - -// define for cursor travelling normally in western text cells and chars do -// the same, but in complex text cell skip over legatures and char skip -// into it. -// These defines exist only to cut off the dependencies to I18N project. -const sal_uInt16 CRSR_SKIP_CHARS = 0; -const sal_uInt16 CRSR_SKIP_CELLS = 1; -const sal_uInt16 CRSR_SKIP_HIDDEN = 2; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index b50f73473ce2..9bfcf18d898e 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -349,8 +349,7 @@ public: inline bool IsInMerge() const { return bInMerge; } void ExecuteFormLetter(SwWrtShell& rSh, - const css::uno::Sequence< css::beans::PropertyValue>& rProperties, - bool bWithDataSourceBrowser = false); + const css::uno::Sequence< css::beans::PropertyValue>& rProperties); static void InsertText(SwWrtShell& rSh, const css::uno::Sequence< css::beans::PropertyValue>& rProperties); @@ -380,7 +379,7 @@ public: bool GetMergeColumnCnt(const OUString& rColumnName, sal_uInt16 nLanguage, OUString &rResult, double *pNumber); bool FillCalcWithMergeData(SvNumberFormatter *pDocFormatter, - sal_uInt16 nLanguage, bool asString, SwCalc &aCalc); + sal_uInt16 nLanguage, SwCalc &aCalc); bool ToNextMergeRecord(); bool ToNextRecord(const OUString& rDataSource, const OUString& rTableOrQuery); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 8fd8fa06fd3e..7f6ed41f03bb 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -365,8 +365,8 @@ public: void UpdateFields( SwField & ); ///< One single field. - size_t GetFieldTypeCount(sal_uInt16 nResId = USHRT_MAX, bool bUsed = false) const; - SwFieldType* GetFieldType(size_t nField, sal_uInt16 nResId = USHRT_MAX, bool bUsed = false) const; + size_t GetFieldTypeCount(sal_uInt16 nResId = USHRT_MAX) const; + SwFieldType* GetFieldType(size_t nField, sal_uInt16 nResId = USHRT_MAX) const; SwFieldType* GetFieldType(sal_uInt16 nResId, const OUString& rName) const; void RemoveFieldType(size_t nField); @@ -539,7 +539,6 @@ public: in case a list style is found, <sListId> holds the list id, to which the text node belongs, which applies the found list style. */ const SwNumRule * SearchNumRule(const bool bNum, - const bool bOutline, int nNonEmptyAllowed, OUString& sListId ); @@ -716,7 +715,7 @@ public: Can Merge checks if Prev or Next are possible. If pointer pChkNxtPrv is passed possible direction is given. */ bool CanMergeTable( bool bWithPrev = true, bool* pChkNxtPrv = nullptr ) const; - bool MergeTable( bool bWithPrev = true, sal_uInt16 nMode = 0 ); + bool MergeTable( bool bWithPrev = true ); /// Set up InsertDB as table Undo. void AppendUndoForInsertFromDB( bool bIsTable ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 295b934d3094..e11eba207bfb 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -263,7 +263,7 @@ public: bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt, bool bIsMove = false, bool bSelectInsert = true ); - void SelectFlyFrame( SwFlyFrame& rFrame, bool bNew = false ); + void SelectFlyFrame( SwFlyFrame& rFrame ); /// Is selected frame within another frame? const SwFrameFormat* IsFlyInFly(); diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index b31d1fc6db5d..7e3e9152736d 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -113,8 +113,7 @@ public: // If a Paragraph Style is assigned to list level N of the Outline Style, // then its outline level - AttrOutlineLevel - is set to N+1 void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel); - void DeleteAssignmentToListLevelOfOutlineStyle(const bool bResetOutlineLevel - = true); + void DeleteAssignmentToListLevelOfOutlineStyle(); /** Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at the corresponding <SwNumRule> instance. */ diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 5711d332ba96..1bc85cb52a16 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -144,7 +144,7 @@ public: ~SwHTMLTableLayoutColumn() {} inline void MergeCellWidthOption( sal_uInt16 nWidth, bool bPrc ); - inline void SetWidthOption( sal_uInt16 nWidth, bool bRelWidth, bool bTest ); + inline void SetWidthOption( sal_uInt16 nWidth ); sal_uInt16 GetWidthOption() const { return nWidthOption; } bool IsRelWidthOption() const { return bRelWidthOption; } @@ -319,7 +319,7 @@ public: bool Resize( sal_uInt16 nAbsAvail, bool bRecalc=false, bool bForce=false, sal_uLong nDelay=0 ); - void BordersChanged( sal_uInt16 nAbsAvail, bool bRecalc=false ); + void BordersChanged( sal_uInt16 nAbsAvail ); /** Calculate available width. This works only if a layout or a SwViewShell exists. Otherwise returns 0. @@ -417,17 +417,10 @@ inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( sal_uInt16 nCol ) return m_aColumns[nCol]; } -inline void SwHTMLTableLayoutColumn::SetWidthOption( - sal_uInt16 nWidth, bool bRelWidth, bool bTest ) +inline void SwHTMLTableLayoutColumn::SetWidthOption( sal_uInt16 nWidth ) { - if( bTest && bRelWidthOption==bRelWidth ) - { - if( nWidth > nWidthOption ) - nWidthOption = nWidth; - } - else - nWidthOption = nWidth; - bRelWidthOption = bRelWidth; + nWidthOption = nWidth; + bRelWidthOption = true; } inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol ) diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index fd00b7ce7df6..8a7bee5e8d3b 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -407,8 +407,7 @@ public: /** @return the real size of the frame or an empty rectangle if no layout exists. Needed for export filters. */ SwRect FindLayoutRect( const bool bPrtArea = false, - const Point* pPoint = nullptr, - const bool bCalcFrame = false ) const; + const Point* pPoint = nullptr ) const; SwRect FindPageFrameRect() const; /** Method creates all views of document for given node. The content diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 2f4fdfdd80ee..f6c8ec9321b4 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -147,8 +147,7 @@ public: /// add parameter <eDefaultNumberFormatPositionAndSpaceMode> SwNumRule( const OUString& rNm, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode, - SwNumRuleType = NUM_RULE, - bool bAutoFlg = true ); + SwNumRuleType = NUM_RULE ); SwNumRule( const SwNumRule& ); ~SwNumRule(); @@ -165,8 +164,7 @@ public: void Set( sal_uInt16 i, const SwNumFormat* ); void Set( sal_uInt16 i, const SwNumFormat& ); - OUString MakeNumString( const SwNodeNum&, bool bInclStrings = true, - bool bOnlyArabic = false ) const; + OUString MakeNumString( const SwNodeNum&, bool bInclStrings = true ) const; /** - add optional parameter <_nRestrictToThisLevel> in order to restrict returned string to this level. */ OUString MakeNumString( const SwNumberTree::tNumberVector & rNumVector, diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx index 1362733410db..30601771276b 100644 --- a/sw/inc/pagepreviewlayout.hxx +++ b/sw/inc/pagepreviewlayout.hxx @@ -267,17 +267,11 @@ public: input parameter - window size in which the preview will be displayed and for which the scaling will be calculated. - @param _bCalcScale - input parameter - control, if method should calculate the needed - scaling for the proposed preview layout for the given window size - and sets the scaling at the output device and the view options. - @return boolean, indicating, if preview layout is successful initialized. */ bool Init( const sal_uInt16 _nCols, const sal_uInt16 _nRows, - const Size& _rPxWinSize, - const bool _bCalcScale + const Size& _rPxWinSize ); /** method to adjust page preview layout to document changes diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index a78036f9354f..53ad3c2c500e 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -263,7 +263,6 @@ #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/weak.hxx> #include <crsrsh.hxx> -#include <crsskip.hxx> #include <crstate.hxx> #include <dbfld.hxx> #include <dbmgr.hxx> diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 373429b4782b..64cc025ec73e 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -125,9 +125,8 @@ class SwAnnotationItem: public SwSidebarItem public: SwAnnotationItem( SwFormatField& rFormatField, - const bool aShow, const bool aFocus) - : SwSidebarItem( aShow, aFocus ) + : SwSidebarItem( true/*aShow*/, aFocus ) , mrFormatField( rFormatField ) { } diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 36c85706d9af..9e9efca69eb5 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -357,7 +357,6 @@ public: virtual SfxAbstractTabDialog* CreateSwParaDlg ( vcl::Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet, - sal_uInt8 nDialogMode, const OUString *pCollName = nullptr, bool bDraw = false, const OString& sDefPage = OString() ) = 0; @@ -371,7 +370,7 @@ public: bool bSetAutoFormat = true, const SwTableAutoFormat* pSelFormat = nullptr ) = 0; virtual SfxAbstractDialog * CreateSwBorderDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) = 0; - virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) = 0; + virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, int nResId ) = 0; virtual VclAbstractDialog * CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc) = 0; virtual SfxAbstractTabDialog* CreateSwTableTabDlg(vcl::Window* pParent, SfxItemPool& Pool, diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 941f2a052f6e..742821dbdd4a 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -56,6 +56,15 @@ namespace nsSwCursorSelOverFlags const SwCursorSelOverFlags SELOVER_CHANGEPOS = 0x08; } +// define for cursor travelling normally in western text cells and chars do +// the same, but in complex text cell skip over ligatures and char skip +// into it. +// These defines exist only to cut off the dependencies to I18N project. +const sal_uInt16 CRSR_SKIP_CHARS = 0; +const sal_uInt16 CRSR_SKIP_CELLS = 1; +const sal_uInt16 CRSR_SKIP_HIDDEN = 2; + + class SW_DLLPUBLIC SwCursor : public SwPaM { friend class SwCursorSaveState; @@ -85,7 +94,7 @@ protected: public: // single argument ctors shall be explicit. - SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel ); + SwCursor( const SwPosition &rPos, SwPaM* pRing ); virtual ~SwCursor(); /// this takes a second parameter, which indicates the Ring that @@ -164,10 +173,8 @@ public: bool SttEndDoc( bool bSttDoc ); bool GoPrevNextCell( bool bNext, sal_uInt16 nCnt ); - bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual, bool bSkipHidden ) - { return LeftRight( true, nCnt, nMode, bAllowVisual, bSkipHidden, false ); } - bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual, bool bSkipHidden ) - { return LeftRight( false, nCnt, nMode, bAllowVisual, bSkipHidden, false ); } + bool Left( sal_uInt16 nCnt ) { return LeftRight( true, nCnt, CRSR_SKIP_CHARS, false/*bAllowVisual*/, false/*bSkipHidden*/, false ); } + bool Right( sal_uInt16 nCnt ) { return LeftRight( false, nCnt, CRSR_SKIP_CHARS, false/*bAllowVisual*/, false/*bSkipHidden*/, false ); } bool GoNextCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( true, nCnt ); } bool GoPrevCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( false, nCnt ); } virtual bool GotoTable( const OUString& rName ); diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index fd3928622e09..4909ccbc751e 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -441,8 +441,7 @@ public: // Search next/previous box with content. SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =nullptr, bool bOvrTableLns=true ) const; - SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =nullptr, - bool bOvrTableLns=true ) const; + SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =nullptr ) const; // Return name of this box. It is determined dynamically and // is calculated from the position in the lines/boxes/table. OUString GetName() const; diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 6ab4f0c1a06d..ee4a3ba06297 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -76,9 +76,8 @@ class SwLanguageIterator : public SwTextAttrIterator { public: SwLanguageIterator( const SwTextNode& rTextNode, sal_Int32 nStart = 0, - sal_uInt16 nWhich = RES_CHRATR_LANGUAGE, - bool bUseGetWhichOfScript = true ) - : SwTextAttrIterator( rTextNode, nWhich, nStart, bUseGetWhichOfScript ) + sal_uInt16 nWhich = RES_CHRATR_LANGUAGE ) + : SwTextAttrIterator( rTextNode, nWhich, nStart, true/*bUseGetWhichOfScript*/ ) {} sal_uInt16 GetLanguage() const diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 838c8b22b236..ae253f977ac1 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -624,8 +624,7 @@ public: //public fuer D&D int InsertGraphic( const OUString &rPath, const OUString &rFilter, bool bLink = true, GraphicFilter *pFlt = nullptr, - Graphic* pPreviewGrf = nullptr, - bool bRule = false ); + Graphic* pPreviewGrf = nullptr ); void ExecuteScan( SfxRequest& rReq ); |