summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx12
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx10
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx8
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx2
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx2
-rw-r--r--chart2/source/view/main/DummyXShape.cxx4
-rw-r--r--compilerplugins/clang/test/unnecessaryparen.cxx12
-rw-r--r--compilerplugins/clang/unnecessaryparen.cxx106
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx4
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--dbaccess/source/core/api/RowSet.cxx10
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx10
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx2
-rw-r--r--editeng/source/items/svxfont.cxx2
-rw-r--r--embeddedobj/source/general/intercept.cxx2
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx2
-rw-r--r--framework/source/helper/titlebarupdate.cxx6
-rw-r--r--framework/source/jobs/joburl.cxx2
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--framework/source/services/autorecovery.cxx4
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx4
-rw-r--r--idlc/source/idlcmain.cxx2
-rw-r--r--include/osl/socket.hxx2
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--sal/rtl/alloc_arena.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx4
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx8
-rw-r--r--sfx2/source/doc/printhelper.cxx8
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewprn.cxx4
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx4
-rw-r--r--starmath/source/node.cxx3
-rw-r--r--store/source/storcach.cxx2
-rw-r--r--store/source/stordata.hxx8
-rw-r--r--store/source/stortree.cxx2
-rw-r--r--svx/source/dialog/_bmpmask.cxx2
-rw-r--r--svx/source/svdraw/svddrgmt.cxx2
-rw-r--r--svx/source/svdraw/svdmark.cxx4
-rw-r--r--svx/source/svdraw/svdpagv.cxx4
-rw-r--r--sw/source/core/access/acccontext.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx2
-rw-r--r--sw/source/core/crsr/pam.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx4
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx7
-rw-r--r--sw/source/core/unocore/unoidx.cxx2
-rw-r--r--sw/source/core/unocore/unoobj2.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx6
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx2
-rw-r--r--unoxml/source/dom/documentbuilder.cxx2
-rw-r--r--unoxml/source/dom/saxbuilder.cxx2
-rw-r--r--unoxml/source/xpath/xpathapi.cxx2
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx4
-rw-r--r--xmloff/source/draw/animationexport.cxx4
73 files changed, 225 insertions, 143 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 73d8598a6dd2..e7cc81283bab 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -161,7 +161,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window
if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, true, &pPoolItem) == SfxItemState::SET )
{
- bool bForbidPercentValue = (static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue() );
+ bool bForbidPercentValue = static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue();
if( bForbidPercentValue )
m_pCBPercent->Enable(false);
}
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index d873fb3c5dba..9b4642751ad7 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -232,7 +232,7 @@ void ErrorBarResources::UpdateControlStates()
// range buttons
m_pRbRange->Enable( !m_bHasInternalDataProvider || m_bEnableDataTableDialog );
- bool bShowRange = ( m_pRbRange->IsChecked());
+ bool bShowRange = m_pRbRange->IsChecked();
bool bCanChooseRange =
( bShowRange &&
m_apRangeSelectionHelper.get() &&
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 657575b36923..eee760d7cf23 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -549,8 +549,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
case SCHATTR_AXIS_REVERSE:
{
bool bWasReverse = ( aScale.Orientation == AxisOrientation_REVERSE );
- bool bNewReverse = (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() );
+ bool bNewReverse = static_cast< const SfxBoolItem & >(
+ rItemSet.Get( nWhichId )).GetValue();
if( bWasReverse != bNewReverse )
{
aScale.Orientation = bNewReverse ? AxisOrientation_REVERSE : AxisOrientation_MATHEMATICAL;
@@ -891,8 +891,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
if( m_pExplicitScale )
{
bool bUseSourceFormat =
- (static_cast< const SfxBoolItem & >(
- rItemSet.Get( SID_ATTR_NUMBERFORMAT_SOURCE )).GetValue() );
+ static_cast< const SfxBoolItem & >(
+ rItemSet.Get( SID_ATTR_NUMBERFORMAT_SOURCE )).GetValue();
if( ! bUseSourceFormat )
{
@@ -914,8 +914,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
case SID_ATTR_NUMBERFORMAT_SOURCE:
{
bool bUseSourceFormat =
- (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() );
+ static_cast< const SfxBoolItem & >(
+ rItemSet.Get( nWhichId )).GetValue();
GetPropertySet()->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(bUseSourceFormat));
bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue(CHART_UNONAME_NUMFMT).hasValue();
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 02bb29c2f8df..9aa54f554bb9 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -104,8 +104,8 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe
return bChanged;
uno::Any aValue;
- bool bUseSourceFormat = (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nSourceWhich )).GetValue() );
+ bool bUseSourceFormat = static_cast< const SfxBoolItem & >(
+ rItemSet.Get( nSourceWhich )).GetValue();
if( !bUseSourceFormat )
{
SfxItemState aState = rItemSet.GetItemState( nWhichId );
@@ -151,8 +151,8 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
return bChanged;
uno::Any aNewValue;
- bool bUseSourceFormat = (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() );
+ bool bUseSourceFormat = static_cast< const SfxBoolItem & >(
+ rItemSet.Get( nWhichId )).GetValue();
if( !bUseSourceFormat )
{
SfxItemState aState = rItemSet.GetItemState( nFormatWhich );
@@ -601,7 +601,7 @@ void DataPointItemConverter::FillSpecialItem(
break;
case SCHATTR_PERCENT_NUMBERFORMAT_SOURCE:
{
- bool bNumberFormatIsSet = ( GetPropertySet()->getPropertyValue( "PercentageNumberFormat" ).hasValue());
+ bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue( "PercentageNumberFormat" ).hasValue();
rOutItemSet.Put( SfxBoolItem( nWhichId, ! bNumberFormatIsSet ));
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index e5542ca2c379..72de9427016f 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -84,9 +84,9 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
while( (*pRanges) != 0)
{
- sal_uInt16 nBeg = (*pRanges);
+ sal_uInt16 nBeg = *pRanges;
++pRanges;
- sal_uInt16 nEnd = (*pRanges);
+ sal_uInt16 nEnd = *pRanges;
++pRanges;
OSL_ASSERT( nBeg <= nEnd );
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index a17110665e45..c12a5aa0eac5 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -295,8 +295,8 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
case SCHATTR_CLOCKWISE:
{
- bool bClockwise = (static_cast< const SfxBoolItem & >(
- rItemSet.Get( nWhichId )).GetValue() );
+ bool bClockwise = static_cast< const SfxBoolItem & >(
+ rItemSet.Get( nWhichId )).GetValue();
if( m_xCooSys.is() )
{
uno::Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 1, 0, m_xCooSys ) );
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 1cd91fb483f7..d4eda866e032 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -96,7 +96,7 @@ bool numberFormatFromItemToPropertySet(
return bChanged;
uno::Any aValue;
- bool bUseSourceFormat = (static_cast<const SfxBoolItem&>(rItemSet.Get(nSourceWhich)).GetValue());
+ bool bUseSourceFormat = static_cast<const SfxBoolItem&>(rItemSet.Get(nSourceWhich)).GetValue();
if (!bUseSourceFormat)
{
SfxItemState aState = rItemSet.GetItemState(nWhichId);
@@ -144,8 +144,8 @@ bool useSourceFormatFromItemToPropertySet(
return bChanged;
uno::Any aNewValue;
- bool bUseSourceFormat = (static_cast<const SfxBoolItem&>(
- rItemSet.Get(nWhichId)).GetValue());
+ bool bUseSourceFormat = static_cast<const SfxBoolItem&>(
+ rItemSet.Get(nWhichId)).GetValue();
if (!bUseSourceFormat)
{
SfxItemState aState = rItemSet.GetItemState(nFormatWhich);
@@ -550,7 +550,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
break;
case SCHATTR_PERCENT_NUMBERFORMAT_SOURCE:
{
- bool bNumberFormatIsSet = (GetPropertySet()->getPropertyValue("PercentageNumberFormat").hasValue());
+ bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue("PercentageNumberFormat").hasValue();
rOutItemSet.Put(SfxBoolItem(nWhichId, !bNumberFormatIsSet));
}
break;
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 5be67a46917a..d11210666caf 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -432,7 +432,7 @@ void ImplObjectHierarchy::createDataSeriesTree(
if( DataSeriesHelper::hasDataLabelsAtSeries( xSeries ) )
{
OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) );
- aChildParticle+=("=");
+ aChildParticle += "=";
aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ) );
}
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 9b90d88e5470..af1544b22815 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2444,7 +2444,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
}
// label
- aLabelText = ( DataSeriesHelper::getDataSeriesLabel( rSeries.getModel(), m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : "values-y") );
+ aLabelText = DataSeriesHelper::getDataSeriesLabel( rSeries.getModel(), m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : "values-y");
aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, xTextProperties );
aResult.push_back(aEntry);
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 4d1248f85f7d..61d956bfaf99 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -789,8 +789,8 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames,
tools::Rectangle aRect;
pDevice->SetFont(aFont);
pDevice->GetTextBoundRect(aRect, rText);
- int screenWidth = (aRect.BottomRight().X());
- int screenHeight = (aRect.BottomRight().Y());
+ int screenWidth = aRect.BottomRight().X();
+ int screenHeight = aRect.BottomRight().Y();
pDevice->SetOutputSizePixel(Size(screenWidth * 3, screenHeight));
pDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
pDevice->DrawText(Point(0, 0), rText);
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 51f792769bc2..d07f4930c4d3 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <string>
+#include <rtl/ustring.hxx>
+
bool foo(int);
enum class EFoo { Bar };
@@ -20,7 +23,7 @@ int main()
foo((1)); // expected-error {{parentheses immediately inside single-arg call [loplugin:unnecessaryparen]}}
- int y = (x); // expected-error {{unnecessary parentheses around identifier [loplugin:unnecessaryparen]}}
+ int y = (x); // expected-error {{unnecessary parentheses around identifier [loplugin:unnecessaryparen]}} expected-error {{parentheses immediately inside vardecl statement [loplugin:unnecessaryparen]}}
(void)y;
EFoo foo = EFoo::Bar;
@@ -40,6 +43,13 @@ int main()
return 0;
}
x = (true) ? 0 : 1;
+
+ int v2 = (1); // expected-error {{parentheses immediately inside vardecl statement [loplugin:unnecessaryparen]}}
+ (void)v2;
+
+ std::string v3;
+ v3 = (std::string("xx") + "xx"); // expected-error {{parentheses immediately inside assignment [loplugin:unnecessaryparen]}}
+ (void)v3;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index 43fc13be8eea..57c9cd9c65b4 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -79,11 +79,13 @@ public:
bool VisitCaseStmt(const CaseStmt *);
bool VisitReturnStmt(const ReturnStmt* );
bool VisitCallExpr(const CallExpr *);
+ bool VisitVarDecl(const VarDecl *);
+ bool VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *);
bool TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *);
bool TraverseCaseStmt(CaseStmt *);
bool TraverseConditionalOperator(ConditionalOperator *);
private:
- void VisitSomeStmt(const Stmt *parent, const Expr* cond, StringRef stmtName);
+ void VisitSomeStmt(Stmt const * stmt, const Expr* cond, StringRef stmtName);
Expr const * insideSizeof = nullptr;
Expr const * insideCaseStmt = nullptr;
Expr const * insideConditionalOperator = nullptr;
@@ -234,11 +236,11 @@ bool UnnecessaryParen::VisitReturnStmt(const ReturnStmt* returnStmt)
return true;
}
-void UnnecessaryParen::VisitSomeStmt(const Stmt *parent, const Expr* cond, StringRef stmtName)
+void UnnecessaryParen::VisitSomeStmt(const Stmt * stmt, const Expr* cond, StringRef stmtName)
{
- if (ignoreLocation(parent))
+ if (ignoreLocation(stmt))
return;
- if (parent->getLocStart().isMacroID())
+ if (stmt->getLocStart().isMacroID())
return;
auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(cond));
@@ -273,18 +275,90 @@ bool UnnecessaryParen::VisitCallExpr(const CallExpr* callExpr)
return true;
auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(callExpr->getArg(0)));
- if (parenExpr) {
- if (parenExpr->getLocStart().isMacroID())
- return true;
- // assignments need extra parentheses or they generate a compiler warning
- auto binaryOp = dyn_cast<BinaryOperator>(parenExpr->getSubExpr());
- if (binaryOp && binaryOp->getOpcode() == BO_Assign)
- return true;
- report(
- DiagnosticsEngine::Warning, "parentheses immediately inside single-arg call",
- parenExpr->getLocStart())
- << parenExpr->getSourceRange();
- }
+ if (!parenExpr)
+ return true;
+ if (parenExpr->getLocStart().isMacroID())
+ return true;
+ // assignments need extra parentheses or they generate a compiler warning
+ auto binaryOp = dyn_cast<BinaryOperator>(parenExpr->getSubExpr());
+ if (binaryOp && binaryOp->getOpcode() == BO_Assign)
+ return true;
+ report(
+ DiagnosticsEngine::Warning, "parentheses immediately inside single-arg call",
+ parenExpr->getLocStart())
+ << parenExpr->getSourceRange();
+ return true;
+}
+
+bool UnnecessaryParen::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* callExpr)
+{
+ if (ignoreLocation(callExpr))
+ return true;
+ if (callExpr->getLocStart().isMacroID())
+ return true;
+ if (callExpr->getNumArgs() != 2)
+ return true;
+
+ // Same logic as CXXOperatorCallExpr::isAssignmentOp(), which our supported clang
+ // doesn't have yet.
+ auto Opc = callExpr->getOperator();
+ if (Opc != OO_Equal && Opc != OO_StarEqual &&
+ Opc != OO_SlashEqual && Opc != OO_PercentEqual &&
+ Opc != OO_PlusEqual && Opc != OO_MinusEqual &&
+ Opc != OO_LessLessEqual && Opc != OO_GreaterGreaterEqual &&
+ Opc != OO_AmpEqual && Opc != OO_CaretEqual &&
+ Opc != OO_PipeEqual)
+ return true;
+
+ auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(callExpr->getArg(1)));
+ if (!parenExpr)
+ return true;
+ if (parenExpr->getLocStart().isMacroID())
+ return true;
+ // Sometimes parentheses make the RHS of an assignment easier to read by
+ // visually disambiguating the = from a call to ==
+ auto sub = parenExpr->getSubExpr();
+ if (isa<BinaryOperator>(sub)
+ || isa<CXXOperatorCallExpr>(sub)
+ || isa<ConditionalOperator>(sub))
+ return true;
+
+ report(
+ DiagnosticsEngine::Warning, "parentheses immediately inside assignment",
+ parenExpr->getLocStart())
+ << parenExpr->getSourceRange();
+ return true;
+}
+
+bool UnnecessaryParen::VisitVarDecl(const VarDecl* varDecl)
+{
+ if (ignoreLocation(varDecl))
+ return true;
+ if (varDecl->getLocStart().isMacroID())
+ return true;
+ if (!varDecl->getInit())
+ return true;
+
+ auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(varDecl->getInit()));
+ if (!parenExpr)
+ return true;
+ if (parenExpr->getLocStart().isMacroID())
+ return true;
+ auto sub = parenExpr->getSubExpr();
+ if (isa<BinaryOperator>(sub)
+ || isa<CXXOperatorCallExpr>(sub)
+ || isa<ConditionalOperator>(sub)
+ // these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]"
+ || isa<CXXBindTemporaryExpr>(sub)
+ || isa<CXXFunctionalCastExpr>(sub))
+ return true;
+
+//varDecl->dump();
+
+ report(
+ DiagnosticsEngine::Warning, "parentheses immediately inside vardecl statement",
+ parenExpr->getLocStart())
+ << parenExpr->getSourceRange();
return true;
}
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 6abd625c1a5c..5e92b07aa697 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -374,8 +374,8 @@ static std::vector< OUString > lookupKeys(
if( keySupplier.is() )
{
Reference< XPropertySet > set( keySupplier, UNO_QUERY );
- set->getPropertyValue( getStatics().NAME ) >>= (*pTable);
- set->getPropertyValue( getStatics().SCHEMA_NAME ) >>= (*pSchema );
+ set->getPropertyValue( getStatics().NAME ) >>= *pTable;
+ set->getPropertyValue( getStatics().SCHEMA_NAME ) >>= *pSchema;
set.clear();
Reference< XEnumerationAccess > keys ( keySupplier->getKeys(), UNO_QUERY );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 898453f300bd..076a000d86b2 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -2102,7 +2102,7 @@ void ExtensionsTabPage::CreateDialogWithHandler()
{
try
{
- bool bWithHandler = ( !m_sEventHdl.isEmpty() );
+ bool bWithHandler = !m_sEventHdl.isEmpty();
if ( bWithHandler )
{
Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index c31eafc5426f..db702ab5b268 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -693,7 +693,7 @@ void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
checkUpdateConditions(columnIndex);
checkUpdateIterator();
- ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get());
+ ORowSetValueVector::Vector& rRow = (*m_aCurrentRow)->get();
ORowSetNotifier aNotify(this,rRow);
m_pCache->updateValue(columnIndex,x,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
@@ -709,7 +709,7 @@ void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex )
checkUpdateConditions(columnIndex);
checkUpdateIterator();
- ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get());
+ ORowSetValueVector::Vector& rRow = (*m_aCurrentRow)->get();
ORowSetNotifier aNotify(this,rRow);
m_pCache->updateNull(columnIndex,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
@@ -797,7 +797,7 @@ void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Refer
::osl::MutexGuard aGuard( *m_pMutex );
checkUpdateConditions(columnIndex);
checkUpdateIterator();
- ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get());
+ ORowSetValueVector::Vector& rRow = (*m_aCurrentRow)->get();
ORowSetNotifier aNotify(this,rRow);
m_pCache->updateCharacterStream(columnIndex,x,length,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
@@ -841,7 +841,7 @@ void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x )
if (!::dbtools::implUpdateObject(this, columnIndex, aNewValue))
{ // there is no other updateXXX call which can handle the value in x
- ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get());
+ ORowSetValueVector::Vector& rRow = (*m_aCurrentRow)->get();
ORowSetNotifier aNotify(this,rRow);
m_pCache->updateObject(columnIndex,aNewValue,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
@@ -855,7 +855,7 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x,
::osl::MutexGuard aGuard( *m_pMutex );
checkUpdateConditions(columnIndex);
checkUpdateIterator();
- ORowSetValueVector::Vector& rRow = ((*m_aCurrentRow)->get());
+ ORowSetValueVector::Vector& rRow = (*m_aCurrentRow)->get();
ORowSetNotifier aNotify(this,rRow);
m_pCache->updateNumericObject(columnIndex,x,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 76689574eb78..8dacb0efa514 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -557,7 +557,7 @@ void ORowSetCache::updateNull(sal_Int32 columnIndex,ORowSetValueVector::Vector&
{
checkUpdateConditions(columnIndex);
- ORowSetValueVector::Vector& rInsert = ((*m_aInsertRow)->get());
+ ORowSetValueVector::Vector& rInsert = (*m_aInsertRow)->get();
if ( !rInsert[columnIndex].isNull() )
{
rInsert[columnIndex].setBound(true);
@@ -577,7 +577,7 @@ void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x
{
checkUpdateConditions(columnIndex);
- ORowSetValueVector::Vector& rInsert = ((*m_aInsertRow)->get());
+ ORowSetValueVector::Vector& rInsert = (*m_aInsertRow)->get();
if ( rInsert[columnIndex] != x )
{
rInsert[columnIndex].setBound(true);
@@ -601,7 +601,7 @@ void ORowSetCache::updateCharacterStream( sal_Int32 columnIndex, const Reference
if(x.is())
x->readBytes(aSeq,length);
- ORowSetValueVector::Vector& rInsert = ((*m_aInsertRow)->get());
+ ORowSetValueVector::Vector& rInsert = (*m_aInsertRow)->get();
rInsert[columnIndex].setBound(true);
rInsert[columnIndex] = aSeq;
rInsert[columnIndex].setModified();
@@ -618,7 +618,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x
{
checkUpdateConditions(columnIndex);
- ORowSetValueVector::Vector& rInsert = ((*m_aInsertRow)->get());
+ ORowSetValueVector::Vector& rInsert = (*m_aInsertRow)->get();
ORowSetValue aTemp;
aTemp.fill(x);
if ( rInsert[columnIndex] != aTemp )
@@ -640,7 +640,7 @@ void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x
{
checkUpdateConditions(columnIndex);
- ORowSetValueVector::Vector& rInsert = ((*m_aInsertRow)->get());
+ ORowSetValueVector::Vector& rInsert = (*m_aInsertRow)->get();
ORowSetValue aTemp;
aTemp.fill(x);
if ( rInsert[columnIndex] != aTemp )
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index e3a484b989b0..e43e45c34919 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -464,7 +464,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
// If it already *does* have an URL, then it was either passed in the arguments, or a previous incarnation
// of that model existed before (which can happen if a model is closed, but an associated DataSource is kept
// alive 'til loading the document again).
- bool bNeedLoad = ( xModel->getURL().isEmpty() );
+ bool bNeedLoad = xModel->getURL().isEmpty();
try
{
aMediaDesc.put( "FileName", _rURL );
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 60b233d851de..bae1e73070c5 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -751,7 +751,7 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< css::form::XForm
if ( aDefault.hasValue() )
aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)TRISTATE_FALSE : (sal_Int16)TRISTATE_TRUE;
else
- aDefault <<= ((sal_Int16)TRISTATE_INDET);
+ aDefault <<= (sal_Int16)TRISTATE_INDET;
}
}
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 71117bece47c..9714006eda2c 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -515,7 +515,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter,
nTmpEsc = -20;
else
nTmpEsc = nEsc;
- Size aSize = ( GetFontSize() );
+ Size aSize = GetFontSize();
aPos.Y() -= ( nTmpEsc * aSize.Height() ) / 100L;
}
Font aOldFont( ChgPhysFont( pOut ) );
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 2110d04a25b0..9424cc55b52d 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -176,7 +176,7 @@ Interceptor::addStatusListener(
aStateEvent.FeatureDescriptor = "SaveCopyTo";
aStateEvent.IsEnabled = true;
aStateEvent.Requery = false;
- aStateEvent.State <<= (OUString( "($3)"));
+ aStateEvent.State <<= OUString("($3)");
Control->statusChanged(aStateEvent);
{
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index ef5c55f9954c..818f782cda7a 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -299,7 +299,7 @@ namespace dbp
{
bool bHaveSome = (0 != m_pExistingRadios->GetEntryCount());
bool bSelectedSome = (0 != m_pExistingRadios->GetSelectedEntryCount());
- bool bUnfinishedInput = (!m_pRadioName->GetText().isEmpty());
+ bool bUnfinishedInput = !m_pRadioName->GetText().isEmpty();
m_pMoveLeft->Enable(bSelectedSome);
m_pMoveRight->Enable(bUnfinishedInput);
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index ac746d5017cc..c782149148e8 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1139,7 +1139,7 @@ void XMLFilterSettingsDialog::initFilterList()
{
if( n > 0 )
pTempFilter->maExtension += ";";
- pTempFilter->maExtension += (*pExtensions++);
+ pTempFilter->maExtension += *pExtensions++;
}
}
}
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 6eb0aa45df50..03935a726b8c 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -386,7 +386,7 @@ void XMLFilterTestDialog::onExportBrowse()
if( n > 0 )
aExtension += ";";
aExtension += "*.";
- aExtension += (*pExtensions++);
+ aExtension += *pExtensions++;
}
}
}
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index c69946db813c..f8d15ecca3e4 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -164,7 +164,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
// VCL SYNCHRONIZED ->
SolarMutexGuard aSolarGuard;
- VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow && pWindow->GetType() == WindowType::WORKWINDOW )
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
@@ -278,7 +278,7 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
// VCL SYNCHRONIZED ->
SolarMutexGuard aSolarGuard;
- VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow && ( pWindow->GetType() == WindowType::WORKWINDOW ) )
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
@@ -309,7 +309,7 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
// VCL SYNCHRONIZED ->
SolarMutexGuard aSolarGuard;
- VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow && ( pWindow->GetType() == WindowType::WORKWINDOW ) )
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx
index bdf4580b709f..62bd3ce8b880 100644
--- a/framework/source/jobs/joburl.cxx
+++ b/framework/source/jobs/joburl.cxx
@@ -224,7 +224,7 @@ bool JobURL::implst_split( /*IN*/ const OUString& sPart ,
/*OUT*/ OUString& rPartArguments )
{
// first search for the given identifier
- bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength));
+ bool bPartFound = sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength);
// If it exist - we can split the part and return sal_True.
// Otherwhise we do nothing and return sal_False.
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 1e4612726dec..766bc7b141df 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -3634,7 +3634,7 @@ void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( const lang::EventObject&
if ( !bDockingInProgress )
{
aUIDockingElement = implts_findToolbar( e.Source );
- bool bWinFound = ( !aUIDockingElement.m_aName.isEmpty() );
+ bool bWinFound = !aUIDockingElement.m_aName.isEmpty();
if ( bWinFound && xWindow.is() )
{
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 02d099d42303..0309f91bc9da 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2028,7 +2028,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
{
// new/modify
css::uno::Reference< css::beans::XPropertySet > xSet;
- bool bNew = (!xCheck->hasByName(sID));
+ bool bNew = !xCheck->hasByName(sID);
if (bNew)
xSet.set(xCreate->createInstance(), css::uno::UNO_QUERY_THROW);
else
@@ -2296,7 +2296,7 @@ IMPL_LINK_NOARG(AutoRecovery, implts_timerExpired, Timer *, void)
if (m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE)
{
- bool bUserIdle = (Application::GetLastInputInterval()>MIN_TIME_FOR_USER_IDLE);
+ bool bUserIdle = Application::GetLastInputInterval() > MIN_TIME_FOR_USER_IDLE;
if (!bUserIdle)
{
g.clear();
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index b8366e792ced..42699cd98003 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1170,9 +1170,9 @@ void ConfigurationAccess_WindowState::impl_putPropertiesFromStruct( const Window
{
OUString aSizeStr;
if ( i == PROPERTY_SIZE )
- aSizeStr = ( OUString::number( rWinStateInfo.aSize.Width ));
+ aSizeStr = OUString::number( rWinStateInfo.aSize.Width );
else
- aSizeStr = ( OUString::number( rWinStateInfo.aDockSize.Width ));
+ aSizeStr = OUString::number( rWinStateInfo.aDockSize.Width );
aSizeStr += aDelim;
if ( i == PROPERTY_SIZE )
aSizeStr += OUString::number( rWinStateInfo.aSize.Height );
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx
index 27b06f4b8949..3cd5dc02a9ae 100644
--- a/idlc/source/idlcmain.cxx
+++ b/idlc/source/idlcmain.cxx
@@ -101,7 +101,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
OString outputFile;
if ( options.isValid("-O") )
{
- outputFile = (options.getOption("-O"));
+ outputFile = options.getOption("-O");
if (!outputFile.endsWith("/")) {
outputFile += OString('/');
}
diff --git a/include/osl/socket.hxx b/include/osl/socket.hxx
index 8a1a291dcc8a..78bb4b1c3768 100644
--- a/include/osl/socket.hxx
+++ b/include/osl/socket.hxx
@@ -136,7 +136,7 @@ namespace osl
inline SocketAddr & SAL_CALL SocketAddr::operator= (const SocketAddr& Addr)
{
- *this = (Addr.getHandle());
+ *this = Addr.getHandle();
return *this;
}
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index d95d55a4d049..f09fe6af45a0 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -152,7 +152,7 @@ bool HelpParser::Merge( const OString &rDestinationFile,
//TODO: explicit BOM handling?
- XMLFile* xmlfile = ( aParser.Execute( sHelpFile, new XMLFile( OString('0') ) ) );
+ XMLFile* xmlfile = aParser.Execute( sHelpFile, new XMLFile( OString('0') ) );
if (!xmlfile)
{
SAL_WARN("l10ntools", "could not parse " << sHelpFile);
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index bdb7dcf24de8..373de6d51ad9 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1005,7 +1005,7 @@ void * SAL_CALL rtl_machdep_alloc(
)
{
void * addr;
- sal_Size size = (*pSize);
+ sal_Size size = *pSize;
assert(pArena == gp_machdep_arena);
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 6933b9951b8f..5522e9555970 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2002,7 +2002,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldSortInfo(*pInfo);
}
else if ( aPropertyName == SC_UNONAME_ISGROUP )
- aRet <<= (hasGroupInfo());
+ aRet <<= hasGroupInfo();
else if ( aPropertyName == SC_UNONAME_GROUPINFO )
{
aRet <<= getGroupInfo();
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index bef00a09fa5f..978915ef71d6 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -74,7 +74,7 @@ ScVbaWorkbook::ResetColors( )
uno::Sequence< sal_Int32 > dDefaultColors( nLen );
sal_Int32* pDest = dDefaultColors.getArray();
for ( sal_Int32 index=0; index < nLen; ++pDest, ++index )
- xIndexAccess->getByIndex( index ) >>= (*pDest);
+ xIndexAccess->getByIndex( index ) >>= *pDest;
initColorData( dDefaultColors );
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b2b553f24700..7dd772d5b2a1 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1965,8 +1965,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
// Check on undo already done above
- ScStyleSheetPool* pStylePool = (pViewData->GetDocument()->
- GetStyleSheetPool());
+ ScStyleSheetPool* pStylePool = pViewData->GetDocument()->
+ GetStyleSheetPool();
if ( pStylePool )
{
SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 2571f27eff4d..7e882ced930c 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -2139,8 +2139,8 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
// partition the page
- long nStartX = ((long) ( nLeftSpace * nScaleX ));
- long nStartY = ((long) ( nTopSpace * nScaleY ));
+ long nStartX = (long) ( nLeftSpace * nScaleX );
+ long nStartY = (long) ( nTopSpace * nScaleY );
long nInnerStartX = nStartX;
long nInnerStartY = nStartY;
if (pBorderItem)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index ffe32d905f9a..78611447b1d2 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -778,7 +778,7 @@ void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
{
- bool bAll = ( tabs.empty() );
+ bool bAll = tabs.empty();
if ( !bAll ) // create associated table data
CreateTabData( tabs );
@@ -818,7 +818,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, bool bAll )
void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs )
{
- bool bAll = ( tabs.empty() );
+ bool bAll = tabs.empty();
if ( !bAll ) // create associated table data
CreateTabData( tabs );
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 50e6572b57d0..efb3496820aa 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -246,8 +246,8 @@ splitPath(OUString const & i_rPath,
// input must not start or end with '/'
return false;
} else {
- o_rDir = (i_rPath.copy(0, idx));
- o_rRest = (i_rPath.copy(idx+1));
+ o_rDir = i_rPath.copy(0, idx);
+ o_rRest = i_rPath.copy(idx+1);
return true;
}
}
@@ -260,8 +260,8 @@ splitXmlId(OUString const & i_XmlId,
if ((idx <= 0) || (idx >= i_XmlId.getLength() - 1)) {
return false;
} else {
- o_StreamName = (i_XmlId.copy(0, idx));
- o_Idref = (i_XmlId.copy(idx+1));
+ o_StreamName = i_XmlId.copy(0, idx);
+ o_Idref = i_XmlId.copy(idx+1);
return isValidXmlId(o_StreamName, o_Idref);
}
}
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 15b87f304ca1..296c53da0aa7 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -277,16 +277,16 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter()
uno::Sequence< beans::PropertyValue > aPrinter(8);
aPrinter.getArray()[7].Name = "CanSetPaperSize";
- aPrinter.getArray()[7].Value <<= ( pPrinter->HasSupport( PrinterSupport::SetPaperSize ) );
+ aPrinter.getArray()[7].Value <<= pPrinter->HasSupport( PrinterSupport::SetPaperSize );
aPrinter.getArray()[6].Name = "CanSetPaperFormat";
- aPrinter.getArray()[6].Value <<= ( pPrinter->HasSupport( PrinterSupport::SetPaper ) );
+ aPrinter.getArray()[6].Value <<= pPrinter->HasSupport( PrinterSupport::SetPaper );
aPrinter.getArray()[5].Name = "CanSetPaperOrientation";
- aPrinter.getArray()[5].Value <<= ( pPrinter->HasSupport( PrinterSupport::SetOrientation ) );
+ aPrinter.getArray()[5].Value <<= pPrinter->HasSupport( PrinterSupport::SetOrientation );
aPrinter.getArray()[4].Name = "IsBusy";
- aPrinter.getArray()[4].Value <<= ( pPrinter->IsPrinting() );
+ aPrinter.getArray()[4].Value <<= pPrinter->IsPrinting();
aPrinter.getArray()[3].Name = "PaperSize";
awt::Size aSize = impl_Size_Object2Struct(pPrinter->GetPaperSize() );
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 72ca5708d872..145caa12f666 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -710,7 +710,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER );
Reference < frame::XFrame > xFrame;
if ( pChildWin )
- xFrame = ( pChildWin->GetFrame() );
+ xFrame = pChildWin->GetFrame();
if ( xFrame.is() )
xFrame->setName( sTargetFrameName );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 904a5ea9fc38..2456829d52bb 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -704,14 +704,14 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
aProps[nProp]. Name = "Wait";
bool bAsynchron = false;
aProps[nProp].Value >>= bAsynchron;
- aProps[nProp].Value <<= (!bAsynchron);
+ aProps[nProp].Value <<= !bAsynchron;
}
else if ( aProps[nProp].Name == "Silent" )
{
aProps[nProp]. Name = "MonitorVisible";
bool bPrintSilent = false;
aProps[nProp].Value >>= bPrintSilent;
- aProps[nProp].Value <<= (!bPrintSilent);
+ aProps[nProp].Value <<= !bPrintSilent;
}
}
}
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 2e20b709faef..18c2534ce541 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -2016,8 +2016,8 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
}
// Time held until here
- const bool bActivitiesLeft = (! maActivitiesQueue.isEmpty());
- const bool bTimerEventsLeft = (! maEventQueue.isEmpty());
+ const bool bActivitiesLeft = ! maActivitiesQueue.isEmpty();
+ const bool bTimerEventsLeft = ! maEventQueue.isEmpty();
const bool bRet = (bActivitiesLeft || bTimerEventsLeft);
if (bRet)
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 23b06c05d04a..39195f5ba194 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -530,8 +530,7 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev (rDev, true);
aTmpDev.SetFont(GetFont());
- SmRect aRect = (SmRect(aTmpDev, &rFormat, "a",
- GetFont().GetBorderWidth()));
+ SmRect aRect(aTmpDev, &rFormat, "a", GetFont().GetBorderWidth());
mnFormulaBaseline = GetAlignM();
// move from middle position by constant - distance
// between middle and baseline for single letter
diff --git a/store/source/storcach.cxx b/store/source/storcach.cxx
index 11b401a6a8d2..2f74a872e9d0 100644
--- a/store/source/storcach.cxx
+++ b/store/source/storcach.cxx
@@ -379,7 +379,7 @@ storeError PageCache::removePageAt (sal_uInt32 nOffset)
if ((*ppEntry)->m_nOffset == nOffset)
{
// Existing entry.
- Entry * entry = (*ppEntry);
+ Entry * entry = *ppEntry;
// Dequeue and destroy entry.
(*ppEntry) = entry->m_pNext;
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index 33e968ec60d1..c992038bb3ac 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -417,7 +417,7 @@ struct OStoreDirectoryDataBlock
/** direct.
*/
- static const sal_uInt16 directCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_DIRECT));
+ static const sal_uInt16 directCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_DIRECT);
sal_uInt32 directLink (sal_uInt16 nIndex) const
{
@@ -434,7 +434,7 @@ struct OStoreDirectoryDataBlock
/** single.
*/
- static const sal_uInt16 singleCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_SINGLE));
+ static const sal_uInt16 singleCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_SINGLE);
sal_uInt32 singleLink (sal_uInt16 nIndex) const
{
@@ -451,7 +451,7 @@ struct OStoreDirectoryDataBlock
/** double.
*/
- static const sal_uInt16 doubleCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_DOUBLE));
+ static const sal_uInt16 doubleCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_DOUBLE);
sal_uInt32 doubleLink (sal_uInt16 nIndex) const
{
@@ -468,7 +468,7 @@ struct OStoreDirectoryDataBlock
/** triple.
*/
- static const sal_uInt16 tripleCount = ((sal_uInt16)(STORE_LIMIT_DATAPAGE_TRIPLE));
+ static const sal_uInt16 tripleCount = (sal_uInt16)(STORE_LIMIT_DATAPAGE_TRIPLE);
sal_uInt32 tripleLink (sal_uInt16 nIndex) const
{
diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx
index a3d679dbdd4a..c4afa028c598 100644
--- a/store/source/stortree.cxx
+++ b/store/source/stortree.cxx
@@ -79,7 +79,7 @@ sal_uInt16 OStoreBTreeNodeData::find (const T& t) const
l = m + 1;
}
- sal_uInt16 const k = ((sal_uInt16)r);
+ sal_uInt16 const k = (sal_uInt16)r;
if ((k < capacityCount()) && (t.m_aKey < m_pData[k].m_aKey))
return k - 1;
else
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index dd7e274087f5..f989dce82bab 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -695,7 +695,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
{
long nTol = ( pTols[i] * 255L ) / 100L;
- long nVal = ( (long) pSrcCols[i].GetRed() );
+ long nVal = (long) pSrcCols[i].GetRed();
pMinR[i] = std::max( nVal - nTol, 0L );
pMaxR[i] = std::min( nVal + nTol, 255L );
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 840c561c1193..5f134d591fb0 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -2825,7 +2825,7 @@ basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView const & rPageView, const
if(rPageView.PageWindowCount())
{
- OutputDevice& rOut = (rPageView.GetPageWindow(0)->GetPaintWindow().GetOutputDevice());
+ OutputDevice& rOut = rPageView.GetPageWindow(0)->GetPaintWindow().GetOutputDevice();
tools::Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect);
sal_uInt32 nHorDiv(aPixelSize.GetWidth() / DRAG_CROOK_RASTER_DISTANCE);
sal_uInt32 nVerDiv(aPixelSize.GetHeight() / DRAG_CROOK_RASTER_DISTANCE);
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index a21f14874bdb..55e8c175fb41 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -592,11 +592,11 @@ const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const
if(1 == nMarkPtCnt)
{
- aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoint : STR_ViewMarkedPoint));
+ aStr1 = ImpGetResStr(bGlue ? STR_ViewMarkedGluePoint : STR_ViewMarkedPoint);
}
else
{
- aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoints : STR_ViewMarkedPoints));
+ aStr1 = ImpGetResStr(bGlue ? STR_ViewMarkedGluePoints : STR_ViewMarkedPoints);
aStr1 = aStr1.replaceFirst("%2", OUString::number( nMarkPtCnt ));
}
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index ab837a7c58e6..dbe359587664 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -816,7 +816,7 @@ void SdrPageView::LeaveOneGroup()
{
if(GetAktGroup())
{
- bool bGlueInvalidate = (GetView().ImpIsGlueVisible());
+ bool bGlueInvalidate = GetView().ImpIsGlueVisible();
if(bGlueInvalidate)
GetView().GlueInvalidate();
@@ -853,7 +853,7 @@ void SdrPageView::LeaveAllGroup()
{
if(GetAktGroup())
{
- bool bGlueInvalidate = (GetView().ImpIsGlueVisible());
+ bool bGlueInvalidate = GetView().ImpIsGlueVisible();
if(bGlueInvalidate)
GetView().GlueInvalidate();
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index fd5356d333fa..0a6414cf148b 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1215,7 +1215,7 @@ void SwAccessibleContext::InvalidateChildPosOrSize(
{
AccessibleEventObject aEvent;
aEvent.EventId = AccessibleEventId::CHILD;
- aEvent.NewValue <<= (rChildFrameOrObj.GetWindow()->GetAccessible());
+ aEvent.NewValue <<= rChildFrameOrObj.GetWindow()->GetAccessible();
FireAccessibleEvent( aEvent );
}
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 667b49d789ed..63a487c367a6 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3314,7 +3314,7 @@ void SwCursorShell::ClearUpCursors()
// If the start entry of the ring is invalid replace it with a
// cursor pointing to the beginning of the first content node in the
// document.
- aIdx = (*(aNodes.GetEndOfContent().StartOfSectionNode()));
+ aIdx = *(aNodes.GetEndOfContent().StartOfSectionNode());
pNode = aNodes.GoNext( &aIdx );
}
bool bFound = (pNode != nullptr);
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 86aa82e088ce..4e762bfcf218 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -457,7 +457,7 @@ void SwPaM::SetMark()
{
m_pMark = &m_Bound1;
}
- (*m_pMark) = (*m_pPoint);
+ (*m_pMark) = *m_pPoint;
}
#ifdef DBG_UTIL
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 14600c68af1b..87189bcc9d05 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -714,7 +714,7 @@ void SwTOXAuthority::FillText( SwTextNode& rNd,
sText = SwAuthorityFieldType::GetAuthTypeName((ToxAuthorityType) --nLevel);
}
else
- sText = (pField->GetFieldText((ToxAuthorityField) nAuthField));
+ sText = pField->GetFieldText((ToxAuthorityField) nAuthField);
rNd.InsertText( sText, rInsPos );
}
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 3d33f5bf1f5a..aa360444fe2b 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2981,9 +2981,9 @@ bool SwpHints::TryInsertHint(
const sal_uInt16 *pRanges = pSet->GetRanges();
while( (*pRanges) != 0 )
{
- const sal_uInt16 nBeg = (*pRanges);
+ const sal_uInt16 nBeg = *pRanges;
++pRanges;
- const sal_uInt16 nEnd = (*pRanges);
+ const sal_uInt16 nEnd = *pRanges;
++pRanges;
for( sal_uInt16 nSubElem = nBeg; nSubElem <= nEnd; ++nSubElem )
if( pSet->HasItem( nSubElem ) )
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index a6dd3ecf1788..9e1b3babed4d 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -637,9 +637,8 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
std::vector<SwTextAttr *> marks;
if (rPam.GetNode().IsTextNode())
{
- marks = (
- rPam.GetNode().GetTextNode()->GetTextAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
+ marks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
+ rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK);
}
if (marks.size())
{
@@ -1209,7 +1208,7 @@ void makeRedline( SwPaM const & rPaM,
nMap = PROPERTY_MAP_PARAGRAPH;
else
nMap = PROPERTY_MAP_TEXTPORTION_EXTENSIONS;
- SfxItemPropertySet const& rPropSet = (*aSwMapProvider.GetPropertySet(nMap));
+ SfxItemPropertySet const& rPropSet = *aSwMapProvider.GetPropertySet(nMap);
// Check if there are any properties
if (aRevertProperties.getLength())
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index f9fe2b6f4895..e14606334462 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -3038,7 +3038,7 @@ SwXDocumentIndex::TokenAccess_Impl::getByIndex(sal_Int32 nIndex)
else
{
pArr[1].Name = "TabStopPosition";
- sal_Int32 nPos = (convertTwipToMm100(aToken.nTabStopPosition));
+ sal_Int32 nPos = convertTwipToMm100(aToken.nTabStopPosition);
if(nPos < 0)
nPos = 0;
pArr[1].Value <<= nPos;
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index cf1afe3de44a..737a38eec04c 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1539,7 +1539,7 @@ uno::Any SAL_CALL SwXTextRangesImpl::getByIndex(sal_Int32 nIndex)
if ((nIndex < 0) || (static_cast<size_t>(nIndex) >= m_Ranges.size()))
throw lang::IndexOutOfBoundsException();
uno::Any ret;
- ret <<= (m_Ranges.at(nIndex));
+ ret <<= m_Ranges.at(nIndex);
return ret;
}
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index fadd507f4f75..7cbb0ab13632 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3470,7 +3470,7 @@ bool SwTokenWindow::CreateQuickHelp(Control const * pCtrl,
bool bBalloon = Help::IsBalloonHelpEnabled();
OUString sEntry;
if(bBalloon || rToken.eTokenType != TOKEN_AUTHORITY)
- sEntry = (m_aButtonHelpTexts[rToken.eTokenType]);
+ sEntry = m_aButtonHelpTexts[rToken.eTokenType];
if(rToken.eTokenType == TOKEN_AUTHORITY )
{
sEntry += SwAuthorityFieldType::GetAuthFieldName(
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index c3266c823339..61249f585796 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -709,7 +709,7 @@ void SwIndexMarkPane::ModifyHdl(Control const * pBox)
}
else //m_pEntryED !!m_pEntryED is not a ListBox but a Edit
{
- bool bHasText = (!m_pEntryED->GetText().isEmpty());
+ bool bHasText = !m_pEntryED->GetText().isEmpty();
if(!bHasText)
{
m_pPhoneticED0->SetText(OUString());
@@ -933,8 +933,8 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, Edit&, rEdit, void )
m_pPhoneticED2->SetText(GetDefaultPhoneticReading(pBox->GetText()));
}
}
- bool bKey1HasText = (!m_pKey1DCB->GetText().isEmpty());
- bool bKey2HasText = (!m_pKey2DCB->GetText().isEmpty());
+ bool bKey1HasText = !m_pKey1DCB->GetText().isEmpty();
+ bool bKey2HasText = !m_pKey2DCB->GetText().isEmpty();
m_pPhoneticFT1->Enable(bKey1HasText && bIsPhoneticReadingEnabled);
m_pPhoneticED1->Enable(bKey1HasText && bIsPhoneticReadingEnabled);
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index be6c855a8af3..d54e457f079b 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -383,7 +383,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl, Edit&, void)
bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup)
{
- bool bDel = (!pGlosHdl->IsReadOnly(&rGroup));
+ bool bDel = !pGlosHdl->IsReadOnly(&rGroup);
// OM: if the name is among the new region name, it is deletable
// as well! Because for non existing region names ReadOnly issues
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 479be401bd7e..6be76c0485c3 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -699,8 +699,8 @@ void SwView::Replace()
{
/* check that the selection match the search string*/
//save state
- SwPosition aStartPos = (* m_pWrtShell->GetSwCursor()->Start());
- SwPosition aEndPos = (* m_pWrtShell->GetSwCursor()->End());
+ SwPosition aStartPos = * m_pWrtShell->GetSwCursor()->Start();
+ SwPosition aEndPos = * m_pWrtShell->GetSwCursor()->End();
bool bHasSelection = m_pSrchItem->GetSelection();
SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand();
diff --git a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
index d49223da33a3..ab50eb778bc0 100644
--- a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
@@ -69,7 +69,7 @@ void process_headers( ne_request * req,
SAL_INFO( "ucb.ucp.webdav", "HEAD - received header: " << aHeaderName << ":" << aHeaderValue);
// Note: Empty vector means that all headers are requested.
- bool bIncludeIt = ( rHeaderNames.empty() );
+ bool bIncludeIt = rHeaderNames.empty();
if ( !bIncludeIt )
{
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 0c02f3287502..f9ccc0072c49 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -1987,7 +1987,7 @@ void runResponseHeaderHandler( void * userdata,
= static_cast< NeonRequestContext * >( userdata );
// Note: Empty vector means that all headers are requested.
- bool bIncludeIt = ( pCtx->pHeaderNames->empty() );
+ bool bIncludeIt = pCtx->pHeaderNames->empty();
if ( !bIncludeIt )
{
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index f32d92cf81a6..db0b59f01090 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -115,7 +115,7 @@ namespace DOM
Sequence<OUString> aSequence;
for (int i=0; aSupportedServiceNames[i]!=nullptr; i++) {
aSequence.realloc(i+1);
- aSequence[i]=(OUString::createFromAscii(aSupportedServiceNames[i]));
+ aSequence[i] = OUString::createFromAscii(aSupportedServiceNames[i]);
}
return aSequence;
}
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 33c7b2b9b2e3..b62dd3f839a2 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -59,7 +59,7 @@ namespace DOM
Sequence<OUString> aSequence;
for (int i=0; aSupportedServiceNames[i]!=nullptr; i++) {
aSequence.realloc(i+1);
- aSequence[i]=(OUString::createFromAscii(aSupportedServiceNames[i]));
+ aSequence[i] = OUString::createFromAscii(aSupportedServiceNames[i]);
}
return aSequence;
}
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 8d3bf6afa596..3dbaa0a2369f 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -73,7 +73,7 @@ namespace XPath
Sequence<OUString> aSequence;
for (int i=0; aSupportedServiceNames[i]!=nullptr; i++) {
aSequence.realloc(i+1);
- aSequence[i]=(OUString::createFromAscii(aSupportedServiceNames[i]));
+ aSequence[i] = OUString::createFromAscii(aSupportedServiceNames[i]);
}
return aSequence;
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 983eb468e238..485a38b378e7 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1465,7 +1465,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) )
{
// set link only, if no other link was set
- const bool bSetLink = ( !rImpGraphic.mpGfxLink );
+ const bool bSetLink = !rImpGraphic.mpGfxLink;
// assign graphic
rImpGraphic = *aGraphic.ImplGetImpGraphic();
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index a8eff5e63165..3cddc0b946e2 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -154,7 +154,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
try
{
uno::Reference< embed::XStorage > xDocumentStorage =
- (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xContext, bRepairStorage ));
+ comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xContext, bRepairStorage );
uno::Reference< uno::XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.document.OOXMLDocumentPropertiesImporter",
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 2a5f71b512c9..44552eee5e5f 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -271,7 +271,7 @@ OOXMLDocumentImpl::getXNoteStream(OOXMLStream::StreamType_t nType, Id aType,
const sal_Int32 nId)
{
OOXMLStream::Pointer_t pStream =
- (OOXMLDocumentFactory::createStream(mpStream, nType));
+ OOXMLDocumentFactory::createStream(mpStream, nType);
// See above, no status indicator for the note stream, either.
OOXMLDocumentImpl * pDocument = new OOXMLDocumentImpl(pStream, uno::Reference<task::XStatusIndicator>(), mbSkipImages, maMediaDescriptor);
pDocument->setXNoteId(nId);
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 3dc185ba9a83..33cd48a9982c 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -746,7 +746,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xPropertySetInfo->hasPropertyByName( sOutlineStyleAsNormalListStyle ) )
{
uno::Any aAny = mxExportInfo->getPropertyValue( sOutlineStyleAsNormalListStyle );
- aAny >>= (mpImpl->mbOutlineStyleAsNormalListStyle);
+ aAny >>= mpImpl->mbOutlineStyleAsNormalListStyle;
}
OUString sTargetStorage( "TargetStorage" );
@@ -758,7 +758,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xPropertySetInfo->hasPropertyByName( sExportTextNumberElement ) )
{
uno::Any aAny = mxExportInfo->getPropertyValue( sExportTextNumberElement );
- aAny >>= (mpImpl->mbExportTextNumberElement);
+ aAny >>= mpImpl->mbExportTextNumberElement;
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 9647dec28731..f96940aeb575 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1105,13 +1105,13 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
if( xPropertySetInfo->hasPropertyByName(sPropName) )
{
uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
- aAny >>= (mpImpl->mbShapePositionInHoriL2R);
+ aAny >>= mpImpl->mbShapePositionInHoriL2R;
}
sPropName = "TextDocInOOoFileFormat";
if( xPropertySetInfo->hasPropertyByName(sPropName) )
{
uno::Any aAny = mxImportInfo->getPropertyValue(sPropName);
- aAny >>= (mpImpl->mbTextDocInOOoFileFormat);
+ aAny >>= mpImpl->mbTextDocInOOoFileFormat;
}
sPropName = "SourceStorage";
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 79a119eef31c..84591565635d 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -490,8 +490,8 @@ static bool splitPath(::rtl::OUString const & i_rPath,
// input must not start or end with '/'
return false;
} else {
- o_rDir = (i_rPath.copy(0, idx));
- o_rRest = (i_rPath.copy(idx+1));
+ o_rDir = i_rPath.copy(0, idx);
+ o_rRest = i_rPath.copy(idx+1);
return true;
}
}