loplugin:constantparam

Change-Id: I3ce653c0d9e517229dbbe32cc8d3ec3c206e364d
Reviewed-on: https://gerrit.libreoffice.org/51273
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-03-14 14:22:34 +02:00
parent 0378294606
commit a1b58e93f6
18 changed files with 28 additions and 35 deletions

View File

@@ -35,7 +35,7 @@ namespace dp_registry { namespace backend { namespace bundle {
css::uno::Reference<css::deployment::XPackageRegistry> create( css::uno::Reference<css::deployment::XPackageRegistry> create(
css::uno::Reference<css::deployment::XPackageRegistry> const & css::uno::Reference<css::deployment::XPackageRegistry> const &
xRootRegistry, xRootRegistry,
OUString const & context, OUString const & cachePath, bool readOnly, OUString const & context, OUString const & cachePath,
css::uno::Reference<css::uno::XComponentContext> const & xComponentContext); css::uno::Reference<css::uno::XComponentContext> const & xComponentContext);
} } } } } }

View File

@@ -341,7 +341,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create(
// backends. // backends.
Reference<deployment::XPackageRegistry> extensionBackend = Reference<deployment::XPackageRegistry> extensionBackend =
::dp_registry::backend::bundle::create( ::dp_registry::backend::bundle::create(
that, context, cachePath, /*readOnly*/false, xComponentContext); that, context, cachePath, xComponentContext);
that->insertBackend(extensionBackend); that->insertBackend(extensionBackend);
Reference<lang::XServiceInfo> xServiceInfo( Reference<lang::XServiceInfo> xServiceInfo(

View File

@@ -1588,14 +1588,14 @@ BackendImpl::PackageImpl::getPackagesFromDb(
Reference<deployment::XPackageRegistry> create( Reference<deployment::XPackageRegistry> create(
Reference<deployment::XPackageRegistry> const & xRootRegistry, Reference<deployment::XPackageRegistry> const & xRootRegistry,
OUString const & context, OUString const & cachePath, bool readOnly, OUString const & context, OUString const & cachePath,
Reference<XComponentContext> const & xComponentContext ) Reference<XComponentContext> const & xComponentContext )
{ {
Sequence<Any> args(cachePath.isEmpty() ? 1 : 3 ); Sequence<Any> args(cachePath.isEmpty() ? 1 : 3 );
args[ 0 ] <<= context; args[ 0 ] <<= context;
if (!cachePath.isEmpty()) { if (!cachePath.isEmpty()) {
args[ 1 ] <<= cachePath; args[ 1 ] <<= cachePath;
args[ 2 ] <<= readOnly; args[ 2 ] <<= false; // readOnly
} }
return new BackendImpl( args, xComponentContext, xRootRegistry ); return new BackendImpl( args, xComponentContext, xRootRegistry );
} }

View File

@@ -56,14 +56,12 @@ namespace StatusbarMerger
bool ProcessMergeOperation( StatusBar* pStatusbar, bool ProcessMergeOperation( StatusBar* pStatusbar,
sal_uInt16 nPos, sal_uInt16 nPos,
sal_uInt16& rItemId, sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeCommand,
const ::rtl::OUString& rMergeCommandParameter, const ::rtl::OUString& rMergeCommandParameter,
const AddonStatusbarItemContainer& rItems ); const AddonStatusbarItemContainer& rItems );
bool ProcessMergeFallback( StatusBar* pStatusbar, bool ProcessMergeFallback( StatusBar* pStatusbar,
sal_uInt16& rItemId, sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeCommand,
const ::rtl::OUString& rMergeFallback, const ::rtl::OUString& rMergeFallback,
const AddonStatusbarItemContainer& rItems ); const AddonStatusbarItemContainer& rItems );

View File

@@ -486,7 +486,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
StatusbarMerger::ProcessMergeOperation( m_pStatusBar, StatusbarMerger::ProcessMergeOperation( m_pStatusBar,
nRefPos, nRefPos,
nItemId, nItemId,
"",
rInstruction.aMergeCommand, rInstruction.aMergeCommand,
rInstruction.aMergeCommandParameter, rInstruction.aMergeCommandParameter,
aItems ); aItems );
@@ -495,7 +494,6 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
{ {
StatusbarMerger::ProcessMergeFallback( m_pStatusBar, StatusbarMerger::ProcessMergeFallback( m_pStatusBar,
nItemId, nItemId,
"",
rInstruction.aMergeCommand, rInstruction.aMergeCommand,
rInstruction.aMergeCommandParameter, rInstruction.aMergeCommandParameter,
aItems ); aItems );

View File

@@ -190,17 +190,16 @@ bool StatusbarMerger::ProcessMergeOperation(
StatusBar* pStatusbar, StatusBar* pStatusbar,
sal_uInt16 nPos, sal_uInt16 nPos,
sal_uInt16& rItemId, sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeCommand,
const ::rtl::OUString& rMergeCommandParameter, const ::rtl::OUString& rMergeCommandParameter,
const AddonStatusbarItemContainer& rItems ) const AddonStatusbarItemContainer& rItems )
{ {
if ( rMergeCommand == MERGECOMMAND_ADDAFTER ) 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 ) 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 ) 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 ) else if ( rMergeCommand == MERGECOMMAND_REMOVE )
return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter ); return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter );
@@ -210,7 +209,6 @@ bool StatusbarMerger::ProcessMergeOperation(
bool StatusbarMerger::ProcessMergeFallback( bool StatusbarMerger::ProcessMergeFallback(
StatusBar* pStatusbar, StatusBar* pStatusbar,
sal_uInt16& rItemId, sal_uInt16& rItemId,
const ::rtl::OUString& rModuleIdentifier,
const ::rtl::OUString& rMergeCommand, const ::rtl::OUString& rMergeCommand,
const ::rtl::OUString& rMergeFallback, const ::rtl::OUString& rMergeFallback,
const AddonStatusbarItemContainer& rItems ) const AddonStatusbarItemContainer& rItems )
@@ -226,9 +224,9 @@ bool StatusbarMerger::ProcessMergeFallback(
( rMergeCommand == MERGECOMMAND_ADDAFTER ) ) ( rMergeCommand == MERGECOMMAND_ADDAFTER ) )
{ {
if ( rMergeFallback == "AddFirst" ) if ( rMergeFallback == "AddFirst" )
return lcl_MergeItems( pStatusbar, 0, 0, rItemId, rModuleIdentifier, rItems ); return lcl_MergeItems( pStatusbar, 0, 0, rItemId, "", rItems );
else if ( rMergeFallback == "AddLast" ) 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; return false;

View File

@@ -107,7 +107,7 @@ public:
static SfxFrame* Create( const css::uno::Reference< css::frame::XFrame >& xFrame ); static SfxFrame* Create( const css::uno::Reference< css::frame::XFrame >& xFrame );
static css::uno::Reference< css::frame::XFrame > static css::uno::Reference< css::frame::XFrame >
CreateBlankFrame(); 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;} vcl::Window& GetWindow() const { return *pWindow;}
void CancelTransfers(); void CancelTransfers();

View File

@@ -183,7 +183,7 @@ public:
SAL_DLLPRIVATE bool GetThumb(sal_uInt32 nPos, BitmapEx& rBmp); 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 InsertGraphic(const Graphic& rGraphic, sal_uInt32 nInsertPos);
bool GetModel(sal_uInt32 nPos, SdrModel& rModel); bool GetModel(sal_uInt32 nPos, SdrModel& rModel);

View File

@@ -44,7 +44,7 @@ class SfxStyleSheet;
class SVX_DLLPUBLIC SdrText : public virtual tools::WeakBase class SVX_DLLPUBLIC SdrText : public virtual tools::WeakBase
{ {
public: public:
SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = nullptr ); explicit SdrText( SdrTextObj& rObject );
virtual ~SdrText() override; virtual ~SdrText() override;
virtual void SetModel(SdrModel* pNewModel); virtual void SetModel(SdrModel* pNewModel);

View File

@@ -1126,7 +1126,7 @@ private:
OUStringBuffer & rTheText, sal_uInt32 nOctet); OUStringBuffer & rTheText, sal_uInt32 nOctet);
static OUString encodeText( 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, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset,
bool bKeepVisibleEscapes); bool bKeepVisibleEscapes);
@@ -1157,7 +1157,7 @@ inline OUString INetURLObject::encodeText(OUString const & rTheText,
bool bKeepVisibleEscapes) bool bKeepVisibleEscapes)
{ {
return encodeText(rTheText.getStr(), return encodeText(rTheText.getStr(),
rTheText.getStr() + rTheText.getLength(), /*bOctets*/false, ePart, rTheText.getStr() + rTheText.getLength(), ePart,
eMechanism, eCharset, bKeepVisibleEscapes); eMechanism, eCharset, bKeepVisibleEscapes);
} }

