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