summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/AccessibleGridControl.cxx2
-rw-r--r--accessibility/source/extended/AccessibleGridControlBase.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/comp/io.cxx22
-rw-r--r--basic/source/sbx/sbxconv.hxx9
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx2
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx4
-rw-r--r--compilerplugins/clang/indentation.cxx47
-rw-r--r--compilerplugins/clang/test/indentation.cxx33
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--hwpfilter/source/mzstring.h5
-rw-r--r--idl/source/objects/slot.cxx2
-rw-r--r--include/typelib/typedescription.h2
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx6
-rw-r--r--oox/source/vml/vmlshapecontext.cxx2
-rw-r--r--sc/qa/unit/opencl-test.cxx14
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx4
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/lotus/tool.cxx4
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx2
-rw-r--r--sc/source/ui/vba/vbaformat.cxx21
-rw-r--r--sc/source/ui/view/tabvwshf.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx10
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx6
-rw-r--r--sd/source/ui/view/sdview3.cxx2
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/view/frmload.cxx58
-rw-r--r--soltools/cpp/_tokens.c4
-rw-r--r--soltools/mkdepend/include.c2
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/filter/exportdialog.cxx2
-rw-r--r--svx/source/table/cellcursor.cxx2
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx6
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/ftnfrm.cxx4
-rw-r--r--sw/source/core/text/txtfrm.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx15
-rw-r--r--unotools/source/config/configitem.cxx32
-rw-r--r--vbahelper/source/vbahelper/vbacolorformat.cxx2
-rw-r--r--vcl/source/app/help.cxx2
-rw-r--r--vcl/source/control/roadmap.cxx2
-rw-r--r--vcl/source/filter/jpeg/transupp.c20
-rw-r--r--vcl/source/window/winproc.cxx2
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx2
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx9
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx6
-rw-r--r--xmloff/source/draw/shapeexport.cxx41
57 files changed, 270 insertions, 180 deletions
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index 6f3e51928e8a..b98104c7695e 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -162,7 +162,7 @@ AccessibleGridControl::getAccessibleAtPoint( const awt::Point& rPoint )
if( xCurrChildComp.is() &&
VCLRectangle( xCurrChildComp->getBounds() ).IsInside( aPoint ) )
- xChild = xCurrChild;
+ xChild = xCurrChild;
}
}
return xChild;
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
index 6a459b374ea6..4ba0ee1a90cd 100644
--- a/accessibility/source/extended/AccessibleGridControlBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -175,7 +175,7 @@ lang::Locale SAL_CALL AccessibleGridControlBase::getLocale()
css::uno::Reference< css::accessibility::XAccessibleContext >
xParentContext( m_xParent->getAccessibleContext() );
if( xParentContext.is() )
- return xParentContext->getLocale();
+ return xParentContext->getLocale();
}
throw IllegalAccessibleComponentStateException();
}
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index f0a7b38730a2..a2e59d8b4213 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -197,7 +197,7 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager const * pM
pLib->MakeModule( aModuleName, aInfo, aMod );
}
else
- pLib->MakeModule( aModuleName, aMod );
+ pLib->MakeModule( aModuleName, aMod );
}
pLib->SetModified( false );
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index d1abbee9c330..3a24d4141027 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -290,18 +290,18 @@ void SbiParser::Close()
if( IsEoln( eCurTok ) )
aGen.Gen( SbiOpcode::CLOSE_, 0 );
else
- for( ;; )
- {
- SbiExpression aExpr( this );
- while( Peek() == COMMA || Peek() == SEMICOLON )
- Next();
- aExpr.Gen();
- aGen.Gen( SbiOpcode::CHANNEL_ );
- aGen.Gen( SbiOpcode::CLOSE_, 1 );
+ for( ;; )
+ {
+ SbiExpression aExpr( this );
+ while( Peek() == COMMA || Peek() == SEMICOLON )
+ Next();
+ aExpr.Gen();
+ aGen.Gen( SbiOpcode::CHANNEL_ );
+ aGen.Gen( SbiOpcode::CLOSE_, 1 );
- if( IsEoln( Peek() ) )
- break;
- }
+ if( IsEoln( Peek() ) )
+ break;
+ }
}
diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx
index 8a8fd98a7a6d..378c752b88d9 100644
--- a/basic/source/sbx/sbxconv.hxx
+++ b/basic/source/sbx/sbxconv.hxx
@@ -70,9 +70,12 @@ sal_Int64 ImpGetCurrency( const SbxValues* );
void ImpPutCurrency( SbxValues*, const sal_Int64 );
inline sal_Int64 ImpDoubleToCurrency( double d )
- { if (d > 0) return static_cast<sal_Int64>( d * CURRENCY_FACTOR + 0.5);
- else return static_cast<sal_Int64>( d * CURRENCY_FACTOR - 0.5);
- }
+{
+ if (d > 0)
+ return static_cast<sal_Int64>( d * CURRENCY_FACTOR + 0.5);
+ else
+ return static_cast<sal_Int64>( d * CURRENCY_FACTOR - 0.5);
+}
inline double ImpCurrencyToDouble( const sal_Int64 r )
{ return static_cast<double>(r) / double(CURRENCY_FACTOR); }
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index b8f4d7f6511e..2c755fedb111 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -217,7 +217,7 @@ SAL_DLLPUBLIC_EXPORT void uno_ext_getMapping(
(*(*ppMapping)->release)( *ppMapping );
}
if (pMapping)
- *ppMapping = pMapping;
+ *ppMapping = pMapping;
}
}
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index c4b4b6756097..f96c7b101509 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -405,7 +405,9 @@ void PropertyMapper::setMultiProperties(
TOOLS_WARN_EXCEPTION("chart2", "" ); //if this occurs more often think of removing the XMultiPropertySet completely for better performance
}
- if(!bSuccess)
+ if(bSuccess)
+ return;
+
try
{
sal_Int32 nCount = std::max( rNames.getLength(), rValues.getLength() );
diff --git a/compilerplugins/clang/indentation.cxx b/compilerplugins/clang/indentation.cxx
index 1b94eac3ec1a..9621ef549bbe 100644
--- a/compilerplugins/clang/indentation.cxx
+++ b/compilerplugins/clang/indentation.cxx
@@ -144,8 +144,10 @@ bool Indentation::VisitCompoundStmt(CompoundStmt const* compoundStmt)
auto stmtLoc = compat::getBeginLoc(stmt);
StringRef macroName;
+ bool partOfMacro = false;
if (SM.isMacroArgExpansion(stmtLoc) || SM.isMacroBodyExpansion(stmtLoc))
{
+ partOfMacro = true;
macroName = Lexer::getImmediateMacroNameForDiagnostics(
stmtLoc, compiler.getSourceManager(), compiler.getLangOpts());
// CPPUNIT_TEST_SUITE/CPPUNIT_TEST/CPPUNIT_TEST_SUITE_END work together, so the one is indented inside the other
@@ -213,6 +215,51 @@ bool Indentation::VisitCompoundStmt(CompoundStmt const* compoundStmt)
//getParentStmt(compoundStmt)->dump();
//stmt->dump();
}
+
+ if (!partOfMacro)
+ if (auto ifStmt = dyn_cast<IfStmt>(stmt))
+ {
+ auto bodyStmt = ifStmt->getThen();
+ if (bodyStmt && !isa<CompoundStmt>(bodyStmt))
+ {
+ stmtLoc = compat::getBeginLoc(bodyStmt);
+ invalid1 = false;
+ invalid2 = false;
+ unsigned bodyColumn = SM.getPresumedColumnNumber(stmtLoc, &invalid1);
+ unsigned bodyLine = SM.getPresumedLineNumber(stmtLoc, &invalid2);
+ if (invalid1 || invalid2)
+ return true;
+
+ if (bodyLine != tmpLine && bodyColumn <= tmpColumn)
+ report(DiagnosticsEngine::Warning, "if body should be indented", stmtLoc);
+ }
+
+ auto elseStmt = ifStmt->getElse();
+ if (elseStmt && !isa<CompoundStmt>(elseStmt) && !isa<IfStmt>(elseStmt))
+ {
+ stmtLoc = compat::getBeginLoc(elseStmt);
+ invalid1 = false;
+ invalid2 = false;
+ unsigned elseColumn = SM.getPresumedColumnNumber(stmtLoc, &invalid1);
+ unsigned elseLine = SM.getPresumedLineNumber(stmtLoc, &invalid2);
+ if (invalid1 || invalid2)
+ return true;
+ if (elseLine != tmpLine && elseColumn <= tmpColumn)
+ report(DiagnosticsEngine::Warning, "else body should be indented", stmtLoc);
+ }
+ if (elseStmt && !isa<CompoundStmt>(bodyStmt))
+ {
+ stmtLoc = ifStmt->getElseLoc();
+ invalid1 = false;
+ invalid2 = false;
+ unsigned elseColumn = SM.getPresumedColumnNumber(stmtLoc, &invalid1);
+ unsigned elseLine = SM.getPresumedLineNumber(stmtLoc, &invalid2);
+ if (invalid1 || invalid2)
+ return true;
+ if (elseLine != tmpLine && elseColumn != tmpColumn)
+ report(DiagnosticsEngine::Warning, "if and else not aligned", stmtLoc);
+ }
+ }
}
return true;
}
diff --git a/compilerplugins/clang/test/indentation.cxx b/compilerplugins/clang/test/indentation.cxx
index 27e858fb319c..e0e25884eebb 100644
--- a/compilerplugins/clang/test/indentation.cxx
+++ b/compilerplugins/clang/test/indentation.cxx
@@ -38,6 +38,39 @@ void top1(int x) {
case 2: foo(); break; // 1expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
};
+
+ if (x)
+ foo(); // expected-error {{if body should be indented [loplugin:indentation]}}
+
+ if (x)
+ {
+ foo();
+ }
+
+ if (x)
+ ;
+ else
+ foo(); // expected-error {{else body should be indented [loplugin:indentation]}}
+
+ if (x)
+ ;
+ else
+ {
+ foo();
+ }
+
+ if (x)
+ ;
+ else // expected-error {{if and else not aligned [loplugin:indentation]}}
+ foo();
+
+ if (x)
+ {
+ } else
+ {
+ foo();
+ }
+
#if 0
if (x)
foo();
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index ea6d8923514c..02318df826ad 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -132,7 +132,7 @@ static bool IsUserWordbook( const OUString& rFile )
if ( !strcmp(pMagicHeader, "WBSWG2")
|| !strcmp(pMagicHeader, "WBSWG5")
|| !strcmp(pMagicHeader, "WBSWG6") )
- bRet = true;
+ bRet = true;
}
}
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index f1219c29361e..ad09f1d543dc 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4565,7 +4565,7 @@ bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode,
nShrink /= 10000;
long nNewWidth = pTextPortion->GetExtraInfos()->nOrgWidth - nShrink;
if ( nNewWidth < pTextPortion->GetSize().Width() )
- pTextPortion->GetSize().setWidth( nNewWidth );
+ pTextPortion->GetSize().setWidth( nNewWidth );
}
}
return bCompressed;
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index fe130230ee65..7db33ba5281e 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1173,7 +1173,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
{
if ( (pPortionInfo->GetRefDevPtr() == GetRefDevice()) ||
(pPortionInfo->RefDevIsVirtual() && GetRefDevice()->IsVirtual()) )
- bUsePortionInfo = true;
+ bUsePortionInfo = true;
}
bool bConvertMetricOfItems = false;
diff --git a/hwpfilter/source/mzstring.h b/hwpfilter/source/mzstring.h
index 0ed917204d2a..0726d5bb55e0 100644
--- a/hwpfilter/source/mzstring.h
+++ b/hwpfilter/source/mzstring.h
@@ -152,8 +152,9 @@ inline const char* MzString::c_str() const
{
Data[Length] = '\0'; // We always leave room for this.
return Data;
- } else
- return "";
+ }
+ else
+ return "";
}
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 0fbc7c78732f..e9b2d9986410 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -313,7 +313,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList)
{
nLow = nMid + 1;
if ( nLow == 0 )
- break;
+ break;
}
else
bFound = true;
diff --git a/include/typelib/typedescription.h b/include/typelib/typedescription.h
index d3e18b8fee42..329384c5d172 100644
--- a/include/typelib/typedescription.h
+++ b/include/typelib/typedescription.h
@@ -1009,7 +1009,7 @@ inline void TYPELIB_DANGER_GET( typelib_TypeDescription** ppMacroTypeDescr,
{
typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef );
if (*ppMacroTypeDescr)
- typelib_typedescription_release( *ppMacroTypeDescr );
+ typelib_typedescription_release( *ppMacroTypeDescr );
}
else
{
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index f545bb5c48c8..05c9e37bf638 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -166,9 +166,9 @@ private:
virtual css::uno::Any SAL_CALL nextElement( ) override
{
- if ( hasMoreElements() )
- return css::uno::makeAny( *mIt++ );
- throw css::container::NoSuchElementException();
+ if ( hasMoreElements() )
+ return css::uno::makeAny( *mIt++ );
+ throw css::container::NoSuchElementException();
}
};
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 2012739e9bae..76953fe750e7 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -423,7 +423,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle )
OUString aName, aValue;
if( ConversionHelper::separatePair( aName, aValue, rStyle.getToken( 0, ';', nIndex ), ':' ) )
{
- if( aName == "position" ) mrTypeModel.maPosition = aValue;
+ if( aName == "position" ) mrTypeModel.maPosition = aValue;
else if( aName == "z-index" ) mrTypeModel.maZIndex = aValue;
else if( aName == "left" ) mrTypeModel.maLeft = aValue;
else if( aName == "top" ) mrTypeModel.maTop = aValue;
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index abf87e6b33bd..f72300da02f3 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -3837,19 +3837,19 @@ void ScOpenCLTest::testMathFormulaSumProduct()
double fLibre = rDoc.GetValue(ScAddress(2,i,0));
double fExcel = rDocRes.GetValue(ScAddress(2,i,0));
if ( i == 1 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(82, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(82, fLibre, fabs(0.0001*fExcel));
else if ( i == 2 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(113, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(113, fLibre, fabs(0.0001*fExcel));
else if ( i == 4 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(175, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(175, fLibre, fabs(0.0001*fExcel));
else if ( i == 5 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(206, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(206, fLibre, fabs(0.0001*fExcel));
else if ( i == 6 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(237, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(237, fLibre, fabs(0.0001*fExcel));
else if ( i == 7 )
- CPPUNIT_ASSERT_DOUBLES_EQUAL(268, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(268, fLibre, fabs(0.0001*fExcel));
else
- CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
}
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 05deff486faa..24815b4937b1 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1782,7 +1782,9 @@ public:
if (NumericRange* NR =
dynamic_cast<NumericRange*>(vSubArguments[i].get()))
{
- bool needBody; NR->GenReductionLoopHeader(ss, needBody); if (!needBody)
+ bool needBody;
+ NR->GenReductionLoopHeader(ss, needBody);
+ if (!needBody)
continue;
}
else if (ParallelNumericRange* PNR =
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 2a2518840828..19115bc86d68 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -482,7 +482,7 @@ void XclExpBiff8Encrypter::GetSalt( sal_uInt8 pnSalt[16] ) const
void XclExpBiff8Encrypter::GetDocId( sal_uInt8 pnDocId[16] ) const
{
if ( sizeof( mpnDocId ) == 16 )
- memcpy( pnDocId, mpnDocId, 16 );
+ memcpy( pnDocId, mpnDocId, 16 );
}
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt8 nData )
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index ab65dbe732d3..5c5d307198a3 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -135,9 +135,9 @@ double Snum32ToDouble( sal_uInt32 nValue )
if (temp)
{
if (nValue & 0x00000010)
- fValue /= pow(double(10), temp);
+ fValue /= pow(double(10), temp);
else
- fValue *= pow(double(10), temp);
+ fValue *= pow(double(10), temp);
}
if (nValue & 0x00000020)
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 8e073a382745..01a541e110d8 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -486,7 +486,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
if(rtl::math::isSignBitSet(nVal))
- rDoc.SetValue(rCol, nRow, 0, -1 * nVal);
+ rDoc.SetValue(rCol, nRow, 0, -1 * nVal);
}
}
}
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index ce5bddd12505..6f65b444df3c 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -704,16 +704,17 @@ ScVbaFormat< Ifc... >::getReadingOrder( )
{
text::WritingMode aWritingMode = text::WritingMode_LR_TB;
if ( ( mxPropertySet->getPropertyValue(sWritingMode) ) >>= aWritingMode )
- switch (aWritingMode){
- case text::WritingMode_LR_TB:
- NRetReadingOrder <<= excel::Constants::xlLTR;
- break;
- case text::WritingMode_RL_TB:
- NRetReadingOrder <<= excel::Constants::xlRTL;
- break;
- default:
- NRetReadingOrder <<= excel::Constants::xlRTL;
- }
+ switch (aWritingMode)
+ {
+ case text::WritingMode_LR_TB:
+ NRetReadingOrder <<= excel::Constants::xlLTR;
+ break;
+ case text::WritingMode_RL_TB:
+ NRetReadingOrder <<= excel::Constants::xlRTL;
+ break;
+ default:
+ NRetReadingOrder <<= excel::Constants::xlRTL;
+ }
}
}
catch (const uno::Exception& )
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 1926f0727a18..00f85a151662 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -903,7 +903,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
|| !pDoc->IsDocEditable()
|| nVis < 2
|| nTabSelCount == nTabCount)
- rSet.DisableItem( nWhich );
+ rSet.DisableItem( nWhich );
}
}
break;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index a2218c8ddcbf..7ed93ac0b0b4 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2282,7 +2282,7 @@ void ScViewFunc::SetWidthOrHeight(
pDocSh->UpdateOle(&GetViewData());
if( !pDocSh->IsReadOnly() )
- aModificator.SetDocumentModified();
+ aModificator.SetDocumentModified();
}
if ( bWidth )
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 5da76b64b94f..9ceab36e4bec 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -806,11 +806,11 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima
{
sal_Int16 nType = 0;
if( GetNodeType( xNode, nType ) )
- switch( nType )
- {
- case css::presentation::EffectNodeType::TIMING_ROOT : aAnim.mnNodeType = 0x12; break;
- case css::presentation::EffectNodeType::MAIN_SEQUENCE : aAnim.mnNodeType = 0x18; break;
- }
+ switch( nType )
+ {
+ case css::presentation::EffectNodeType::TIMING_ROOT : aAnim.mnNodeType = 0x12; break;
+ case css::presentation::EffectNodeType::MAIN_SEQUENCE : aAnim.mnNodeType = 0x18; break;
+ }
}
break;
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index ca8dc682ea60..8fa6914709c1 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -720,9 +720,9 @@ sal_Int8 PPTWriterBase::GetTransition( sal_Int16 nTransitionType, sal_Int16 nTra
case TransitionType::FADE :
{
if ( nTransitionSubtype == TransitionSubType::CROSSFADE )
- nPPTTransitionType = PPT_TRANSITION_TYPE_SMOOTHFADE;
+ nPPTTransitionType = PPT_TRANSITION_TYPE_SMOOTHFADE;
else if ( nTransitionSubtype == TransitionSubType::FADEOVERCOLOR )
- nPPTTransitionType = PPT_TRANSITION_TYPE_FADE;
+ nPPTTransitionType = PPT_TRANSITION_TYPE_FADE;
}
break;
case TransitionType::PUSHWIPE :
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index fc61ec18cbea..f86e07942100 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -936,9 +936,9 @@ void SelectionFunction::ModeHandler::SwitchView (const model::SharedPageDescript
(rpDescriptor->GetPage()->GetPageNum()-1)/2);
}
if (mrSlideSorter.GetViewShellBase() != nullptr)
- framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
- framework::FrameworkHelper::msImpressViewURL,
- framework::FrameworkHelper::msCenterPaneURL);
+ framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
+ framework::FrameworkHelper::msImpressViewURL,
+ framework::FrameworkHelper::msCenterPaneURL);
}
void SelectionFunction::ModeHandler::StartDrag (
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 6b750c9cb6bd..d1873a6b73aa 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -266,7 +266,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
SfxInPlaceClient* pIpClient = mpViewSh->GetViewShell()->GetIPClient();
if( dynamic_cast< ::sd::slidesorter::SlideSorterViewShell *>( mpViewSh ) != nullptr
|| (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive()))
- nPasteOptions |= SdrInsertFlags::DONTMARK;
+ nPasteOptions |= SdrInsertFlags::DONTMARK;
}
if( bDrag )
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 3ae3bdc503e0..26048177e87d 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -554,7 +554,7 @@ void PDFOutDev::processLink(Link* link, Catalog*)
LinkAction* pAction = link->getAction();
if (!(pAction && pAction->getKind() == actionURI))
-return;
+ return;
#if POPPLER_CHECK_VERSION(0, 72, 0)
const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str();
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 395672aaae97..b2bf405836d8 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2421,7 +2421,7 @@ void SAL_CALL SfxBaseModel::removeShapeEventListener( const css::uno::Reference<
{
rVec.erase(it2);
if (rVec.empty())
- m_pData->maShapeListeners.erase(it);
+ m_pData->maShapeListeners.erase(it);
}
}
}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index e6885694a944..d098ac5c00e2 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -538,35 +538,35 @@ SfxInterfaceId SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const
try
{
if ( nViewId == SFX_INTERFACE_NONE )
- do
- {
- Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY );
- Reference< XIndexAccess > xViewData;
- if ( xViewDataSupplier.is() )
- xViewData.set( xViewDataSupplier->getViewData() );
-
- if ( !xViewData.is() || ( xViewData->getCount() == 0 ) )
- // no view data stored together with the model
- break;
-
- // obtain the ViewID from the view data
- Sequence< PropertyValue > aViewData;
- if ( !( xViewData->getByIndex( 0 ) >>= aViewData ) )
- break;
-
- ::comphelper::NamedValueCollection aNamedViewData( aViewData );
- OUString sViewId = aNamedViewData.getOrDefault( "ViewId", OUString() );
- if ( sViewId.isEmpty() )
- break;
-
- // somewhat weird convention here ... in the view data, the ViewId is a string, effectively describing
- // a view name. In the document load descriptor, the ViewId is in fact the numeric ID.
-
- SfxViewFactory* pViewFactory = i_rDocument.GetFactory().GetViewFactoryByViewName( sViewId );
- if ( pViewFactory )
- nViewId = pViewFactory->GetOrdinal();
- }
- while ( false );
+ do
+ {
+ Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY );
+ Reference< XIndexAccess > xViewData;
+ if ( xViewDataSupplier.is() )
+ xViewData.set( xViewDataSupplier->getViewData() );
+
+ if ( !xViewData.is() || ( xViewData->getCount() == 0 ) )
+ // no view data stored together with the model
+ break;
+
+ // obtain the ViewID from the view data
+ Sequence< PropertyValue > aViewData;
+ if ( !( xViewData->getByIndex( 0 ) >>= aViewData ) )
+ break;
+
+ ::comphelper::NamedValueCollection aNamedViewData( aViewData );
+ OUString sViewId = aNamedViewData.getOrDefault( "ViewId", OUString() );
+ if ( sViewId.isEmpty() )
+ break;
+
+ // somewhat weird convention here ... in the view data, the ViewId is a string, effectively describing
+ // a view name. In the document load descriptor, the ViewId is in fact the numeric ID.
+
+ SfxViewFactory* pViewFactory = i_rDocument.GetFactory().GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory )
+ nViewId = pViewFactory->GetOrdinal();
+ }
+ while ( false );
}
catch( const Exception& )
{
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index ff01657204db..0a10cd34cdb1 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -513,8 +513,8 @@ void
{
if ( write(1, wbuf, (int)(wbp - wbuf)) != -1)
wbp = wbuf;
- else
- exit(1);
+ else
+ exit(1);
}
}
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index 153c62b86c28..fd005c3284c7 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -196,7 +196,7 @@ void remove_dotdot(char *path)
*tp++ = *fp; /* move all the pointers down */
} while (*fp++);
if (cp != components)
- cp--; /* go back and check for nested ".." */
+ cp--; /* go back and check for nested ".." */
} else {
cp++;
}
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index f71515a2221c..c84ef2eb8cfd 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -482,7 +482,7 @@ namespace svt
AsynchGetFocus();
if (!(IsEditing() && aController->GetWindow().IsEnabled() && aController->WantMouseEvent()))
-return;
+ return;
// forwards the event to the control
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 1604ff38d36c..9a04956698f9 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -722,7 +722,7 @@ void ExportDialog::setupSizeControls()
mxLbSizeX->set_active( static_cast< sal_uInt16 >( nUnit ) );
if ( !mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes
-return;
+ return;
// sense eg for bitmap fillings in metafiles, to preserve high dpi output
// (atm without special vector support the bitmaps are rendered with 96dpi)
diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx
index bd77a885957c..09197d1be194 100644
--- a/svx/source/table/cellcursor.cxx
+++ b/svx/source/table/cellcursor.cxx
@@ -314,7 +314,7 @@ void CellCursor::split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector<
// merged cells are ignored, but newly added columns will be added to leftovers
xCell.set( dynamic_cast< Cell* >(mxTable->getCellByPosition( nCol+1, nRow ).get() ) );
if( !xCell.is() || !xCell->isMerged() )
- rLeftOvers[nRow] += nNewCols;
+ rLeftOvers[nRow] += nNewCols;
}
}
else
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 033ccb556faf..673e257e0554 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -368,7 +368,7 @@ void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& r
m_bLateInitialization = false;
if( !(GetSubType() & nsSwGetSetExpType::GSE_STRING) &&
static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING )
- SetSubType( nsSwGetSetExpType::GSE_STRING );
+ SetSubType( nsSwGetSetExpType::GSE_STRING );
}
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 3c0c7d5279a2..2f874fd34e24 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -472,7 +472,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
{
SdrObject* pDrawObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
if( pDrawObj )
- aDrawObjs.push_back( pDrawObj );
+ aDrawObjs.push_back( pDrawObj );
}
}
// loop on marked drawing objects
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index e4939dfb16c1..b5f364511f6e 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -450,7 +450,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
{
SwRootFrame* pLayout = pMaster->getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
+ pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
}
}
@@ -496,7 +496,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
{
SwRootFrame* pLayout = pMaster->getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
+ pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
}
}
@@ -761,7 +761,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- pSh->Imp()->InvalidateAccessibleEditableState( true, this );
+ pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
}
break;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index b1e414d46880..f0ef0a38314d 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -543,7 +543,7 @@ SwLayNotify::~SwLayNotify()
//Thereby the subordinates are retouched clean.
//Example problem: Take the Flys with the handles and downsize.
//Not for body and page, otherwise it flickers when loading HTML.
- pLay->SetCompletePaint();
+ pLay->SetCompletePaint();
}
}
//Notify Lower if the position has changed.
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 6711643d438b..da0cf0334de5 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1112,7 +1112,7 @@ const SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame co
const SwFootnoteBossFrame* pBoss = pRet->GetRef()->FindFootnoteBossFrame();
if( pBoss->GetPhyPageNum() != nPageNum ||
nColNum != lcl_ColumnNum( pBoss ) )
- pRet = nullptr;
+ pRet = nullptr;
}
}
}
@@ -2562,7 +2562,7 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
- nRet += BROWSE_HEIGHT - getFrameArea().Height();
+ nRet += BROWSE_HEIGHT - getFrameArea().Height();
}
return nRet;
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index b18d64c22ecf..028db9511c08 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2906,7 +2906,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
const sal_uInt16 nWhich = pHt->Which();
if (RES_TXTATR_FIELD == nWhich ||
(HasFootnote() && pVoid && RES_TXTATR_FTN == nWhich))
- InvalidateRange(SwCharRange(nStart, TextFrameIndex(1)), 1);
+ InvalidateRange(SwCharRange(nStart, TextFrameIndex(1)), 1);
}
}
// A new boss, a new chance for growing
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 35dc5e95d3bc..b5b7f4e1a88e 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1834,7 +1834,7 @@ void SAL_CALL SwXTextField::attach(
{
if (nSubType != nsSwGetSetExpType::GSE_STRING &&
static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING)
- nSubType = nsSwGetSetExpType::GSE_STRING;
+ nSubType = nsSwGetSetExpType::GSE_STRING;
}
else
bSetGetExpFieldUninitialized = true; // #i82544#
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index f8b96e99f2c0..872352db5e3d 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -184,7 +184,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sSuffix == "text" ||
sSuffix == "graphic" ||
sSuffix == "ole" )
- sText = sText.copy( 0, nFound - 1);
+ sText = sText.copy( 0, nFound - 1);
}
// #i104300#
// special handling if target is a cross-reference bookmark
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 67e8ecfd7b64..bb9f4a975297 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1237,11 +1237,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
default:
bMore = true;
}
- if(bMore && pArgs)
- {
- pItem = nullptr;
- pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
- if(pItem)
+
+
+ if(!bMore || !pArgs)
+ return;
+
+ pItem = nullptr;
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
+ if(pItem)
switch(nSlot)
{
case SID_ATTR_BRUSH:
@@ -1304,8 +1307,6 @@ void SwBaseShell::Execute(SfxRequest &rReq)
default:
OSL_FAIL("wrong Dispatcher");
}
-
- }
}
// Here the state for SID_IMAP / SID_CONTOUR will be handled
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index fd12fbde6796..8ed1d317a09c 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -873,26 +873,26 @@ bool ConfigItem::ReplaceSetProperties(
{
bool bFound = comphelper::findValue(aSubNodeNames, rContainerSubNode) != -1;
if(!bFound)
- try
- {
- xCont->removeByName(rContainerSubNode);
- }
- catch (const Exception&)
- {
- if (isSimpleValueSet)
+ try
{
- try
+ xCont->removeByName(rContainerSubNode);
+ }
+ catch (const Exception&)
+ {
+ if (isSimpleValueSet)
{
- // #i37322#: fallback action: replace with <void/>
- xCont->replaceByName(rContainerSubNode, Any());
- // fallback successful: continue looping
- continue;
+ try
+ {
+ // #i37322#: fallback action: replace with <void/>
+ xCont->replaceByName(rContainerSubNode, Any());
+ // fallback successful: continue looping
+ continue;
+ }
+ catch (Exception &)
+ {} // propagate original exception, if fallback fails
}
- catch (Exception &)
- {} // propagate original exception, if fallback fails
+ throw;
}
- throw;
- }
}
try { xBatch->commitChanges(); }
catch (css::uno::Exception &)
diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx
index 653d0db23a2a..7fdfa9911d19 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.cxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.cxx
@@ -124,7 +124,7 @@ ScVbaColorFormat::getSchemeColor()
for( ; i < 56; i++ )
{
if( nColor == MsoColorIndices::getColorIndex(i) )
- break;
+ break;
}
if( i == 56 ) // this is most likely an error condition
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index ec0e1d0579fc..0176b8b895e0 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -368,7 +368,7 @@ void HelpTextWindow::ImplShow()
VclPtr<HelpTextWindow> xWindow( this );
Show( true, ShowFlags::NoActivate );
if( !xWindow->IsDisposed() )
- Update();
+ Update();
}
void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx
index 6233edf47f7e..b7ecae751497 100644
--- a/vcl/source/control/roadmap.cxx
+++ b/vcl/source/control/roadmap.cxx
@@ -690,7 +690,7 @@ void RoadmapItem::GrabFocus()
void RoadmapItem::SetInteractive(bool _bInteractive)
{
if ( mpDescription )
- mpDescription->SetInteractive(_bInteractive);
+ mpDescription->SetInteractive(_bInteractive);
}
void RoadmapItem::SetID(sal_Int16 ID)
diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c
index aa126f03f9be..a81445812fef 100644
--- a/vcl/source/filter/jpeg/transupp.c
+++ b/vcl/source/filter/jpeg/transupp.c
@@ -857,18 +857,18 @@ jtransform_request_workspace (j_decompress_ptr srcinfo,
if (info->perfect) {
if (info->num_components == 1) {
if (!jtransform_perfect_transform(srcinfo->output_width,
- srcinfo->output_height,
- srcinfo->min_DCT_h_scaled_size_,
- srcinfo->min_DCT_v_scaled_size_,
- info->transform))
- return FALSE;
+ srcinfo->output_height,
+ srcinfo->min_DCT_h_scaled_size_,
+ srcinfo->min_DCT_v_scaled_size_,
+ info->transform))
+ return FALSE;
} else {
if (!jtransform_perfect_transform(srcinfo->output_width,
- srcinfo->output_height,
- srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size_,
- srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size_,
- info->transform))
- return FALSE;
+ srcinfo->output_height,
+ srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size_,
+ srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size_,
+ info->transform))
+ return FALSE;
}
}
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 089b24c0fec7..424b8b6cdbfa 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -2260,7 +2260,7 @@ static void ImplHandleStartReconversion( vcl::Window *pWindow )
{
vcl::Window* pChild = ImplGetKeyInputWindow( pWindow );
if( pChild )
- ImplCallCommand( pChild, CommandEventId::PrepareReconversion );
+ ImplCallCommand( pChild, CommandEventId::PrepareReconversion );
}
static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow,
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 0c1fb28bf7e1..7b479816e1ec 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -668,7 +668,7 @@ void PspSalInfoPrinter::GetPageInfo(
// get the selected page size
if( !aData.m_pParser )
-return;
+ return;
OUString aPaper;
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 8ba1df9810bb..3f02da765611 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -359,7 +359,7 @@ void PrinterInfoManager::initialize()
const PPDValue* pPrinterValue = pPrinterKey->getValue( pDefValue->m_aOption );
if( pPrinterValue )
// the printer has a corresponding option for the key
- aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue );
+ aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue );
}
else
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, nullptr );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 48505401b876..dd573bd25e42 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1360,11 +1360,10 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
const StyleSheetEntryPtr pParent = (!pEntry->sBaseStyleIdentifier.isEmpty()) ? GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier) : nullptr;
const StyleSheetPropertyMap* pParentProperties = dynamic_cast<const StyleSheetPropertyMap*>(pParent ? pParent->pProperties.get() : nullptr);
if (!pEntry->sBaseStyleIdentifier.isEmpty())
-
- if ( (oProperty = pStyleSheetProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT))
- // If the numbering comes from a base style, indent of the base style has also priority.
- || (bNumberingFromBaseStyle && pParentProperties && (oProperty = pParentProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT))) )
- pParaContext->Insert(PROP_PARA_FIRST_LINE_INDENT, oProperty->second, /*bOverwrite=*/false);
+ if ( (oProperty = pStyleSheetProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT))
+ // If the numbering comes from a base style, indent of the base style has also priority.
+ || (bNumberingFromBaseStyle && pParentProperties && (oProperty = pParentProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT))) )
+ pParaContext->Insert(PROP_PARA_FIRST_LINE_INDENT, oProperty->second, /*bOverwrite=*/false);
if ( (oProperty = pStyleSheetProperties->getProperty(PROP_PARA_LEFT_MARGIN))
|| (bNumberingFromBaseStyle && pParentProperties && (oProperty = pParentProperties->getProperty(PROP_PARA_LEFT_MARGIN))) )
pParaContext->Insert(PROP_PARA_LEFT_MARGIN, oProperty->second, /*bOverwrite=*/false);
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 5e026e346e63..322a97e4331f 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -367,7 +367,8 @@ void SchXMLImportHelper::DeleteDataSeries(
const Reference< chart2::XDataSeries > & xSeries,
const Reference< chart2::XChartDocument > & xDoc )
{
- if( xDoc.is() )
+ if( !xDoc.is() )
+ return;
try
{
Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
@@ -584,7 +585,8 @@ void SAL_CALL SchXMLImport::setTargetDocument(const uno::Reference<lang::XCompon
uno::Reference<chart2::XChartDocument> xChartDoc(GetModel(), uno::UNO_QUERY);
- if (xChartDoc.is())
+ if (!xChartDoc.is())
+ return;
try
{
// prevent rebuild of view during load (necessary especially if loaded not
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 836fc921fdf3..ddd128d1d8b0 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -732,32 +732,31 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
{
if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
aShapeInfo.meShapeType != XmlShapeTypeHandoutShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape )
+ try
+ {
+ bool bVisible = true;
+ bool bPrintable = true;
- try
- {
- bool bVisible = true;
- bool bPrintable = true;
+ xSet->getPropertyValue(gsVisible) >>= bVisible;
+ xSet->getPropertyValue(gsPrintable) >>= bPrintable;
- xSet->getPropertyValue(gsVisible) >>= bVisible;
- xSet->getPropertyValue(gsPrintable) >>= bPrintable;
+ XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID;
+ const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0);
+ switch( nDisplay )
+ {
+ case 0: eDisplayToken = XML_NONE; break;
+ case 1: eDisplayToken = XML_PRINTER; break;
+ case 2: eDisplayToken = XML_SCREEN; break;
+ // case 3: eDisplayToken = XML_ALWAYS break; this is the default
+ }
- XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID;
- const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0);
- switch( nDisplay )
+ if( eDisplayToken != XML_TOKEN_INVALID )
+ mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken );
+ }
+ catch(const uno::Exception&)
{
- case 0: eDisplayToken = XML_NONE; break;
- case 1: eDisplayToken = XML_PRINTER; break;
- case 2: eDisplayToken = XML_SCREEN; break;
- // case 3: eDisplayToken = XML_ALWAYS break; this is the default
+ DBG_UNHANDLED_EXCEPTION("xmloff.draw");
}
-
- if( eDisplayToken != XML_TOKEN_INVALID )
- mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken );
- }
- catch(const uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION("xmloff.draw");
- }
}
// #82003# test export count