summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-27 09:46:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-27 14:04:40 +0100
commita2656563f1a7639a99276fda90b6c8f675d20fc5 (patch)
treecc9eb4f064b1e8cdfce9ac42c52dfa6ae54f2b70 /sw
parent0093ae5f2ca1141f199aa9ae3b34b05a33def928 (diff)
loplugin:unnecessaryparen: Warn about parentheses around literals
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/ui/envelp/envfmt.cxx4
-rw-r--r--sw/source/uibase/config/caption.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index c75ad43df571..34a448ef2690 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1461,7 +1461,7 @@ void WW8AttributeOutput::CharBidiRTL( const SfxPoolItem& rHt )
if( rAttr.GetValue() == 1 )
{
m_rWW8Export.InsUInt16(0x85a);
- m_rWW8Export.pO->push_back((sal_uInt8)(1));
+ m_rWW8Export.pO->push_back((sal_uInt8)1);
}
}
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 0dc857836407..cdc602bcb29a 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -436,9 +436,9 @@ void SwEnvFormatPage::SetMinMax()
m_pAddrLeftField->SetMax((long) 100 * (lWidth - 2 * 566), FUNIT_TWIP);
m_pAddrTopField->SetMin((long) 100 * (GetFieldVal(*m_pSendTopField ) + 2 * 566), FUNIT_TWIP);
m_pAddrTopField->SetMax((long) 100 * (lHeight - 2 * 566), FUNIT_TWIP);
- m_pSendLeftField->SetMin((long) 100 * (566), FUNIT_TWIP);
+ m_pSendLeftField->SetMin((long) 100 * 566, FUNIT_TWIP);
m_pSendLeftField->SetMax((long) 100 * (GetFieldVal(*m_pAddrLeftField) - 566), FUNIT_TWIP);
- m_pSendTopField->SetMin((long) 100 * (566), FUNIT_TWIP);
+ m_pSendTopField->SetMin((long) 100 * 566, FUNIT_TWIP);
m_pSendTopField->SetMax((long) 100 * (GetFieldVal(*m_pAddrTopField ) - 2 * 566), FUNIT_TWIP);
// First and last
diff --git a/sw/source/uibase/config/caption.cxx b/sw/source/uibase/config/caption.cxx
index 97244660f550..0458826a30d7 100644
--- a/sw/source/uibase/config/caption.cxx
+++ b/sw/source/uibase/config/caption.cxx
@@ -25,7 +25,7 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI
bUseCaption(false),
eObjType(eType),
nNumType(SVX_NUM_ARABIC),
- sNumberSeparator((". ")),
+ sNumberSeparator(". "),
nPos(1),
nLevel(0),
sSeparator( OUString(": ") ),