Kaydet (Commit) dd6d7992 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantparam

Change-Id: I67d74072c776c32a1f91df94c621efe180baf5dc
Reviewed-on: https://gerrit.libreoffice.org/37481Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8891472e
......@@ -203,11 +203,11 @@ protected:
pContext->commitTableEvent( nEventId, rNewValue, rOldValue );
}
virtual void commitEvent( sal_Int16 nEventId,
const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override
const css::uno::Any& rNewValue ) override
{
AccessibleGridControl* pContext( getContext() );
if ( pContext )
pContext->commitEvent( nEventId, rNewValue, rOldValue );
pContext->commitEvent( nEventId, rNewValue, css::uno::Any() );
}
private:
......
......@@ -155,7 +155,7 @@ SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator )
case SBXID_ARRAY: return new SbxArray;
case SBXID_DIMARRAY: return new SbxDimArray;
case SBXID_OBJECT: return new SbxObject( "" );
case SBXID_COLLECTION: return new SbxCollection( "" );
case SBXID_COLLECTION: return new SbxCollection;
case SBXID_FIXCOLLECTION:
return new SbxStdCollection;
case SBXID_METHOD: return new SbxMethod( "", SbxEMPTY );
......
......@@ -30,8 +30,8 @@ static OUString pRemove;
static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash;
SbxCollection::SbxCollection( const OUString& rClass )
: SbxObject( rClass )
SbxCollection::SbxCollection()
: SbxObject( "" )
{
if( !nCountHash )
{
......@@ -238,8 +238,7 @@ bool SbxCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
SbxStdCollection::SbxStdCollection()
: SbxCollection( "" ),
bAddRemoveOk( true )
: bAddRemoveOk( true )
{}
SbxStdCollection::SbxStdCollection( const SbxStdCollection& r )
......
......@@ -77,6 +77,9 @@ for callInfo, callValues in callDict.iteritems():
if callValue.startswith("get"): continue
if "operator=" in functionSig: continue
if "&&" in functionSig: continue
if callInfo[2] == "###0" and callValue == "InitData()": continue
if callInfo[2] == "###0" and callValue == "InitAggregate()": continue
if callValue == "shared_from_this()": continue
tmp3list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue))
......
......@@ -222,7 +222,7 @@ protected:
public:
SBX_DECL_PERSIST_NODATA(SBXID_COLLECTION,1);
SbxCollection( const OUString& rClassname );
SbxCollection();
SbxCollection( const SbxCollection& );
SbxCollection& operator=( const SbxCollection& );
virtual SbxVariable* FindUserData( sal_uInt32 nUserData ) override;
......
......@@ -159,8 +159,7 @@ public:
///** Commits an event to all listeners. */
virtual void commitEvent(
sal_Int16 nEventId,
const css::uno::Any& rNewValue,
const css::uno::Any& rOldValue
const css::uno::Any& rNewValue
) = 0;
protected:
......
......@@ -43,10 +43,10 @@ private:
void ImpReadImageMap( SvStream& rIStm, size_t nCount, const OUString& );
// Import/Export
void ImpWriteCERN( SvStream& rOStm, const OUString& rBaseURL ) const;
void ImpWriteNCSA( SvStream& rOStm, const OUString& rBaseURL ) const;
sal_uLong ImpReadCERN( SvStream& rOStm, const OUString& rBaseURL );
sal_uLong ImpReadNCSA( SvStream& rOStm, const OUString& rBaseURL );
void ImpWriteCERN( SvStream& rOStm ) const;
void ImpWriteNCSA( SvStream& rOStm ) const;
sal_uLong ImpReadCERN( SvStream& rOStm );
sal_uLong ImpReadNCSA( SvStream& rOStm );
void ImpReadCERNLine( const OString& rLine, const OUString& rBaseURL );
static Point ImpReadCERNCoords( const char** ppStr );
......@@ -108,8 +108,8 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
// Import/Export
void Write ( SvStream& rOStm, const OUString& rBaseURL ) const;
void Read( SvStream& rIStm, const OUString& rBaseURL );
void Write ( SvStream& rOStm ) const;
void Read( SvStream& rIStm );
void Write( SvStream& rOStm, sal_uLong nFormat ) const;
sal_uLong Read( SvStream& rIStm, sal_uLong nFormat );
......
......@@ -321,7 +321,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
pImageMap.reset(new ImageMap);
// mba: clipboard always must contain absolute URLs (could be from alien source)
pImageMap->Read( *xStm, OUString() );
pImageMap->Read( *xStm );
}
}
......
......@@ -910,7 +910,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount, const OUString&
|*
\******************************************************************************/
void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
void ImageMap::Write( SvStream& rOStm ) const
{
IMapCompat* pCompat;
OUString aImageName( GetName() );
......@@ -934,7 +934,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
delete pCompat;
ImpWriteImageMap( rOStm, rBaseURL );
ImpWriteImageMap( rOStm, OUString() );
rOStm.SetEndian( nOldFormat );
}
......@@ -946,7 +946,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
|*
\******************************************************************************/
void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
void ImageMap::Read( SvStream& rIStm )
{
char cMagic[6];
SvStreamEndian nOldFormat = rIStm.GetEndian();
......@@ -975,7 +975,7 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
// here one can read in newer versions
delete pCompat;
ImpReadImageMap( rIStm, nCount, rBaseURL );
ImpReadImageMap( rIStm, nCount, OUString() );
}
else
......
......@@ -144,16 +144,16 @@ void ImageMap::Write( SvStream& rOStm, sal_uLong nFormat ) const
{
switch( nFormat )
{
case IMAP_FORMAT_BIN : Write( rOStm, "" ); break;
case IMAP_FORMAT_CERN : ImpWriteCERN( rOStm, "" ); break;
case IMAP_FORMAT_NCSA : ImpWriteNCSA( rOStm, "" ); break;
case IMAP_FORMAT_BIN : Write( rOStm ); break;
case IMAP_FORMAT_CERN : ImpWriteCERN( rOStm ); break;
case IMAP_FORMAT_NCSA : ImpWriteNCSA( rOStm ); break;
default:
break;
}
}
void ImageMap::ImpWriteCERN( SvStream& rOStm, const OUString& rBaseURL ) const
void ImageMap::ImpWriteCERN( SvStream& rOStm ) const
{
size_t nCount = maList.size();
......@@ -164,15 +164,15 @@ void ImageMap::ImpWriteCERN( SvStream& rOStm, const OUString& rBaseURL ) const
switch( pObj->GetType() )
{
case IMAP_OBJ_RECTANGLE:
static_cast<IMapRectangleObject*>( pObj )->WriteCERN( rOStm, rBaseURL );
static_cast<IMapRectangleObject*>( pObj )->WriteCERN( rOStm, OUString() );
break;
case IMAP_OBJ_CIRCLE:
static_cast<IMapCircleObject*>( pObj )->WriteCERN( rOStm, rBaseURL );
static_cast<IMapCircleObject*>( pObj )->WriteCERN( rOStm, OUString() );
break;
case IMAP_OBJ_POLYGON:
static_cast<IMapPolygonObject*>( pObj )->WriteCERN( rOStm, rBaseURL );
static_cast<IMapPolygonObject*>( pObj )->WriteCERN( rOStm, OUString() );
break;
default:
......@@ -181,7 +181,7 @@ void ImageMap::ImpWriteCERN( SvStream& rOStm, const OUString& rBaseURL ) const
}
}
void ImageMap::ImpWriteNCSA( SvStream& rOStm, const OUString& rBaseURL ) const
void ImageMap::ImpWriteNCSA( SvStream& rOStm ) const
{
size_t nCount = maList.size();
......@@ -192,15 +192,15 @@ void ImageMap::ImpWriteNCSA( SvStream& rOStm, const OUString& rBaseURL ) const
switch( pObj->GetType() )
{
case IMAP_OBJ_RECTANGLE:
static_cast<IMapRectangleObject*>( pObj )->WriteNCSA( rOStm, rBaseURL );
static_cast<IMapRectangleObject*>( pObj )->WriteNCSA( rOStm, OUString() );
break;
case IMAP_OBJ_CIRCLE:
static_cast<IMapCircleObject*>( pObj )->WriteNCSA( rOStm, rBaseURL );
static_cast<IMapCircleObject*>( pObj )->WriteNCSA( rOStm, OUString() );
break;
case IMAP_OBJ_POLYGON:
static_cast<IMapPolygonObject*>( pObj )->WriteNCSA( rOStm, rBaseURL );
static_cast<IMapPolygonObject*>( pObj )->WriteNCSA( rOStm, OUString() );
break;
default:
......@@ -218,9 +218,9 @@ sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat )
switch ( nFormat )
{
case IMAP_FORMAT_BIN : Read( rIStm, "" ); break;
case IMAP_FORMAT_CERN : nRet = ImpReadCERN( rIStm, "" ); break;
case IMAP_FORMAT_NCSA : nRet = ImpReadNCSA( rIStm, "" ); break;
case IMAP_FORMAT_BIN : Read( rIStm ); break;
case IMAP_FORMAT_CERN : nRet = ImpReadCERN( rIStm ); break;
case IMAP_FORMAT_NCSA : nRet = ImpReadNCSA( rIStm ); break;
default:
break;
......@@ -232,14 +232,14 @@ sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat )
return nRet;
}
sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm, const OUString& rBaseURL )
sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm )
{
// delete old content
ClearImageMap();
OString aStr;
while ( rIStm.ReadLine( aStr ) )
ImpReadCERNLine( aStr, rBaseURL );
ImpReadCERNLine( aStr, OUString() );
return IMAP_ERR_OK;
}
......@@ -373,14 +373,14 @@ OUString ImageMap::ImpReadCERNURL( const char** ppStr, const OUString& rBaseURL
return INetURLObject::GetAbsURL( rBaseURL, aStr );
}
sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm, const OUString& rBaseURL )
sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm )
{
// delete old content
ClearImageMap();
OString aStr;
while ( rIStm.ReadLine( aStr ) )
ImpReadNCSALine( aStr, rBaseURL );
ImpReadNCSALine( aStr, OUString() );
return IMAP_ERR_OK;
}
......
......@@ -713,7 +713,7 @@ bool TransferableHelper::SetImageMap( const ImageMap& rIMap )
SvMemoryStream aMemStm( 8192, 8192 );
aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
rIMap.Write( aMemStm, OUString() );
rIMap.Write( aMemStm );
maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
return( maAny.hasValue() );
......@@ -1767,7 +1767,7 @@ bool TransferableDataHelper::GetImageMap( const css::datatransfer::DataFlavor& r
if( bRet )
{
rIMap.Read( *xStm, OUString() );
rIMap.Read( *xStm );
bRet = ( xStm->GetError() == ERRCODE_NONE );
}
......
......@@ -463,7 +463,7 @@ void TransferDataContainer::CopyImageMap( const ImageMap& rImgMap )
{
SvMemoryStream aMemStm( 8192, 8192 );
aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
rImgMap.Write( aMemStm, OUString() );
rImgMap.Write( aMemStm );
CopyAnyData( SotClipboardFormatId::SVIM, static_cast<sal_Char const *>(aMemStm.GetData()),
aMemStm.Seek( STREAM_SEEK_TO_END ) );
}
......
......@@ -2432,7 +2432,7 @@ namespace svt { namespace table
void TableControl_Impl::impl_commitAccessibleEvent( sal_Int16 const i_eventID, Any const & i_newValue )
{
if ( impl_isAccessibleAlive() )
m_pAccessibleTable->commitEvent( i_eventID, i_newValue, Any() );
m_pAccessibleTable->commitEvent( i_eventID, i_newValue );
}
......
......@@ -270,12 +270,10 @@ namespace sw { namespace mark
Bookmark::Bookmark(const SwPaM& aPaM,
const vcl::KeyCode& rCode,
const OUString& rName,
const OUString& rShortName)
const OUString& rName)
: DdeBookmark(aPaM)
, ::sfx2::Metadatable()
, m_aCode(rCode)
, m_sShortName(rShortName)
{
m_aName = rName;
}
......
......@@ -38,7 +38,7 @@ namespace sw { namespace mark
const OUString& rPrefix)
: Bookmark(
// ensure that m_pPos2 is null by only passing start to super
SwPaM(*rPaM.Start()), rCode, rName, OUString())
SwPaM(*rPaM.Start()), rCode, rName)
{
assert( IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark(rPaM)
&& "<CrossRefBookmark::CrossRefBookmark(..)>"
......
......@@ -409,7 +409,7 @@ namespace sw { namespace mark
pMark = std::shared_ptr<IMark>(new NavigatorReminder(rPaM));
break;
case IDocumentMarkAccess::MarkType::BOOKMARK:
pMark = std::shared_ptr<IMark>(new Bookmark(rPaM, vcl::KeyCode(), rName, OUString()));
pMark = std::shared_ptr<IMark>(new Bookmark(rPaM, vcl::KeyCode(), rName));
break;
case IDocumentMarkAccess::MarkType::DDE_BOOKMARK:
pMark = std::shared_ptr<IMark>(new DdeBookmark(rPaM));
......
......@@ -161,8 +161,7 @@ namespace sw {
public:
Bookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName,
const OUString& rShortName);
const OUString& rName);
virtual void InitDoc(SwDoc* const io_Doc) override;
virtual void DeregisterFromDoc(SwDoc* const io_pDoc) override;
......
......@@ -79,7 +79,7 @@ public:
void AppendItem(EHistoryType eHistory,
const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
const OUString& sPassword, const boost::optional<OUString>& sThumbnail);
const boost::optional<OUString>& sThumbnail);
void DeleteItem(EHistoryType eHistory, const OUString& sURL);
......@@ -320,7 +320,7 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
const OUString& sPassword, const boost::optional<OUString>& sThumbnail)
const boost::optional<OUString>& sThumbnail)
{
uno::Reference<container::XNameAccess> xListAccess(GetListAccess(eHistory));
if (!xListAccess.is())
......@@ -436,7 +436,7 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
xSet.set(xInst, uno::UNO_QUERY);
xSet->setPropertyValue(s_sFilter, uno::makeAny(sFilter));
xSet->setPropertyValue(s_sTitle, uno::makeAny(sTitle));
xSet->setPropertyValue(s_sPassword, uno::makeAny(sPassword));
xSet->setPropertyValue(s_sPassword, uno::makeAny(OUString()));
xSet->setPropertyValue(s_sThumbnail, uno::makeAny(sThumbnail.get_value_or(OUString())));
::comphelper::ConfigurationHelper::flush(m_xCfg);
......@@ -565,7 +565,7 @@ void SvtHistoryOptions::AppendItem(EHistoryType eHistory,
{
MutexGuard aGuard(theHistoryOptionsMutex::get());
m_pImpl->AppendItem(eHistory, sURL, sFilter, sTitle, ""/*sPassword*/, sThumbnail);
m_pImpl->AppendItem(eHistory, sURL, sFilter, sTitle, sThumbnail);
}
void SvtHistoryOptions::DeleteItem(EHistoryType eHistory, const OUString& sURL)
......
......@@ -389,7 +389,7 @@ MenuItemData* Menu::NbcInsertItem(sal_uInt16 nId, MenuItemBits nBits,
{
// put Item in MenuItemList
MenuItemData* pData = pItemList->Insert(nId, MenuItemType::STRING,
nBits, rStr, Image(), pMenu, nPos, rIdent);
nBits, rStr, pMenu, nPos, rIdent);
// update native menu
if (ImplGetSalMenu() && pData->pSalMenuItem)
......
......@@ -50,13 +50,12 @@ MenuItemData* MenuItemList::Insert(
MenuItemType eType,
MenuItemBits nBits,
const OUString& rStr,
const Image& rImage,
Menu* pMenu,
size_t nPos,
const OString &rIdent
)
{
MenuItemData* pData = new MenuItemData( rStr, rImage );
MenuItemData* pData = new MenuItemData( rStr, Image() );
pData->nId = nId;
pData->sIdent = rIdent;
pData->eType = eType;
......@@ -74,7 +73,6 @@ MenuItemData* MenuItemList::Insert(
aSalMIData.nBits = nBits;
aSalMIData.pMenu = pMenu;
aSalMIData.aText = rStr;
aSalMIData.aImage = rImage;
// Native-support: returns NULL if not supported
pData->pSalMenuItem = ImplGetSVData()->mpDefInst->CreateMenuItem( &aSalMIData );
......
......@@ -106,7 +106,6 @@ public:
MenuItemType eType,
MenuItemBits nBits,
const OUString& rStr,
const Image& rImage,
Menu* pMenu,
size_t nPos,
const OString &rIdent
......
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