From a1b58e93f631c6bfd92fc8269da89c74e3784d58 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Mar 2018 14:22:34 +0200 Subject: loplugin:constantparam Change-Id: I3ce653c0d9e517229dbbe32cc8d3ec3c206e364d Reviewed-on: https://gerrit.libreoffice.org/51273 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/source/deployment/inc/dp_package.hxx | 2 +- desktop/source/deployment/registry/dp_registry.cxx | 2 +- desktop/source/deployment/registry/package/dp_package.cxx | 4 ++-- framework/inc/uielement/statusbarmerger.hxx | 2 -- framework/source/uielement/statusbarmanager.cxx | 2 -- framework/source/uielement/statusbarmerger.cxx | 12 +++++------- include/sfx2/frame.hxx | 2 +- include/svx/galtheme.hxx | 2 +- include/svx/svdtext.hxx | 2 +- include/tools/urlobj.hxx | 4 ++-- sd/source/ui/slideshow/slideshow.cxx | 2 +- sfx2/source/view/frame2.cxx | 4 ++-- svx/source/gallery2/galexpl.cxx | 2 +- svx/source/gallery2/galtheme.cxx | 4 ++-- svx/source/svdraw/svdtext.cxx | 4 ++-- svx/source/table/cell.cxx | 2 +- tools/source/fsys/urlobj.cxx | 6 +++--- xmloff/source/forms/propertyimport.hxx | 5 ++--- 18 files changed, 28 insertions(+), 35 deletions(-) diff --git a/desktop/source/deployment/inc/dp_package.hxx b/desktop/source/deployment/inc/dp_package.hxx index 579b008e43c2..22ab1a5a2d4b 100644 --- a/desktop/source/deployment/inc/dp_package.hxx +++ b/desktop/source/deployment/inc/dp_package.hxx @@ -35,7 +35,7 @@ namespace dp_registry { namespace backend { namespace bundle { css::uno::Reference create( css::uno::Reference const & xRootRegistry, - OUString const & context, OUString const & cachePath, bool readOnly, + OUString const & context, OUString const & cachePath, css::uno::Reference const & xComponentContext); } } } diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 9d12da270d24..26da83826b93 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -341,7 +341,7 @@ Reference PackageRegistryImpl::create( // backends. Reference extensionBackend = ::dp_registry::backend::bundle::create( - that, context, cachePath, /*readOnly*/false, xComponentContext); + that, context, cachePath, xComponentContext); that->insertBackend(extensionBackend); Reference xServiceInfo( diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 7ea79fd9454d..ff7a245f6519 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1588,14 +1588,14 @@ BackendImpl::PackageImpl::getPackagesFromDb( Reference create( Reference const & xRootRegistry, - OUString const & context, OUString const & cachePath, bool readOnly, + OUString const & context, OUString const & cachePath, Reference const & xComponentContext ) { Sequence args(cachePath.isEmpty() ? 1 : 3 ); args[ 0 ] <<= context; if (!cachePath.isEmpty()) { args[ 1 ] <<= cachePath; - args[ 2 ] <<= readOnly; + args[ 2 ] <<= false; // readOnly } return new BackendImpl( args, xComponentContext, xRootRegistry ); } diff --git a/framework/inc/uielement/statusbarmerger.hxx b/framework/inc/uielement/statusbarmerger.hxx index 7e593734cbcd..5d752d1d4f8b 100644 --- a/framework/inc/uielement/statusbarmerger.hxx +++ b/framework/inc/uielement/statusbarmerger.hxx @@ -56,14 +56,12 @@ namespace StatusbarMerger bool ProcessMergeOperation( StatusBar* pStatusbar, sal_uInt16 nPos, sal_uInt16& rItemId, - const ::rtl::OUString& rModuleIdentifier, const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeCommandParameter, const AddonStatusbarItemContainer& rItems ); bool ProcessMergeFallback( StatusBar* pStatusbar, sal_uInt16& rItemId, - const ::rtl::OUString& rModuleIdentifier, const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeFallback, const AddonStatusbarItemContainer& rItems ); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 9f12efb3d8fa..2cc90fd8293e 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -486,7 +486,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc StatusbarMerger::ProcessMergeOperation( m_pStatusBar, nRefPos, nItemId, - "", rInstruction.aMergeCommand, rInstruction.aMergeCommandParameter, aItems ); @@ -495,7 +494,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc { StatusbarMerger::ProcessMergeFallback( m_pStatusBar, nItemId, - "", rInstruction.aMergeCommand, rInstruction.aMergeCommandParameter, aItems ); diff --git a/framework/source/uielement/statusbarmerger.cxx b/framework/source/uielement/statusbarmerger.cxx index d48c843961ea..2680a63076bd 100644 --- a/framework/source/uielement/statusbarmerger.cxx +++ b/framework/source/uielement/statusbarmerger.cxx @@ -190,17 +190,16 @@ bool StatusbarMerger::ProcessMergeOperation( StatusBar* pStatusbar, sal_uInt16 nPos, sal_uInt16& rItemId, - const ::rtl::OUString& rModuleIdentifier, const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeCommandParameter, const AddonStatusbarItemContainer& rItems ) { if ( rMergeCommand == MERGECOMMAND_ADDAFTER ) - return lcl_MergeItems( pStatusbar, nPos, 1, rItemId, rModuleIdentifier, rItems ); + return lcl_MergeItems( pStatusbar, nPos, 1, rItemId, "", rItems ); else if ( rMergeCommand == MERGECOMMAND_ADDBEFORE ) - return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rItems ); + return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, "", rItems ); else if ( rMergeCommand == MERGECOMMAND_REPLACE ) - return lcl_ReplaceItem( pStatusbar, nPos, rItemId, rModuleIdentifier, rItems ); + return lcl_ReplaceItem( pStatusbar, nPos, rItemId, "", rItems ); else if ( rMergeCommand == MERGECOMMAND_REMOVE ) return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter ); @@ -210,7 +209,6 @@ bool StatusbarMerger::ProcessMergeOperation( bool StatusbarMerger::ProcessMergeFallback( StatusBar* pStatusbar, sal_uInt16& rItemId, - const ::rtl::OUString& rModuleIdentifier, const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeFallback, const AddonStatusbarItemContainer& rItems ) @@ -226,9 +224,9 @@ bool StatusbarMerger::ProcessMergeFallback( ( rMergeCommand == MERGECOMMAND_ADDAFTER ) ) { if ( rMergeFallback == "AddFirst" ) - return lcl_MergeItems( pStatusbar, 0, 0, rItemId, rModuleIdentifier, rItems ); + return lcl_MergeItems( pStatusbar, 0, 0, rItemId, "", rItems ); else if ( rMergeFallback == "AddLast" ) - return lcl_MergeItems( pStatusbar, STATUSBAR_APPEND, 0, rItemId, rModuleIdentifier, rItems ); + return lcl_MergeItems( pStatusbar, STATUSBAR_APPEND, 0, rItemId, "", rItems ); } return false; diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx index 6306156c8c36..89d5a75c6586 100644 --- a/include/sfx2/frame.hxx +++ b/include/sfx2/frame.hxx @@ -107,7 +107,7 @@ public: static SfxFrame* Create( const css::uno::Reference< css::frame::XFrame >& xFrame ); static css::uno::Reference< css::frame::XFrame > CreateBlankFrame(); - static SfxFrame* Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden ); + static SfxFrame* CreateHidden( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId ); vcl::Window& GetWindow() const { return *pWindow;} void CancelTransfers(); diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index 3f191502b305..8442f95ca705 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -183,7 +183,7 @@ public: SAL_DLLPRIVATE bool GetThumb(sal_uInt32 nPos, BitmapEx& rBmp); - bool GetGraphic(sal_uInt32 nPos, Graphic& rGraphic, bool bProgress = false); + bool GetGraphic(sal_uInt32 nPos, Graphic& rGraphic); bool InsertGraphic(const Graphic& rGraphic, sal_uInt32 nInsertPos); bool GetModel(sal_uInt32 nPos, SdrModel& rModel); diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx index c5c8831841c0..020d8a483b4b 100644 --- a/include/svx/svdtext.hxx +++ b/include/svx/svdtext.hxx @@ -44,7 +44,7 @@ class SfxStyleSheet; class SVX_DLLPUBLIC SdrText : public virtual tools::WeakBase { public: - SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = nullptr ); + explicit SdrText( SdrTextObj& rObject ); virtual ~SdrText() override; virtual void SetModel(SdrModel* pNewModel); diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index 819cc3136596..3624d2f89122 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -1126,7 +1126,7 @@ private: OUStringBuffer & rTheText, sal_uInt32 nOctet); static OUString encodeText( - sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bOctets, + sal_Unicode const * pBegin, sal_Unicode const * pEnd, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes); @@ -1157,7 +1157,7 @@ inline OUString INetURLObject::encodeText(OUString const & rTheText, bool bKeepVisibleEscapes) { return encodeText(rTheText.getStr(), - rTheText.getStr() + rTheText.getLength(), /*bOctets*/false, ePart, + rTheText.getStr() + rTheText.getLength(), ePart, eMechanism, eCharset, bKeepVisibleEscapes); } diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 920d2a35164f..3c89620a2231 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -1123,7 +1123,7 @@ void SlideShow::StartFullscreenPresentation( ) // The new frame is created hidden. To make it visible and activate the // new view shell--a prerequisite to process slot calls and initialize // its panes--a GrabFocus() has to be called later on. - SfxFrame* pNewFrame = SfxFrame::Create( *mpDoc->GetDocSh(), *pWorkWindow, PRESENTATION_FACTORY_ID, true ); + SfxFrame* pNewFrame = SfxFrame::CreateHidden( *mpDoc->GetDocSh(), *pWorkWindow, PRESENTATION_FACTORY_ID ); pNewFrame->SetPresentationMode(true); mpFullScreenViewShellBase = static_cast(pNewFrame->GetCurrentViewFrame()->GetViewShell()); diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 663d9bfef299..5b8c3ca73638 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -217,7 +217,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame() return xFrame; } -SfxFrame* SfxFrame::Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden ) +SfxFrame* SfxFrame::CreateHidden( SfxObjectShell const & rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId ) { SfxFrame* pFrame = nullptr; try @@ -240,7 +240,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, S ::comphelper::NamedValueCollection aArgs( aLoadArgs ); aArgs.put( "Model", rDoc.GetModel() ); - aArgs.put( "Hidden", bHidden ); + aArgs.put( "Hidden", true ); if ( nViewId != SFX_INTERFACE_NONE ) aArgs.put( "ViewId", static_cast(nViewId) ); diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 21e085fc128b..8379b616ba2f 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -149,7 +149,7 @@ bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uInt32 nPos if( pTheme ) { if( pGraphic ) - bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic, /*bProgress*/false ); + bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic ); pGal->ReleaseTheme( pTheme, aListener ); } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 7c3705f85ae7..de21ba0307bb 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -765,7 +765,7 @@ bool GalleryTheme::GetThumb(sal_uInt32 nPos, BitmapEx& rBmp) return bRet; } -bool GalleryTheme::GetGraphic(sal_uInt32 nPos, Graphic& rGraphic, bool bProgress) +bool GalleryTheme::GetGraphic(sal_uInt32 nPos, Graphic& rGraphic) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); bool bRet = false; @@ -781,7 +781,7 @@ bool GalleryTheme::GetGraphic(sal_uInt32 nPos, Graphic& rGraphic, bool bProgress case SgaObjKind::Inet: { OUString aFilterDummy; - bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, bProgress ) != GalleryGraphicImportRet::IMPORT_NONE ); + bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, /*bProgress*/false ) != GalleryGraphicImportRet::IMPORT_NONE ); } break; diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index a4875dc20a1f..159f863cb54c 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -28,8 +28,8 @@ #include #include -SdrText::SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject /* = 0 */ ) -: mpOutlinerParaObject( pOutlinerParaObject ) +SdrText::SdrText( SdrTextObj& rObject ) +: mpOutlinerParaObject( nullptr ) , mrObject( rObject ) , mpModel( rObject.GetModel() ) , mbPortionInfoChecked( false ) diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 922a58d0a4e9..cd1973848746 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -393,7 +393,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj ) Cell::Cell( SdrTableObj& rTableObj ) -: SdrText( rTableObj, /*pOutlinerParaObject*/nullptr ) +: SdrText( rTableObj ) , SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) , mpPropSet( ImplGetSvxCellPropertySet() ) , mpProperties( new sdr::properties::CellProperties( rTableObj, this ) ) diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index b8c2db217add..d4860be20849 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -3384,7 +3384,7 @@ bool INetURLObject::hasDosVolume(FSysStyle eStyle) const // static OUString INetURLObject::encodeText(sal_Unicode const * pBegin, - sal_Unicode const * pEnd, bool bOctets, + sal_Unicode const * pEnd, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes) @@ -3393,9 +3393,9 @@ OUString INetURLObject::encodeText(sal_Unicode const * pBegin, while (pBegin < pEnd) { EscapeType eEscapeType; - sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, bOctets, + sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, /*bOctets*/false, eMechanism, eCharset, eEscapeType); - appendUCS4(aResult, nUTF32, eEscapeType, bOctets, ePart, + appendUCS4(aResult, nUTF32, eEscapeType, /*bOctets*/false, ePart, eCharset, bKeepVisibleEscapes); } return aResult.makeStringAndClear(); diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index 30e57fac4904..47b9312f7e1b 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -46,12 +46,11 @@ namespace xmloff static css::uno::Any convertString( const css::uno::Type& _rExpectedType, const OUString& _rReadCharacters, - const SvXMLEnumMapEntry* _pEnumMap = nullptr, - const bool _bInvertBoolean = false + const SvXMLEnumMapEntry* _pEnumMap = nullptr ) { return convertString(_rExpectedType, _rReadCharacters, - reinterpret_cast*>(_pEnumMap), _bInvertBoolean); + reinterpret_cast*>(_pEnumMap), /*_bInvertBoolean*/false); } static css::uno::Any convertString( const css::uno::Type& _rExpectedType, -- cgit v1.2.3