View File

@@ -1123,7 +1123,7 @@ void SlideShow::StartFullscreenPresentation( )
// The new frame is created hidden. To make it visible and activate the // The new frame is created hidden. To make it visible and activate the
// new view shell--a prerequisite to process slot calls and initialize // new view shell--a prerequisite to process slot calls and initialize
// its panes--a GrabFocus() has to be called later on. // 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); pNewFrame->SetPresentationMode(true);
mpFullScreenViewShellBase = static_cast<ViewShellBase*>(pNewFrame->GetCurrentViewFrame()->GetViewShell()); mpFullScreenViewShellBase = static_cast<ViewShellBase*>(pNewFrame->GetCurrentViewFrame()->GetViewShell());

View File

@@ -217,7 +217,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
return xFrame; 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; SfxFrame* pFrame = nullptr;
try try
@@ -240,7 +240,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, S
::comphelper::NamedValueCollection aArgs( aLoadArgs ); ::comphelper::NamedValueCollection aArgs( aLoadArgs );
aArgs.put( "Model", rDoc.GetModel() ); aArgs.put( "Model", rDoc.GetModel() );
aArgs.put( "Hidden", bHidden ); aArgs.put( "Hidden", true );
if ( nViewId != SFX_INTERFACE_NONE ) if ( nViewId != SFX_INTERFACE_NONE )
aArgs.put( "ViewId", static_cast<sal_uInt16>(nViewId) ); aArgs.put( "ViewId", static_cast<sal_uInt16>(nViewId) );

