loplugin:passstuffbyref improved returns in vcl
Change-Id: I0b103df2e7ce59093869f547225c95865d33da27 Reviewed-on: https://gerrit.libreoffice.org/46916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
38bf5f6966
commit
a8c1c0ae16
@ -68,7 +68,7 @@ public:
|
||||
|
||||
size_t size() const { return aCommandList.size(); }
|
||||
|
||||
SvCommand operator[]( size_t i) {
|
||||
SvCommand const & operator[]( size_t i) {
|
||||
return aCommandList[ i ];
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
|
||||
|
||||
SVL_DLLPUBLIC void SetMaybeFileHdl(Link<OUString *, bool> const & rTheMaybeFileHdl);
|
||||
|
||||
SVL_DLLPUBLIC Link<OUString *, bool> GetMaybeFileHdl();
|
||||
SVL_DLLPUBLIC Link<OUString *, bool> const & GetMaybeFileHdl();
|
||||
|
||||
/**
|
||||
Converts a URI reference to a relative one, ignoring certain differences (for
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
|
||||
BitmapChecksum GetChecksum() const { return Bitmap::GetChecksum(); }
|
||||
|
||||
Bitmap GetBitmap() const;
|
||||
Bitmap const & GetBitmap() const;
|
||||
|
||||
bool Erase( sal_uInt8 cTransparency );
|
||||
bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency );
|
||||
|
@ -427,8 +427,8 @@ public:
|
||||
const Size &rSize );
|
||||
public:
|
||||
|
||||
SAL_DLLPRIVATE std::shared_ptr<ImpBitmap> ImplGetBitmapImpBitmap() const { return aBitmap.ImplGetImpBitmap(); }
|
||||
SAL_DLLPRIVATE std::shared_ptr<ImpBitmap> ImplGetMaskImpBitmap() const { return aMask.ImplGetImpBitmap(); }
|
||||
SAL_DLLPRIVATE std::shared_ptr<ImpBitmap> const & ImplGetBitmapImpBitmap() const { return aBitmap.ImplGetImpBitmap(); }
|
||||
SAL_DLLPRIVATE std::shared_ptr<ImpBitmap> const & ImplGetMaskImpBitmap() const { return aMask.ImplGetImpBitmap(); }
|
||||
|
||||
|
||||
private:
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
|
||||
/// Setup handler for UNO commands so that commands like .uno:Something are handled automagically by this button.
|
||||
void SetCommandHandler(const OUString& aCommand);
|
||||
const OUString GetCommand() const { return maCommand; }
|
||||
OUString const & GetCommand() const { return maCommand; }
|
||||
|
||||
static OUString GetStandardText( StandardButtonType eButton );
|
||||
|
||||
|
@ -145,7 +145,7 @@ public:
|
||||
nUserId(nArgUserId) {}
|
||||
virtual ~ErrorInfo();
|
||||
|
||||
ErrCode GetErrorCode() const { return nUserId; }
|
||||
ErrCode const & GetErrorCode() const { return nUserId; }
|
||||
|
||||
static ErrorInfo* GetErrorInfo(ErrCode);
|
||||
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
virtual void dispose() override;
|
||||
|
||||
void addEntry(VclPtr<vcl::Window> xEntry, sal_uInt32 nPos = std::numeric_limits<sal_uInt16>::max());
|
||||
std::vector<VclPtr<vcl::Window>> getEntries() const;
|
||||
std::vector<VclPtr<vcl::Window>> const & getEntries() const;
|
||||
void deleteEntry(sal_uInt32 nPos);
|
||||
|
||||
virtual Size GetOptimalSize() const override;
|
||||
|
@ -188,7 +188,7 @@ public:
|
||||
|
||||
@returns The event's data string.
|
||||
*/
|
||||
OUString GetStringData() const
|
||||
OUString const & GetStringData() const
|
||||
{
|
||||
assert(
|
||||
aEvent == Type::Accept || aEvent == Type::Help
|
||||
|
@ -355,7 +355,7 @@ public:
|
||||
sal_uInt16 GetItemId( const OUString& rCommand ) const;
|
||||
tools::Rectangle GetItemRect( sal_uInt16 nItemId );
|
||||
tools::Rectangle GetItemPosRect( ImplToolItems::size_type nPos );
|
||||
tools::Rectangle GetOverflowRect() const;
|
||||
tools::Rectangle const & GetOverflowRect() const;
|
||||
|
||||
/// Returns size of the bitmap / text that is inside this toolbox item.
|
||||
Size GetItemContentSize( sal_uInt16 nItemId );
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
void SetStrm( SvStream*, bool );
|
||||
void SetStrm( UCBStorageStream* );
|
||||
bool Good() const { return m_nError == ERRCODE_NONE; }
|
||||
ErrCode GetError() const { return m_nError; }
|
||||
ErrCode const & GetError() const { return m_nError; }
|
||||
void MoveError( StorageBase const & );
|
||||
void SetError( ErrCode );
|
||||
void ResetError();
|
||||
|
@ -61,11 +61,11 @@ namespace {
|
||||
// #i86923#
|
||||
bool hasItemSet( const bool bCheckUsage ) const;
|
||||
// #i87808#
|
||||
const std::shared_ptr<SfxItemSet> getItemSet() const
|
||||
std::shared_ptr<SfxItemSet> const & getItemSet() const
|
||||
{
|
||||
return maItemSet.back();
|
||||
}
|
||||
const std::shared_ptr<SfxItemSet> getUsedOrLastAddedItemSet() const;
|
||||
std::shared_ptr<SfxItemSet> const & getUsedOrLastAddedItemSet() const;
|
||||
void setItemSet( const SfxItemSet& rSet ){ maItemSet.push_back( std::shared_ptr<SfxItemSet>( rSet.Clone() ) ); }
|
||||
// #i86923#
|
||||
Node* findChildNode( const SfxPoolItem& rItem,
|
||||
@ -80,7 +80,7 @@ namespace {
|
||||
};
|
||||
|
||||
// #i87808#
|
||||
const std::shared_ptr<SfxItemSet> Node::getUsedOrLastAddedItemSet() const
|
||||
std::shared_ptr<SfxItemSet> const & Node::getUsedOrLastAddedItemSet() const
|
||||
{
|
||||
std::vector< std::shared_ptr<SfxItemSet> >::const_reverse_iterator aIter;
|
||||
|
||||
|
@ -112,7 +112,7 @@ void URIHelper::SetMaybeFileHdl(Link<OUString *, bool> const & rTheMaybeFileHdl)
|
||||
MaybeFileHdl::get() = rTheMaybeFileHdl;
|
||||
}
|
||||
|
||||
Link<OUString *, bool> URIHelper::GetMaybeFileHdl()
|
||||
Link<OUString *, bool> const & URIHelper::GetMaybeFileHdl()
|
||||
{
|
||||
return MaybeFileHdl::get();
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
* be too late for the destructors of the bitmaps in maIconCache)*/
|
||||
void shutdown();
|
||||
|
||||
css::uno::Reference< css::container::XNameAccess > getNameAccess();
|
||||
css::uno::Reference< css::container::XNameAccess > const & getNameAccess();
|
||||
|
||||
private:
|
||||
ImplImageTree(const ImplImageTree&) = delete;
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
mbRelaxed = bRelaxed;
|
||||
}
|
||||
|
||||
WatchdogTimingsValues getWatchdogTimingsValues(WatchdogTimingMode eMode)
|
||||
WatchdogTimingsValues const & getWatchdogTimingsValues(WatchdogTimingMode eMode)
|
||||
{
|
||||
size_t index = 0;
|
||||
index = (eMode == WatchdogTimingMode::SHADER_COMPILE) ? 1 : 0;
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
GDBusProxy * getProxy( std::string target );
|
||||
void addBackend( std::pair< std::string, GDBusProxy * > pair );
|
||||
void addTempBackend( std::pair< std::string, gchar* > pair );
|
||||
std::vector<std::pair<std::string, gchar*>> getTempBackends();
|
||||
std::vector<std::pair<std::string, gchar*>> const & getTempBackends();
|
||||
void addNewPrinter( const OUString&, const OUString&, CPDPrinter * );
|
||||
#endif
|
||||
|
||||
|
@ -148,7 +148,7 @@ void ListControl::deleteEntry(sal_uInt32 nPos)
|
||||
RecalcAll();
|
||||
}
|
||||
|
||||
std::vector<VclPtr<vcl::Window>> ListControl::getEntries() const
|
||||
std::vector<VclPtr<vcl::Window>> const & ListControl::getEntries() const
|
||||
{
|
||||
return maEntries;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ void AlphaMask::ImplSetBitmap( const Bitmap& rBitmap )
|
||||
*static_cast<Bitmap*>(this) = rBitmap;
|
||||
}
|
||||
|
||||
Bitmap AlphaMask::GetBitmap() const
|
||||
Bitmap const & AlphaMask::GetBitmap() const
|
||||
{
|
||||
return ImplGetBitmap();
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ bool ImplImageTree::checkPathAccess()
|
||||
return rNameAccess.is();
|
||||
}
|
||||
|
||||
css::uno::Reference<css::container::XNameAccess> ImplImageTree::getNameAccess()
|
||||
css::uno::Reference<css::container::XNameAccess> const & ImplImageTree::getNameAccess()
|
||||
{
|
||||
checkPathAccess();
|
||||
return getCurrentIconSet().maNameAccess;
|
||||
|
@ -863,7 +863,7 @@ tools::Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
|
||||
return tools::Rectangle();
|
||||
}
|
||||
|
||||
tools::Rectangle ToolBox::GetOverflowRect() const
|
||||
tools::Rectangle const & ToolBox::GetOverflowRect() const
|
||||
{
|
||||
return mpData->maMenubuttonItem.maRect;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ void CPDManager::addTempBackend(std::pair<std::string, gchar*> pair) {
|
||||
m_tBackends.push_back(pair);
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, gchar*>> CPDManager::getTempBackends() {
|
||||
std::vector<std::pair<std::string, gchar*>> const & CPDManager::getTempBackends() {
|
||||
return m_tBackends;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user