summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 10:19:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 11:53:58 +0100
commit004cc81168ce4e9f9b2f8fddf3361f8c23323673 (patch)
tree16c7009a3fac88766214ff073cab5562555a2f3a /lotuswordpro
parent2429c626b4ae5efcd2edf47dabf4add6a7384dff (diff)
loplugin:collapseif in dbaccess..lotuswordpro
Change-Id: Ia2a0d25c3833dfde0cd28337361f3cbd2aa29662 Reviewed-on: https://gerrit.libreoffice.org/62934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpfribptr.cxx17
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx30
2 files changed, 19 insertions, 28 deletions
diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index 902727aef38c..2001fe2069f3 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -536,18 +536,15 @@ void LwpFribPtr::RegisterStyle()
void LwpFribPtr::ProcessDropcap(LwpStory* pStory,LwpFrib* pFrib,sal_uInt32 nLen)
{
- if (pStory)
+ if (pStory && pStory->GetDropcapFlag())
{
- if (pStory->GetDropcapFlag())
- {
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- XFTextStyle* pFribStyle = pXFStyleManager->FindTextStyle(pFrib->GetStyleName());
- pFribStyle->GetFont()->SetFontSize(0);
+ XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
+ XFTextStyle* pFribStyle = pXFStyleManager->FindTextStyle(pFrib->GetStyleName());
+ pFribStyle->GetFont()->SetFontSize(0);
- LwpDropcapLayout* pObj = dynamic_cast<LwpDropcapLayout*>(pStory->GetLayoutsWithMe().GetOnlyLayout().obj().get());
- if (pObj)
- pObj->SetChars(nLen);
- }
+ LwpDropcapLayout* pObj = dynamic_cast<LwpDropcapLayout*>(pStory->GetLayoutsWithMe().GetOnlyLayout().obj().get());
+ if (pObj)
+ pObj->SetChars(nLen);
}
}
/**
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index 157dc041adc1..e99ee6a9e603 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -436,17 +436,14 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden
pTotalIndent.reset(pIndent->clone());
//for bullet only
- if (pPara)
+ if (pPara && pPara->GetBulletFlag())
{
- if (pPara->GetBulletFlag())
- {
- pTotalIndent->SetMAll(o3tl::saturating_add(pParentIndent->GetMAll(), pTotalIndent->GetMAll()));
- pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), pTotalIndent->GetMRight()));
- pParaStyle->SetMargins(LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(
- pTotalIndent->GetMAll())), pTotalIndent->GetRight());
- pPara->SetIndent(pTotalIndent.release());
- return;
- }
+ pTotalIndent->SetMAll(o3tl::saturating_add(pParentIndent->GetMAll(), pTotalIndent->GetMAll()));
+ pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), pTotalIndent->GetMRight()));
+ pParaStyle->SetMargins(LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(
+ pTotalIndent->GetMAll())), pTotalIndent->GetRight());
+ pPara->SetIndent(pTotalIndent.release());
+ return;
}
sal_uInt16 relative = pParentIndent->GetRelative();
@@ -467,15 +464,12 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden
else
{
pTotalIndent.reset(pIndent->clone());
- if (pPara)
+ if (pPara && pPara->GetBulletFlag())
{
- if (pPara->GetBulletFlag())
- {
- pParaStyle->SetMargins(LwpTools::ConvertToMetric(
- LwpTools::ConvertFromUnits(pIndent->GetMAll())), pIndent->GetRight());
- pPara->SetIndent(pTotalIndent.release());
- return;
- }
+ pParaStyle->SetMargins(LwpTools::ConvertToMetric(
+ LwpTools::ConvertFromUnits(pIndent->GetMAll())), pIndent->GetRight());
+ pPara->SetIndent(pTotalIndent.release());
+ return;
}
pParaStyle->SetIndent(pIndent->GetFirst());