Kaydet (Commit) 337f517a authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unuseddefaultparams comphelper

Change-Id: I78280a13fc0d82fc87041b5dad0c3f2f7d462652
Reviewed-on: https://gerrit.libreoffice.org/22853Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 944cdf5f
......@@ -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 )
......
......@@ -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 );
......
......@@ -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 );
}
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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)
......
......@@ -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
*/
......
......@@ -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
......
......@@ -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
......
......@@ -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 >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment