vcl: Pass SvLBoxItem::CalcWidth param by ref
... instead of by pointer. Change-Id: I2b6ee78b6c2102cdbeb5154171b4d2efed7142a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202345 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -118,7 +118,7 @@ public:
|
||||
SvTreeListEntry* pEntry,
|
||||
SvViewDataItem* pViewData = nullptr) override;
|
||||
|
||||
virtual int CalcWidth(const SvTreeListBox* pView) const override;
|
||||
virtual int CalcWidth(const SvTreeListBox& rView) const override;
|
||||
|
||||
void Align(TxtAlign eAlign) { meAlign = eAlign; }
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
SvLBoxItem();
|
||||
virtual ~SvLBoxItem();
|
||||
virtual SvLBoxItemType GetType() const = 0;
|
||||
virtual int CalcWidth(const SvTreeListBox* pView) const;
|
||||
virtual int CalcWidth(const SvTreeListBox& rView) const;
|
||||
int GetWidth(const SvTreeListBox& rView, const SvTreeListEntry* pEntry) const;
|
||||
int GetWidth(const SvTreeListBox& rView, const SvViewDataEntry* pData,
|
||||
sal_uInt16 nItemPos) const;
|
||||
|
||||
@@ -301,9 +301,9 @@ void SvLBoxString::InitViewData(
|
||||
pView->GetOutDev()->Pop();
|
||||
}
|
||||
|
||||
int SvLBoxString::CalcWidth(const SvTreeListBox* pView) const
|
||||
int SvLBoxString::CalcWidth(const SvTreeListBox& rView) const
|
||||
{
|
||||
return pView->GetTextWidth(maText);
|
||||
return rView.GetTextWidth(maText);
|
||||
}
|
||||
|
||||
// ***************************************************************
|
||||
|
||||
@@ -354,7 +354,7 @@ int SvLBoxItem::GetWidth(const SvTreeListBox& rView, const SvTreeListEntry* pEnt
|
||||
int nWidth = pViewData->mnWidth;
|
||||
if (nWidth == -1)
|
||||
{
|
||||
nWidth = CalcWidth(&rView);
|
||||
nWidth = CalcWidth(rView);
|
||||
const_cast<SvViewDataItem*>(pViewData)->mnWidth = nWidth;
|
||||
}
|
||||
return nWidth;
|
||||
@@ -373,7 +373,7 @@ int SvLBoxItem::GetWidth(const SvTreeListBox& rView, const SvViewDataEntry* pDat
|
||||
int nWidth = rIData.mnWidth;
|
||||
if (nWidth == -1)
|
||||
{
|
||||
nWidth = CalcWidth(&rView);
|
||||
nWidth = CalcWidth(rView);
|
||||
const_cast<SvViewDataItem&>(rIData).mnWidth = nWidth;
|
||||
}
|
||||
return nWidth;
|
||||
@@ -385,7 +385,7 @@ int SvLBoxItem::GetHeight(const SvViewDataEntry* pData, sal_uInt16 nItemPos)
|
||||
return rIData.mnHeight;
|
||||
}
|
||||
|
||||
int SvLBoxItem::CalcWidth(const SvTreeListBox* /*pView*/) const
|
||||
int SvLBoxItem::CalcWidth(const SvTreeListBox& /*rView*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user