summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-07 08:42:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-07 10:45:05 +0200
commit868d8c8f0fdf376b0a3eb545ee841c9c12ffee3b (patch)
tree7e8b919732f3d73cfb77974c489ee864103b2882 /sw
parent9479171a09ba4c73afa8b40a5c2590df3b6d5415 (diff)
loplugin:unnecessaryparen handle parens inside call expr
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/ui/table/tabledlg.cxx4
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx5
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx4
7 files changed, 13 insertions, 12 deletions
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 15b6b0565824..f29114005681 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1991,7 +1991,7 @@ SwNumRule* DocumentStylePoolManager::GetNumRuleFromPool( sal_uInt16 nId )
for (sal_uInt16 n = 0; n < MAXLEVEL; ++n)
{
- aFormat.SetBulletChar( ( (n & 1) ? 0x25a1 : 0x2611 ) );
+ aFormat.SetBulletChar( (n & 1) ? 0x25a1 : 0x2611 );
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 76af28b3dc49..11f2b7d56a7f 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1275,7 +1275,7 @@ void RtfAttributeOutput::SectionPageBorders(const SwFrameFormat* pFormat, const
void RtfAttributeOutput::SectionBiDi(bool bBiDi)
{
- m_rExport.Strm().WriteCharPtr((bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT));
+ m_rExport.Strm().WriteCharPtr(bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT);
}
void RtfAttributeOutput::SectionPageNumbering(sal_uInt16 nNumType, const ::boost::optional<sal_uInt16>& oPageRestartNumber)
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index fd24098031ed..a585b8d48233 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1042,11 +1042,11 @@ void wwSectionManager::CreateSep(const long nTextPos)
if (eVer >= ww::eWW6)
{
- aRes = pSep->HasSprm((eVer <= ww::eWW7 ? 132 : 0x3001));
+ aRes = pSep->HasSprm(eVer <= ww::eWW7 ? 132 : 0x3001);
if (aRes.pSprm && aRes.nRemainingData >= 1)
aNewSection.maSep.iHeadingPgn = *aRes.pSprm;
- aRes = pSep->HasSprm((eVer <= ww::eWW7 ? 131 : 0x3000));
+ aRes = pSep->HasSprm(eVer <= ww::eWW7 ? 131 : 0x3000);
if (aRes.pSprm && aRes.nRemainingData >= 1)
aNewSection.maSep.cnsPgn = *aRes.pSprm;
}
@@ -1817,7 +1817,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
{
bAutoWidth = true;
nWidth = nNetWidth =
- msword_cast<sal_Int16>((nPgWidth ? nPgWidth : 2268)); // 4 cm
+ msword_cast<sal_Int16>(nPgWidth ? nPgWidth : 2268); // 4 cm
}
if( nWidth <= MINFLY )
nWidth = nNetWidth = MINFLY; // minimum width
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index f38c0d7fdf96..b1f9298fd594 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -770,8 +770,8 @@ SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSe
SetExchangeSupport();
const SfxPoolItem* pItem;
- Init((SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem )
- && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON));
+ Init(SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem )
+ && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
}
SwTableColumnPage::~SwTableColumnPage()
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 3b6eeda36108..5a7fa6afcc82 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -287,7 +287,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
- FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
+ FieldUnit eMetric = ::GetDfltMetric(0 != (nHtmlMode&HTMLMODE_ON));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(CurRectType::Page);
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 1a32de2bf9a8..3347c1af6d44 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -1061,10 +1061,11 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_MODE_FIX_PROP :
case FN_TABLE_MODE_VARIABLE :
{
- rSh.SetTableChgMode( ( FN_TABLE_MODE_FIX == nSlot ? TableChgMode::FixedWidthChangeAbs
+ rSh.SetTableChgMode( FN_TABLE_MODE_FIX == nSlot
+ ? TableChgMode::FixedWidthChangeAbs
: FN_TABLE_MODE_FIX_PROP == nSlot
? TableChgMode::FixedWidthChangeProp
- : TableChgMode::VarWidthChangeAbs ) );
+ : TableChgMode::VarWidthChangeAbs );
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
static sal_uInt16 aInva[] =
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 3ac39c0f091c..138069464a09 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1365,8 +1365,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if( nFrameType & FrameTypeFlags::DRAWOBJ)
{
const SwRect &rRect = rSh.GetObjRect();
- aLongUL.SetUpper((rRect.Top() - rPageRect.Top()));
- aLongUL.SetLower((rPageRect.Bottom() - rRect.Bottom()));
+ aLongUL.SetUpper(rRect.Top() - rPageRect.Top());
+ aLongUL.SetLower(rPageRect.Bottom() - rRect.Bottom());
}
else if(bBrowse)
{