summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-25 23:03:53 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-27 05:22:07 +0000
commit1bf97d99e7529f1a69688522ac271636059a3391 (patch)
tree67629ba3d6d0c9fbe9916e7245461c3c2d7c79b2 /sw/source/uibase/utlui
parentb1225d201f8c23c75e31e09a0f5e9ff838866776 (diff)
loplugin:singlevalfields in sw(part1)
Change-Id: I0c6f545a8818da1f226c3958580abeeff0dc87b7 Reviewed-on: https://gerrit.libreoffice.org/26664 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/content.cxx24
1 files changed, 5 insertions, 19 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index fa3c723f198b..abe568f5ce76 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -197,10 +197,7 @@ bool SwContent::IsProtect() const
bool SwPostItContent::IsProtect() const
{
- if (mbPostIt)
- return pField->IsProtect();
- else
- return false;
+ return pField->IsProtect();
}
bool SwURLFieldContent::IsProtect() const
@@ -3159,18 +3156,12 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode)
m_pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell();
if(nMode == EditEntryMode::DELETE)
{
- if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
- {
- m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
- m_pActiveShell->DelRight();
- }
+ m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
+ m_pActiveShell->DelRight();
}
else
{
- if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
- nSlot = FN_POSTIT;
- else
- nSlot = FN_REDLINE_COMMENT;
+ nSlot = FN_POSTIT;
}
break;
case ContentTypeId::INDEX:
@@ -3314,12 +3305,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
break;
case ContentTypeId::POSTIT:
m_pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell();
- if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
- m_pActiveShell->GotoFormatField(*static_cast<SwPostItContent*>(pCnt)->GetPostIt());
- else
- m_pActiveShell->GetView().GetDocShell()->GetWrtShell()->GotoRedline(
- m_pActiveShell->GetView().GetDocShell()->GetWrtShell()->FindRedlineOfData(static_cast<SwPostItContent*>(pCnt)->GetRedline()->GetRedlineData()));
-
+ m_pActiveShell->GotoFormatField(*static_cast<SwPostItContent*>(pCnt)->GetPostIt());
break;
case ContentTypeId::DRAWOBJECT:
{