summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
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());