comphelper/source/container/embeddedobjectcontainer.cxx | 4 ++-- comphelper/source/misc/accessiblewrapper.cxx | 4 ++-- comphelper/source/misc/componentmodule.cxx | 4 ++-- comphelper/source/misc/docpasswordhelper.cxx | 5 ++--- comphelper/source/misc/storagehelper.cxx | 9 +-------- include/comphelper/accessiblewrapper.hxx | 3 +-- include/comphelper/componentmodule.hxx | 3 +-- include/comphelper/docpasswordhelper.hxx | 7 +------ include/comphelper/embeddedobjectcontainer.hxx | 2 +- include/comphelper/storagehelper.hxx | 3 +-- 10 files changed, 14 insertions(+), 30 deletions(-)
New commits: commit 337f517af60d25351bc89f3814dcaf48f3aaa5b6 Author: Noel Grandin <n...@peralex.com> Date: Thu Mar 3 13:08:30 2016 +0200 loplugin:unuseddefaultparams comphelper Change-Id: I78280a13fc0d82fc87041b5dad0c3f2f7d462652 Reviewed-on: https://gerrit.libreoffice.org/22853 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 6c373e2..a37b2f0 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -1206,10 +1206,10 @@ uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetObjectStream( co return xInputStream; } -uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetObjectStream( const uno::Reference < embed::XEmbeddedObject >& xObj, OUString* pMediaType ) +uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetObjectStream( const uno::Reference < embed::XEmbeddedObject >& xObj ) { // try to load it from the container storage - return GetObjectStream( GetEmbeddedObjectName( xObj ), pMediaType ); + return GetObjectStream( GetEmbeddedObjectName( xObj ), nullptr ); } bool EmbeddedObjectContainer::InsertGraphicStream( const css::uno::Reference < css::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType ) diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 75cad7f..e106b9d 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -88,7 +88,7 @@ namespace comphelper Reference< XAccessible > OWrappedAccessibleChildrenManager::getAccessibleWrapperFor( - const Reference< XAccessible >& _rxKey, bool _bCreate ) + const Reference< XAccessible >& _rxKey ) { Reference< XAccessible > xValue; @@ -104,7 +104,7 @@ namespace comphelper { xValue = aPos->second; } - else if ( _bCreate ) + else { // not found in the cache, and allowed to create // -> new wrapper xValue = new OAccessibleWrapper( m_xContext, _rxKey, m_aOwningAccessible ); diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index 24c9a72..7e91b3c 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -105,9 +105,9 @@ namespace comphelper void OModule::registerImplementation( const OUString& _rImplementationName, const css::uno::Sequence< OUString >& _rServiceNames, - ::cppu::ComponentFactoryFunc _pCreateFunction, FactoryInstantiation _pFactoryFunction ) + ::cppu::ComponentFactoryFunc _pCreateFunction ) { - ComponentDescription aComponent( _rImplementationName, _rServiceNames, _pCreateFunction, _pFactoryFunction ); + ComponentDescription aComponent( _rImplementationName, _rServiceNames, _pCreateFunction, ::cppu::createSingleComponentFactory ); registerImplementation( aComponent ); } diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 301612c..8251768 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -235,10 +235,9 @@ sal_uInt16 DocPasswordHelper::GetXLHashAsUINT16( Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence( - const OUString& aUString, - rtl_TextEncoding nEnc ) + const OUString& aUString ) { - sal_uInt16 nHash = GetXLHashAsUINT16( aUString, nEnc ); + sal_uInt16 nHash = GetXLHashAsUINT16( aUString ); Sequence< sal_Int8 > aResult( 2 ); aResult[0] = ( nHash >> 8 ); aResult[1] = ( nHash & 0xFF ); diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 4e7a035..35756dc 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -292,19 +292,12 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL( const OUString& aFormat, const OUString& aURL, sal_Int32 nStorageMode, - const uno::Reference< uno::XComponentContext >& rxContext, - bool bRepairStorage ) + const uno::Reference< uno::XComponentContext >& rxContext ) throw ( uno::Exception ) { uno::Sequence< beans::PropertyValue > aProps( 1 ); aProps[0].Name = "StorageFormat"; aProps[0].Value <<= aFormat; - if ( bRepairStorage ) - { - aProps.realloc( 2 ); - aProps[1].Name = "RepairPackage"; - aProps[1].Value <<= bRepairStorage; - } uno::Sequence< uno::Any > aArgs( 3 ); aArgs[0] <<= aURL; diff --git a/include/comphelper/accessiblewrapper.hxx b/include/comphelper/accessiblewrapper.hxx index e78c400..b6df320 100644 --- a/include/comphelper/accessiblewrapper.hxx +++ b/include/comphelper/accessiblewrapper.hxx @@ -349,8 +349,7 @@ namespace comphelper /// retrieves a wrapper for the given accessible css::uno::Reference< css::accessibility::XAccessible > getAccessibleWrapperFor( - const css::uno::Reference< css::accessibility::XAccessible >& _rxKey, - bool _bCreate = true + const css::uno::Reference< css::accessibility::XAccessible >& _rxKey ); /// erases the given key from the map (if it is present there) diff --git a/include/comphelper/componentmodule.hxx b/include/comphelper/componentmodule.hxx index b14148a..4c0f8a3 100644 --- a/include/comphelper/componentmodule.hxx +++ b/include/comphelper/componentmodule.hxx @@ -113,8 +113,7 @@ namespace comphelper void registerImplementation( const OUString& _rImplementationName, const css::uno::Sequence< OUString >& _rServiceNames, - ::cppu::ComponentFactoryFunc _pCreateFunction, - FactoryInstantiation _pFactoryFunction = ::cppu::createSingleComponentFactory ); + ::cppu::ComponentFactoryFunc _pCreateFunction ); /** registers a component given by ComponentDescription */ diff --git a/include/comphelper/docpasswordhelper.hxx b/include/comphelper/docpasswordhelper.hxx index 12ecb7ee6..18eebd1 100644 --- a/include/comphelper/docpasswordhelper.hxx +++ b/include/comphelper/docpasswordhelper.hxx @@ -172,17 +172,12 @@ public: @param aString The string for which the hash should be calculated - @param nEnc - The encoding that should be used to generate the 8-bit string - before the hash is generated - @return The hash represented by sequence of bytes in BigEndian form */ static css::uno::Sequence< sal_Int8 > GetXLHashAsSequence( - const OUString& aString, - rtl_TextEncoding nEnc = RTL_TEXTENCODING_UTF8 ); + const OUString& aString ); /** This helper function generates a random sequence of bytes of diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx index ddbc6d0..2e73050 100644 --- a/include/comphelper/embeddedobjectcontainer.hxx +++ b/include/comphelper/embeddedobjectcontainer.hxx @@ -144,7 +144,7 @@ public: bool MoveEmbeddedObject( const OUString& rName, EmbeddedObjectContainer& ); // get the stored representation for the object - css::uno::Reference < css::io::XInputStream > GetObjectStream( const css::uno::Reference < css::embed::XEmbeddedObject >&, OUString* pMediaType=nullptr ); + css::uno::Reference < css::io::XInputStream > GetObjectStream( const css::uno::Reference < css::embed::XEmbeddedObject >& ); css::uno::Reference < css::io::XInputStream > GetObjectStream( const OUString& aName, OUString* pMediaType ); // get the stored graphical representation for the object diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx index 9472ce6..d5655d4 100644 --- a/include/comphelper/storagehelper.hxx +++ b/include/comphelper/storagehelper.hxx @@ -145,8 +145,7 @@ public: const OUString& aURL, sal_Int32 nStorageMode, const css::uno::Reference< css::uno::XComponentContext >& rxContext - = css::uno::Reference< css::uno::XComponentContext >(), - bool bRepairStorage = false ) + = css::uno::Reference< css::uno::XComponentContext >() ) throw ( css::uno::Exception ); static css::uno::Reference< css::embed::XStorage > _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits