diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-22 14:12:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-22 19:16:52 +0100 |
commit | 72ef2b5d9802c424dbb0810e0a72fae50d92b678 (patch) | |
tree | c043fd16189d55fcc549589cecf145bb522089e6 /xmloff | |
parent | b140f92531396c1087b997852d7ece18429b79d1 (diff) |
Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for
pFormat = (pGrfObj)
? ...
(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).
Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 697dc84cad4a..3041578f0cf9 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -153,10 +153,10 @@ void XMLGraphicsDefaultStyle::SetDefaults() XMLPropertyByIndex(nStrokeIndex))) { sal_Int32 const nStroke( - (bIsAOO4) ? RGB_COLORDATA(128, 128, 128) : COL_BLACK); + bIsAOO4 ? RGB_COLORDATA(128, 128, 128) : COL_BLACK); xDefaults->setPropertyValue("LineColor", makeAny(nStroke)); } - sal_Int32 const nFillColor( (bIsAOO4) + sal_Int32 const nFillColor( bIsAOO4 ? RGB_COLORDATA(0xCF, 0xE7, 0xF5) : RGB_COLORDATA(153, 204, 255)); sal_Int32 const nFillIndex( pImpPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, "fill-color", 0)); diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 86370e8a118b..53a8727fc87a 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -388,7 +388,7 @@ SdXMLExport::SdXMLExport( OUString const & implementationName, bool bIsDraw, SvXMLExportFlags nExportFlags ) : SvXMLExport( util::MeasureUnit::CM, xContext, implementationName, - (bIsDraw) ? XML_GRAPHICS : XML_PRESENTATION, nExportFlags ), + bIsDraw ? XML_GRAPHICS : XML_PRESENTATION, nExportFlags ), mnDocMasterPageCount(0), mnDocDrawPageCount(0), mnObjectCount(0), diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index fe75012bd407..7ff3bec70784 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1527,7 +1527,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName ); const OUString rPropName = bPara ? OUString("ParaStyleName") : OUString("CharStyleName"); - const Reference < XNameContainer > & rStyles = (bPara) + const Reference < XNameContainer > & rStyles = bPara ? m_xImpl->m_xParaStyles : m_xImpl->m_xTextStyles; if( rStyles.is() && |