store/source/lockbyte.cxx | 4 ++-- svgio/inc/svgstyleattributes.hxx | 2 +- svgio/source/svgreader/svgstyleattributes.cxx | 2 +- svl/source/items/stylepool.cxx | 4 ++-- svl/source/numbers/zforfind.hxx | 2 +- svl/source/numbers/zformat.cxx | 2 +- svtools/inc/roadmap.hxx | 2 +- svtools/source/config/miscopt.cxx | 12 ++++++------ svtools/source/contnr/fileview.cxx | 4 ++-- svtools/source/contnr/imivctl.hxx | 14 +++++++------- svtools/source/contnr/imivctl1.cxx | 12 ++++++------ svtools/source/contnr/ivctrl.cxx | 6 +++--- svtools/source/contnr/treelistbox.cxx | 2 +- svtools/source/dialogs/roadmapwizard.cxx | 3 ++- svtools/source/inc/iconviewimpl.hxx | 2 +- svtools/source/inc/svimpbox.hxx | 2 +- svtools/source/misc/langtab.cxx | 4 ++-- svtools/source/table/tablecontrol_impl.cxx | 4 ++-- svtools/source/uno/treecontrolpeer.cxx | 2 +- svtools/source/uno/treecontrolpeer.hxx | 2 +- 20 files changed, 44 insertions(+), 43 deletions(-)
New commits: commit 27319418ed7601fa62993e39894bb8f8902a88d0 Author: Noel Grandin <n...@peralex.com> Date: Wed Jul 27 14:25:48 2016 +0200 loplugin:countusersofdefaultparams in store..svtools Change-Id: I15b4400bddc5a4d0e3de5dfffe18b7e493f97df6 Reviewed-on: https://gerrit.libreoffice.org/27580 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx index a446a45..65ac5c3 100644 --- a/store/source/lockbyte.cxx +++ b/store/source/lockbyte.cxx @@ -813,13 +813,13 @@ template< class T > struct ResourceHolder T m_value; explicit ResourceHolder (T const & value = T()) : m_value (value) {} - ~ResourceHolder() { reset(); } + ~ResourceHolder() { reset(T()); } T & get() { return m_value; } T const & get() const { return m_value; } void set (T const & value) { m_value = value; } - void reset (T const & value = T()) + void reset (T const & value) { T tmp (m_value); if (tmp != value) diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index ea9c6c2..ba8cb55 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -465,7 +465,7 @@ namespace svgio const SvgMarkerNode* accessMarkerEndXLink() const; // BaselineShift - void setBaselineShift(const BaselineShift aBaselineShift = BaselineShift_Baseline) { maBaselineShift = aBaselineShift; } + void setBaselineShift(const BaselineShift aBaselineShift) { maBaselineShift = aBaselineShift; } BaselineShift getBaselineShift() const { return maBaselineShift; } void setBaselineShiftNumber(const SvgNumber& rBaselineShift = SvgNumber()) { maBaselineShiftNumber = rBaselineShift; } SvgNumber getBaselineShiftNumber() const; diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 3366ce0..9fc8b23 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1951,7 +1951,7 @@ namespace svgio else { // no BaselineShift or inherit (which is automatically) - setBaselineShift(); + setBaselineShift(BaselineShift_Baseline); } } break; diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index 6df2501..8ac1e4f 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -69,7 +69,7 @@ namespace { void setItemSet( const SfxItemSet& rSet ){ maItemSet.push_back( std::shared_ptr<SfxItemSet>( rSet.Clone() ) ); } // #i86923# Node* findChildNode( const SfxPoolItem& rItem, - const bool bIsItemIgnorable = false ); + const bool bIsItemIgnorable ); Node* nextItemSet( Node* pLast, const bool bSkipUnusedItemSet, const bool bSkipIgnorable ); @@ -396,7 +396,7 @@ std::shared_ptr<SfxItemSet> StylePoolImpl::insertItemSet( const SfxItemSet& rSet if ( !xFoundIgnorableItems.get() || (xFoundIgnorableItems->Put( *pItem ) == nullptr ) ) { - pCurNode = pCurNode->findChildNode( *pItem ); + pCurNode = pCurNode->findChildNode( *pItem, false ); } pItem = aIter.NextItem(); } diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index 5f62e28..ba24b87 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -46,7 +46,7 @@ public: bool IsNumberFormat( const OUString& rString, /// input string short& F_Type, /// format type (in + out) double& fOutNumber, /// value determined (out) - const SvNumberformat* pFormat = nullptr); /// optional a number format to which compare against + const SvNumberformat* pFormat); /// optional a number format to which compare against /// after IsNumberFormat: get decimal position short GetDecPos() const { return nDecPos; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index ce018a1..3274ae3 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -674,7 +674,7 @@ SvNumberformat::SvNumberformat(OUString& rString, if (nAnzChars > 0) { short F_Type = css::util::NumberFormat::UNDEFINED; - if (!pISc->IsNumberFormat(sStr,F_Type,fNumber) || + if (!pISc->IsNumberFormat(sStr, F_Type, fNumber, nullptr) || ( F_Type != css::util::NumberFormat::NUMBER && F_Type != css::util::NumberFormat::SCIENTIFIC) ) { diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index 6b9c503..14d63ee 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -69,7 +69,7 @@ public: ItemIndex GetItemCount() const; ItemId GetItemID( ItemIndex _nIndex ) const; - void InsertRoadmapItem( ItemIndex Index, const OUString& RoadmapItem, ItemId _nUniqueId, bool _bEnabled = true ); + void InsertRoadmapItem( ItemIndex Index, const OUString& RoadmapItem, ItemId _nUniqueId, bool _bEnabled ); void ReplaceRoadmapItem( ItemIndex Index, const OUString& RoadmapItem, ItemId _nUniqueId, bool _bEnabled ); void DeleteRoadmapItem( ItemIndex _nIndex ); diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 10a6fe9..63fe6a6 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -159,7 +159,7 @@ public: static OUString GetIconTheme(); - enum SetModifiedFlag { SET_MODIFIED, DONT_SET_MODIFIED }; + enum class SetModifiedFlag { SET, DONT_SET }; /** Set the icon theme * @@ -174,7 +174,7 @@ public: * during initialization in the constructor. */ void - SetIconTheme(const OUString &theme, SetModifiedFlag setModified = SET_MODIFIED ); + SetIconTheme(const OUString &theme, SetModifiedFlag setModified ); bool IconThemeWasSetAutomatically() {return m_bIconThemeWasSetAutomatically;} @@ -340,7 +340,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() { OUString aIconTheme; if (seqValues[nProperty] >>= aIconTheme) - SetIconTheme(aIconTheme, DONT_SET_MODIFIED); + SetIconTheme(aIconTheme, SetModifiedFlag::DONT_SET); else OSL_FAIL("Wrong type of \"Misc\\SymbolStyle\"!" ); @@ -463,7 +463,7 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) case PROPERTYHANDLE_SYMBOLSTYLE : { OUString aIconTheme; if (seqValues[nProperty] >>= aIconTheme) - SetIconTheme(aIconTheme, DONT_SET_MODIFIED); + SetIconTheme(aIconTheme, SetModifiedFlag::DONT_SET); else OSL_FAIL("Wrong type of \"Misc\\SymbolStyle\"!" ); } @@ -546,7 +546,7 @@ SvtMiscOptions_Impl::SetIconTheme(const OUString &rName, SetModifiedFlag setModi Application::MergeSystemSettings( aAllSettings ); Application::SetSettings(aAllSettings); - if (setModified == SET_MODIFIED) { + if (setModified == SetModifiedFlag::SET) { SetModified(); } CallListeners(); @@ -784,7 +784,7 @@ OUString SvtMiscOptions::GetIconTheme() const void SvtMiscOptions::SetIconTheme(const OUString& iconTheme) { - m_pImpl->SetIconTheme(iconTheme); + m_pImpl->SetIconTheme(iconTheme, SvtMiscOptions_Impl::SetModifiedFlag::SET); } bool SvtMiscOptions::DisableUICustomization() const diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index edbc446..4f05be0 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -367,7 +367,7 @@ public: FileViewResult GetFolderContent_Impl( const FolderDescriptor& _rFolder, const FileViewAsyncAction* pAsyncDescriptor, - const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >()); + const css::uno::Sequence< OUString >& rBlackList ); void FilterFolderContent_Impl( const OUString &rFilter ); void CancelRunningAsyncAction(); @@ -1127,7 +1127,7 @@ bool SvtFileView::Initialize( const css::uno::Reference< css::ucb::XContent>& _x mpImpl->Clear(); ::ucbhelper::Content aContent(_xContent, mpImpl->mxCmdEnv, comphelper::getProcessComponentContext() ); - FileViewResult eResult = mpImpl->GetFolderContent_Impl( FolderDescriptor( aContent ), nullptr ); + FileViewResult eResult = mpImpl->GetFolderContent_Impl( FolderDescriptor( aContent ), nullptr, css::uno::Sequence< OUString >() ); OSL_ENSURE( eResult != eStillRunning, "SvtFileView::Initialize: this was expected to be synchronous!" ); if ( eResult != eSuccess ) return false; diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 0e0f09e..af0f2d9 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -324,7 +324,7 @@ public: ~SvxIconChoiceCtrl_Impl(); bool SetChoiceWithCursor() { bool bOld = bChooseWithCursor; bChooseWithCursor = true; return bOld; } - void Clear( bool bInCtor = false ); + void Clear( bool bInCtor ); void SetStyle( WinBits nWinStyle ); WinBits GetStyle() const { return nWinBits; } void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos ); @@ -347,7 +347,7 @@ public: SvxIconChoiceCtrlEntry* pNewCursor, bool bMod1, bool bShift, - bool bPaintSync = false + bool bPaintSync ); bool KeyInput( const KeyEvent& ); void Resize(); @@ -374,9 +374,9 @@ public: void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true ); void Arrange( - bool bKeepPredecessors = false, - long nSetMaxVirtWidth =0, - long nSetMaxVirtHeight =0 + bool bKeepPredecessors, + long nSetMaxVirtWidth, + long nSetMaxVirtHeight ); Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); @@ -484,11 +484,11 @@ public: void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry, - bool bKeepHighlightFlags = false + bool bKeepHighlightFlags ); void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect); - void CallEventListeners( sal_uLong nEvent, void* pData = nullptr ); + void CallEventListeners( sal_uLong nEvent, void* pData ); ::svt::IAccessibleFactory& GetAccessibleFactory() { diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index ef8a25c..5050907 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -164,7 +164,7 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl() { pCurEditedEntry = nullptr; pEdit.disposeAndClear(); - Clear(); + Clear(false); StopEditTimer(); CancelUserEvents(); delete pZOrderList; @@ -924,7 +924,7 @@ bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt ) else if( nWinBits & WB_HIGHLIGHTFRAME ) { SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, true ); - SetEntryHighlightFrame( pEntry ); + SetEntryHighlightFrame( pEntry, false ); } else return false; @@ -992,7 +992,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SvxIconChoiceCtrlEntry* pNewCursor = GetEntry( nPos ); SvxIconChoiceCtrlEntry* pOldCursor = pCursor; if ( pNewCursor != pOldCursor ) - SetCursor_Impl( pOldCursor, pNewCursor, false, false ); + SetCursor_Impl( pOldCursor, pNewCursor, false, false, false ); return true; } @@ -2657,7 +2657,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, AutoArrangeHdl, Idle *, void) { aAutoArrangeIdle.Stop(); - Arrange( IsAutoArrange() ); + Arrange( IsAutoArrange(), 0, 0 ); } IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, VisRectChangedHdl, Idle *, void) @@ -2777,7 +2777,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, if( eTextMode == IcnShowTextDontKnow ) eTextMode = IcnShowTextShort; eTextMode = eMode; - Arrange( true ); + Arrange( true, 0, 0 ); } } else @@ -3420,7 +3420,7 @@ void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCt nGridDX = pInfo->GetWidth(); if( GetUpdateMode() ) - Arrange( IsAutoArrange() ); + Arrange( IsAutoArrange(), 0, 0 ); } const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 nIndex ) const diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 5b48497..7c35e4a 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -90,7 +90,7 @@ void SvtIconChoiceCtrl::dispose() { if (_pImpl) { - _pImpl->CallEventListeners( VCLEVENT_OBJECT_DYING ); + _pImpl->CallEventListeners( VCLEVENT_OBJECT_DYING, nullptr ); _pImpl.reset(); } Control::dispose(); @@ -152,7 +152,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() aFullSize.setWidth ( aFullSize.getWidth()+aEntryRect.GetWidth() ); } - _pImpl->Arrange ( false, aFullSize.getWidth() ); + _pImpl->Arrange ( false, aFullSize.getWidth(), 0 ); } else if ( GetStyle() & WB_ALIGN_LEFT ) { @@ -171,7 +171,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() } else { - _pImpl->Arrange(); + _pImpl->Arrange(false, 0, 0); } _pImpl->Arrange( false, 0, 1000 ); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 028f9a2..1dda5b5 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3306,7 +3306,7 @@ void SvTreeListBox::SetAlternatingRowColors( bool bEnable ) pEntry->SetBackColor( GetBackground().GetColor() ); mbAlternatingRowColors = bEnable; - pImpl->UpdateAll(); + pImpl->UpdateAll(true); } SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX,SvLBoxTab** ppTab) diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 4fa72e8..24cba25 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -321,7 +321,8 @@ namespace svt m_pImpl->pRoadmap->InsertRoadmapItem( nItemIndex, getStateDisplayName( nState ), - nState + nState, + true ); } diff --git a/svtools/source/inc/iconviewimpl.hxx b/svtools/source/inc/iconviewimpl.hxx index 2163afc..5b6a782 100644 --- a/svtools/source/inc/iconviewimpl.hxx +++ b/svtools/source/inc/iconviewimpl.hxx @@ -45,7 +45,7 @@ public: // returns 0 if position is just past the last entry SvTreeListEntry* GetEntry( const Point& rPoint ) const SAL_OVERRIDE; - void UpdateAll( bool bInvalidateCompleteView = true ) SAL_OVERRIDE; + void UpdateAll( bool bInvalidateCompleteView ) SAL_OVERRIDE; bool KeyInput( const KeyEvent& ) SAL_OVERRIDE; diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index cca5fc9..5c18142 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -273,7 +273,7 @@ public: void Resize(); void GetFocus(); void LoseFocus(); - virtual void UpdateAll( bool bInvalidateCompleteView= true ); + virtual void UpdateAll( bool bInvalidateCompleteView ); void SetEntryHeight( short nHeight ); void InvalidateEntry( SvTreeListEntry* ); virtual void RecalcFocusRect(); diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index 6b35a0d..6e4ba6c 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -40,7 +40,7 @@ public: virtual ~SvtLanguageTableImpl(); bool HasType( const LanguageType eType ) const; - const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const; + const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection ) const; LanguageType GetType( const OUString& rStr ) const; sal_uInt32 GetEntryCount() const; LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const; @@ -174,7 +174,7 @@ const OUString SvtLanguageTableImpl::GetString( const LanguageType eType, bool b OUString SvtLanguageTable::GetLanguageString( const LanguageType eType ) { - return theLanguageTable::get().GetString( eType ); + return theLanguageTable::get().GetString( eType, false ); } OUString SvtLanguageTable::GetLanguageString( const LanguageType eType, bool bUserInterfaceSelection ) diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index f87c0f1..08a4d29 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -664,7 +664,7 @@ namespace svt { namespace table for the given row height. Partially fitting rows are counted, too, if the respective parameter says so. */ - TableSize lcl_getRowsFittingInto( long _nOverallHeight, long _nRowHeightPixel, bool _bAcceptPartialRow = false ) + TableSize lcl_getRowsFittingInto( long _nOverallHeight, long _nRowHeightPixel, bool _bAcceptPartialRow ) { return _bAcceptPartialRow ? ( _nOverallHeight + ( _nRowHeightPixel - 1 ) ) / _nRowHeightPixel @@ -1094,7 +1094,7 @@ namespace svt { namespace table m_rAntiImpl, m_pVScroll, i_verticalScrollbar, - lcl_getRowsFittingInto( i_dataCellPlayground.GetHeight(), m_nRowHeightPixel ), + lcl_getRowsFittingInto( i_dataCellPlayground.GetHeight(), m_nRowHeightPixel, false ), // visible units m_nTopRow, // current position 1, // line size diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 4ba1ab1..bf334fa 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -408,7 +408,7 @@ void TreeControlPeer::addNode( UnoTreeListBoxImpl& rTree, const Reference< XTree { if( xNode.is() ) { - UnoTreeListEntry* pEntry = createEntry( xNode, pParentEntry ); + UnoTreeListEntry* pEntry = createEntry( xNode, pParentEntry, TREELIST_APPEND ); const sal_Int32 nChildCount = xNode->getChildCount(); for( sal_Int32 nChild = 0; nChild < nChildCount; nChild++ ) addNode( rTree, xNode->getChildAt( nChild ), pEntry ); diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx index 545b813..8bb4902 100644 --- a/svtools/source/uno/treecontrolpeer.hxx +++ b/svtools/source/uno/treecontrolpeer.hxx @@ -123,7 +123,7 @@ private: void fillTree( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeDataModel >& xDataModel ); void addNode( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParentEntry ); - UnoTreeListEntry* createEntry( const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = TREELIST_APPEND ); + UnoTreeListEntry* createEntry( const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos ); void updateEntry( UnoTreeListEntry* pEntry ); void updateTree( const css::awt::tree::TreeDataModelEvent& rEvent ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits