summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-20 09:25:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-21 11:32:43 +0100
commita60ffa6985dec32cc73032a7774f58694a6ee9a7 (patch)
treee94b9c586e6db1dde0a69aeddbe067bf8be2a47d /sw/source/ui/envelp
parent466c3564058aae4946cdd21eab9dfef529554d90 (diff)
loplugin:flatten in sw
Change-Id: I64176f48d90303f078e326c8838da9eb2daf8126 Reviewed-on: https://gerrit.libreoffice.org/44937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/envelp')
-rw-r--r--sw/source/ui/envelp/labfmt.cxx33
1 files changed, 17 insertions, 16 deletions
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index b31bec047365..c60a46320ab9 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -500,22 +500,23 @@ DeactivateRC SwLabFormatPage::DeactivatePage(SfxItemSet* _pSet)
void SwLabFormatPage::FillItem(SwLabItem& rItem)
{
- if (bModified)
- {
- rItem.m_aMake = rItem.m_aType = SwResId(STR_CUSTOM_LABEL);
-
- SwLabRec& rRec = *GetParentSwLabDlg()->Recs()[0];
- rItem.m_lHDist = rRec.m_nHDist = static_cast< long >(GETFLDVAL(*m_pHDistField ));
- rItem.m_lVDist = rRec.m_nVDist = static_cast< long >(GETFLDVAL(*m_pVDistField ));
- rItem.m_lWidth = rRec.m_nWidth = static_cast< long >(GETFLDVAL(*m_pWidthField ));
- rItem.m_lHeight = rRec.m_nHeight = static_cast< long >(GETFLDVAL(*m_pHeightField));
- rItem.m_lLeft = rRec.m_nLeft = static_cast< long >(GETFLDVAL(*m_pLeftField ));
- rItem.m_lUpper = rRec.m_nUpper = static_cast< long >(GETFLDVAL(*m_pUpperField ));
- rItem.m_nCols = rRec.m_nCols = static_cast< sal_Int32 >(m_pColsField->GetValue());
- rItem.m_nRows = rRec.m_nRows = static_cast< sal_Int32 >(m_pRowsField->GetValue());
- rItem.m_lPWidth = rRec.m_nPWidth = static_cast< long >(GETFLDVAL(*m_pPWidthField ));
- rItem.m_lPHeight = rRec.m_nPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField));
- }
+ if (!bModified)
+ return;
+
+ rItem.m_aMake = rItem.m_aType = SwResId(STR_CUSTOM_LABEL);
+
+ SwLabRec& rRec = *GetParentSwLabDlg()->Recs()[0];
+ rItem.m_lHDist = rRec.m_nHDist = static_cast< long >(GETFLDVAL(*m_pHDistField ));
+ rItem.m_lVDist = rRec.m_nVDist = static_cast< long >(GETFLDVAL(*m_pVDistField ));
+ rItem.m_lWidth = rRec.m_nWidth = static_cast< long >(GETFLDVAL(*m_pWidthField ));
+ rItem.m_lHeight = rRec.m_nHeight = static_cast< long >(GETFLDVAL(*m_pHeightField));
+ rItem.m_lLeft = rRec.m_nLeft = static_cast< long >(GETFLDVAL(*m_pLeftField ));
+ rItem.m_lUpper = rRec.m_nUpper = static_cast< long >(GETFLDVAL(*m_pUpperField ));
+ rItem.m_nCols = rRec.m_nCols = static_cast< sal_Int32 >(m_pColsField->GetValue());
+ rItem.m_nRows = rRec.m_nRows = static_cast< sal_Int32 >(m_pRowsField->GetValue());
+ rItem.m_lPWidth = rRec.m_nPWidth = static_cast< long >(GETFLDVAL(*m_pPWidthField ));
+ rItem.m_lPHeight = rRec.m_nPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField));
+
}
bool SwLabFormatPage::FillItemSet(SfxItemSet* rSet)