summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwpparastyle.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-18 12:14:29 +0200
committerNoel Grandin <noel@peralex.com>2014-06-24 11:34:21 +0200
commite2080e70fe8b085f18e868e46340454720fa94ca (patch)
tree4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /lotuswordpro/source/filter/lwpparastyle.cxx
parentTranslated German comments - correction (diff)
downloadcore-e2080e70fe8b085f18e868e46340454720fa94ca.tar.gz
core-e2080e70fe8b085f18e868e46340454720fa94ca.zip
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'lotuswordpro/source/filter/lwpparastyle.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index 47aa89be8050..a44d0ae8c73f 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -589,7 +589,7 @@ void LwpParaStyle::ApplySpacing(LwpPara* pPara, XFParaStyle* pParaStyle, LwpSpac
{
if (below_val != -1)
pPara->SetBelowSpacing(below_val);
- LwpPara* pPrePara = dynamic_cast<LwpPara*>(pPara->GetPrevious()->obj().get());
+ LwpPara* pPrePara = dynamic_cast<LwpPara*>(pPara->GetPrevious().obj().get());
if (pPrePara && above_val != -1)
{
above_val += pPrePara->GetBelowSpacing();
@@ -608,14 +608,14 @@ void LwpParaStyle::ApplySpacing(LwpPara* pPara, XFParaStyle* pParaStyle, LwpSpac
**************************************************************************/
void LwpParaStyle::ApplyTab(XFParaStyle *pParaStyle, LwpTabOverride *pTabOverRide)
{
- LwpObjectID* pTabRackID = pTabOverRide->GetTabRackID();
- if(pTabRackID->IsNull())
+ LwpObjectID& rTabRackID = pTabOverRide->GetTabRackID();
+ if(rTabRackID.IsNull())
{
//assert(false);
return;
}
- LwpTabRack* pTabRack = dynamic_cast<LwpTabRack*>(pTabRackID->obj().get());
+ LwpTabRack* pTabRack = dynamic_cast<LwpTabRack*>(rTabRackID.obj().get());
if(!pTabRack)
{
//assert(false);
@@ -688,12 +688,12 @@ void LwpParaStyle::RegisterStyle()
XFParaStyle* pStyle = new XFParaStyle();
//Set name
- OUString styleName = GetName()->str();
+ OUString styleName = GetName().str();
pStyle->SetStyleName(styleName);
//Create font
- LwpFontManager* pFontMgr = m_pFoundry->GetFontManger();
- rtl::Reference<XFFont> pFont = pFontMgr->CreateFont(m_nFinalFontID);
+ LwpFontManager& rFontMgr = m_pFoundry->GetFontManger();
+ rtl::Reference<XFFont> pFont = rFontMgr.CreateFont(m_nFinalFontID);
pStyle->SetFont(pFont);
//Set other paragraph properties...
@@ -701,7 +701,7 @@ void LwpParaStyle::RegisterStyle()
Apply(pStyle);
//Add style
LwpStyleManager* pStyleMgr = m_pFoundry->GetStyleManager();
- pStyleMgr->AddStyle(*GetObjectID(), pStyle);
+ pStyleMgr->AddStyle(GetObjectID(), pStyle);
}
LwpAlignmentOverride* LwpParaStyle::GetAlignment()