summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/qa/unit/import-tests.cxx8
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 00e72e3b533c..0d2ede053bae 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1323,9 +1323,9 @@ void SdImportTest::testTdf93124()
uno::Sequence< beans::PropertyValue > aFilterData(2);
aFilterData[0].Name = "PixelWidth";
- aFilterData[0].Value <<= (sal_Int32)(320);
+ aFilterData[0].Value <<= (sal_Int32)320;
aFilterData[1].Name = "PixelHeight";
- aFilterData[1].Value <<= (sal_Int32)(180);
+ aFilterData[1].Value <<= (sal_Int32)180;
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
@@ -1399,9 +1399,9 @@ void SdImportTest::testTdf99729()
uno::Sequence< beans::PropertyValue > aFilterData(2);
aFilterData[0].Name = "PixelWidth";
- aFilterData[0].Value <<= (sal_Int32)(320);
+ aFilterData[0].Value <<= (sal_Int32)320;
aFilterData[1].Name = "PixelHeight";
- aFilterData[1].Value <<= (sal_Int32)(240);
+ aFilterData[1].Value <<= (sal_Int32)240;
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index d3c6d2ee0877..2699b62bb97f 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1116,7 +1116,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
- uno::Sequence< OUString > aSNS( mbImpressDoc ? (36) : (19) );
+ uno::Sequence< OUString > aSNS( mbImpressDoc ? 36 : 19 );
sal_uInt16 i(0);