[Libreoffice-commits] core.git: canvas/source chart2/source compilerplugins/clang cui/source dbaccess/source filter/source framework/source lotuswordpro/source sc/source sdext/source sd/source sfx2/source slideshow/source svx/source sw/qa vbahelper/source xmloff/source
Stephan Bergmann
sbergman at redhat.com
Thu Oct 26 08:33:50 UTC 2017
canvas/source/factory/cf_service.cxx | 6 -
chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx | 4 -
chart2/source/controller/main/ChartController_Position.cxx | 2
chart2/source/model/template/PieChartTypeTemplate.cxx | 2
chart2/source/tools/DataSeriesHelper.cxx | 8 +-
chart2/source/view/main/VLegend.cxx | 2
compilerplugins/clang/unnecessaryparen.cxx | 40 +++++++---
cui/source/options/optgdlg.cxx | 4 -
dbaccess/source/ui/dlg/ConnectionPage.cxx | 2
dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 2
filter/source/svg/impsvgdialog.cxx | 2
filter/source/svg/svgexport.cxx | 2
framework/source/uiconfiguration/uicategorydescription.cxx | 2
framework/source/uiconfiguration/windowstateconfiguration.cxx | 4 -
framework/source/uielement/uicommanddescription.cxx | 4 -
lotuswordpro/source/filter/lwpfont.cxx | 2
sc/source/ui/unoobj/dapiuno.cxx | 2
sc/source/ui/vba/vbaformat.cxx | 2
sd/source/filter/ppt/pptinanimations.cxx | 2
sdext/source/presenter/PresenterAccessibility.cxx | 4 -
sfx2/source/appl/sfxhelp.cxx | 2
slideshow/source/engine/animationnodes/animationbasenode.cxx | 4 -
slideshow/source/engine/animationnodes/basenode.cxx | 2
slideshow/source/engine/effectrewinder.cxx | 2
slideshow/source/engine/slide/targetpropertiescreator.cxx | 2
svx/source/xml/xmlgrhlp.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlencryption.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 2
sw/qa/extras/ooxmlexport/ooxmlw14export.cxx | 2
vbahelper/source/vbahelper/vbafontbase.cxx | 4 -
xmloff/source/chart/SchXMLExport.cxx | 2
36 files changed, 77 insertions(+), 57 deletions(-)
New commits:
commit 084f454e8caa2d9e43f7bdea098538bfb87423d8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Oct 26 10:27:48 2017 +0200
More loplugin:unnecessaryparen
81892b2037453108b9bde1512a500cf3b2ce438a "loplugin:unnecessaryparen when
compiling as C++17, so the ParenExpr is no longer hidden behind
ExprWithCleanups/CXXConstructExpr/MaterializedTemporaryExpr wrappers" gave me
the idea to generally look though IgnoreImplicit instead of IngoreImpCasts in
loplugin:unnecessaryparen. However, that would still not look through implicit
CXXConstructExpr, so would still not have found the occurrences in
81892b2037453108b9bde1512a500cf3b2ce438a when compiling in pre-C++17 mode.
Therefore, let ignoreAllImplicit also look through CXXConstructExpr. (I am not
entirely sure in which situations non-implicit CXXConstructExpr---that should
thus not be ignored---would occur, but assume they would be underneath something
like a CXXFunctionalCastExpr, which is not ignored.)
Change-Id: I947d08742e1809150ecc34a7abe84cca5e0ce843
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 5a846aef7bb3..ed49bcfa1474 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -166,15 +166,15 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
if( xEntryNameAccess.is() )
{
Sequence<OUString> implementationList;
- if( (xEntryNameAccess->getByName("PreferredImplementations") >>= implementationList) )
+ if( xEntryNameAccess->getByName("PreferredImplementations") >>= implementationList )
{
m_aAvailableImplementations.emplace_back(*pCurr,implementationList );
}
- if( (xEntryNameAccess->getByName("AcceleratedImplementations") >>= implementationList) )
+ if( xEntryNameAccess->getByName("AcceleratedImplementations") >>= implementationList )
{
m_aAcceleratedImplementations.emplace_back(*pCurr,implementationList );
}
- if( (xEntryNameAccess->getByName("AntialiasingImplementations") >>= implementationList) )
+ if( xEntryNameAccess->getByName("AntialiasingImplementations") >>= implementationList )
{
m_aAAImplementations.emplace_back(*pCurr,implementationList );
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 7fa34a3de548..f5205d1691a6 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -369,7 +369,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
bool bFoundSize = false;
try
{
- if( (xProp->getPropertyValue( "Size100thMM" ) >>= aSize) )
+ if( xProp->getPropertyValue( "Size100thMM" ) >>= aSize )
{
if( aSize.Width == 0 && aSize.Height == 0 )
aSize = aDefaultSize;
@@ -385,7 +385,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol )
if(!bFoundSize)
{
awt::Size aAWTPixelSize(10,10);
- if( (xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize) )
+ if( xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize )
{
Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height);
Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MapUnit::MapPixel, MapUnit::Map100thMM ));
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 8f19372f46c5..c7b590e3ce95 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -118,7 +118,7 @@ void ChartController::executeDispatch_PositionAndSize()
awt::Size aSelectedSize;
ExplicitValueProvider* pProvider( ExplicitValueProvider::getExplicitValueProvider( m_xChartView ) );
if( pProvider )
- aSelectedSize = ToSize( ( pProvider->getRectangleOfObject( aCID ) ) );
+ aSelectedSize = ToSize( pProvider->getRectangleOfObject( aCID ) );
ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 2b02085a5bdb..15fdbf494d13 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -337,7 +337,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate(
if(xPointProp.is())
{
double fPointOffset=0.0;
- if( (xProp->getPropertyValue( "Offset") >>= fPointOffset ) )
+ if( xProp->getPropertyValue( "Offset") >>= fPointOffset )
{
if( ! ::rtl::math::approxEqual( fPointOffset, fOffset ) )
{
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index c52060dee958..82b7c2a59cb5 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -541,7 +541,7 @@ void switchSymbolsOnOrOff( const Reference< beans::XPropertySet > & xSeriesPrope
return;
chart2::Symbol aSymbProp;
- if( (xSeriesProperties->getPropertyValue( "Symbol") >>= aSymbProp ) )
+ if( xSeriesProperties->getPropertyValue( "Symbol") >>= aSymbProp )
{
if( !bSymbolsOn )
aSymbProp.Style = chart2::SymbolStyle_NONE;
@@ -722,7 +722,7 @@ bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries )
if( xProp.is() )
{
DataPointLabel aLabel;
- if( (xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) )
+ if( xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
}
}
@@ -750,7 +750,7 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries )
if( xPointProp.is() )
{
DataPointLabel aLabel;
- if( (xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) )
+ if( xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
if( bRet )
break;
@@ -788,7 +788,7 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I
if( xProp.is() )
{
DataPointLabel aLabel;
- if( (xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) )
+ if( xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName;
}
}
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index af2b7afbfe52..012070dfebff 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -757,7 +757,7 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe
if(xLegendProp.is())
{
sal_Int16 nWritingMode=-1;
- if( (xLegendProp->getPropertyValue( "WritingMode" ) >>= nWritingMode) )
+ if( xLegendProp->getPropertyValue( "WritingMode" ) >>= nWritingMode )
{
if( nWritingMode == text::WritingMode2::PAGE )
nWritingMode = nDefaultWritingMode;
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index 02b71694e6ac..bb601fbc096c 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -23,6 +23,26 @@ look for unnecessary parentheses
namespace {
+// Like clang::Stmt::IgnoreImplicit (lib/AST/Stmt.cpp), but also ignoring
+// CXXConstructExpr:
+Expr const * ignoreAllImplicit(Expr const * expr) {
+ if (auto const e = dyn_cast<ExprWithCleanups>(expr)) {
+ expr = e->getSubExpr();
+ }
+ if (auto const e = dyn_cast<CXXConstructExpr>(expr)) {
+ if (e->getNumArgs() == 1) {
+ expr = e->getArg(0);
+ }
+ }
+ if (auto const e = dyn_cast<MaterializeTemporaryExpr>(expr)) {
+ expr = e->GetTemporaryExpr();
+ }
+ if (auto const e = dyn_cast<CXXBindTemporaryExpr>(expr)) {
+ expr = e->getSubExpr();
+ }
+ return expr->IgnoreImpCasts();
+}
+
class UnnecessaryParen:
public RecursiveASTVisitor<UnnecessaryParen>, public loplugin::Plugin
{
@@ -63,16 +83,16 @@ public:
bool TraverseConditionalOperator(ConditionalOperator *);
private:
void VisitSomeStmt(const Stmt *parent, const Expr* cond, StringRef stmtName);
- Expr* insideSizeof = nullptr;
- Expr* insideCaseStmt = nullptr;
- Expr* insideConditionalOperator = nullptr;
+ Expr const * insideSizeof = nullptr;
+ Expr const * insideCaseStmt = nullptr;
+ Expr const * insideConditionalOperator = nullptr;
};
bool UnnecessaryParen::TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr * expr)
{
auto old = insideSizeof;
if (expr->getKind() == UETT_SizeOf && !expr->isArgumentType()) {
- insideSizeof = expr->getArgumentExpr()->IgnoreImpCasts();
+ insideSizeof = ignoreAllImplicit(expr->getArgumentExpr());
}
bool ret = RecursiveASTVisitor::TraverseUnaryExprOrTypeTraitExpr(expr);
insideSizeof = old;
@@ -82,7 +102,7 @@ bool UnnecessaryParen::TraverseUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr
bool UnnecessaryParen::TraverseCaseStmt(CaseStmt * caseStmt)
{
auto old = insideCaseStmt;
- insideCaseStmt = caseStmt->getLHS()->IgnoreImpCasts();
+ insideCaseStmt = ignoreAllImplicit(caseStmt->getLHS());
bool ret = RecursiveASTVisitor::TraverseCaseStmt(caseStmt);
insideCaseStmt = old;
return ret;
@@ -91,7 +111,7 @@ bool UnnecessaryParen::TraverseCaseStmt(CaseStmt * caseStmt)
bool UnnecessaryParen::TraverseConditionalOperator(ConditionalOperator * conditionalOperator)
{
auto old = insideConditionalOperator;
- insideConditionalOperator = conditionalOperator->getCond()->IgnoreImpCasts();
+ insideConditionalOperator = ignoreAllImplicit(conditionalOperator->getCond());
bool ret = RecursiveASTVisitor::TraverseConditionalOperator(conditionalOperator);
insideConditionalOperator = old;
return ret;
@@ -110,7 +130,7 @@ bool UnnecessaryParen::VisitParenExpr(const ParenExpr* parenExpr)
if (insideConditionalOperator && parenExpr == insideConditionalOperator)
return true;
- auto subExpr = parenExpr->getSubExpr()->IgnoreImpCasts();
+ auto subExpr = ignoreAllImplicit(parenExpr->getSubExpr());
if (auto subParenExpr = dyn_cast<ParenExpr>(subExpr))
{
@@ -191,7 +211,7 @@ bool UnnecessaryParen::VisitReturnStmt(const ReturnStmt* returnStmt)
if (!returnStmt->getRetValue())
return true;
- auto parenExpr = dyn_cast<ParenExpr>(returnStmt->getRetValue()->IgnoreImpCasts());
+ auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(returnStmt->getRetValue()));
if (!parenExpr)
return true;
if (parenExpr->getLocStart().isMacroID())
@@ -220,7 +240,7 @@ void UnnecessaryParen::VisitSomeStmt(const Stmt *parent, const Expr* cond, Strin
if (parent->getLocStart().isMacroID())
return;
- auto parenExpr = dyn_cast<ParenExpr>(cond->IgnoreImpCasts());
+ auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(cond));
if (parenExpr) {
if (parenExpr->getLocStart().isMacroID())
return;
@@ -251,7 +271,7 @@ bool UnnecessaryParen::VisitCallExpr(const CallExpr* callExpr)
if (callExpr->getNumArgs() != 1 || isa<CXXOperatorCallExpr>(callExpr))
return true;
- auto parenExpr = dyn_cast<ParenExpr>(callExpr->getArg(0)->IgnoreImpCasts());
+ auto parenExpr = dyn_cast<ParenExpr>(ignoreAllImplicit(callExpr->getArg(0)));
if (parenExpr) {
if (parenExpr->getLocStart().isMacroID())
return true;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 19489fecedca..a9e21f35a0d2 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -473,7 +473,7 @@ CanvasSettings::CanvasSettings() :
if( xEntryNameAccess.is() )
{
Sequence<OUString> preferredImplementations;
- if( (xEntryNameAccess->getByName("PreferredImplementations") >>= preferredImplementations) )
+ if( xEntryNameAccess->getByName("PreferredImplementations") >>= preferredImplementations )
maAvailableImplementations.emplace_back(*pCurr,preferredImplementations );
}
@@ -516,7 +516,7 @@ bool CanvasSettings::IsHardwareAccelerationAvailable() const
pCurrImpl->trim() ),
UNO_QUERY_THROW );
bool bHasAccel(false);
- if( (xPropSet->getPropertyValue("HardwareAcceleration") >>= bHasAccel) )
+ if( xPropSet->getPropertyValue("HardwareAcceleration") >>= bHasAccel )
if( bHasAccel )
{
mbHWAccelAvailable = true;
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 7e6cb24fa402..866f0dcbec40 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -151,7 +151,7 @@ namespace dbaui
m_pConnectionURL->SetHelpId(HID_DSADMIN_CALC_PATH);
break;
case ::dbaccess::DST_WRITER:
- m_pFT_Connection->SetText((DBA_RES(STR_WRITER_PATH_OR_FILE)));
+ m_pFT_Connection->SetText(DBA_RES(STR_WRITER_PATH_OR_FILE));
m_pConnectionURL->SetHelpId(HID_DSADMIN_WRITER_PATH);
break;
case ::dbaccess::DST_ADO:
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 75f46bf5510a..5fc918cea17c 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -103,7 +103,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe
}
while( pEntry )
{
- if((bCase ? rEntryText == GetEntryText(pEntry) : rEntryText.equalsIgnoreAsciiCase(GetEntryText(pEntry))))
+ if(bCase ? rEntryText == GetEntryText(pEntry) : rEntryText.equalsIgnoreAsciiCase(GetEntryText(pEntry)))
{
return pEntry;
}
diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx
index bc39bd4b5101..d0248bfafcac 100644
--- a/filter/source/svg/impsvgdialog.cxx
+++ b/filter/source/svg/impsvgdialog.cxx
@@ -115,7 +115,7 @@ Sequence< PropertyValue > ImpSVGDialog::GetFilterData()
maConfigItem.WriteBool( SVG_PROP_EMBEDFONTS, maCBEmbedFonts->IsChecked() );
maConfigItem.WriteBool( SVG_PROP_NATIVEDECORATION, maCBUseNativeDecoration->IsChecked() );
- return( maConfigItem.GetFilterData() );
+ return maConfigItem.GetFilterData();
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 55465733e657..a7409f4cfeef 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1572,7 +1572,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId,
SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
// In case the page has a background object we append it .
- if( (mpObjects->find( rxPage ) != mpObjects->end()) )
+ if( mpObjects->find( rxPage ) != mpObjects->end() )
{
const GDIMetaFile& rMtf = (*mpObjects)[ rxPage ].GetRepresentation();
if( rMtf.GetActionSize() )
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index d91a7588ddc4..5250811477d9 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -158,7 +158,7 @@ sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasByName( const OUString& rId
// XElementAccess
Type SAL_CALL ConfigurationAccess_UICategory::getElementType()
{
- return( cppu::UnoType<OUString>::get());
+ return cppu::UnoType<OUString>::get();
}
sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasElements()
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 4cf804a2226f..b8366e792ced 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -296,7 +296,7 @@ sal_Bool SAL_CALL ConfigurationAccess_WindowState::hasByName( const OUString& rR
// XElementAccess
Type SAL_CALL ConfigurationAccess_WindowState::getElementType()
{
- return( cppu::UnoType<Sequence< PropertyValue >>::get() );
+ return cppu::UnoType<Sequence< PropertyValue >>::get();
}
sal_Bool SAL_CALL ConfigurationAccess_WindowState::hasElements()
@@ -1378,7 +1378,7 @@ sal_Bool SAL_CALL WindowStateConfiguration::hasByName( const OUString& aName )
// XElementAccess
Type SAL_CALL WindowStateConfiguration::getElementType()
{
- return( cppu::UnoType<XNameAccess>::get());
+ return cppu::UnoType<XNameAccess>::get();
}
sal_Bool SAL_CALL WindowStateConfiguration::hasElements()
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 7f32f70541ba..bd199b6891b1 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -265,7 +265,7 @@ sal_Bool SAL_CALL ConfigurationAccess_UICommand::hasByName( const OUString& rCom
// XElementAccess
Type SAL_CALL ConfigurationAccess_UICommand::getElementType()
{
- return( cppu::UnoType<Sequence< PropertyValue >>::get() );
+ return cppu::UnoType<Sequence< PropertyValue >>::get();
}
sal_Bool SAL_CALL ConfigurationAccess_UICommand::hasElements()
@@ -706,7 +706,7 @@ sal_Bool SAL_CALL UICommandDescription::hasByName( const OUString& aName )
// XElementAccess
Type SAL_CALL UICommandDescription::getElementType()
{
- return( cppu::UnoType<XNameAccess>::get());
+ return cppu::UnoType<XNameAccess>::get();
}
sal_Bool SAL_CALL UICommandDescription::hasElements()
diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx
index a192a8ed55e0..e9011a5ea3db 100644
--- a/lotuswordpro/source/filter/lwpfont.cxx
+++ b/lotuswordpro/source/filter/lwpfont.cxx
@@ -231,7 +231,7 @@ void LwpFontTableEntry::Read(LwpObjectStream *pStrm)
OUString LwpFontTableEntry::GetFaceName()
{
- return (m_WindowsFaceName.str());
+ return m_WindowsFaceName.str();
}
void LwpFontTableEntry::RegisterFontDecl()
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 74f55f433c1f..6933b9951b8f 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2991,7 +2991,7 @@ void ScDataPilotFieldGroupsObj::renameFieldGroup( const OUString& rOldName, cons
if( aOldIt == maGroups.end() )
throw RuntimeException("Field Group with name \"" + rOldName + "\" not found", static_cast<cppu::OWeakObject*>(this));
// new name must not exist yet
- if( ((aNewIt != maGroups.end()) && (aNewIt != aOldIt)) )
+ if( (aNewIt != maGroups.end()) && (aNewIt != aOldIt) )
throw RuntimeException("Field Group with name \"" + rOldName + "\" already exists", static_cast<cppu::OWeakObject*>(this));
aOldIt->maName = rNewName;
}
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 06ae463b8219..6ad20222c8bb 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -497,7 +497,7 @@ ScVbaFormat< Ifc... >::getIndentLevel( )
if (!isAmbiguous(sParaIndent))
{
sal_Int16 IndentLevel = 0;
- if ( ( mxPropertySet->getPropertyValue(sParaIndent) >>= IndentLevel ) )
+ if ( mxPropertySet->getPropertyValue(sParaIndent) >>= IndentLevel )
NRetIndentLevel <<= sal_Int32( rtl::math::round(static_cast<double>( IndentLevel ) / 352.8));
else
NRetIndentLevel <<= sal_Int32(0);
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 6ecf2a123b0c..34190b2566be 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -1025,7 +1025,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode > const & xNode, con
if( rSet.hasProperty( DFF_ANIM_PRESET_SUB_TYPE ) )
{
sal_Int32 nPresetSubType = 0;
- if( (rSet.getProperty( DFF_ANIM_PRESET_SUB_TYPE ) >>= nPresetSubType) )
+ if( rSet.getProperty( DFF_ANIM_PRESET_SUB_TYPE ) >>= nPresetSubType )
{
if( nPresetSubType )
{
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 21ae24d542dd..06f63fdf94ab 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -617,9 +617,9 @@ void PresenterAccessible::NotifyCurrentSlideChange ()
{
PresenterPaneContainer::SharedPaneDescriptor pPreviewPane (GetPreviewPane());
mpAccessiblePreview->SetAccessibleName(
- (pPreviewPane&&pPreviewPane->mxPane.is()
+ pPreviewPane&&pPreviewPane->mxPane.is()
? pPreviewPane->mxPane->GetTitle()
- : OUString()));
+ : OUString());
}
// Play some focus ping-pong to trigger AT tools.
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 7de805350551..2df8b5ac7012 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -172,7 +172,7 @@ bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor )
::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::DecodeMechanism::NONE ),
Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
- if ( ( aCnt.getPropertyValue("AnchorName") >>= sAnchor ) )
+ if ( aCnt.getPropertyValue("AnchorName") >>= sAnchor )
{
if ( !sAnchor.isEmpty() )
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 36d88d05a2b6..678c4a51a9ff 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -389,11 +389,11 @@ AnimationBaseNode::fillCommonParameters() const
boost::optional<double> aRepeats;
double nRepeats = 0;
- if( (mxAnimateNode->getRepeatCount() >>= nRepeats) ) {
+ if( mxAnimateNode->getRepeatCount() >>= nRepeats ) {
aRepeats.reset( nRepeats );
}
else {
- if( (mxAnimateNode->getRepeatDuration() >>= nRepeats) ) {
+ if( mxAnimateNode->getRepeatDuration() >>= nRepeats ) {
// when repeatDuration is given,
// autoreverse does _not_ modify the
// active duration. Thus, calc repeat
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index a83daa1889dc..16dec389d38d 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -702,7 +702,7 @@ void BaseNode::showState() const
css::presentation::ParagraphTarget aTarget;
// no shape provided. Maybe a ParagraphTarget?
- if( (xAnimate->getTarget() >>= aTarget) )
+ if( xAnimate->getTarget() >>= aTarget )
xTargetShape = aTarget.Shape;
}
diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx
index b14df76a23c8..d920bdd4ad06 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -312,7 +312,7 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode)
if (xNode.is())
{
animations::Event aEvent;
- if ((xNode->getBegin() >>= aEvent))
+ if (xNode->getBegin() >>= aEvent)
bIsUserTriggered = (aEvent.Trigger == animations::EventTrigger::ON_NEXT);
}
diff --git a/slideshow/source/engine/slide/targetpropertiescreator.cxx b/slideshow/source/engine/slide/targetpropertiescreator.cxx
index d7cf667e7cf8..dc2006c462fb 100644
--- a/slideshow/source/engine/slide/targetpropertiescreator.cxx
+++ b/slideshow/source/engine/slide/targetpropertiescreator.cxx
@@ -225,7 +225,7 @@ namespace internal
{
// no parent-supplied target, retrieve
// node target
- if( (xAnimateNode->getTarget() >>= aTarget.mxRef) )
+ if( xAnimateNode->getTarget() >>= aTarget.mxRef )
{
// pure shape target - set paragraph
// index to magic
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3f1d67e38b0c..bfc7414b5211 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -625,7 +625,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt32 nInsertPos, OUString const & rRequestedFileName )
{
OUString aPictureStorageName, aPictureStreamName;
- if( ( maURLSet.find( rURLStr ) != maURLSet.end() ) )
+ if( maURLSet.find( rURLStr ) != maURLSet.end() )
{
for (URLPairVector::const_iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); aIter != aEnd ; ++aIter)
{
diff --git a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
index 6547676d82d1..66ae8f1754ac 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
@@ -17,7 +17,7 @@ public:
protected:
bool mustTestImportOf(const char* filename) const override {
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 06f1f012646d..7fe5f86ff7ef 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -95,7 +95,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
protected:
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index a5a28a21d9b7..66ac2feaa876 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -37,7 +37,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 8607ff84fca5..41cd6ac8b676 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -38,7 +38,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 42991a3c3b8b..8bb8f3ecf4b5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -95,7 +95,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 96026740894b..41a309d5713b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -47,7 +47,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 7e5373e60241..736a4b9e6a24 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -61,7 +61,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx b/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
index 6b255bfd7fe0..c9c0a0ab87fe 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
@@ -22,7 +22,7 @@ protected:
*/
bool mustTestImportOf(const char* filename) const override {
// If the testcase is stored in some other format, it's pointless to test.
- return (OString(filename).endsWith(".docx"));
+ return OString(filename).endsWith(".docx");
}
};
diff --git a/vbahelper/source/vbahelper/vbafontbase.cxx b/vbahelper/source/vbahelper/vbafontbase.cxx
index 777ac975c104..685c6652551b 100644
--- a/vbahelper/source/vbahelper/vbafontbase.cxx
+++ b/vbahelper/source/vbahelper/vbafontbase.cxx
@@ -79,7 +79,7 @@ VbaFontBase::getSuperscript()
// not supported in form controls
if( !mbFormControl )
mxFont->getPropertyValue( "CharEscapement" ) >>= nValue;
- return uno::makeAny( ( nValue == SUPERSCRIPT ) );
+ return uno::makeAny( nValue == SUPERSCRIPT );
}
void SAL_CALL
@@ -112,7 +112,7 @@ VbaFontBase::getSubscript()
// not supported in form controls
if( !mbFormControl )
mxFont->getPropertyValue( "CharEscapement" ) >>= nValue;
- return uno::makeAny( ( nValue == SUBSCRIPT ) );
+ return uno::makeAny( nValue == SUBSCRIPT );
}
void SAL_CALL
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 801eb7103b16..29ef4d2a431b 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2119,7 +2119,7 @@ void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XProperty
return;
chart::TimeIncrement aIncrement;
- if( (rAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement) )
+ if( rAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement )
{
sal_Int32 nTimeResolution = css::chart::TimeUnit::DAY;
if( aIncrement.TimeResolution >>= nTimeResolution )
More information about the Libreoffice-commits
mailing list