View File

@@ -149,7 +149,7 @@ bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uInt32 nPos
if( pTheme ) if( pTheme )
{ {
if( pGraphic ) if( pGraphic )
bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic, /*bProgress*/false ); bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic );
pGal->ReleaseTheme( pTheme, aListener ); pGal->ReleaseTheme( pTheme, aListener );
} }

View File

@@ -765,7 +765,7 @@ bool GalleryTheme::GetThumb(sal_uInt32 nPos, BitmapEx& rBmp)
return bRet; 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 ); const GalleryObject* pObject = ImplGetGalleryObject( nPos );
bool bRet = false; bool bRet = false;
@@ -781,7 +781,7 @@ bool GalleryTheme::GetGraphic(sal_uInt32 nPos, Graphic& rGraphic, bool bProgress
case SgaObjKind::Inet: case SgaObjKind::Inet:
{ {
OUString aFilterDummy; OUString aFilterDummy;
bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, bProgress ) != GalleryGraphicImportRet::IMPORT_NONE ); bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, /*bProgress*/false ) != GalleryGraphicImportRet::IMPORT_NONE );
} }
break; break;

View File

@@ -28,8 +28,8 @@
#include <libxml/xmlwriter.h> #include <libxml/xmlwriter.h>
#include <memory> #include <memory>
SdrText::SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject /* = 0 */ ) SdrText::SdrText( SdrTextObj& rObject )
: mpOutlinerParaObject( pOutlinerParaObject ) : mpOutlinerParaObject( nullptr )
, mrObject( rObject ) , mrObject( rObject )
, mpModel( rObject.GetModel() ) , mpModel( rObject.GetModel() )
, mbPortionInfoChecked( false ) , mbPortionInfoChecked( false )

View File

@@ -393,7 +393,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj )
Cell::Cell( SdrTableObj& rTableObj ) Cell::Cell( SdrTableObj& rTableObj )
: SdrText( rTableObj, /*pOutlinerParaObject*/nullptr ) : SdrText( rTableObj )
, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) , SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
, mpPropSet( ImplGetSvxCellPropertySet() ) , mpPropSet( ImplGetSvxCellPropertySet() )
, mpProperties( new sdr::properties::CellProperties( rTableObj, this ) ) , mpProperties( new sdr::properties::CellProperties( rTableObj, this ) )

View File

@@ -3384,7 +3384,7 @@ bool INetURLObject::hasDosVolume(FSysStyle eStyle) const
// static // static
OUString INetURLObject::encodeText(sal_Unicode const * pBegin, OUString INetURLObject::encodeText(sal_Unicode const * pBegin,
sal_Unicode const * pEnd, bool bOctets, sal_Unicode const * pEnd,
Part ePart, EncodeMechanism eMechanism, Part ePart, EncodeMechanism eMechanism,
rtl_TextEncoding eCharset, rtl_TextEncoding eCharset,
bool bKeepVisibleEscapes) bool bKeepVisibleEscapes)
@@ -3393,9 +3393,9 @@ OUString INetURLObject::encodeText(sal_Unicode const * pBegin,
while (pBegin < pEnd) while (pBegin < pEnd)
{ {
EscapeType eEscapeType; EscapeType eEscapeType;
sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, bOctets, sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, /*bOctets*/false,
eMechanism, eCharset, eEscapeType); eMechanism, eCharset, eEscapeType);
appendUCS4(aResult, nUTF32, eEscapeType, bOctets, ePart, appendUCS4(aResult, nUTF32, eEscapeType, /*bOctets*/false, ePart,
eCharset, bKeepVisibleEscapes); eCharset, bKeepVisibleEscapes);
} }
return aResult.makeStringAndClear(); return aResult.makeStringAndClear();

View File

@@ -46,12 +46,11 @@ namespace xmloff
static css::uno::Any convertString( static css::uno::Any convertString(
const css::uno::Type& _rExpectedType, const css::uno::Type& _rExpectedType,
const OUString& _rReadCharacters, const OUString& _rReadCharacters,
const SvXMLEnumMapEntry<EnumT>* _pEnumMap = nullptr, const SvXMLEnumMapEntry<EnumT>* _pEnumMap = nullptr
const bool _bInvertBoolean = false
) )
{ {
return convertString(_rExpectedType, _rReadCharacters, return convertString(_rExpectedType, _rReadCharacters,
reinterpret_cast<const SvXMLEnumMapEntry<sal_uInt16>*>(_pEnumMap), _bInvertBoolean); reinterpret_cast<const SvXMLEnumMapEntry<sal_uInt16>*>(_pEnumMap), /*_bInvertBoolean*/false);
} }
static css::uno::Any convertString( static css::uno::Any convertString(
const css::uno::Type& _rExpectedType, const css::uno::Type& _rExpectedType,