summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-22 10:21:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-28 10:47:34 +0200
commitbfc1600c6ade6f006eb774bffe7caa9c948e8603 (patch)
treec660fa18fc6a9e5f05c3cc58fa34411cdc4f4257
parentf9514beb9bfed51aee69227797e74504afed31c6 (diff)
loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basegfx/source/polygon/b2dlinegeometry.cxx8
-rw-r--r--basic/source/classes/sbunoobj.cxx4
-rw-r--r--basic/source/comp/scanner.cxx2
-rw-r--r--basic/source/runtime/methods.cxx16
-rw-r--r--canvas/source/opengl/ogl_canvascustomsprite.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx8
-rw-r--r--chart2/source/tools/ChartTypeHelper.cxx2
-rw-r--r--compilerplugins/clang/indentation.cxx140
-rw-r--r--compilerplugins/clang/test/indentation.cxx10
-rw-r--r--connectivity/source/drivers/evoab2/NCatalog.cxx5
-rw-r--r--connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx24
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
-rw-r--r--cppu/source/typelib/typelib.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/options/optdict.cxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx20
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx2
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx4
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx121
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx2
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx2
-rw-r--r--desktop/unx/source/start.c2
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx5
-rw-r--r--editeng/source/misc/svxacorr.cxx2
-rw-r--r--filter/source/msfilter/msvbahelper.cxx18
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--filter/source/odfflatxml/OdfFlatXml.cxx46
-rw-r--r--filter/source/svg/svgwriter.cxx18
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx8
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx6
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx100
-rw-r--r--formula/source/core/api/token.cxx4
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--framework/source/jobs/jobdata.cxx8
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/recording/dispatchrecorder.cxx9
-rw-r--r--hwpfilter/source/drawing.h2
-rw-r--r--hwpfilter/source/hcode.cxx18
-rw-r--r--hwpfilter/source/hiodev.cxx2
-rw-r--r--hwpfilter/source/hwpfile.cxx2
-rw-r--r--hwpfilter/source/hwpread.cxx46
-rw-r--r--hwpfilter/source/hwpreader.cxx13
-rw-r--r--hwpfilter/source/lexer.cxx102
-rw-r--r--i18npool/source/breakiterator/breakiterator_th.cxx20
-rw-r--r--i18npool/source/breakiterator/breakiterator_unicode.cxx244
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx5
-rw-r--r--i18nutil/source/utility/widthfolding.cxx140
-rw-r--r--idl/source/objects/object.cxx4
-rw-r--r--idlc/source/astscope.cxx2
-rw-r--r--l10ntools/source/cfgmerge.cxx2
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--l10ntools/source/xrmmerge.cxx2
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx18
-rw-r--r--oox/source/export/chartexport.cxx2
-rw-r--r--oox/source/ppt/pptshapecontext.cxx6
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
-rw-r--r--sal/osl/all/log.cxx32
-rw-r--r--sal/osl/unx/file_stat.cxx10
-rw-r--r--sal/qa/osl/file/osl_File.cxx2
-rw-r--r--sc/qa/extras/check_data_pilot_table.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/postit.cxx4
-rw-r--r--sc/source/core/data/table1.cxx4
-rw-r--r--sc/source/core/data/table2.cxx16
-rw-r--r--sc/source/core/opencl/op_financial.cxx16
-rw-r--r--sc/source/core/opencl/op_logical.cxx24
-rw-r--r--sc/source/core/opencl/op_math.cxx4
-rw-r--r--sc/source/core/opencl/op_statistical.cxx14
-rw-r--r--sc/source/filter/excel/excform8.cxx2
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/excel/xlroot.cxx2
-rw-r--r--sc/source/ui/app/seltrans.cxx4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/dataproviderdlg.cxx2
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx3
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/vba/vbainterior.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx34
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx8
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx6
-rw-r--r--sd/source/core/sdpage.cxx4
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/ppt/propread.cxx25
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/func/fusel.cxx12
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx2
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx6
-rw-r--r--sd/source/ui/view/GraphicObjectBar.cxx2
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx2
-rw-r--r--sdext/source/pdfimport/tree/writertreevisiting.cxx2
-rw-r--r--sdext/source/presenter/PresenterController.cxx4
-rw-r--r--sdext/source/presenter/PresenterNotesView.cxx24
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx32
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx8
-rw-r--r--sfx2/source/appl/appuno.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/bastyp/bitset.cxx2
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--slideshow/source/engine/slide/userpaintoverlay.cxx2
-rw-r--r--soltools/cpp/_tokens.c13
-rw-r--r--soltools/mkdepend/parse.c2
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx2
-rw-r--r--svl/source/numbers/zformat.cxx2
-rw-r--r--svtools/source/config/helpopt.cxx2
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.cxx2
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx4
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/sdr/animation/scheduler.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx47
-rw-r--r--svx/source/svdraw/svditer.cxx3
-rw-r--r--svx/source/table/tablecontroller.cxx5
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx6
-rw-r--r--sw/source/core/access/accframebase.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx4
-rw-r--r--sw/source/core/crsr/pam.cxx6
-rw-r--r--sw/source/core/crsr/viscrs.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx2
-rw-r--r--sw/source/core/doc/doccorr.cxx2
-rw-r--r--sw/source/core/layout/dbg_lay.cxx4
-rw-r--r--sw/source/core/layout/fly.cxx8
-rw-r--r--sw/source/core/layout/flycnt.cxx12
-rw-r--r--sw/source/core/layout/frmtool.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx48
-rw-r--r--sw/source/core/text/frmform.cxx2
-rw-r--r--sw/source/core/text/itrcrsr.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
-rw-r--r--sw/source/filter/xml/xmliteme.cxx4
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx4
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/vba/vbafont.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx18
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/inc/usrpref.hxx10
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/uitest/uiobject.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx2
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx4
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/ContentProperties.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/DateTimeHelper.cxx2
-rw-r--r--unotools/source/misc/fontdefs.cxx2
-rw-r--r--unotools/source/ucbhelper/xtempfile.cxx4
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbafontbase.cxx2
-rw-r--r--vcl/source/bitmap/BitmapScaleSuperFilter.cxx2
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/notebookbar.cxx20
-rw-r--r--vcl/source/filter/ipict/ipict.cxx48
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx6
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx2
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx8
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx2
-rw-r--r--vcl/source/treelist/transfer.cxx8
-rw-r--r--vcl/source/window/brdwin.cxx16
-rw-r--r--vcl/unx/generic/app/saldisp.cxx15
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx4
-rw-r--r--vcl/unx/generic/gdi/freetypetextrender.cxx2
-rw-r--r--vcl/unx/generic/window/salframe.cxx4
-rw-r--r--vcl/unx/gtk3/a11y/atkwrapper.cxx4
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx16
-rw-r--r--vcl/unx/gtk3/hudawareness.cxx12
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx4
-rw-r--r--xmlhelp/source/treeview/tvread.cxx16
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx6
-rw-r--r--xmloff/source/style/impastpl.cxx34
-rw-r--r--xmloff/source/style/xmlnume.cxx2
-rw-r--r--xmloff/source/style/xmlstyle.cxx2
-rw-r--r--xmloff/source/table/XMLTableExport.cxx8
-rw-r--r--xmloff/source/text/txtflde.cxx6
-rw-r--r--xmloff/source/text/txtparai.cxx2
203 files changed, 1176 insertions, 1005 deletions
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index 72c25f0c0593..4bba7cb009f9 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -929,10 +929,10 @@ namespace basegfx
if(aOrientation == B2VectorOrientation::Neutral)
{
- // they are parallel or empty; if they are both not zero and point
- // in opposite direction, a half-circle is needed
- if(!aTangentPrev.equalZero() && !aTangentEdge.equalZero())
- {
+ // they are parallel or empty; if they are both not zero and point
+ // in opposite direction, a half-circle is needed
+ if(!aTangentPrev.equalZero() && !aTangentEdge.equalZero())
+ {
const double fAngle(fabs(aTangentPrev.angle(aTangentEdge)));
if(fTools::equal(fAngle, F_PI))
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index f4dbd35e3b6c..edf112eca9e3 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2132,7 +2132,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
aMember.setValue( aAnyValue );
}
return;
- }
+ }
// take over the value from Uno to Sbx
Any aAnyValue = sbxToUnoValue( pVar, pProp->aUnoProp.Type, &pProp->aUnoProp );
try
@@ -4565,7 +4565,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
break;
}
}
- }
+ }
return bSuccess;
}
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index f74259d7bbbf..268308ab13c1 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -440,7 +440,7 @@ bool SbiScanner::NextSym()
{
GenError( ERRCODE_BASIC_SYNTAX );
}
- }
+ }
}
// Hex/octal number? Read in and convert:
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index fce05bf3e4d1..fb0e3e81aaa7 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -431,25 +431,25 @@ void SbRtl_CurDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
int nSize = PATH_INCR;
std::unique_ptr<char[]> pMem;
while( true )
- {
+ {
pMem.reset(new char[nSize]);
if( !pMem )
- {
+ {
StarBASIC::Error( ERRCODE_BASIC_NO_MEMORY );
return;
- }
+ }
if( getcwd( pMem.get(), nSize-1 ) != nullptr )
- {
+ {
rPar.Get(0)->PutString(OUString::createFromAscii(pMem.get()));
return;
- }
+ }
if( errno != ERANGE )
- {
+ {
StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR );
return;
- }
+ }
nSize += PATH_INCR;
- };
+ };
#endif
}
diff --git a/canvas/source/opengl/ogl_canvascustomsprite.cxx b/canvas/source/opengl/ogl_canvascustomsprite.cxx
index 2e930611f5bf..d15de6b31c0d 100644
--- a/canvas/source/opengl/ogl_canvascustomsprite.cxx
+++ b/canvas/source/opengl/ogl_canvascustomsprite.cxx
@@ -217,7 +217,7 @@ namespace oglcanvas
glVertex2d(
rCandidate.getC().getX(),
rCandidate.getC().getY());
- }
+ }
glEnd();
}
else
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index a58d24433b75..37e820eb5d94 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -908,9 +908,9 @@ void DataBrowser::RemoveColumn()
void DataBrowser::InsertRow()
{
- sal_Int32 nRowIdx = GetCurRow();
+ sal_Int32 nRowIdx = GetCurRow();
- if( nRowIdx >= 0 && m_apDataBrowserModel)
+ if( nRowIdx >= 0 && m_apDataBrowserModel)
{
// save changes made to edit-field
if( IsModified() )
@@ -923,9 +923,9 @@ void DataBrowser::InsertRow()
void DataBrowser::RemoveRow()
{
- sal_Int32 nRowIdx = GetCurRow();
+ sal_Int32 nRowIdx = GetCurRow();
- if( nRowIdx >= 0 && m_apDataBrowserModel)
+ if( nRowIdx >= 0 && m_apDataBrowserModel)
{
// save changes made to edit-field
if( IsModified() )
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index a4b8059ffb19..bb8f965ee199 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -113,7 +113,7 @@ bool ChartTypeHelper::isSupportingAreaProperties( const uno::Reference< XChartTy
//@todo ask charttype itself --> need model change first
if(xChartType.is())
{
- if(nDimensionCount==2)
+ if(nDimensionCount==2)
{
OUString aChartTypeName = xChartType->getChartType();
if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_LINE) )
diff --git a/compilerplugins/clang/indentation.cxx b/compilerplugins/clang/indentation.cxx
index 088de1e702d6..345b33a5bd63 100644
--- a/compilerplugins/clang/indentation.cxx
+++ b/compilerplugins/clang/indentation.cxx
@@ -15,6 +15,7 @@
#include <iostream>
#include <fstream>
#include <set>
+#include <unordered_set>
#include "plugin.hxx"
/*
@@ -65,9 +66,17 @@ public:
bool PostTraverseSwitchStmt(SwitchStmt*, bool);
bool TraverseSwitchStmt(SwitchStmt*);
bool VisitSwitchStmt(SwitchStmt const*);
+ bool VisitIfStmt(IfStmt const*);
+ bool VisitForStmt(ForStmt const*);
+ bool VisitWhileStmt(WhileStmt const*);
+ bool VisitDoStmt(DoStmt const*);
+ bool VisitCXXForRangeStmt(CXXForRangeStmt const*);
private:
+ void checkCompoundStmtBraces(const Stmt* parentStmt, const CompoundStmt*);
+
std::vector<const Stmt*> switchStmtBodies;
+ std::unordered_set<const Stmt*> chainedSet;
};
bool Indentation::PreTraverseSwitchStmt(SwitchStmt* switchStmt)
@@ -258,9 +267,140 @@ bool Indentation::VisitCompoundStmt(CompoundStmt const* compoundStmt)
}
}
}
+
+ return true;
+}
+
+bool Indentation::VisitIfStmt(IfStmt const* ifStmt)
+{
+ if (ignoreLocation(ifStmt))
+ return true;
+
+ // TODO - ignore chained if statements for now
+ if (auto chained = ifStmt->getElse())
+ chainedSet.insert(chained);
+ if (chainedSet.find(ifStmt) != chainedSet.end())
+ return true;
+
+ if (auto compoundStmt = dyn_cast_or_null<CompoundStmt>(ifStmt->getThen()))
+ checkCompoundStmtBraces(ifStmt, compoundStmt);
+ // TODO - needs to be checked against the line that contains the else keyword, but not against the parent
+ // if (auto compoundStmt = dyn_cast_or_null<CompoundStmt>(ifStmt->getElse()))
+ // checkCompoundStmtBraces(ifStmt, compoundStmt);
+ return true;
+}
+
+bool Indentation::VisitForStmt(ForStmt const* forStmt)
+{
+ if (ignoreLocation(forStmt))
+ return true;
+ if (chainedSet.find(forStmt) != chainedSet.end())
+ return true;
+ if (auto compoundStmt = dyn_cast_or_null<CompoundStmt>(forStmt->getBody()))
+ checkCompoundStmtBraces(forStmt, compoundStmt);
+ return true;
+}
+
+bool Indentation::VisitWhileStmt(WhileStmt const* whileStmt)
+{
+ if (ignoreLocation(whileStmt))
+ return true;
+ if (chainedSet.find(whileStmt) != chainedSet.end())
+ return true;
+ if (auto compoundStmt = dyn_cast_or_null<CompoundStmt>(whileStmt->getBody()))
+ checkCompoundStmtBraces(whileStmt, compoundStmt);
return true;
}
+bool Indentation::VisitDoStmt(DoStmt const* doStmt)
+{
+ if (ignoreLocation(doStmt))
+ return true;
+ if (chainedSet.find(doStmt) != chainedSet.end())
+ return true;
+ if (auto compoundStmt = dyn_cast_or_null<CompoundStmt>(doStmt->getBody()))
+ checkCompoundStmtBraces(doStmt, compoundStmt);
+ return true;
+}
+
+bool Indentation::VisitCXXForRangeStmt(CXXForRangeStmt const* cxxForRangeStmt)
+{
+ if (ignoreLocation(cxxForRangeStmt))
+ return true;
+ if (chainedSet.find(cxxForRangeStmt) != chainedSet.end())
+ return true;
+ if (auto compoundStmt = dyn_cast_or_null<CompoundStmt>(cxxForRangeStmt->getBody()))
+ checkCompoundStmtBraces(cxxForRangeStmt, compoundStmt);
+ return true;
+}
+
+void Indentation::checkCompoundStmtBraces(const Stmt* parentStmt, const CompoundStmt* compoundStmt)
+{
+ auto& SM = compiler.getSourceManager();
+ bool invalid1 = false;
+ bool invalid2 = false;
+
+ auto parentBeginLoc = compat::getBeginLoc(parentStmt);
+ unsigned parentColumn = SM.getPresumedColumnNumber(parentBeginLoc, &invalid1);
+ if (invalid1)
+ return;
+
+ auto startBraceLoc = compat::getBeginLoc(compoundStmt);
+ auto endBraceLoc = compat::getEndLoc(compoundStmt);
+ unsigned beginColumn = SM.getPresumedColumnNumber(startBraceLoc, &invalid1);
+ unsigned beginLine = SM.getPresumedLineNumber(startBraceLoc, &invalid2);
+ if (invalid1 || invalid2)
+ return;
+ unsigned endColumn = SM.getPresumedColumnNumber(endBraceLoc, &invalid1);
+ unsigned endLine = SM.getPresumedLineNumber(endBraceLoc, &invalid2);
+ if (invalid1 || invalid2)
+ return;
+ if (beginLine == endLine)
+ return;
+
+ // check for code to the left of the starting brace
+ bool foundCodeToLeft = false;
+ {
+ const char* p1 = SM.getCharacterData(startBraceLoc);
+ --p1;
+ while (*p1 && *p1 != '\n')
+ {
+ if (*p1 != ' ')
+ {
+ foundCodeToLeft = true;
+ break;
+ }
+ --p1;
+ }
+ }
+
+ // if we found code to the left of the start brace, that means the end-brace needs
+ // to line up with the start of the parent statement
+ if (foundCodeToLeft)
+ {
+ if (parentColumn != endColumn)
+ {
+ report(DiagnosticsEngine::Warning, "end brace not aligned with beginning of statement",
+ endBraceLoc);
+ report(DiagnosticsEngine::Note, "statement beginning here", parentBeginLoc);
+ }
+ }
+ else
+ {
+ if (parentColumn != beginColumn)
+ {
+ report(DiagnosticsEngine::Warning,
+ "start brace not aligned with beginning of parent statement", startBraceLoc);
+ report(DiagnosticsEngine::Note, "statement beginning here", parentBeginLoc);
+ }
+ else if (beginColumn != endColumn)
+ {
+ report(DiagnosticsEngine::Warning, "start and end brace not aligned", endBraceLoc);
+ report(DiagnosticsEngine::Note, "start brace here", startBraceLoc);
+ }
+ }
+}
+
bool Indentation::VisitSwitchStmt(SwitchStmt const* switchStmt)
{
if (ignoreLocation(switchStmt))
diff --git a/compilerplugins/clang/test/indentation.cxx b/compilerplugins/clang/test/indentation.cxx
index e0e25884eebb..8ef6d2c03653 100644
--- a/compilerplugins/clang/test/indentation.cxx
+++ b/compilerplugins/clang/test/indentation.cxx
@@ -48,6 +48,16 @@ void top1(int x) {
}
if (x)
+ { // expected-note {{start brace here [loplugin:indentation]}}
+ foo();
+ } // expected-error {{start and end brace not aligned [loplugin:indentation]}}
+
+ if (x) // expected-note {{statement beginning here [loplugin:indentation]}}
+ { // expected-error {{start brace not aligned with beginning of parent statement [loplugin:indentation]}}
+ foo();
+ }
+
+ if (x)
;
else
foo(); // expected-error {{else body should be indented [loplugin:indentation]}}
diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx
index fb010b8dce5d..6b409ce66d65 100644
--- a/connectivity/source/drivers/evoab2/NCatalog.cxx
+++ b/connectivity/source/drivers/evoab2/NCatalog.cxx
@@ -67,9 +67,8 @@ Reference< XNameAccess > SAL_CALL OEvoabCatalog::getTables( )
try
{
- if (!m_pTables) {
- refreshTables();
- }
+ if (!m_pTables)
+ refreshTables();
}
catch( const RuntimeException& )
{
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 6c798e5a166c..0e98a5944a3e 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -1083,20 +1083,20 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
bool bTableFound = true;
sal_Int32 nLength = types.getLength();
if(nLength)
- {
- bTableFound = false;
+ {
+ bTableFound = false;
- const OUString* pBegin = types.getConstArray();
- const OUString* pEnd = pBegin + nLength;
- for(;pBegin != pEnd;++pBegin)
- {
- if(*pBegin == aTable)
- {
- bTableFound = true;
- break;
- }
- }
+ const OUString* pBegin = types.getConstArray();
+ const OUString* pEnd = pBegin + nLength;
+ for(;pBegin != pEnd;++pBegin)
+ {
+ if(*pBegin == aTable)
+ {
+ bTableFound = true;
+ break;
+ }
}
+ }
if(!bTableFound)
return pResult;
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index c4c28dc4a822..9902c571b7ea 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -823,7 +823,7 @@ void OSQLParser::killThousandSeparator(OSQLParseNode* pLiteral)
}
else
pLiteral->m_aNodeValue = pLiteral->m_aNodeValue.replace(',', sal_Unicode());
- }
+ }
}
OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType, OSQLParseNode* pLiteral)
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 26875778c22b..fa2a73d767ac 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -1655,7 +1655,7 @@ extern "C" sal_Int32 typelib_typedescription_getAlignedUnoSize(
// inherit structs extends the base struct.
nStructSize = pTmp->pBaseTypeDescription->aBase.nSize;
rMaxIntegralTypeSize = pTmp->pBaseTypeDescription->aBase.nAlignment;
- }
+ }
for( sal_Int32 i = 0; i < pTmp->nMembers; i++ )
{
typelib_TypeDescription * pMemberType = nullptr;
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 3a0dcb8a69c9..1c4b15576190 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -762,7 +762,7 @@ void TPGalleryThemeProperties::FillFilterList()
aExtensions += ";";
aExtensions += aWildcard + aFilter.second.getToken( 0, ';', nIndex );
}
- }
+ }
#endif
#if defined(_WIN32)
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 0a7a4ba74c5c..945202e75ce6 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -623,7 +623,7 @@ bool SvxEditDictionaryDialog::NewDelHdl(const weld::Widget* pBtn)
nAddRes = linguistic::AddEntryToDic( xDic,
aNewWord, bIsNegEntry,
aRplcText, false );
- }
+ }
}
if (DictionaryError::NONE != nAddRes)
SvxDicError(m_xDialog.get(), nAddRes);
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 2284f1db3e3f..1153fb56714e 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -431,11 +431,11 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc
|| !m_aCurrentColumns[SelectColumns]
|| !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME)
)
- {
- OUString sError(DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP));
- SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() );
- throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) );
- }
+ {
+ OUString sError(DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP));
+ SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() );
+ throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) );
+ }
OUString aName, aNewName;
column->getPropertyValue(PROPERTY_NAME) >>= aName;
@@ -501,11 +501,11 @@ OUString OSingleSelectQueryComposer::impl_getColumnNameOrderBy_throw(const Refer
|| !m_aCurrentColumns[SelectColumns]
|| !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME)
)
- {
- OUString sError(DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP));
- SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() );
- throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) );
- }
+ {
+ OUString sError(DBA_RES(RID_STR_COLUMN_UNKNOWN_PROP));
+ SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() );
+ throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) );
+ }
OUString aName;
column->getPropertyValue(PROPERTY_NAME) >>= aName;
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 472f60ad566f..4554a1fd4dcb 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -413,7 +413,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
aOpenCommand,
Environment );
aRet <<= xSet;
- }
+ }
else
{
// Unsupported.
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 8291597870c5..b702d9133f94 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -883,7 +883,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
_rxEnvironment );
// Unreachable
OSL_FAIL( "unreachable" );
- }
+ }
OSL_ENSURE( !m_pImpl->m_aProps.sPersistentName.isEmpty(),
"ODocumentDefinition::onCommandOpenSomething: no persistent name - cannot load!" );
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 9620d5840a34..ee38f63609b0 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1376,7 +1376,7 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OU
if (!xElementSet.is())
{
throw css::lang::IllegalArgumentException();
- }
+ }
OUString sName;
try
{
@@ -1545,7 +1545,7 @@ void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Elem
if (!xElementSet.is())
{
throw css::lang::IllegalArgumentException();
- }
+ }
OUString sName;
try
{
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 7c6278d60fe2..795aae0350dc 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1142,82 +1142,83 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
if (!::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)).is())
return nAction;
- if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) ) do
- { // odd construction, but spares us a lot of (explicit ;) goto's
+ if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) )
+ do
+ { // odd construction, but spares us a lot of (explicit ;) goto's
- if (!GetEmptyRow().is())
- // without an empty row we're not in update mode
- break;
+ if (!GetEmptyRow().is())
+ // without an empty row we're not in update mode
+ break;
- const sal_Int32 nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
- const sal_uInt16 nCol = GetColumnId(GetColumnAtXPosPixel(rEvt.maPosPixel.X()));
+ const sal_Int32 nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+ const sal_uInt16 nCol = GetColumnId(GetColumnAtXPosPixel(rEvt.maPosPixel.X()));
- sal_Int32 nCorrectRowCount = GetRowCount();
- if (GetOptions() & DbGridControlOptions::Insert)
- --nCorrectRowCount; // there is an empty row for inserting records
- if (IsCurrentAppending())
- --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
+ sal_Int32 nCorrectRowCount = GetRowCount();
+ if (GetOptions() & DbGridControlOptions::Insert)
+ --nCorrectRowCount; // there is an empty row for inserting records
+ if (IsCurrentAppending())
+ --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
- if ( (nCol == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount) || (nCol == 0) )
- // no valid cell under the mouse cursor
- break;
+ if ( (nCol == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount) || (nCol == 0) )
+ // no valid cell under the mouse cursor
+ break;
- tools::Rectangle aRect = GetCellRect(nRow, nCol, false);
- if (!aRect.IsInside(rEvt.maPosPixel))
- // not dropped within a cell (a cell isn't as wide as the column - the are small spaces)
- break;
+ tools::Rectangle aRect = GetCellRect(nRow, nCol, false);
+ if (!aRect.IsInside(rEvt.maPosPixel))
+ // not dropped within a cell (a cell isn't as wide as the column - the are small spaces)
+ break;
- if ((IsModified() || (GetCurrentRow().is() && GetCurrentRow()->IsModified())) && (GetCurrentPos() != nRow))
- // there is a current and modified row or cell and he text is to be dropped into another one
- break;
+ if ((IsModified() || (GetCurrentRow().is() && GetCurrentRow()->IsModified())) && (GetCurrentPos() != nRow))
+ // there is a current and modified row or cell and he text is to be dropped into another one
+ break;
- CellControllerRef xCurrentController = Controller();
- if (xCurrentController.is() && xCurrentController->IsValueChangedFromSaved() && ((nRow != GetCurRow()) || (nCol != GetCurColumnId())))
- // the current controller is modified and the user wants to drop in another cell -> no chance
- // (when leaving the modified cell an error may occur - this is deadly while dragging)
- break;
+ CellControllerRef xCurrentController = Controller();
+ if (xCurrentController.is() && xCurrentController->IsValueChangedFromSaved() && ((nRow != GetCurRow()) || (nCol != GetCurColumnId())))
+ // the current controller is modified and the user wants to drop in another cell -> no chance
+ // (when leaving the modified cell an error may occur - this is deadly while dragging)
+ break;
- Reference< XPropertySet > xField = getField(GetModelColumnPos(nCol));
- if (!xField.is())
- // the column is not valid bound (for instance a binary field)
- break;
+ Reference< XPropertySet > xField = getField(GetModelColumnPos(nCol));
+ if (!xField.is())
+ // the column is not valid bound (for instance a binary field)
+ break;
- try
- {
- if (::comphelper::getBOOL(xField->getPropertyValue(PROPERTY_ISREADONLY)))
+ try
+ {
+ if (::comphelper::getBOOL(xField->getPropertyValue(PROPERTY_ISREADONLY)))
+ break;
+ }
+ catch (const Exception& )
+ {
+ // assume RO
break;
- }
- catch (const Exception& )
- {
- // assume RO
- break;
- }
+ }
- try
- {
- // assume that text can be dropped into a field if the column has a css::awt::XTextComponent interface
- Reference< XIndexAccess > xColumnControls(static_cast<css::form::XGridPeer*>(GetPeer()), UNO_QUERY);
- if (xColumnControls.is())
+ try
{
- Reference< css::awt::XTextComponent > xColControl(
- xColumnControls->getByIndex(GetViewColumnPos(nCol)),
- css::uno::UNO_QUERY);
- if (xColControl.is())
+ // assume that text can be dropped into a field if the column has a css::awt::XTextComponent interface
+ Reference< XIndexAccess > xColumnControls(static_cast<css::form::XGridPeer*>(GetPeer()), UNO_QUERY);
+ if (xColumnControls.is())
{
- m_bActivatingForDrop = true;
- GoToRowColumnId(nRow, nCol);
- m_bActivatingForDrop = false;
-
- nAction = DND_ACTION_COPY;
+ Reference< css::awt::XTextComponent > xColControl(
+ xColumnControls->getByIndex(GetViewColumnPos(nCol)),
+ css::uno::UNO_QUERY);
+ if (xColControl.is())
+ {
+ m_bActivatingForDrop = true;
+ GoToRowColumnId(nRow, nCol);
+ m_bActivatingForDrop = false;
+
+ nAction = DND_ACTION_COPY;
+ }
}
}
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION("dbaccess");
- }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION("dbaccess");
+ }
- } while (false);
+ } while (false);
if(nAction != DND_ACTION_COPY && GetEmptyRow().is())
{
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index c036f8bdee82..74983ef30bb6 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -227,7 +227,7 @@ namespace dbaui
[](const Type& type)
{ return type == cppu::UnoType<XScriptInvocationContext>::get(); } );
aTypes.realloc( std::distance(aTypes.begin(), newEnd) );
- }
+ }
return aTypes;
}
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index bda1b1678190..4db98a876b05 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -421,7 +421,7 @@ void UpdateInstallDialog::Thread::installExtensions()
m_dialog.m_xStatusbar->set_percentage(
(sal::static_int_cast<sal_uInt16>(100) * count) /
sal::static_int_cast<sal_uInt16>(m_aVecUpdateData.size()));
- }
+ }
m_dialog.m_xFt_extension_name->set_label(updateData.aInstalledPackage->getDisplayName());
}
bool bError = false;
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index d24811621d72..63f684666857 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -521,7 +521,7 @@ void syncRepositories(
restarter->requestRestart(xCmdEnv.is() ? xCmdEnv->getInteractionHandler() :
Reference<task::XInteractionHandler>());
}
- }
+ }
#endif
}
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index f41836f8e4d0..40b253587b81 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -114,7 +114,7 @@ BackendImpl::BackendImpl(
OUString dbFile = makeURL(getCachePath(), "backenddb.xml");
m_backendDb.reset(
new ExecutableBackendDb(getComponentContext(), dbFile));
- }
+ }
}
// XServiceInfo
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index f2dd75ccca6e..8d8d234858c9 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -285,7 +285,7 @@ BackendImpl::BackendImpl(
dbFile = makeURL(dbFile, "backenddb.xml");
m_backendDb.reset(
new ExtensionBackendDb(getComponentContext(), dbFile));
- }
+ }
}
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 76f3adcb6e9c..385761a81230 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -786,7 +786,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
// Then send args
bSentArgs = send_args(fd, pCwdPath);
- }
+ }
close(fd);
}
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 624227a5f64e..bc72db490fe4 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1923,7 +1923,7 @@ namespace accessibility
//while ( preWordStart > 0 && aBoundary.startPos == curWordStart)
while ( (preWordStart >= 0 && !bWord ) || ( aBoundary.endPos > curWordStart ) )
- {
+ {
preWordStart--;
bWord = implGetWordBoundary( sText, aBoundary, preWordStart );
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index ee199b663855..8a6e0a68baca 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -148,9 +148,8 @@ EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
// dependent on a secondary.
SfxItemPool* pPool = &aEditDoc.GetItemPool();
while (pPool->GetSecondaryPool() && pPool->GetName() != "EditEngineItemPool")
- {
+ {
pPool = pPool->GetSecondaryPool();
-
}
DBG_ASSERT(pPool && pPool->GetName() == "EditEngineItemPool",
@@ -1505,7 +1504,7 @@ bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
editeng::HangulHanjaConversion::IsChinese( nSrcLang ));
if (bHasConvTxt)
return bHasConvTxt;
- }
+ }
}
return bHasConvTxt;
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 4507cd5523b5..b58c19492650 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -834,7 +834,7 @@ bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rT
SID_ATTR_CHAR_UNDERLINE,
aSvxUnderlineItem);
}
- }
+ }
return -1 != nFndPos;
}
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 6d29cd972fae..3f28fb1385ff 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -108,17 +108,17 @@ static SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
<< " and we look for " << aURL);
OUString aName = xModel->getURL() ;
if (aName.isEmpty())
+ {
+ uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_SET_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
+ xProps->getPropertyValue("Title") >>= aName;
+ aName = aName.getToken(0, '-').trim();
+ if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 )
{
- uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_SET_THROW );
- uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
- xProps->getPropertyValue("Title") >>= aName;
- aName = aName.getToken(0, '-').trim();
- if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 )
- {
- pFoundShell = pShell;
- break;
- }
+ pFoundShell = pShell;
+ break;
}
+ }
if ( sMacroURLOrPath.endsWithIgnoreAsciiCase( ".dot" ) )
{
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index df873c2bf122..1b5a30110a94 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2516,7 +2516,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind )
pMasterPersist = &(*pPageList)[ nMasterIndex ];
}
m_pPPTStyleSheet = pMasterPersist->xStyleSheet.get();
- }
+ }
}
if ( !m_pPPTStyleSheet )
m_pPPTStyleSheet = m_pDefaultSheet;
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 69deeb36ee71..4d60054317c0 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -120,13 +120,13 @@ OdfFlatXml::importer(
sal_Int32 paramCount = sourceData.getLength();
for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++)
- {
- paramName = sourceData[paramIdx].Name;
- if ( paramName == "InputStream" )
- sourceData[paramIdx].Value >>= inputStream;
- else if ( paramName == "URL" )
- sourceData[paramIdx].Value >>= url;
- }
+ {
+ paramName = sourceData[paramIdx].Name;
+ if ( paramName == "InputStream" )
+ sourceData[paramIdx].Value >>= inputStream;
+ else if ( paramName == "URL" )
+ sourceData[paramIdx].Value >>= url;
+ }
OSL_ASSERT(inputStream.is());
if (!inputStream.is())
@@ -179,13 +179,13 @@ OdfFlatXml::importer(
sal_Int32 paramCount = sourceData.getLength();
for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++)
- {
- paramName = sourceData[paramIdx].Name;
- if ( paramName == "InputStream" )
- sourceData[paramIdx].Value >>= inputStream;
- else if ( paramName == "URL" )
- sourceData[paramIdx].Value >>= url;
- }
+ {
+ paramName = sourceData[paramIdx].Name;
+ if ( paramName == "InputStream" )
+ sourceData[paramIdx].Value >>= inputStream;
+ else if ( paramName == "URL" )
+ sourceData[paramIdx].Value >>= url;
+ }
OSL_ASSERT(inputStream.is());
if (!inputStream.is())
@@ -226,17 +226,17 @@ OdfFlatXml::exporter(const Sequence< PropertyValue >& sourceData,
// Read output stream and target URL from the parameters given in sourceData.
sal_Int32 paramCount = sourceData.getLength();
for (sal_Int32 paramIdx = 0; paramIdx < paramCount; paramIdx++)
- {
- paramName = sourceData[paramIdx].Name;
- if ( paramName == "OutputStream" )
- sourceData[paramIdx].Value >>= outputStream;
- }
+ {
+ paramName = sourceData[paramIdx].Name;
+ if ( paramName == "OutputStream" )
+ sourceData[paramIdx].Value >>= outputStream;
+ }
if (!getDelegate().is())
- {
- Reference< XDocumentHandler > saxWriter = Writer::create(m_xContext);
- setDelegate(saxWriter);
- }
+ {
+ Reference< XDocumentHandler > saxWriter = Writer::create(m_xContext);
+ setDelegate(saxWriter);
+ }
// get data source interface ...
Reference<XActiveDataSource> dataSource(getDelegate(), UNO_QUERY);
OSL_ASSERT(dataSource.is());
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index a5fe44536d32..fbf3561352c3 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1282,14 +1282,14 @@ void SVGTextWriter::startTextShape()
// if text is rotated, set transform matrix at text element
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetOrientation() )
- {
- Point aRot( maTextPos );
- OUString aTransform = "rotate(" +
- OUString::number( rFont.GetOrientation().get() * -0.1 ) + " " +
- OUString::number( aRot.X() ) + " " +
- OUString::number( aRot.Y() ) + ")";
- mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
- }
+ {
+ Point aRot( maTextPos );
+ OUString aTransform = "rotate(" +
+ OUString::number( rFont.GetOrientation().get() * -0.1 ) + " " +
+ OUString::number( aRot.X() ) + " " +
+ OUString::number( aRot.Y() ) + ")";
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform );
+ }
mpTextShapeElem.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, mbIWS ));
startTextParagraph();
@@ -2876,7 +2876,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
SvXMLElementExport aRefElem( mrExport, XML_NAMESPACE_NONE, "use", true, true );
return;
- }
+ }
}
BitmapEx aBmpEx( rBmpEx );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index c00301bacfc3..032e00782a7b 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -442,10 +442,10 @@ void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp )
aSourceData[i++].Value <<= true;
if( bUseDocType )
- {
- aSourceData[i ].Name = "DocType_Public";
- aSourceData[i++].Value <<= m_xFilterInfo->maDocType;
- }
+ {
+ aSourceData[i ].Name = "DocType_Public";
+ aSourceData[i++].Value <<= m_xFilterInfo->maDocType;
+ }
Reference< XExportFilter > xExporter( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.documentconversion.XSLTFilter", mxContext ), UNO_QUERY );
Reference< XDocumentHandler > xHandler( xExporter, UNO_QUERY );
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index e11777a59e8d..7ebc7aeb457d 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -217,9 +217,9 @@ namespace XSLT
css::uno::Reference<XInputStream> xis = m_transformer->getInputStream();
n = xis->readBytes(m_readBuf, len);
if (n > 0)
- {
- memcpy(buffer, m_readBuf.getArray(), n);
- }
+ {
+ memcpy(buffer, m_readBuf.getArray(), n);
+ }
return n;
}
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index f98b83b73c48..f7dcab9e5cdd 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -316,16 +316,16 @@ namespace XSLT
css::uno::Reference<XInputStream> xInputStream;
css::uno::Reference<XInteractionHandler> xInterActionHandler;
for (sal_Int32 i = 0; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- Any value = aSourceData[i].Value;
- if ( aName == "InputStream" )
- value >>= xInputStream;
- else if ( aName == "URL" )
- value >>= aURL;
- else if ( aName == "InteractionHandler" )
- value >>= xInterActionHandler;
- }
+ {
+ aName = aSourceData[i].Name;
+ Any value = aSourceData[i].Value;
+ if ( aName == "InputStream" )
+ value >>= xInputStream;
+ else if ( aName == "URL" )
+ value >>= aURL;
+ else if ( aName == "InteractionHandler" )
+ value >>= xInterActionHandler;
+ }
OSL_ASSERT(xInputStream.is());
if (!xInputStream.is())
return false;
@@ -350,7 +350,7 @@ namespace XSLT
OSL_ASSERT(xInputStream.is());
OSL_ASSERT(m_tcontrol.is());
if (xHandler.is() && xInputStream.is() && m_tcontrol.is())
- {
+ {
try
{
css::uno::Reference<css::io::XSeekable> xSeek(xInputStream, UNO_QUERY);
@@ -430,11 +430,11 @@ namespace XSLT
TOOLS_WARN_EXCEPTION("filter.xslt", "");
return false;
}
- }
+ }
else
- {
- return false;
- }
+ {
+ return false;
+ }
}
sal_Bool
@@ -456,16 +456,16 @@ namespace XSLT
css::uno::Reference<XInputStream> xInputStream;
css::uno::Reference<XInteractionHandler> xInterActionHandler;
for (sal_Int32 i = 0; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- Any value = aSourceData[i].Value;
- if ( aName == "InputStream" )
- value >>= xInputStream;
- else if ( aName == "URL" )
- value >>= aURL;
- else if ( aName == "InteractionHandler" )
- value >>= xInterActionHandler;
- }
+ {
+ aName = aSourceData[i].Name;
+ Any value = aSourceData[i].Value;
+ if ( aName == "InputStream" )
+ value >>= xInputStream;
+ else if ( aName == "URL" )
+ value >>= aURL;
+ else if ( aName == "InteractionHandler" )
+ value >>= xInterActionHandler;
+ }
OSL_ASSERT(xInputStream.is());
if (!xInputStream.is())
return false;
@@ -490,7 +490,7 @@ namespace XSLT
OSL_ASSERT(xInputStream.is());
OSL_ASSERT(m_tcontrol.is());
if (xFastParser.is() && xInputStream.is() && m_tcontrol.is())
- {
+ {
try
{
css::uno::Reference<css::io::XSeekable> xSeek(xInputStream, UNO_QUERY);
@@ -556,11 +556,11 @@ namespace XSLT
TOOLS_WARN_EXCEPTION("filter.xslt", "");
return false;
}
- }
+ }
else
- {
- return false;
- }
+ {
+ return false;
+ }
}
sal_Bool
@@ -582,23 +582,23 @@ namespace XSLT
// css::uno::Reference<XOutputStream> rOutputStream;
sal_Int32 nLength = aSourceData.getLength();
for (sal_Int32 i = 0; i < nLength; i++)
- {
- aName = aSourceData[i].Name;
- if ( aName == "DocType_Public" )
- aSourceData[i].Value >>= aDoctypePublic;
- else if ( aName == "OutputStream" )
- aSourceData[i].Value >>= m_rOutputStream;
- else if ( aName == "URL" )
- aSourceData[i].Value >>= sURL;
- }
+ {
+ aName = aSourceData[i].Name;
+ if ( aName == "DocType_Public" )
+ aSourceData[i].Value >>= aDoctypePublic;
+ else if ( aName == "OutputStream" )
+ aSourceData[i].Value >>= m_rOutputStream;
+ else if ( aName == "URL" )
+ aSourceData[i].Value >>= sURL;
+ }
if (!getDelegate().is())
- {
- // get the document writer
- setDelegate(css::uno::Reference<XExtendedDocumentHandler>(
- Writer::create(m_xContext),
- UNO_QUERY_THROW));
- }
+ {
+ // get the document writer
+ setDelegate(css::uno::Reference<XExtendedDocumentHandler>(
+ Writer::create(m_xContext),
+ UNO_QUERY_THROW));
+ }
// create transformer
Sequence<Any> args(4);
@@ -624,7 +624,7 @@ namespace XSLT
OSL_ASSERT(m_rOutputStream.is());
OSL_ASSERT(m_tcontrol.is());
if (m_tcontrol.is() && m_rOutputStream.is())
- {
+ {
// we want to be notified when the processing is done...
m_tcontrol->addListener(new XSLTFilterStreamListener(*this));
@@ -648,11 +648,11 @@ namespace XSLT
// we will start the transformation as soon as we receive the startDocument
// event.
return true;
- }
+ }
else
- {
- return false;
- }
+ {
+ return false;
+ }
}
// for the DocumentHandler implementation, we just proxy the
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 6464f3d52b0f..0af1f63f0e5e 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1739,8 +1739,8 @@ FormulaToken* FormulaTokenArrayPlainIterator::GetNextReferenceOrName()
// added to avoid warnings
}
}
- }
- }
+ }
+ }
return nullptr;
}
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 2f22d3d48b19..1f94a58436ae 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -760,7 +760,7 @@ void SvtFileDialog::OpenHdl_Impl(void const * pVoid)
m_aContent.disableInteractionHandler();
else if ( eInterActionHandlerType == SmartContent::IHT_DEFAULT )
m_aContent.enableDefaultInteractionHandler();
- }
+ }
if ( !bIsFolder // no existent folder
&& m_xImpl->m_xCbAutoExtension // auto extension is enabled in general
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index 6013812e0e7f..1101d77a94da 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -468,10 +468,10 @@ bool JobData::hasCorrectContext(const OUString& rModuleIdent) const
{
sal_Int32 nIndex = m_sContext.indexOf( rModuleIdent );
if ( nIndex >= 0 && ( nIndex+nModuleIdLen <= nContextLen ))
- {
- OUString sContextModule = m_sContext.copy( nIndex, nModuleIdLen );
- return sContextModule == rModuleIdent;
- }
+ {
+ OUString sContextModule = m_sContext.copy( nIndex, nModuleIdLen );
+ return sContextModule == rModuleIdent;
+ }
}
return false;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 917e4182e1e2..a717de1fa00f 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -1626,8 +1626,8 @@ sal_Bool SAL_CALL LayoutManager::requestElement( const OUString& rResourceURL )
if ( pToolbarManager && bComponentAttached )
{
- bNotify = pToolbarManager->requestToolbar( rResourceURL );
- }
+ bNotify = pToolbarManager->requestToolbar( rResourceURL );
+ }
}
else if ( aElementType.equalsIgnoreAsciiCase("dockingwindow"))
{
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index 70b6b9f41f2f..71639beb0bb5 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -392,9 +392,8 @@ sal_Int32 SAL_CALL DispatchRecorder::getCount()
css::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx)
{
- if (idx >= static_cast<sal_Int32>(m_aStatements.size())) {
+ if (idx >= static_cast<sal_Int32>(m_aStatements.size()))
throw css::lang::IndexOutOfBoundsException( "Dispatch recorder out of bounds" );
- }
Any element(&m_aStatements[idx],
cppu::UnoType<css::frame::DispatchStatement>::get());
@@ -411,12 +410,10 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const css::uno::An
Reference< XInterface >(), 2 );
}
- if (idx >= static_cast<sal_Int32>(m_aStatements.size())) {
- throw css::lang::IndexOutOfBoundsException(
+ if (idx >= static_cast<sal_Int32>(m_aStatements.size()))
+ throw css::lang::IndexOutOfBoundsException(
"Dispatch recorder out of bounds" );
- }
-
auto pStatement = o3tl::doAccess<css::frame::DispatchStatement>(element);
css::frame::DispatchStatement aStatement(
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 935b33171c15..c7526a4c591e 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -308,7 +308,7 @@ static bool LoadCommonHeader(HWPDrawingObject * hdo, unsigned short * link_info)
return true;
else
return false;
- }
+ }
if (size <= common_size)
return true;
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index a895caec1eab..dfd9af78b4b8 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -563,9 +563,9 @@ static hchar jaso2ks(hchar hh)
{
for (size_t i = 0; i < SAL_N_ELEMENTS(jaso_hh_code); i++)
if (hh == jaso_hh_code[i])
- {
- return sal::static_int_cast<hchar>(0xa4a1 + i);
- }
+ {
+ return sal::static_int_cast<hchar>(0xa4a1 + i);
+ }
return 0;
}
@@ -1050,7 +1050,7 @@ int hcharconv(hchar ch, hchar *dest, int codeType)
else
dest[0] = 0xA1E0;
return 1;
- }
+ }
//printf("hcharconv Special[%04x]\n",ch);
dest[0] = ch;
return 1;
@@ -1085,16 +1085,16 @@ int kssm_hangul_to_ucs2(hchar ch, hchar *dest)
dest[0] = 0x25a1; // empty square.
return 1;
}
- }
- else if ( choseong == 1 && jongseong == 1 ){ /* Vowel */
+ }
+ else if ( choseong == 1 && jongseong == 1 ){ /* Vowel */
dest[0] = joongseong_to_unicode[joongseong];
return 1;
- }
- else if ( joongseong == 2 && jongseong == 1 ){ /* Consonant */
+ }
+ else if ( joongseong == 2 && jongseong == 1 ){ /* Consonant */
dest[0] = choseong_to_unicode[choseong];
return 1;
}
- else if( choseong > 20 || choseong == 0 ||
+ else if( choseong > 20 || choseong == 0 ||
joongseong == 17 || joongseong == 24 ||
joongseong == 25 || joongseong > 29 ||
jongseong == 0 || jongseong == 18 ||
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index a9bd14b57b11..6437004143cb 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -235,7 +235,7 @@ size_t HStreamIODev::skipBlock(size_t size)
}
return size - remain;
}
- }
+ }
return _stream->skipBytes(size);
}
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 8be445919ed4..4c79a6c1211f 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -291,7 +291,7 @@ void HWPFile::TagsRead()
return;
if (size <= 0 && tag > 0){
continue;
- }
+ }
if (tag == FILETAG_END_OF_COMPRESSED ||
tag == FILETAG_END_OF_UNCOMPRESSED)
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 28506b369dac..be8cdc7bb82d 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -125,12 +125,12 @@ bool Bookmark::Read(HWPFile & hwpf)
return false;
if (len != 34)// 2 * (BMK_COMMENT_LEN + 1) + 2
- {
+ {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
if (hh != dummy || dummy != CH_BOOKMARK) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.Read2b(id, BMK_COMMENT_LEN + 1);
hwpf.Read2b(&type, 1);
@@ -145,7 +145,7 @@ bool DateFormat::Read(HWPFile & hwpf)
return false;
if (hh != dummy || CH_DATE_FORM != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return true;
}
@@ -158,7 +158,7 @@ bool DateCode::Read(HWPFile & hwpf)
return false;
if (hh != dummy || CH_DATE_CODE != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.AddDateFormat(this);
return true;
}
@@ -176,7 +176,7 @@ bool Tab::Read(HWPFile & hwpf)
return false;
if (hh != dummy || CH_TAB != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return true;
}
@@ -217,7 +217,7 @@ bool TxtBox::Read(HWPFile & hwpf)
if (hh != dummy || CH_TEXT_BOX != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.AddBox(this);
hwpf.Read2b(&style.cap_len, 1);
hwpf.Read2b(&dummy1, 1);
@@ -539,7 +539,7 @@ bool Line::Read(HWPFile & hwpf)
if (hh != dummy || CH_LINE != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.AddBox(this);
style.boxnum = fboxnum++;
@@ -598,7 +598,7 @@ bool Hidden::Read(HWPFile & hwpf)
hwpf.Read2b(&dummy, 1);
if (hh != dummy || CH_HIDDEN != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.ReadBlock(info, 8);
hwpf.ReadParaList(plist);
@@ -623,7 +623,7 @@ bool HeaderFooter::Read(HWPFile & hwpf)
hwpf.Read2b(&dummy, 1);
if (hh != dummy || CH_HEADER_FOOTER != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.ReadBlock(info, 8);
hwpf.Read1b(type);
@@ -655,7 +655,7 @@ bool Footnote::Read(HWPFile & hwpf)
hwpf.Read2b(&dummy, 1);
if (hh != dummy || CH_FOOTNOTE != dummy) {
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
hwpf.ReadBlock(info, 8);
hwpf.Read2b(&number, 1);
@@ -686,7 +686,7 @@ bool AutoNum::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -709,7 +709,7 @@ bool NewNum::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -731,7 +731,7 @@ bool ShowPageNum::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
m_nPageNumber = hwpf.getCurrentPage();
hwpf.setMaxSettedPage();
hwpf.AddPageNumber(this);
@@ -755,7 +755,7 @@ bool PageNumCtrl::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -773,7 +773,7 @@ bool MailMerge::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -791,7 +791,7 @@ bool Compose::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -810,7 +810,7 @@ bool Hyphen::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -831,7 +831,7 @@ bool TocMark::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -852,7 +852,7 @@ bool IndexMark::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -878,7 +878,7 @@ bool Outline::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -897,7 +897,7 @@ bool KeepSpace::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
@@ -916,7 +916,7 @@ bool FixedSpace::Read(HWPFile & hwpf)
if (hh != dummy){
return hwpf.SetState(HWP_InvalidFileFormat);
- }
+ }
return !hwpf.State();
}
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 3b69da304af4..45cb722561ca 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -2935,12 +2935,12 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
{
if( n > 0 )
if( para->GetCharShape(n)->index != para->GetCharShape(n-1)->index && !infield )
- {
+ {
if( !pstart ) {STARTP;}
if( !tstart ) {STARTT;}
makeChars(str);
ENDT;
- }
+ }
if( para->hhstr[n]->hh == CH_SPACE )
firstspace = 0;
else
@@ -3749,7 +3749,7 @@ void HwpReader::makeHyperText(TxtBox * hbox)
OUString(tmp2.c_str(), tmp2.size()+1, RTL_TEXTENCODING_EUC_KR));
}
- }
+ }
else
{
padd("xlink:type", sXML_CDATA, "simple");
@@ -4297,8 +4297,9 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
padd("draw:start-angle", sXML_CDATA, Double2Str(start_angle * 180. / PI));
padd("draw:end-angle", sXML_CDATA, Double2Str(end_angle * 180. / PI));
- }
- else{
+ }
+ else
+ {
if( drawobj->u.line_arc.flip == 0 )
{
padd("draw:start-angle", sXML_CDATA, "270");
@@ -4420,7 +4421,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
oustr.append(ascii(buf));
}
- }
+ }
padd("svg:d", sXML_CDATA, oustr.makeStringAndClear());
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 2cf76bf3e49f..5d0cef7e2f9d 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -1085,7 +1085,7 @@ YY_DECL
int yy_act;
if ( yy_init )
- {
+ {
yy_init = 0;
#ifdef YY_USER_INIT
@@ -1106,10 +1106,10 @@ YY_DECL
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
- }
+ }
while ( true ) /* loops until end-of-file is reached */
- {
+ {
yy_cp = yy_c_buf_p;
/* Support of yytext. */
@@ -1123,32 +1123,32 @@ YY_DECL
yy_current_state = yy_start;
yy_match:
do
- {
+ {
YY_CHAR yy_c = sal::static_int_cast<YY_CHAR>(yy_ec[YY_SC_TO_UI(*yy_cp)]);
if ( yy_accept[yy_current_state] )
- {
+ {
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
- }
+ }
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+ {
yy_current_state = static_cast<int>(yy_def[yy_current_state]);
if ( yy_current_state >= 994 )
yy_c = sal::static_int_cast<YY_CHAR>(yy_meta[static_cast<unsigned int>(yy_c)]);
- }
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + static_cast<unsigned int>(yy_c)];
++yy_cp;
- }
+ }
while ( yy_base[yy_current_state] != 1315 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
- { /* have to back up */
+ { /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
- }
+ }
YY_DO_BEFORE_ACTION;
@@ -1362,7 +1362,7 @@ case YY_STATE_EOF(INITIAL):
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
- {
+ {
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
@@ -1375,7 +1375,7 @@ case YY_STATE_EOF(INITIAL):
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
+ }
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
@@ -1385,7 +1385,7 @@ case YY_STATE_EOF(INITIAL):
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
+ { /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
@@ -1406,19 +1406,19 @@ case YY_STATE_EOF(INITIAL):
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
- {
+ {
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
- }
+ }
else
- {
+ {
yy_cp = yy_c_buf_p;
goto yy_find_action;
- }
}
+ }
else switch ( yy_get_next_buffer() )
{
@@ -1427,7 +1427,7 @@ case YY_STATE_EOF(INITIAL):
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
- {
+ {
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
@@ -1441,13 +1441,13 @@ case YY_STATE_EOF(INITIAL):
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
- }
+ }
else
- {
+ {
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
- }
+ }
}
break;
@@ -1480,7 +1480,7 @@ case YY_STATE_EOF(INITIAL):
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
- } /* end of scanning one token */
+ } /* end of scanning one token */
} /* end of yylex */
@@ -1504,23 +1504,23 @@ static int yy_get_next_buffer()
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
+ { /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
+ {
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
- }
+ }
else
- {
+ {
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
- }
}
+ }
/* Try to read more data. */
@@ -1537,12 +1537,12 @@ static int yy_get_next_buffer()
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
- {
+ {
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
+ { /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
@@ -1555,7 +1555,7 @@ static int yy_get_next_buffer()
static_cast<int>(yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
- {
+ {
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
@@ -1567,7 +1567,7 @@ static int yy_get_next_buffer()
/* Include room in for 2 EOB chars. */
yy_flex_realloc( static_cast<void *>(b->yy_ch_buf),
b->yy_buf_size + 2 ));
- }
+ }
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = nullptr;
@@ -1581,7 +1581,7 @@ static int yy_get_next_buffer()
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
- }
+ }
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
@@ -1591,23 +1591,23 @@ static int yy_get_next_buffer()
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
- }
+ }
if ( yy_n_chars == 0 )
- {
+ {
if ( number_to_move == YY_MORE_ADJ )
- {
+ {
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
- }
+ }
else
- {
+ {
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
- }
}
+ }
else
ret_val = EOB_ACT_CONTINUE_SCAN;
@@ -1632,21 +1632,21 @@ static yy_state_type yy_get_previous_state()
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
+ {
YY_CHAR yy_c = sal::static_int_cast<YY_CHAR>(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
- {
+ {
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
- }
+ }
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+ {
yy_current_state = static_cast<int>(yy_def[yy_current_state]);
if ( yy_current_state >= 994 )
yy_c = sal::static_int_cast<YY_CHAR>(yy_meta[static_cast<unsigned int>(yy_c)]);
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + static_cast<unsigned int>(yy_c)];
}
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + static_cast<unsigned int>(yy_c)];
+ }
return yy_current_state;
}
@@ -1670,16 +1670,16 @@ yy_state_type yy_current_state;
YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
- {
+ {
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
- }
+ }
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+ {
yy_current_state = static_cast<int>(yy_def[yy_current_state]);
if ( yy_current_state >= 994 )
yy_c = sal::static_int_cast<YY_CHAR>(yy_meta[static_cast<unsigned int>(yy_c)]);
- }
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + static_cast<unsigned int>(yy_c)];
yy_is_jam = (yy_current_state == 993);
@@ -1712,12 +1712,12 @@ YY_BUFFER_STATE new_buffer;
return;
if ( yy_current_buffer )
- {
+ {
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
- }
+ }
yy_current_buffer = new_buffer;
yy_load_buffer_state();
diff --git a/i18npool/source/breakiterator/breakiterator_th.cxx b/i18npool/source/breakiterator/breakiterator_th.cxx
index 659a50e44e70..df78aeab3afe 100644
--- a/i18npool/source/breakiterator/breakiterator_th.cxx
+++ b/i18npool/source/breakiterator/breakiterator_th.cxx
@@ -62,9 +62,13 @@ sal_Int32 SAL_CALL BreakIterator_th::previousCharacters( const OUString& Text,
if (m_aNextCellIndex[nStartPos-1] == 0) // not a CTL character
return BreakIterator_Unicode::previousCharacters(Text, nStartPos, rLocale,
nCharacterIteratorMode, nCount, nDone);
- else while (nCount > 0 && m_aNextCellIndex[nStartPos - 1] > 0) {
- nCount--; nDone++;
- nStartPos = m_aPreviousCellIndex[nStartPos - 1];
+ else
+ {
+ while (nCount > 0 && m_aNextCellIndex[nStartPos - 1] > 0)
+ {
+ nCount--; nDone++;
+ nStartPos = m_aPreviousCellIndex[nStartPos - 1];
+ }
}
} else
nStartPos = 0;
@@ -89,9 +93,13 @@ sal_Int32 SAL_CALL BreakIterator_th::nextCharacters(const OUString& Text,
if (m_aNextCellIndex[nStartPos] == 0) // not a CTL character
return BreakIterator_Unicode::nextCharacters(Text, nStartPos, rLocale,
nCharacterIteratorMode, nCount, nDone);
- else while (nCount > 0 && m_aNextCellIndex[nStartPos] > 0) {
- nCount--; nDone++;
- nStartPos = m_aNextCellIndex[nStartPos];
+ else
+ {
+ while (nCount > 0 && m_aNextCellIndex[nStartPos] > 0)
+ {
+ nCount--; nDone++;
+ nStartPos = m_aNextCellIndex[nStartPos];
+ }
}
} else
nStartPos = len;
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index ca34f91e157b..a4a00c46a1ad 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -145,77 +145,52 @@ void BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Locale& rLocal
else
icuBI->mpValue.reset();
- if (!bInMap && rule) do {
- const uno::Sequence< OUString > breakRules = LocaleDataImpl::get()->getBreakIteratorRules(rLocale);
+ if (!bInMap && rule)
+ do
+ {
+ const uno::Sequence< OUString > breakRules = LocaleDataImpl::get()->getBreakIteratorRules(rLocale);
- status = U_ZERO_ERROR;
- udata_setAppData("OpenOffice", OpenOffice_dat, &status);
- if ( !U_SUCCESS(status) ) throw uno::RuntimeException();
+ status = U_ZERO_ERROR;
+ udata_setAppData("OpenOffice", OpenOffice_dat, &status);
+ if ( !U_SUCCESS(status) ) throw uno::RuntimeException();
- std::shared_ptr<OOoRuleBasedBreakIterator> rbi;
+ std::shared_ptr<OOoRuleBasedBreakIterator> rbi;
- if (breakRules.getLength() > breakType && !breakRules[breakType].isEmpty())
- {
- // langtag;rule;breakType
- const OString aBIMapRuleTypeKey( aLangtagStr + ";" + rule + ";" + OString::number(breakType));
- aMapIt = theBIMap.find( aBIMapRuleTypeKey);
- bInMap = (aMapIt != theBIMap.end());
- if (bInMap)
+ if (breakRules.getLength() > breakType && !breakRules[breakType].isEmpty())
{
- icuBI->mpValue = aMapIt->second;
- icuBI->maBIMapKey = aBIMapGlobalKey;
- theBIMap.insert( std::make_pair( aBIMapGlobalKey, icuBI->mpValue));
- break; // do
- }
+ // langtag;rule;breakType
+ const OString aBIMapRuleTypeKey( aLangtagStr + ";" + rule + ";" + OString::number(breakType));
+ aMapIt = theBIMap.find( aBIMapRuleTypeKey);
+ bInMap = (aMapIt != theBIMap.end());
+ if (bInMap)
+ {
+ icuBI->mpValue = aMapIt->second;
+ icuBI->maBIMapKey = aBIMapGlobalKey;
+ theBIMap.insert( std::make_pair( aBIMapGlobalKey, icuBI->mpValue));
+ break; // do
+ }
- rbi = std::make_shared<OOoRuleBasedBreakIterator>(udata_open("OpenOffice", "brk",
- OUStringToOString(breakRules[breakType], RTL_TEXTENCODING_ASCII_US).getStr(), &status), status);
+ rbi = std::make_shared<OOoRuleBasedBreakIterator>(udata_open("OpenOffice", "brk",
+ OUStringToOString(breakRules[breakType], RTL_TEXTENCODING_ASCII_US).getStr(), &status), status);
- if (U_SUCCESS(status))
- {
- icuBI->mpValue = std::make_shared<BI_ValueData>();
- icuBI->mpValue->mpBreakIterator = rbi;
- theBIMap.insert( std::make_pair( aBIMapRuleTypeKey, icuBI->mpValue));
- }
- else
- {
- rbi.reset();
- }
- }
- //use icu's breakiterator for Thai, Tibetan and Dzongkha
- else if (rLocale.Language != "th" && rLocale.Language != "lo" && rLocale.Language != "bo" && rLocale.Language != "dz" && rLocale.Language != "km")
- {
- // language;rule (not langtag, unless we'd actually load such)
- OString aLanguage( LanguageTag( rLocale).getLanguage().toUtf8());
- const OString aBIMapRuleKey( aLanguage + ";" + rule);
- aMapIt = theBIMap.find( aBIMapRuleKey);
- bInMap = (aMapIt != theBIMap.end());
- if (bInMap)
- {
- icuBI->mpValue = aMapIt->second;
- icuBI->maBIMapKey = aBIMapGlobalKey;
- theBIMap.insert( std::make_pair( aBIMapGlobalKey, icuBI->mpValue));
- break; // do
- }
-
- status = U_ZERO_ERROR;
- OString aUDName = OString::Concat(rule) + "_" + aLanguage;
- UDataMemory* pUData = udata_open("OpenOffice", "brk", aUDName.getStr(), &status);
- if( U_SUCCESS(status) )
- rbi = std::make_shared<OOoRuleBasedBreakIterator>( pUData, status);
- if ( U_SUCCESS(status) )
- {
- icuBI->mpValue = std::make_shared<BI_ValueData>();
- icuBI->mpValue->mpBreakIterator = rbi;
- theBIMap.insert( std::make_pair( aBIMapRuleKey, icuBI->mpValue));
+ if (U_SUCCESS(status))
+ {
+ icuBI->mpValue = std::make_shared<BI_ValueData>();
+ icuBI->mpValue->mpBreakIterator = rbi;
+ theBIMap.insert( std::make_pair( aBIMapRuleTypeKey, icuBI->mpValue));
+ }
+ else
+ {
+ rbi.reset();
+ }
}
- else
+ //use icu's breakiterator for Thai, Tibetan and Dzongkha
+ else if (rLocale.Language != "th" && rLocale.Language != "lo" && rLocale.Language != "bo" && rLocale.Language != "dz" && rLocale.Language != "km")
{
- rbi.reset();
-
- // ;rule (only)
- const OString aBIMapRuleOnlyKey( OString::Concat(";") + rule);
- aMapIt = theBIMap.find( aBIMapRuleOnlyKey);
+ // language;rule (not langtag, unless we'd actually load such)
+ OString aLanguage( LanguageTag( rLocale).getLanguage().toUtf8());
+ const OString aBIMapRuleKey( aLanguage + ";" + rule);
+ aMapIt = theBIMap.find( aBIMapRuleKey);
bInMap = (aMapIt != theBIMap.end());
if (bInMap)
{
@@ -226,78 +201,107 @@ void BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Locale& rLocal
}
status = U_ZERO_ERROR;
- pUData = udata_open("OpenOffice", "brk", rule, &status);
+ OString aUDName = OString::Concat(rule) + "_" + aLanguage;
+ UDataMemory* pUData = udata_open("OpenOffice", "brk", aUDName.getStr(), &status);
if( U_SUCCESS(status) )
rbi = std::make_shared<OOoRuleBasedBreakIterator>( pUData, status);
if ( U_SUCCESS(status) )
{
icuBI->mpValue = std::make_shared<BI_ValueData>();
icuBI->mpValue->mpBreakIterator = rbi;
- theBIMap.insert( std::make_pair( aBIMapRuleOnlyKey, icuBI->mpValue));
+ theBIMap.insert( std::make_pair( aBIMapRuleKey, icuBI->mpValue));
}
else
{
rbi.reset();
+
+ // ;rule (only)
+ const OString aBIMapRuleOnlyKey( OString::Concat(";") + rule);
+ aMapIt = theBIMap.find( aBIMapRuleOnlyKey);
+ bInMap = (aMapIt != theBIMap.end());
+ if (bInMap)
+ {
+ icuBI->mpValue = aMapIt->second;
+ icuBI->maBIMapKey = aBIMapGlobalKey;
+ theBIMap.insert( std::make_pair( aBIMapGlobalKey, icuBI->mpValue));
+ break; // do
+ }
+
+ status = U_ZERO_ERROR;
+ pUData = udata_open("OpenOffice", "brk", rule, &status);
+ if( U_SUCCESS(status) )
+ rbi = std::make_shared<OOoRuleBasedBreakIterator>( pUData, status);
+ if ( U_SUCCESS(status) )
+ {
+ icuBI->mpValue = std::make_shared<BI_ValueData>();
+ icuBI->mpValue->mpBreakIterator = rbi;
+ theBIMap.insert( std::make_pair( aBIMapRuleOnlyKey, icuBI->mpValue));
+ }
+ else
+ {
+ rbi.reset();
+ }
}
}
- }
- if (rbi) {
-#if (U_ICU_VERSION_MAJOR_NUM < 58)
- // ICU 58 made RuleBasedBreakIterator::setBreakType() private
- // instead of protected, so the old workaround of
- // https://ssl.icu-project.org/trac/ticket/5498
- // doesn't work anymore. However, they also claim to have fixed
- // the cause that an initial fBreakType==-1 would lead to an
- // endless loop under some circumstances.
- // Let's see ...
- switch (rBreakType) {
- case LOAD_CHARACTER_BREAKITERATOR: rbi->publicSetBreakType(UBRK_CHARACTER); break;
- case LOAD_WORD_BREAKITERATOR: rbi->publicSetBreakType(UBRK_WORD); break;
- case LOAD_SENTENCE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_SENTENCE); break;
- case LOAD_LINE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_LINE); break;
+ if (rbi) {
+ #if (U_ICU_VERSION_MAJOR_NUM < 58)
+ // ICU 58 made RuleBasedBreakIterator::setBreakType() private
+ // instead of protected, so the old workaround of
+ // https://ssl.icu-project.org/trac/ticket/5498
+ // doesn't work anymore. However, they also claim to have fixed
+ // the cause that an initial fBreakType==-1 would lead to an
+ // endless loop under some circumstances.
+ // Let's see ...
+ switch (rBreakType) {
+ case LOAD_CHARACTER_BREAKITERATOR: rbi->publicSetBreakType(UBRK_CHARACTER); break;
+ case LOAD_WORD_BREAKITERATOR: rbi->publicSetBreakType(UBRK_WORD); break;
+ case LOAD_SENTENCE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_SENTENCE); break;
+ case LOAD_LINE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_LINE); break;
+ }
+ #endif
}
-#endif
- }
- } while (false);
-
- if (!icuBI->mpValue || !icuBI->mpValue->mpBreakIterator) do {
- // langtag;;;rBreakType (empty rule; empty breakType)
- const OString aBIMapLocaleTypeKey( aLangtagStr + ";;;" + OString::number(rBreakType));
- aMapIt = theBIMap.find( aBIMapLocaleTypeKey);
- bInMap = (aMapIt != theBIMap.end());
- if (bInMap)
+ } while (false);
+
+ if (!icuBI->mpValue || !icuBI->mpValue->mpBreakIterator)
+ do
{
- icuBI->mpValue = aMapIt->second;
- icuBI->maBIMapKey = aBIMapGlobalKey;
- theBIMap.insert( std::make_pair( aBIMapGlobalKey, icuBI->mpValue));
- break; // do
- }
+ // langtag;;;rBreakType (empty rule; empty breakType)
+ const OString aBIMapLocaleTypeKey( aLangtagStr + ";;;" + OString::number(rBreakType));
+ aMapIt = theBIMap.find( aBIMapLocaleTypeKey);
+ bInMap = (aMapIt != theBIMap.end());
+ if (bInMap)
+ {
+ icuBI->mpValue = aMapIt->second;
+ icuBI->maBIMapKey = aBIMapGlobalKey;
+ theBIMap.insert( std::make_pair( aBIMapGlobalKey, icuBI->mpValue));
+ break; // do
+ }
- icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( rLocale)));
- std::shared_ptr< icu::BreakIterator > pBI;
-
- status = U_ZERO_ERROR;
- switch (rBreakType) {
- case LOAD_CHARACTER_BREAKITERATOR:
- pBI.reset( icu::BreakIterator::createCharacterInstance(icuLocale, status) );
- break;
- case LOAD_WORD_BREAKITERATOR:
- pBI.reset( icu::BreakIterator::createWordInstance(icuLocale, status) );
- break;
- case LOAD_SENTENCE_BREAKITERATOR:
- pBI.reset( icu::BreakIterator::createSentenceInstance(icuLocale, status) );
- break;
- case LOAD_LINE_BREAKITERATOR:
- pBI.reset( icu::BreakIterator::createLineInstance(icuLocale, status) );
- break;
- }
- if ( !U_SUCCESS(status) || !pBI ) {
- throw uno::RuntimeException();
- }
- icuBI->mpValue = std::make_shared<BI_ValueData>();
- icuBI->mpValue->mpBreakIterator = pBI;
- theBIMap.insert( std::make_pair( aBIMapLocaleTypeKey, icuBI->mpValue));
- } while (false);
+ icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( rLocale)));
+ std::shared_ptr< icu::BreakIterator > pBI;
+
+ status = U_ZERO_ERROR;
+ switch (rBreakType) {
+ case LOAD_CHARACTER_BREAKITERATOR:
+ pBI.reset( icu::BreakIterator::createCharacterInstance(icuLocale, status) );
+ break;
+ case LOAD_WORD_BREAKITERATOR:
+ pBI.reset( icu::BreakIterator::createWordInstance(icuLocale, status) );
+ break;
+ case LOAD_SENTENCE_BREAKITERATOR:
+ pBI.reset( icu::BreakIterator::createSentenceInstance(icuLocale, status) );
+ break;
+ case LOAD_LINE_BREAKITERATOR:
+ pBI.reset( icu::BreakIterator::createLineInstance(icuLocale, status) );
+ break;
+ }
+ if ( !U_SUCCESS(status) || !pBI ) {
+ throw uno::RuntimeException();
+ }
+ icuBI->mpValue = std::make_shared<BI_ValueData>();
+ icuBI->mpValue->mpBreakIterator = pBI;
+ theBIMap.insert( std::make_pair( aBIMapLocaleTypeKey, icuBI->mpValue));
+ } while (false);
if (!icuBI->mpValue || !icuBI->mpValue->mpBreakIterator) {
throw uno::RuntimeException();
}
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 28ef390f4939..942e03271029 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -75,11 +75,12 @@ const LocaleNode* LocaleNode::getRoot() const
const LocaleNode * LocaleNode::findNode ( const char *name) const {
if (aName.equalsAscii(name))
return this;
- for (size_t i = 0; i< children.size(); i++) {
+ for (size_t i = 0; i< children.size(); i++)
+ {
const LocaleNode *n=children[i]->findNode(name);
if (n)
return n;
- }
+ }
return nullptr;
}
diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx
index 6f572080689c..7efddd564f0a 100644
--- a/i18nutil/source/utility/widthfolding.cxx
+++ b/i18nutil/source/utility/widthfolding.cxx
@@ -115,82 +115,82 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal
// This conversion algorithm requires at least one character.
if (nCount > 0) {
- // .. .. KA VOICE .. ..
- // ^ ^
- // previousChar currentChar
- // ^
- // position
- //
- // will be converted to
- // .. .. GA .. ..
-
- sal_Int32 *p = nullptr;
- sal_Int32 position = 0;
- if (useOffset) {
- // Allocate nCount length to offset argument.
- offset.realloc( nCount );
- p = offset.getArray();
- position = startPos;
- }
-
- //
- sal_Unicode previousChar = *src ++;
- sal_Unicode currentChar;
-
- // Composition: KA + voice-mark --> GA
- while (-- nCount > 0) {
- currentChar = *src ++;
- // see http://charts.unicode.org/Web/U3040.html Hiragana (U+3040..U+309F)
- // see http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF)
- // 0x3099 COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
- // 0x309a COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
- // 0x309b KATAKANA-HIRAGANA VOICED SOUND MARK
- // 0x309c KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
- int j = currentChar - 0x3099; // 0x3099, 0x309a, 0x309b, 0x309c ?
-
- if (2 <= j && j <= 3) // 0x309b or 0x309c
- j -= 2;
-
- if (0 <= j && j <= 1) {
- // 0 addresses a code point regarding 0x3099 or 0x309b (voiced sound mark),
- // 1 is 0x309a or 0x309c (semi-voiced sound mark)
- int i = int(previousChar - 0x3040); // i acts as an index of array
- bool bCompose = false;
-
- if (0 <= i && i <= (0x30ff - 0x3040) && composition_table[i][j])
- bCompose = true;
-
- // not to use combined KATAKANA LETTER VU
- if ( previousChar == 0x30a6 && (nFlags & WIDTHFOLDING_DONT_USE_COMBINED_VU) )
- bCompose = false;
+ // .. .. KA VOICE .. ..
+ // ^ ^
+ // previousChar currentChar
+ // ^
+ // position
+ //
+ // will be converted to
+ // .. .. GA .. ..
+
+ sal_Int32 *p = nullptr;
+ sal_Int32 position = 0;
+ if (useOffset) {
+ // Allocate nCount length to offset argument.
+ offset.realloc( nCount );
+ p = offset.getArray();
+ position = startPos;
+ }
- if( bCompose ){
- if (useOffset) {
- position ++;
- *p ++ = position ++;
+ //
+ sal_Unicode previousChar = *src ++;
+ sal_Unicode currentChar;
+
+ // Composition: KA + voice-mark --> GA
+ while (-- nCount > 0) {
+ currentChar = *src ++;
+ // see http://charts.unicode.org/Web/U3040.html Hiragana (U+3040..U+309F)
+ // see http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF)
+ // 0x3099 COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
+ // 0x309a COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ // 0x309b KATAKANA-HIRAGANA VOICED SOUND MARK
+ // 0x309c KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ int j = currentChar - 0x3099; // 0x3099, 0x309a, 0x309b, 0x309c ?
+
+ if (2 <= j && j <= 3) // 0x309b or 0x309c
+ j -= 2;
+
+ if (0 <= j && j <= 1) {
+ // 0 addresses a code point regarding 0x3099 or 0x309b (voiced sound mark),
+ // 1 is 0x309a or 0x309c (semi-voiced sound mark)
+ int i = int(previousChar - 0x3040); // i acts as an index of array
+ bool bCompose = false;
+
+ if (0 <= i && i <= (0x30ff - 0x3040) && composition_table[i][j])
+ bCompose = true;
+
+ // not to use combined KATAKANA LETTER VU
+ if ( previousChar == 0x30a6 && (nFlags & WIDTHFOLDING_DONT_USE_COMBINED_VU) )
+ bCompose = false;
+
+ if( bCompose ){
+ if (useOffset) {
+ position ++;
+ *p ++ = position ++;
+ }
+ *dst ++ = composition_table[i][j];
+ previousChar = *src ++;
+ nCount --;
+ continue;
+ }
}
- *dst ++ = composition_table[i][j];
- previousChar = *src ++;
- nCount --;
- continue;
+ if (useOffset)
+ *p ++ = position ++;
+ *dst ++ = previousChar;
+ previousChar = currentChar;
}
- }
- if (useOffset)
- *p ++ = position ++;
- *dst ++ = previousChar;
- previousChar = currentChar;
- }
- if (nCount == 0) {
- if (useOffset)
- *p = position;
- *dst ++ = previousChar;
- }
+ if (nCount == 0) {
+ if (useOffset)
+ *p = position;
+ *dst ++ = previousChar;
+ }
- *dst = u'\0';
+ *dst = u'\0';
- newStr->length = sal_Int32(dst - newStr->buffer);
- }
+ newStr->length = sal_Int32(dst - newStr->buffer);
+ }
if (useOffset)
offset.realloc(newStr->length);
return OUString(newStr, SAL_NO_ACQUIRE); // take ownership
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 627b158b3da4..6fc0a5e0af7c 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -115,7 +115,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() )
{
throw SvParseException( rInStm, "Attribute's " + pS->GetName() + " with different id's");
- }
+ }
}
else
{
@@ -125,7 +125,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
{
OString aStr = "Attribute " + pS->GetName() + " and Attribute " + rAttr.GetName() + " with equal id's";
throw SvParseException(rInStm, aStr);
- }
+ }
}
}
SvMetaClass * pSC = aSuperClass.get();
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index c77ad48ceb1d..d4c0f954367c 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -146,7 +146,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
// have to look in the inherited interfaces as well.
if ( !pDecl && m_nodeType == NT_interface )
pDecl = lookupInInherited(scopedName);
- }
+ }
}
if ( bFindFirstScope && (firstScope != scopedName) )
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 5715bd1c1d14..3fc24d50d5ca 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -206,7 +206,7 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
case CFG_TEXT_START: {
if ( sCurrentResTyp != sTokenName ) {
WorkOnResourceEnd();
- }
+ }
sCurrentResTyp = sTokenName;
OString sTemp = sToken.copy( sToken.indexOf( "xml:lang=" ));
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 460acb50b253..ed5e1c8777aa 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -183,7 +183,7 @@ void HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile
s_ResData.sFilename = sHelpFile;
ProcessHelp( aLangHM , sLanguage, &s_ResData , pMergeDataFile );
- }
+ }
file->Write(sPath);
}
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 6059ad19160d..a30feb000c3a 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -313,7 +313,7 @@ void XRMResExport::WorkOnDesc(
file.close();
memblock[size] = '\0';
rText = OString(memblock.get());
- }
+ }
WorkOnText( rOpenTag, rText );
EndOfText( rOpenTag, rOpenTag );
}
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index a98e4df84707..2a7f3843a5c5 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -426,17 +426,17 @@ void LwpPara::RegisterStyle()
else //use named style
{
if (m_pIndentOverride)
+ {
+ if (m_pIndentOverride->IsUseRelative() && GetParent())
{
- if (m_pIndentOverride->IsUseRelative() && GetParent())
- {
- xOverStyle.reset(new XFParaStyle);
- *xOverStyle = *pBaseStyle;
- OverrideIndent(nullptr,m_pIndentOverride.get(),xOverStyle.get());
- if (!m_ParentStyleName.isEmpty())
- xOverStyle->SetParentStyleName(m_ParentStyleName);
- m_StyleName = pXFStyleManager->AddStyle(std::move(xOverStyle)).m_pStyle->GetStyleName();
- }
+ xOverStyle.reset(new XFParaStyle);
+ *xOverStyle = *pBaseStyle;
+ OverrideIndent(nullptr,m_pIndentOverride.get(),xOverStyle.get());
+ if (!m_ParentStyleName.isEmpty())
+ xOverStyle->SetParentStyleName(m_ParentStyleName);
+ m_StyleName = pXFStyleManager->AddStyle(std::move(xOverStyle)).m_pStyle->GetStyleName();
}
+ }
}
if (IsInCell())
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 63f29a245ddc..12a996a45161 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3470,7 +3470,7 @@ void ChartExport::_exportAxis(
pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ));
pFS->endElement( FSNS( XML_c, XML_dispUnits ) );
}
- }
+ }
}
}
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index a853843930a6..62351c913567 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -133,7 +133,7 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con
break;
}
if ( nFirstPlaceholder )
- {
+ {
oox::drawingml::ShapePtr pPlaceholder;
if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree
{
@@ -158,9 +158,9 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con
pPPTShape->setReferenced( true );
pPPTShapePtr->setPlaceholder( pPlaceholder );
}
- }
+ }
}
- }
+ }
}
break;
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index e08bc607b6ca..762d1ba9919c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3607,9 +3607,9 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
uno::Reference< report::XReportComponent> xTextfield(pControl[1]->getUnoShape(),uno::UNO_QUERY_THROW);
xTextfield->setPositionY(aTextfield.Top());
+ }
}
}
- }
}
// not sure where the ownership of these passes too...
pControl[0].release();
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index c493f4ddf03e..405d5599ccae 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -184,24 +184,24 @@ std::pair<bool, bool> getTimestampFlags(char const *selector)
bool outputTimestamp = false;
bool outputRelativeTimer = false;
for (char const* p = selector; p && *p;)
- {
+ {
if (*p++ == '+')
- {
- char const * p1 = p;
- while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
- ++p1;
- }
- if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("TIMESTAMP")))
- outputTimestamp = true;
- else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER")))
- outputRelativeTimer = true;
- char const * p2 = p1;
- while (*p2 != '+' && *p2 != '-' && *p2 != '\0') {
- ++p2;
- }
- p = p2;
+ {
+ char const * p1 = p;
+ while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
+ ++p1;
}
- }
+ if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("TIMESTAMP")))
+ outputTimestamp = true;
+ else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER")))
+ outputRelativeTimer = true;
+ char const * p2 = p1;
+ while (*p2 != '+' && *p2 != '-' && *p2 != '\0') {
+ ++p2;
+ }
+ p = p2;
+ }
+ }
return std::pair(outputTimestamp, outputRelativeTimer);
}
diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx
index 4d7a7cb43da5..d08a6ed56894 100644
--- a/sal/osl/unx/file_stat.cxx
+++ b/sal/osl/unx/file_stat.cxx
@@ -148,10 +148,10 @@ namespace
void set_file_size(const struct stat& file_stat, oslFileStatus* pStat)
{
if (S_ISREG(file_stat.st_mode))
- {
- pStat->uFileSize = file_stat.st_size;
- pStat->uValidFields |= osl_FileStatus_Mask_FileSize;
- }
+ {
+ pStat->uFileSize = file_stat.st_size;
+ pStat->uValidFields |= osl_FileStatus_Mask_FileSize;
+ }
}
/* we only need to call stat or lstat if one of the
@@ -262,7 +262,7 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS
| RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT));
assert(ok); (void)ok;
pStat->uValidFields |= osl_FileStatus_Mask_FileName;
- }
+ }
return osl_File_E_None;
}
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index e4c595a6f0f7..9280ceb40406 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -4224,7 +4224,7 @@ namespace osl_Directory
{
bOk3 = true;
}
- }
+ }
// close a directory
nError1 = testDirectory.close();
diff --git a/sc/qa/extras/check_data_pilot_table.cxx b/sc/qa/extras/check_data_pilot_table.cxx
index f13768ffbc87..261fa23b303c 100644
--- a/sc/qa/extras/check_data_pilot_table.cxx
+++ b/sc/qa/extras/check_data_pilot_table.cxx
@@ -126,7 +126,7 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
{
oSheet->getCellByPosition(i, j)->setValue(i * (j + 1));
oSheet2->getCellByPosition(i, j)->setValue(i * (j + 2));
- }
+ }
}
// change a value of a cell and check the change in the data pilot
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 3191e3d5f816..1db11be0c777 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -835,7 +835,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
if (pValidationList)
pValidationList->UpdateInsertTab(aCxt);
- }
+ }
else
bValid = false;
}
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 882cc8c190bb..a4ec79b2c909 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -462,7 +462,7 @@ ScCaptionPtr::ScCaptionPtr( SdrCaptionObj* p ) :
if (p)
{
newHead();
- }
+ }
}
ScCaptionPtr::ScCaptionPtr( const ScCaptionPtr& r ) :
@@ -805,7 +805,7 @@ void ScCaptionPtr::dissolve()
ScCaptionPtr* p = pThat->mpNext;
pThat->clear();
pThat = p;
- }
+ }
assert(!mpHead && !mpNext && !mpCaption); // should had been cleared during list walk
delete pHead;
}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 40aeab42cfa2..b0885b08e5cb 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -516,7 +516,7 @@ bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
SCCOL nMaxX = 0;
SCROW nMaxY = 0;
for (SCCOL i=0; i<aCol.size(); i++)
- {
+ {
if (!aCol[i].IsEmptyData())
{
bFound = true;
@@ -539,7 +539,7 @@ bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
nMaxX = i;
}
}
- }
+ }
rEndCol = nMaxX;
rEndRow = nMaxY;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index af36f60f0d9e..1074fe1f65a1 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -964,10 +964,10 @@ public:
{
mnFilteredRows++;
continue;
-}
+ }
if (mbAsLink && mnFlags == InsertDeleteFlags::ALL)
-{
+ {
// with InsertDeleteFlags::ALL, also create links (formulas) for empty cells
setLink(nRow);
continue;
@@ -1043,12 +1043,12 @@ void ScTable::TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol,
SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered,
const std::vector<SCROW>& rFilteredRows, SCROW nRowDestOffset)
{
- SCROW nAttrRow1 = {}; // spurious -Werror=maybe-uninitialized
- SCROW nAttrRow2 = {}; // spurious -Werror=maybe-uninitialized
- const ScPatternAttr* pPattern;
- std::unique_ptr<ScAttrIterator> pAttrIter(aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
- while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) != nullptr )
- {
+ SCROW nAttrRow1 = {}; // spurious -Werror=maybe-uninitialized
+ SCROW nAttrRow2 = {}; // spurious -Werror=maybe-uninitialized
+ const ScPatternAttr* pPattern;
+ std::unique_ptr<ScAttrIterator> pAttrIter(aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
+ while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) != nullptr )
+ {
if ( !IsDefaultItem( pPattern ) )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx
index 6d44271f1203..30a47cbfbd93 100644
--- a/sc/source/core/opencl/op_financial.cxx
+++ b/sc/source/core/opencl/op_financial.cxx
@@ -412,11 +412,11 @@ void OpFV::GenSlidingWindowFunction(std::stringstream& ss,
ss << " double arg4 = " << GetBottom() << ";\n";
unsigned j = vSubArguments.size();
while (j--)
- {
+ {
FormulaToken* pCur = vSubArguments[j]->GetFormulaToken();
assert(pCur);
if(pCur->GetType() == formula::svSingleVectorRef)
- {
+ {
const formula::SingleVectorRefToken* pSVR =
static_cast< const formula::SingleVectorRefToken* >(pCur);
ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isnan(";
@@ -427,8 +427,8 @@ void OpFV::GenSlidingWindowFunction(std::stringstream& ss,
ss << " arg" << j << " = ";
ss << vSubArguments[j]->GenSlidingWindowDeclRef();
ss << ";\n";
- }
}
+ }
ss << " tmp = GetFV(arg0, arg1, arg2, arg3, arg4);\n";
ss << " return tmp;\n";
ss << "}";
@@ -463,11 +463,11 @@ void OpIPMT::GenSlidingWindowFunction(std::stringstream& ss,
ss << " double arg5 = " << GetBottom() << ";\n";
unsigned j = vSubArguments.size();
while (j--)
- {
+ {
FormulaToken* pCur = vSubArguments[j]->GetFormulaToken();
assert(pCur);
if(pCur->GetType() == formula::svSingleVectorRef)
- {
+ {
const formula::SingleVectorRefToken* pSVR =
static_cast< const formula::SingleVectorRefToken* >(pCur);
ss << " if(gid0 >= " << pSVR->GetArrayLength() << " || isnan(";
@@ -478,8 +478,8 @@ void OpIPMT::GenSlidingWindowFunction(std::stringstream& ss,
ss << " arg" << j << " = ";
ss << vSubArguments[j]->GenSlidingWindowDeclRef();
ss << ";\n";
- }
}
+ }
ss << " double pmt ;\n";
ss << " if(arg0 == 0.0)\n";
ss << " return 0;\n";
@@ -666,8 +666,8 @@ void OpDuration_ADD::GenSlidingWindowFunction(std::stringstream& ss,
ss << " arg" << j << " = ";
ss << vSubArguments[j]->GenSlidingWindowDeclRef();
ss << ";\n";
- }
}
+ }
ss << " int nNullDate = GetNullDate();\n";
ss << " tmp = GetDuration( nNullDate, (int)arg0, (int)arg1, arg2,";
ss << " arg3, (int)arg4, (int)arg5);\n";
@@ -4428,7 +4428,7 @@ tmpCur3);
ss<< " int buffer_fv_len = ";
ss<< tmpCurDVR3->GetArrayLength();
ss << ";\n";
- }
+ }
if(vSubArguments.size()>4)
{
diff --git a/sc/source/core/opencl/op_logical.cxx b/sc/source/core/opencl/op_logical.cxx
index 2d91b169723f..b9c70a1c7413 100644
--- a/sc/source/core/opencl/op_logical.cxx
+++ b/sc/source/core/opencl/op_logical.cxx
@@ -71,19 +71,19 @@ void OpAnd::GenSlidingWindowFunction(std::stringstream &ss,
ss << "0; i < " << nCurWindowSize << "; i++) {\n";
}
if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
- {
+ {
ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef();
ss <<")||i+gid0>="<<pCurDVR->GetArrayLength();
ss <<")\n";
ss <<" tmp = 1;\n else\n";
- }
+ }
else
- {
+ {
ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef();
ss <<")||i>="<<pCurDVR->GetArrayLength();
ss <<")\n";
ss <<" tmp = 1;\n else\n";
- }
+ }
ss <<" tmp = ";
ss <<vSubArguments[j]->GenSlidingWindowDeclRef()<<";\n";
ss <<" tmp"<<j<<" = tmp"<<j<<" && tmp;\n";
@@ -156,19 +156,19 @@ void OpOr::GenSlidingWindowFunction(std::stringstream &ss,
ss << "0; i < " << nCurWindowSize << "; i++) {\n";
}
if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
- {
+ {
ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef();
ss <<")||i+gid0>="<<pCurDVR->GetArrayLength();
ss <<")\n";
ss <<" tmp = 0;\n else\n";
- }
+ }
else
- {
+ {
ss <<" if(isnan("<<vSubArguments[j]->GenSlidingWindowDeclRef();
ss <<")||i>="<<pCurDVR->GetArrayLength();
ss <<")\n";
ss <<" tmp = 0;\n else\n";
- }
+ }
ss <<" tmp = ";
ss <<vSubArguments[j]->GenSlidingWindowDeclRef()<<";\n";
ss <<" tmp"<<j<<" = tmp"<<j<<" || tmp;\n";
@@ -272,19 +272,19 @@ void OpXor::GenSlidingWindowFunction(std::stringstream &ss,
ss << "0; i < " << nCurWindowSize << "; i++) {\n";
}
if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
- {
+ {
ss <<" if(isnan("<<rArg->GenSlidingWindowDeclRef();
ss <<")||i+gid0>="<<pCurDVR->GetArrayLength();
ss <<")\n";
ss <<" tmp = 0;\n else\n";
- }
+ }
else
- {
+ {
ss <<" if(isnan("<<rArg->GenSlidingWindowDeclRef();
ss <<")||i>="<<pCurDVR->GetArrayLength();
ss <<")\n";
ss <<" tmp = 0;\n else\n";
- }
+ }
ss <<" tmp = ";
ss <<rArg->GenSlidingWindowDeclRef()<<";\n";
ss <<" tmp0 = (tmp != 0);\n";
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index 01658ce987d1..4042e2511177 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -875,13 +875,13 @@ void OpAverageIfs::GenSlidingWindowFunction(std::stringstream &ss,
tmpss << " tmp += tmp0;\n";
tmpss << " count++;\n";
for(size_t j=1;j<vSubArguments.size();j+=2,m--)
- {
+ {
for(int n = 0;n<m+1;n++)
{
tmpss << " ";
}
tmpss<< "}\n";
- }
+ }
UnrollDoubleVector(ss,tmpss,pCurDVR,nCurWindowSize);
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 273f37dcc204..3de4417fb240 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -3081,7 +3081,7 @@ void OpCorrel::GenSlidingWindowFunction(
ss << "vYSum += pow(arg1 - vYMean, 2);\n\t\t\t";
ss << "vSum += (arg0 - vXMean)*(arg1 - vYMean);\n\t\t";
ss << "}\n\t\t";
- } else if (pCurDVRX->IsStartFixed() && !pCurDVRX->IsEndFixed()) {
+ } else if (pCurDVRX->IsStartFixed() && !pCurDVRX->IsEndFixed()) {
ss << "0; i < gid0 + " << nCurWindowSizeX << "; i++) {\n\t\t\t";
ss << "arg0 = " << vSubArguments[0]
->GenSlidingWindowDeclRef(true) << ";\n\t\t\t";
@@ -4127,7 +4127,7 @@ void OpPermut::GenSlidingWindowFunction(
if (i)
ss << ",";
vSubArguments[i]->GenSlidingWindowDecl(ss);
- }
+ }
ss << ") {\n";
ss <<" int gid0=get_global_id(0);\n";
ss <<" double inA;\n";
@@ -7353,7 +7353,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss,
if (i)
ss << ",";
vSubArguments[i]->GenSlidingWindowDecl(ss);
- }
+ }
ss << ") {\n";
ss << " int gid0 = get_global_id(0);\n";
ss << " double vSum = 0.0;\n";
@@ -7418,7 +7418,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss,
ss << " vSum += arg" << i << ";\n";
ss << " }\n";
}
-}
+ }
else if (pCur->GetType() == formula::svSingleVectorRef)
{
const formula::SingleVectorRefToken* pTVR =
@@ -7449,7 +7449,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss,
ss << " cnt++;\n";
ss << " vSum += arg" << i << ";\n";
}
- }
+ }
ss << " vMean = vSum / cnt;\n";
ss << " vSum = 0.0;\n";
for(size_t k = 0; k < vSubArguments.size(); k++ )
@@ -7502,7 +7502,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss,
ss << " vSum += pow( arg" << k << " - vMean, 2 );\n";
ss << " }\n";
}
- }
+ }
else if (pCur->GetType() == formula::svSingleVectorRef)
{
const formula::SingleVectorRefToken* pTVR =
@@ -7529,7 +7529,7 @@ void OpDevSq::GenSlidingWindowFunction(std::stringstream& ss,
ss << vSubArguments[k]->GenSlidingWindowDeclRef() << ";\n";
ss << " vSum += pow( arg" << k << " - vMean, 2 );\n";
}
- }
+ }
ss << " return vSum;\n";
ss << "}";
}
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 19f2a8c66257..62e184204a1c 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -1658,7 +1658,7 @@ void ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, std::size_t nLen
{// nFactor -> skip bytes or words AttrChoose
nData++;
nSeek = nData * 2;
- }
+ }
}
break;
}
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index e1f26807b556..d2c58f3d234d 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -360,7 +360,7 @@ void ImportExcel8::ReadBasic()
aVbaPrj.setOleOverridesSink( xOleNameOverrideSink );
aVbaPrj.importVbaProject( *vbaStg );
GetObjectManager().SetOleNameOverrideInfo( xOleNameOverrideSink );
- }
+ }
}
catch( uno::Exception& )
{
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 9b8d33f31d7d..0e8ff487e8b1 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3686,7 +3686,7 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO
but that should not have any effect for grouped objects. */
if( !bIsTopLevel )
xDrawObj->PostProcessSdrObject( *this, *xSdrObj );
- }
+ }
return xSdrObj.release();
}
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index c232b6082b2f..a965a5e16d2c 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -388,7 +388,7 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const
pEditSet->Put( aItemSet.Get( ATTR_CJK_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK) );
pEditSet->Put( aItemSet.Get( ATTR_CTL_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL) );
rEE.SetDefaults( std::move(pEditSet) ); // takes ownership
- }
+ }
return *mrData.mxHFEditEngine;
}
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 7c50c1cf1b6f..9b7b3caa0905 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -45,7 +45,7 @@ static bool lcl_IsURLButton( SdrObject* pObject )
SdrUnoObj* pUnoCtrl = dynamic_cast<SdrUnoObj*>( pObject );
if (pUnoCtrl && SdrInventor::FmForm == pUnoCtrl->GetObjInventor())
- {
+ {
const uno::Reference<awt::XControlModel>& xControlModel = pUnoCtrl->GetUnoControlModel();
OSL_ENSURE( xControlModel.is(), "uno control without model" );
if ( xControlModel.is() )
@@ -61,7 +61,7 @@ static bool lcl_IsURLButton( SdrObject* pObject )
if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL )
bRet = true;
}
- }
+ }
}
return bRet;
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 6738eb79bd06..7e310d12cb45 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -133,7 +133,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference(const OUString& rStr)
ScRange const & rRangeEntry = aRangeList[ i ];
Color aColName = ScRangeFindList::GetColorName( i );
pTabViewShell->AddHighlightRange( rRangeEntry, aColName );
- }
+ }
}
}
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index 85d58a907527..d41c3842488c 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -677,7 +677,7 @@ std::shared_ptr<sc::DataTransformation> ScDateTimeTransformation::getTransformat
// translate from 1-based column notations to internal Calc one
aColumns.insert(nCol - 1);
-}
+ }
switch (nPos)
{
case 0:
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 60e3d2aa4536..d336cdd201b8 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -482,7 +482,7 @@ void ScChartObj::GetData_Impl( ScRangeListRef& rRanges, bool& rColHeaders, bool&
}
bFound = true;
}
- }
+ }
if( !bFound )
{
rRanges = nullptr;
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index b95566ed667f..2f9550812260 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -584,7 +584,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
break;
}
}
- }
+ }
}
else
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 6b2abcb752dc..9a85aae7cb8d 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1670,7 +1670,8 @@ OUString SAL_CALL ScDataPilotFieldObj::getName()
aName = *pLayoutName;
else
aName = pDim->GetName();
- } }
+ }
+ }
return aName;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index e12207f3ad37..5f625839f490 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1182,11 +1182,11 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans
for (const beans::PropertyValue& rValue : rArguments)
{
if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>())
- {
+ {
ScDocOptions options = GetDocument()->GetDocOptions();
options.SetAutoSpell(rValue.Value.get<bool>());
GetDocument()->SetDocOptions(options);
- }
+ }
}
// show us the text exactly
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 241099a00624..9c99fc39e762 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -166,7 +166,7 @@ ScVbaInterior::GetColorIndex( const sal_Int32 nColor )
sal_Int32 nElems = xIndex->getCount();
sal_Int32 nIndex = -1;
for ( sal_Int32 count=0; count<nElems; ++count )
- {
+ {
sal_Int32 nPaletteColor = 0;
xIndex->getByIndex( count ) >>= nPaletteColor;
if ( nPaletteColor == nColor )
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 4837f5525aa3..aff1c4b00eff 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -200,24 +200,24 @@ static uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const
const uno::Sequence< table::CellRangeAddress > sAddresses = xLocSheetCellRanges->getRangeAddresses();
ScRangeList aCellRanges;
if ( sAddresses.hasElements() )
- {
- for ( const auto& rAddress : sAddresses )
{
- ScRange refRange;
- ScUnoConversion::FillScRange( refRange, rAddress );
- aCellRanges.push_back( refRange );
- }
- // Single range
- if ( aCellRanges.size() == 1 )
- {
- uno::Reference< table::XCellRange > xTmpRange( new ScCellRangeObj( pDoc, aCellRanges.front() ) );
- xRange = new ScVbaRange( xParent, xContext, xTmpRange );
- }
- else
- {
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDoc, aCellRanges ) );
- xRange = new ScVbaRange( xParent, xContext, xRanges );
- }
+ for ( const auto& rAddress : sAddresses )
+ {
+ ScRange refRange;
+ ScUnoConversion::FillScRange( refRange, rAddress );
+ aCellRanges.push_back( refRange );
+ }
+ // Single range
+ if ( aCellRanges.size() == 1 )
+ {
+ uno::Reference< table::XCellRange > xTmpRange( new ScCellRangeObj( pDoc, aCellRanges.front() ) );
+ xRange = new ScVbaRange( xParent, xContext, xTmpRange );
+ }
+ else
+ {
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDoc, aCellRanges ) );
+ xRange = new ScVbaRange( xParent, xContext, xRanges );
+ }
}
return xRange;
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 3ca2bb5e7fe5..15141c68a064 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1525,7 +1525,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
}
else
pErrorId = STR_INVALIDNAME;
- }
+ }
}
else if (aPosData.Flags & MemberResultFlags::GRANDTOTAL)
{
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 98bf88d1f99f..f51e8f49290f 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -356,7 +356,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
sInput.iterateCodePoints(&nUtf16Pos);
if( nUtf16Pos > aSel.nEndPos )
aSel.nEndPos = nUtf16Pos;
- }
+ }
ToggleUnicodeCodepoint aToggle;
while( nUtf16Pos && aToggle.AllowMoreInput( sInput[nUtf16Pos-1]) )
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c2c115c4371c..ec90a6bac1bb 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3382,7 +3382,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y);
- }
+ }
return;
}
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 0ac87b887c08..f2faf59edd6b 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1230,7 +1230,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
bBottomRulerChange = false;
bHeaderRulerChange = false;
bFooterRulerChange = false;
- }
+ }
}
bTopRulerMove = false;
bBottomRulerMove = false;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index dc084ec75689..9fb716331383 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -2544,10 +2544,10 @@ tools::Long ScPrintFunc::CountNotePages()
if (rDoc.HasColNotes(nCol, nPrintTab))
{
for ( SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow )
- {
- if ( rDoc.HasNote(nCol, nRow, nPrintTab) )
- aNotePosList.emplace_back( nCol, nRow, nPrintTab );
- }
+ {
+ if ( rDoc.HasNote(nCol, nRow, nPrintTab) )
+ aNotePosList.emplace_back( nCol, nRow, nPrintTab );
+ }
}
}
}
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index c4404839ee4a..079b0909ab3e 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -923,9 +923,9 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet )
{
TOOLS_WARN_EXCEPTION("scripting", "event script raised" );
}
- }
- }
- }
+ }
+ }
+ }
}
namespace {
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index aaf209a63fe8..098947eb96b4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1089,7 +1089,7 @@ void SdPage::DestroyDefaultPresObj(PresObjKind eObjKind)
const char* sPageKind = PageKindVector[mePageKind];
if (mePageKind == PageKind::Standard)
- {
+ {
getPresObjProp( *this , "PRESOBJ_TITLE" ,sPageKind, propvalue);
aTitlePos.AdjustX(::tools::Long( aTitleSize.Width() * propvalue[2] ) );
aTitlePos.AdjustY(::tools::Long( aTitleSize.Height() * propvalue[3] ) );
@@ -1560,7 +1560,7 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
}
}
}
- }
+ }
}
break;
case PresObjKind::Chart:
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 32ef963e1ed6..103cc37ca606 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -294,7 +294,7 @@ bool SdGRFFilter::Export()
static_cast< SdGRFFilter_ImplInteractionHdl* >( xInteractionHandler.get() )->GetErrorCode(),
rGraphicFilter.GetLastError().nStreamError );
}
- }
+ }
}
}
return bRet;
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 2a1b4e440178..c82c0d791dbd 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -579,20 +579,21 @@ void PropRead::Read()
{
mbStatus = false;
}
- else for ( sal_uInt32 i = 0; i < nSections; i++ )
- {
- mpSvStream->ReadBytes(aSectCLSID.data(), aSectCLSID.size());
- sal_uInt32 nSectionOfs(0);
- mpSvStream->ReadUInt32( nSectionOfs );
- sal_uInt32 nCurrent = mpSvStream->Tell();
- if (checkSeek(*mpSvStream, nSectionOfs))
+ else
+ for ( sal_uInt32 i = 0; i < nSections; i++ )
{
- Section aSection(aSectCLSID.data());
- aSection.Read(mpSvStream.get());
- maSections.push_back(std::make_unique<Section>(aSection));
+ mpSvStream->ReadBytes(aSectCLSID.data(), aSectCLSID.size());
+ sal_uInt32 nSectionOfs(0);
+ mpSvStream->ReadUInt32( nSectionOfs );
+ sal_uInt32 nCurrent = mpSvStream->Tell();
+ if (checkSeek(*mpSvStream, nSectionOfs))
+ {
+ Section aSection(aSectCLSID.data());
+ aSection.Read(mpSvStream.get());
+ maSections.push_back(std::make_unique<Section>(aSection));
+ }
+ mpSvStream->Seek( nCurrent );
}
- mpSvStream->Seek( nCurrent );
- }
}
PropRead& PropRead::operator=( const PropRead& rPropRead )
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index a3915844078b..a1a79a67815f 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -191,7 +191,7 @@ namespace accessibility
if (aHint)
{
Broadcast(*aHint);
- }
+ }
}
} // end of namespace accessibility
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 01d36ee93155..64a149a1334d 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -135,8 +135,8 @@ void SdModule::Execute(SfxRequest& rReq)
break;
default:
break;
- }
}
+ }
}
break;
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 045a61a725bc..44cb043aa185 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -743,13 +743,13 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* If 3D-rotation bodies are about to be created,
* end creation now
**********************************************************/
- Degree100 nAngle1 = GetAngle(aPnt - mpView->GetRef1());
- nAngle1 -= 27000_deg100;
- nAngle1 = NormAngle36000(nAngle1);
- bool bMirrorSide1 = nAngle1 < 18000_deg100;
+ Degree100 nAngle1 = GetAngle(aPnt - mpView->GetRef1());
+ nAngle1 -= 27000_deg100;
+ nAngle1 = NormAngle36000(nAngle1);
+ bool bMirrorSide1 = nAngle1 < 18000_deg100;
- if (bMirrorSide0 != bMirrorSide1)
- {
+ if (bMirrorSide0 != bMirrorSide1)
+ {
bSuppressChangesOfSelection = true;
mpWindow->EnterWait();
mpView->End3DCreation();
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index b0b8163ff57d..8751a7c6f212 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1005,7 +1005,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings )
beans::PropertyState_DIRECT_VALUE );
if( mbUsePen )
- {
+ {
aProperties.emplace_back( "UserPaintColor" ,
// User paint color is black by default.
-1, Any( mnUserPaintColor ),
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 3f47b7663f2c..3016d4b977e0 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -344,7 +344,7 @@ void PreviewRenderer::PaintFrame()
mpPreviewDevice->SetFillColor();
mpPreviewDevice->DrawRect(aPaintRectangle);
mpPreviewDevice->EnableMapMode();
- }
+ }
}
void PreviewRenderer::SetupOutputSize (
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index f8e1da8f02dc..271429c8cdaf 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -448,9 +448,9 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( const uno::
if( xEnumAccess.is() )
{
- uno::Reference< container::XEnumeration > xPortionEnum( xEnumAccess->createEnumeration() );
- if( xPortionEnum.is() )
- {
+ uno::Reference< container::XEnumeration > xPortionEnum( xEnumAccess->createEnumeration() );
+ if( xPortionEnum.is() )
+ {
while(xPortionEnum->hasMoreElements())
{
uno::Reference< text::XTextRange > xPortion( xPortionEnum->nextElement(), uno::UNO_QUERY );
diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx
index b3f9b1468b28..60cab73f7b06 100644
--- a/sd/source/ui/view/GraphicObjectBar.cxx
+++ b/sd/source/ui/view/GraphicObjectBar.cxx
@@ -130,7 +130,7 @@ void GraphicObjectBar::ExecuteFilter( SfxRequest const & rReq )
return;
}
}
- }
+ }
}
Invalidate();
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 0628fd865420..7f4039a0fc5d 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -882,7 +882,7 @@ void ViewShellManager::Implementation::CreateShells()
}
}
}
- }
+ }
}
void ViewShellManager::Implementation::CreateTargetStack (ShellStack& rStack) const
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 79b799f7c9a3..0aab0c9a7261 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -201,7 +201,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement& rElem,
aBuf.append( ' ' );
aBuf.append( convertPixelToUnitString( rel_y ) );
aBuf.append( " )" );
- }
+ }
rProps[ "draw:transform" ] = aBuf.makeStringAndClear();
}
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 7d4ac91b710e..86b57ca73794 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -1172,7 +1172,7 @@ void PresenterController::SwitchMonitors()
void PresenterController::ExitPresenter()
{
if( mxController.is() )
- {
+ {
Reference< XPresentationSupplier > xPS( mxController->getModel(), UNO_QUERY );
if( xPS.is() )
{
@@ -1180,7 +1180,7 @@ void PresenterController::ExitPresenter()
if( xP.is() )
xP->end();
}
- }
+ }
}
} // end of namespace ::sdext::presenter
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index 86258464471d..ad43f035b041 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -396,7 +396,7 @@ void PresenterNotesView::Layout()
geometry::RealRectangle2D aNewTextBoundingBox (0,0,aWindowBox.Width, aWindowBox.Height);
// Size the tool bar and the horizontal separator above it.
if (mxToolBarWindow.is())
- {
+ {
const geometry::RealSize2D aToolBarSize (mpToolBar->GetMinimalSize());
const sal_Int32 nToolBarHeight = sal_Int32(aToolBarSize.Height + 0.5);
mxToolBarWindow->setPosSize(0, aWindowBox.Height - nToolBarHeight,
@@ -409,23 +409,23 @@ void PresenterNotesView::Layout()
mpCloseButton->SetCenter(geometry::RealPoint2D(
(aWindowBox.Width + aToolBarSize.Width) / 2,
aWindowBox.Height - aToolBarSize.Height/2));
- }
+ }
// Check whether the vertical scroll bar is necessary.
if (mpScrollBar)
- {
+ {
bool bShowVerticalScrollbar (false);
try
{
const double nTextBoxHeight (aNewTextBoundingBox.Y2 - aNewTextBoundingBox.Y1);
const double nHeight (mpTextView->GetTotalTextHeight());
if (nHeight > nTextBoxHeight)
- {
+ {
bShowVerticalScrollbar = true;
if(!AllSettings::GetLayoutRTL())
aNewTextBoundingBox.X2 -= mpScrollBar->GetSize();
else
aNewTextBoundingBox.X1 += mpScrollBar->GetSize();
- }
+ }
mpScrollBar->SetTotalSize(nHeight);
}
catch(beans::UnknownPropertyException&)
@@ -433,7 +433,7 @@ void PresenterNotesView::Layout()
OSL_ASSERT(false);
}
if(AllSettings::GetLayoutRTL())
- {
+ {
mpScrollBar->SetVisible(bShowVerticalScrollbar);
mpScrollBar->SetPosSize(
geometry::RealRectangle2D(
@@ -444,9 +444,9 @@ void PresenterNotesView::Layout()
if( ! bShowVerticalScrollbar)
mpScrollBar->SetThumbPosition(0, false);
UpdateScrollBar();
- }
+ }
else
- {
+ {
mpScrollBar->SetVisible(bShowVerticalScrollbar);
mpScrollBar->SetPosSize(
geometry::RealRectangle2D(
@@ -457,14 +457,14 @@ void PresenterNotesView::Layout()
if( ! bShowVerticalScrollbar)
mpScrollBar->SetThumbPosition(0, false);
UpdateScrollBar();
- }
- }
+ }
+ }
// Has the text area has changed it position or size?
if (aNewTextBoundingBox.X1 != maTextBoundingBox.X1
|| aNewTextBoundingBox.Y1 != maTextBoundingBox.Y1
|| aNewTextBoundingBox.X2 != maTextBoundingBox.X2
|| aNewTextBoundingBox.Y2 != maTextBoundingBox.Y2)
- {
+ {
maTextBoundingBox = aNewTextBoundingBox;
mpTextView->SetLocation(
geometry::RealPoint2D(
@@ -474,7 +474,7 @@ void PresenterNotesView::Layout()
geometry::RealSize2D(
aNewTextBoundingBox.X2 - aNewTextBoundingBox.X1,
aNewTextBoundingBox.Y2 - aNewTextBoundingBox.Y1));
- }
+ }
}
void PresenterNotesView::Paint (const awt::Rectangle& rUpdateBox)
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index 493e33a39ce9..c06c0dfd79ec 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -692,11 +692,11 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars (
Reference<container::XIndexAccess> xSlides (mxSlideShowController, UNO_QUERY_THROW);
bIsScrollBarNeeded = mpLayout->IsScrollBarNeeded(xSlides->getCount());
if (mpVerticalScrollBar)
- {
+ {
if (bIsScrollBarNeeded)
- {
+ {
if(AllSettings::GetLayoutRTL())
- {
+ {
mpVerticalScrollBar->SetPosSize(geometry::RealRectangle2D(
rUpperBox.X1,
rUpperBox.Y1,
@@ -710,9 +710,9 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars (
rUpperBox.Y1,
rUpperBox.X2,
rUpperBox.Y2);
- }
+ }
else
- {
+ {
// if it's not RTL place vertical scroll bar at right border.
mpVerticalScrollBar->SetPosSize(geometry::RealRectangle2D(
rUpperBox.X2 - mpVerticalScrollBar->GetSize(),
@@ -727,11 +727,11 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars (
rUpperBox.Y1,
rUpperBox.X2 - mpVerticalScrollBar->GetSize() - gnHorizontalGap,
rUpperBox.Y2);
- }
- }
+ }
+ }
else
mpVerticalScrollBar->SetVisible(false);
- }
+ }
return rUpperBox;
}
@@ -1202,34 +1202,34 @@ geometry::RealPoint2D PresenterSlideSorter::Layout::GetLocalPosition(
const geometry::RealPoint2D& rWindowPoint) const
{
if(AllSettings::GetLayoutRTL())
- {
+ {
return css::geometry::RealPoint2D(
-rWindowPoint.X + maBoundingBox.X2 + mnHorizontalOffset,
rWindowPoint.Y - maBoundingBox.Y1 + mnVerticalOffset);
- }
+ }
else
- {
+ {
return css::geometry::RealPoint2D(
rWindowPoint.X - maBoundingBox.X1 + mnHorizontalOffset,
rWindowPoint.Y - maBoundingBox.Y1 + mnVerticalOffset);
- }
+ }
}
geometry::RealPoint2D PresenterSlideSorter::Layout::GetWindowPosition(
const geometry::RealPoint2D& rLocalPoint) const
{
if(AllSettings::GetLayoutRTL())
- {
+ {
return css::geometry::RealPoint2D(
-rLocalPoint.X + mnHorizontalOffset + maBoundingBox.X2,
rLocalPoint.Y - mnVerticalOffset + maBoundingBox.Y1);
- }
+ }
else
- {
+ {
return css::geometry::RealPoint2D(
rLocalPoint.X - mnHorizontalOffset + maBoundingBox.X1,
rLocalPoint.Y - mnVerticalOffset + maBoundingBox.Y1);
- }
+ }
}
sal_Int32 PresenterSlideSorter::Layout::GetColumn (
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index 9f9af15da731..a840165914b1 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -1872,10 +1872,10 @@ void PresentationTimeLabel::TimeHasChanged (const oslDateTime& rCurrentTime)
//the presentation was paused for in order to continue the
//timer from the same position
if(!isPaused())
- {
- TimeValue pauseTime = getPauseTimeValue();
- if(pauseTime.Seconds != 0 || pauseTime.Nanosec != 0)
- {
+ {
+ TimeValue pauseTime = getPauseTimeValue();
+ if(pauseTime.Seconds != 0 || pauseTime.Nanosec != 0)
+ {
TimeValue incrementValue(0, 0);
incrementValue.Seconds = aCurrentTimeValue.Seconds - pauseTime.Seconds;
if(pauseTime.Nanosec > aCurrentTimeValue.Nanosec)
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index f16c825d4886..cc4917eebb11 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1272,7 +1272,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
continue;
if (nId == SID_REPLACEABLE)
continue;
- }
+ }
OString aDbg = "Unknown item detected: " + OString::number(static_cast<sal_Int32>(nId));
DBG_ASSERT(nArg<nFormalArgs, aDbg.getStr());
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index fb0516fedfd4..1862684f8796 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2055,7 +2055,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
// do nothing disables the writer accelerators
bDone = true;
- }
+ }
else if ( rKeyCode.IsMod1() && ( KEY_F4 == nKey || KEY_W == nKey ) )
{
// <CTRL><F4> or <CTRL><W> -> close top frame
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index 9dc18f3e5c04..b6980a890bd2 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -95,7 +95,7 @@ IndexBitSet::~IndexBitSet()
sal_uInt16 IndexBitSet::GetFreeIndex()
{
for(sal_uInt16 i=0;i<SAL_MAX_UINT16;i++)
- if(!Contains(i))
+ if(!Contains(i))
{
*this|=i;
return i;
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 5a8dc39aaaf5..5726343bb290 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -731,7 +731,7 @@ void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
pImpl->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
else
pImpl->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
- }
+ }
}
bool SfxShell::SetContextBroadcasterEnabled (const bool bIsEnabled)
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 50d11b8b043b..2cfc845204e6 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -845,7 +845,7 @@ OUString SfxDocTplService_Impl::CreateNewUniqueFileWithPrefix( const OUString& a
uno::Reference< XCommandEnvironment > aQuietEnv;
if ( Content::create( aDirPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aQuietEnv, comphelper::getProcessComponentContext(), aParent ) )
- {
+ {
for ( sal_Int32 nInd = 0; nInd < 32000; nInd++ )
{
Content aNewFile;
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index 045c455e69fe..ea66490633e2 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -354,7 +354,7 @@ namespace slideshow::internal
mrScreenUpdater.notifyUpdate(rxView,true);
}
- }
+ }
else
{
if( !mbIsLastPointValid )
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index 0a10cd34cdb1..bf2803845c20 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -493,12 +493,13 @@ void
if (wbp >= &wbuf[OBS])
{
- if ( write(1, wbuf, OBS) != -1 ) {
- if (wbp > &wbuf[OBS])
- memmove(wbuf, wbuf + OBS, wbp - &wbuf[OBS]);
- wbp -= OBS;
- }
- else exit(1);
+ if ( write(1, wbuf, OBS) != -1 )
+ {
+ if (wbp > &wbuf[OBS])
+ memmove(wbuf, wbuf + OBS, wbp - &wbuf[OBS]);
+ wbp -= OBS;
+ }
+ else exit(1);
}
}
trp->tp = tp;
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index a25fd9cd2bcd..a5c8273a27dd 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -179,7 +179,7 @@ int deftype (char *line, struct filepointer *filep, struct inclist * file,
return ELIFFALSE;
else
return ELIFGUESSFALSE;
- }
+ }
else
{
debug(0,("true...\n"));
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 57e7832ebce3..082b8f89a715 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -735,7 +735,7 @@ namespace svgio::svgreader
// Extract known viewport data
// bXXXIsAbsolute tracks whether relative values could be resolved to absolute values
if (getParent())
- {
+ {
// If width or height is not provided, the default 100% is used, see SVG 1.1 section 5.1.2
// value 0.0 here is only to initialize variable
bool bWidthIsAbsolute(getWidth().isSet() && SvgUnit::percent != getWidth().getUnit());
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 9395299afd16..2c43d22087c9 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2259,7 +2259,7 @@ OUString lcl_GetPercentString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 nCn
i = nCnt;
if( bStringFound )
aPercentString.insert( 0, "\"" );
- }
+ }
}
return aPercentString.makeStringAndClear();
}
diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx
index 1137caaef436..7cdb3f5ab5e4 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -142,7 +142,7 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames)
OUString aTmpStr;
sal_Int32 nTmpInt = 0;
if ( pValues[nProp] >>= bTmp )
- {
+ {
switch ( static_cast< HelpProperty >(
comphelper::findValue(aInternalPropertyNames, rPropertyNames[nProp]) ) )
{
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 3848f166f5e2..ada6aafecbd3 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -201,7 +201,7 @@ sal_Int16 SvFilterOptionsDialog::execute()
aInternalFilterName = aInternalFilterName.replaceFirst( "calc_", "" );
aInternalFilterName = aInternalFilterName.replaceFirst( "writer_", "" );
break;
- }
+ }
else if ( rName == "Graphic" )
{
rProp.Value >>= xGraphic;
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 9926bb82e7c3..d0124e290ad2 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1525,14 +1525,14 @@ namespace svt::table
m_aSelectedRows.clear();
m_aSelectedRows.push_back(m_nCurRow);
invalidateRow( m_nCurRow );
- }
+ }
else
{
//a region is already selected, prevRow is last selected row and the row beneath - nextRow - should be selected
int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow);
int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow+1);
if(prevRow>-1)
- {
+ {
//if m_nCurRow isn't the last one, can move down, otherwise not
if(m_nCurRow<m_nRowCount-1)
m_nCurRow++;
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index f12352f1c596..e24c6b73f201 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -488,7 +488,7 @@ Reference<XAccessibleRelationSet> SAL_CALL SvxRectCtlChildAccessibleContext::get
{
rtl::Reference<utl::AccessibleRelationSetHelper> pRelationSetHelper = new utl::AccessibleRelationSetHelper;
if( mxParent.is() )
- {
+ {
uno::Sequence< uno::Reference< uno::XInterface > > aSequence { mxParent };
pRelationSetHelper->AddRelation( css::accessibility::AccessibleRelation( css::accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
}
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index b644a2d51422..3990fe4766e0 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1154,7 +1154,7 @@ void GalleryBrowser2::Execute(std::string_view rIdent)
weld::Widget* pParent = GetViewWindow();
TransferableDataHelper aDataHelper(TransferableDataHelper::CreateFromClipboard(pParent->get_clipboard()));
mpCurTheme->InsertTransferable( aDataHelper.GetTransferable(), mnCurActionPos );
- }
+ }
}
}
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index ed603c0de66e..7f7ce9980255 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -96,7 +96,7 @@ bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel )
// recall to read as XML
bRet = GallerySvDrawImport( aMemStm, rModel );
}
- }
+ }
else
{
// read as XML
diff --git a/svx/source/sdr/animation/scheduler.cxx b/svx/source/sdr/animation/scheduler.cxx
index 2b8ce885c151..2e3ea1d4a057 100644
--- a/svx/source/sdr/animation/scheduler.cxx
+++ b/svx/source/sdr/animation/scheduler.cxx
@@ -138,7 +138,7 @@ namespace sdr::animation
mnDeltaTime = 0;
triggerEvents();
checkTimeout();
- }
+ }
}
void Scheduler::InsertEvent(Event& rNew)
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 06a7ea4d207f..438639e092a2 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -664,27 +664,30 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
bNotMatch = true;
break;
}
- }else if ((eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) {
- const SvxBrushItem* pBrsh1 = aFmt.GetBrush();
- const SvxBrushItem* pBrsh2 = _pSet->pBrushItem;
- bool bIsMatch = false;
- if (pBrsh1==pBrsh2) bIsMatch = true;
- if (pBrsh1 && pBrsh2) {
- const Graphic* pGrf1 = pBrsh1->GetGraphic();
- const Graphic* pGrf2 = pBrsh2->GetGraphic();
- if (pGrf1==pGrf2) bIsMatch = true;
- if (pGrf1 && pGrf2) {
- if ( pGrf1->GetBitmapEx() == pGrf2->GetBitmapEx() &&
- _pSet->aSize == aFmt.GetGraphicSize())
- bIsMatch = true;
- }
- }
- if (!bIsMatch) {
- bNotMatch = true;
- break;
- }
- } else
- {
+ }
+ else if ((eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP )
+ {
+ const SvxBrushItem* pBrsh1 = aFmt.GetBrush();
+ const SvxBrushItem* pBrsh2 = _pSet->pBrushItem;
+ bool bIsMatch = false;
+ if (pBrsh1==pBrsh2) bIsMatch = true;
+ if (pBrsh1 && pBrsh2) {
+ const Graphic* pGrf1 = pBrsh1->GetGraphic();
+ const Graphic* pGrf2 = pBrsh2->GetGraphic();
+ if (pGrf1==pGrf2) bIsMatch = true;
+ if (pGrf1 && pGrf2) {
+ if ( pGrf1->GetBitmapEx() == pGrf2->GetBitmapEx() &&
+ _pSet->aSize == aFmt.GetGraphicSize())
+ bIsMatch = true;
+ }
+ }
+ if (!bIsMatch) {
+ bNotMatch = true;
+ break;
+ }
+ }
+ else
+ {
if (!(sPrefix == _pSet->sPrefix &&
sLclSuffix == _pSet->sSuffix &&
eNumType == eNType &&
@@ -697,7 +700,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
bNotMatch = true;
break;
}
- }
+ }
}
if ( !bNotMatch )
return iDex+1;
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index 810732e2b16c..397244efe1d6 100644
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -89,7 +89,8 @@ SdrObjListIter::SdrObjListIter( const SdrMarkList& rMarkList, SdrIterMode eMode
}
void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode)
-{ for(size_t nIdx(0), nCount(rObjList.GetObjCount()); nIdx < nCount; ++nIdx)
+{
+ for(size_t nIdx(0), nCount(rObjList.GetObjCount()); nIdx < nCount; ++nIdx)
{
const SdrObject* pSdrObject(mbUseZOrder
? rObjList.GetObj(nIdx)
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 06aa2d615127..54464406febe 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2123,8 +2123,11 @@ void SvxTableController::getSelectedCells( CellPos& rFirst, CellPos& rLast )
rLast.mnCol = std::max( maCursorFirstPos.mnCol, maCursorLastPos.mnCol );
rLast.mnRow = std::max( maCursorFirstPos.mnRow, maCursorLastPos.mnRow );
+ if( !mxTable.is() )
+ return;
+
bool bExt = false;
- if( mxTable.is() ) do
+ do
{
bExt = false;
for( sal_Int32 nRow = rFirst.mnRow; nRow <= rLast.mnRow && !bExt; nRow++ )
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 29ea67e50781..3a9279a96dcf 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -343,7 +343,7 @@ Graphic SvXMLGraphicOutputStream::GetGraphic()
{
mpOStm.reset();
mpTmp.reset();
- }
+ }
return aGraphic;
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 0faed8c2ac02..1c2250afc7bb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -390,13 +390,13 @@ note that the indexes may get off as the implementation evolves, C++ code search
for( int i = 0;
i < numbering.getLength();
++i )
- {
+ {
if( numbering[ i ].Name == "NumberingType" )
- {
+ {
numbering[ i ].Value >>= numberingType;
break;
- }
}
+ }
CPPUNIT_ASSERT_EQUAL( style::NumberingType::ARABIC, numberingType );
}
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 6f1e73a12338..505cb5c37e1b 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -95,7 +95,7 @@ SwNodeType SwAccessibleFrameBase::GetNodeType( const SwFlyFrame *pFlyFrame )
SwNodeType nType = SwNodeType::Text;
if( pFlyFrame->Lower() )
{
- if( pFlyFrame->Lower()->IsNoTextFrame() )
+ if( pFlyFrame->Lower()->IsNoTextFrame() )
{
const SwNoTextFrame *const pContentFrame =
static_cast<const SwNoTextFrame *>(pFlyFrame->Lower());
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 4479ce52e38c..a3a029342692 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3325,7 +3325,7 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa
// loop on all text frames registered at the text node.
SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pTextNode);
for( SwTextFrame* pTextFrame = aIter.First(); pTextFrame; pTextFrame = aIter.Next() )
- {
+ {
uno::WeakReference < XAccessible > xWeakAcc;
SwAccessibleContextMap_Impl::iterator aMapIter =
mpFrameMap->find( pTextFrame );
@@ -3348,10 +3348,10 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa
// sw_redlinehide: should be idempotent for multiple nodes in a merged para
pRetSelectedParas->emplace( xWeakAcc, aDataEntry );
}
- }
}
}
}
+ }
// prepare next turn: get next cursor in ring
pCursor = pCursor->GetNext();
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index f6e55168315a..cb0a624bb83e 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -846,9 +846,9 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const &
pNd->FindSectionNode()->GetSection().IsProtect()
)
)
- {
- pNd = nullptr;
- }
+ {
+ pNd = nullptr;
+ }
}
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 280bbae9ef82..4d60a0d6e573 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -253,7 +253,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell)
pWrong = pNode->GetGrammarCheck();
if (pWrong)
bIsWrong = pWrong->InWrongWord(nBegin,nLen) && !pNode->IsSymbolAt(nBegin);
- }
+ }
}
}
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 6079ddcc88f2..2699b1818560 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -92,7 +92,7 @@ using namespace com::sun::star;
OSL_ENSURE( ( *(j->GetPoint()) != *(j->GetMark()) ) ||
( j->GetContentIdx() != nullptr ),
ERROR_PREFIX "empty redline" );
- }
+ }
// verify proper redline sorting
for( size_t n = 1; n < rTable.size(); ++n )
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 2c8ce7eec4c0..0014bb814f93 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -276,7 +276,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
if( pCursorShell->IsTableMode() )
lcl_PaMCorrRel1( pCursorShell->GetTableCrs(), pOldNode, aNewPos, nCntIdx );
- }
+ }
}
rDoc.cleanupUnoCursorTable();
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 6391f97343d8..180125bb3b61 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -720,8 +720,8 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n
{
aOut.append(' ');
aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
- }
- break;
+ }
+ break;
case PROT::FileInit: FileInit();
aOut.append("Initialize");
break;
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index dfaef977b10a..1ae5bae8496e 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -981,10 +981,10 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
- {
- pSh->Imp()->DisposeAccessibleFrame( this );
- pSh->Imp()->AddAccessibleFrame( this );
- }
+ {
+ pSh->Imp()->DisposeAccessibleFrame( this );
+ pSh->Imp()->AddAccessibleFrame( this );
+ }
}
// #i28701# - perform reorder of object lists
// at anchor frame and at page frame.
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 8cfb9524365c..c49a12cec791 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -843,16 +843,16 @@ static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
{
if( pLay->IsVertical() )
{
- if ( pLay->IsVertLR() )
- {
+ if ( pLay->IsVertLR() )
+ {
nFrameTop = pLay->getFrameArea().Left();
nPrtHeight = pLay->getFramePrintArea().Width();
- }
- else
- {
+ }
+ else
+ {
nFrameTop = pLay->getFrameArea().Left() + pLay->getFrameArea().Width();
nPrtHeight = pLay->getFramePrintArea().Width();
- }
+ }
}
else
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 03c1f1bbfe02..c50061bcf68e 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -3459,9 +3459,9 @@ void Notify_Background( const SdrObject* pObj,
pFly->getFrameArea().Top() <= rRect.Bottom() &&
pFly->getFrameArea().Right() >= rRect.Left() &&
pFly->getFrameArea().Left() <= rRect.Right() )
- {
+ {
pFly->InvalidateSize();
- }
+ }
}
// Flys above myself might sidestep if they have an automatic
// alignment. This happens independently of my attributes since
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 982cd95f98af..d8a293c54ca1 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7074,7 +7074,7 @@ void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const
pFly->getFrameArea().Bottom() >= rRect.Top() )
pFly->RefreshExtraData( rRect );
}
- }
+ }
pCnt = pCnt->GetNextContentFrame();
}
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 53c07abe8c0f..778f23046826 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -2324,35 +2324,35 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP
SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(rTNd);
for ( SwTextFrame* pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() )
+ {
+ // Add offset to current page:
+ const SwPageFrame* pPageFrame = pTmpFrame->FindPageFrame();
+ SwRect aHFLinkRect( rLinkRect );
+ aHFLinkRect.Pos() = pPageFrame->getFrameArea().Pos() + aOffset;
+
+ // #i97135# the gcc_x64 optimizer gets aHFLinkRect != rLinkRect wrong
+ // fool it by comparing the position only (the width and height are the
+ // same anyway)
+ if ( aHFLinkRect.Pos() != rLinkRect.Pos() )
{
- // Add offset to current page:
- const SwPageFrame* pPageFrame = pTmpFrame->FindPageFrame();
- SwRect aHFLinkRect( rLinkRect );
- aHFLinkRect.Pos() = pPageFrame->getFrameArea().Pos() + aOffset;
-
- // #i97135# the gcc_x64 optimizer gets aHFLinkRect != rLinkRect wrong
- // fool it by comparing the position only (the width and height are the
- // same anyway)
- if ( aHFLinkRect.Pos() != rLinkRect.Pos() )
- {
- // Link PageNums
- std::vector<sal_Int32> aHFLinkPageNums = CalcOutputPageNums( aHFLinkRect );
+ // Link PageNums
+ std::vector<sal_Int32> aHFLinkPageNums = CalcOutputPageNums( aHFLinkRect );
- for (sal_Int32 aHFLinkPageNum : aHFLinkPageNums)
- {
- // Link Export
- tools::Rectangle aRect(SwRectToPDFRect(pPageFrame, aHFLinkRect.SVRect()));
- const sal_Int32 nHFLinkId =
- rPDFExtOutDevData.CreateLink(aRect, aHFLinkPageNum);
+ for (sal_Int32 aHFLinkPageNum : aHFLinkPageNums)
+ {
+ // Link Export
+ tools::Rectangle aRect(SwRectToPDFRect(pPageFrame, aHFLinkRect.SVRect()));
+ const sal_Int32 nHFLinkId =
+ rPDFExtOutDevData.CreateLink(aRect, aHFLinkPageNum);
- // Connect Link and Destination:
- if ( bIntern )
- rPDFExtOutDevData.SetLinkDest( nHFLinkId, nDestId );
- else
- rPDFExtOutDevData.SetLinkURL( nHFLinkId, rURL );
- }
+ // Connect Link and Destination:
+ if ( bIntern )
+ rPDFExtOutDevData.SetLinkDest( nHFLinkId, nDestId );
+ else
+ rPDFExtOutDevData.SetLinkURL( nHFLinkId, rURL );
}
}
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 82f2a8dcd893..111afe6a0f89 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -456,7 +456,7 @@ void SwTextFrame::AdjustFrame( const SwTwips nChgHght, bool bHasToFit )
else
nRstHeight = getFrameArea().Left() + getFrameArea().Width() -
( GetUpper()->getFrameArea().Left() + GetUpper()->getFramePrintArea().Left() );
- }
+ }
else
nRstHeight = GetUpper()->getFrameArea().Top()
+ GetUpper()->getFramePrintArea().Top()
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 2974826154bb..8f94315a2c5c 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -935,7 +935,7 @@ void SwTextCursor::GetCharRect_( SwRect* pOrig, TextFrameIndex const nOfst,
{
nX -= GetInfo().GetFont()->GetRightBorderSpace();
}
- }
+ }
}
bWidth = false;
break;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 95809edf540d..a66e69d88f59 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1507,7 +1507,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
// check if next character is Reh or Yeh-like
sal_Unicode cNextCh = rWord[ nIdx + 1 ];
if ( isRehChar ( cNextCh ) || isYehChar ( cNextCh ))
- {
+ {
SAL_WARN_IF( 0 == cPrevCh, "sw.core", "No previous character" );
// check if character is connectable to previous character,
if ( lcl_ConnectToPrev( cCh, cPrevCh ) )
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 7c1562ad49c3..bb42a0853cba 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -266,7 +266,7 @@ SwFlyInContentFrame *SwTextFlyCnt::GetFlyFrame_( const SwFrame *pCurrFrame )
while ( pFirst->IsFollow() )
pFirst = pFirst->FindMaster();
do
- {
+ {
SwTextFrame *pTmp = pFirst;
do
{ if( static_cast<SwFlyFrame*>(pFrame)->GetAnchorFrame() == static_cast<SwFrame*>(pTmp) )
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 3348abee8fe1..cd8e799fee00 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -350,7 +350,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::CreateShape( SdrObject *pObj ) c
return xRet;
}
}
- }
+ }
else
{
// own block - temporary object has to be destroyed before
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 9c9ef1ec44d9..d34adfeb86f8 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -806,7 +806,7 @@ lcl_ExportHints(
switch( nAttrWhich )
{
case RES_TXTATR_FIELD:
- if(!bRightMoveForbidden)
+ if(!bRightMoveForbidden)
{
pUnoCursor->Right(1);
if( *pUnoCursor->GetMark() == *pUnoCursor->GetPoint() )
@@ -1066,7 +1066,7 @@ static void lcl_FillRedlineArray(
if( pRedline->HasMark() && pRedline->End()->nNode == nOwnNode )
rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>(
pRedline, false ) );
- }
+ }
}
static void lcl_FillSoftPageBreakArray(
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index ac72abefd161..a6a14abef2dc 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3729,7 +3729,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
OSL_FAIL( "Illegal argument" );
}
}
- }
+ }
// clear parent again
aSet.SetParent(nullptr);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 9f2daa129d53..cbb32e7e2e82 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2378,9 +2378,9 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner );
for ( const auto nCol : *pGridCols )
- {
+ {
m_rWW8Export.InsUInt16( o3tl::narrowing<sal_uInt16>(nCol) + nTableOffset );
- }
+ }
/* TCs */
ww8::RowSpansPtr pRowSpans = pTableTextNodeInfoInner->getRowSpansOfRow();
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 012a4c4075f9..4384a4e69bdc 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -71,10 +71,10 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex const &rIdx)
((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
rIdx == pAPos->nNode.GetIndex() )
- {
- bRet=true;
- break;
- }
+ {
+ bRet=true;
+ break;
+ }
}
return bRet;
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 5d96a44e9196..ad56049a6e97 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2699,7 +2699,7 @@ void WW8TabDesc::MergeCells()
// (that can be a newly created or another group)
UpdateTableMergeGroup( rCell, pActMGroup, m_pTabBox, i );
}
- }
+ }
}
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index b5a5623fd22a..6dc0a5e5df5b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3063,7 +3063,7 @@ void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, shor
pSI->m_n81Flags |= nMask; // set flag
else
pSI->m_n81Flags &= ~nMask; // delete flag
- }
+ }
}
else
{
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 61a8205064ff..447abab52b67 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -129,8 +129,8 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem(
AddAttribute( rEntry.nNameSpace, rEntry.eLocalName,
sValue, rNamespaceMap, rAttrList );
}
- }
- }
+ }
+ }
}
break;
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 57f845e206f8..16e2a1128b08 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -164,7 +164,7 @@ bool sw_frmitems_setXMLBorder( std::unique_ptr<SvxBorderLine>& rpLine,
( bHasStyle &&
((table::BorderLineStyle::SOLID == nStyle && rpLine->GetDistance()) ||
(table::BorderLineStyle::DOUBLE == nStyle && !rpLine->GetDistance())) ) )
- {
+ {
bool bDouble = (bHasWidth && table::BorderLineStyle::DOUBLE == nStyle ) ||
rpLine->GetDistance();
@@ -190,7 +190,7 @@ bool sw_frmitems_setXMLBorder( std::unique_ptr<SvxBorderLine>& rpLine,
}
}
sw_frmitems_setXMLBorderStyle( *rpLine, nStyle );
- }
+ }
// set color
if( bHasColor )
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index f30a39a26080..aac1602f3968 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -310,12 +310,12 @@ IMPL_LINK_NOARG(SwAddressListDialog, RemoveHdl_Impl, weld::Button&, void)
m_xListLB->remove(nEntry);
// If this was the last item, disable the Remove & Edit buttons and enable Create
if (m_xListLB->n_children() < 1 )
- {
+ {
m_xRemovePB->set_sensitive(false);
m_xEditPB->set_sensitive(false);
m_xFilterPB->set_sensitive(false);
m_xCreateListPB->set_sensitive(true);
- }
+ }
}
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
index 1b16c07bd2b3..79642b3109f4 100644
--- a/sw/source/ui/vba/vbafont.cxx
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -158,7 +158,7 @@ SwVbaFont::getColorIndex()
sal_Int32 nElems = mxPalette->getCount();
sal_Int32 nIndex = 0;
for ( sal_Int32 count=0; count<nElems; ++count )
- {
+ {
sal_Int32 nPaletteColor = 0;
mxPalette->getByIndex( count ) >>= nPaletteColor;
if ( nPaletteColor == nColor )
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 475388d2134e..9aad1ea7ed64 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2437,15 +2437,15 @@ SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
rData.sCommand == pParam->sCommand &&
(rData.nCommandType == -1 || rData.nCommandType == pParam->nCommandType ||
(bCreate && pParam->nCommandType == -1)))
- {
- // calls from the calculator may add a connection with an invalid commandtype
- //later added "real" data base connections have to re-use the already available
- //DSData and set the correct CommandType
- if(bCreate && pParam->nCommandType == -1)
- pParam->nCommandType = rData.nCommandType;
- pFound = pParam;
- break;
- }
+ {
+ // calls from the calculator may add a connection with an invalid commandtype
+ //later added "real" data base connections have to re-use the already available
+ //DSData and set the correct CommandType
+ if(bCreate && pParam->nCommandType == -1)
+ pParam->nCommandType = rData.nCommandType;
+ pFound = pParam;
+ break;
+ }
}
if(bCreate && !pFound)
{
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 772889bf06f7..ff7ee5e872a3 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2291,7 +2291,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
else
{
if( rData.HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFormat, aObjDesc ) )
- {
+ {
xStrm = rData.GetInputStream(SotClipboardFormatId::EMBED_SOURCE_OLE, OUString());
if (!xStrm.is())
xStrm = rData.GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ_OLE, OUString());
diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx
index e93d6a050d06..1464c90bce3c 100644
--- a/sw/source/uibase/inc/usrpref.hxx
+++ b/sw/source/uibase/inc/usrpref.hxx
@@ -177,7 +177,7 @@ public:
if(bSet && m_eFieldUpdateFlags == AUTOUPD_OFF)
{
m_eFieldUpdateFlags = AUTOUPD_FIELD_ONLY;
- }
+ }
else if(!bSet)
{
m_eFieldUpdateFlags = AUTOUPD_OFF;
@@ -197,11 +197,11 @@ public:
if(bSet)
{
m_eFieldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS;
- }
- else if(m_eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS)
- {
+ }
+ else if(m_eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS)
+ {
m_eFieldUpdateFlags = AUTOUPD_FIELD_ONLY;
- }
+ }
};
bool IsUpdateCharts()const {return m_eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; }
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 0c11a9395a40..f500f618c48a 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1889,7 +1889,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
else
bIsPhysical = false;
- }
+ }
}
}
diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx
index c120bdd778f7..7a19b4c8d88e 100644
--- a/sw/source/uibase/uitest/uiobject.cxx
+++ b/sw/source/uibase/uitest/uiobject.cxx
@@ -172,12 +172,12 @@ void CommentUIObject::execute(const OUString& rAction,
{
if (rParameters.find("FROM") != rParameters.end() &&
rParameters.find("TO") != rParameters.end())
- {
+ {
tools::Long nMin = rParameters.find("FROM")->second.toInt32();
tools::Long nMax = rParameters.find("TO")->second.toInt32();
ESelection aNewSelection( 0 , nMin, mxCommentUIObject->GetOutliner()->GetParagraphCount()-1, nMax );
mxCommentUIObject->GetOutlinerView()->SetSelection( aNewSelection );
- }
+ }
}
else if (rAction == "LEAVE")
{
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 4eb96467fc80..3be1be85b1f3 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -196,7 +196,7 @@ void SwWrtShell::InsertByWord( const OUString & rStr)
bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
sal_Int32 nPos = 0, nStt = 0;
for( ; nPos < rStr.getLength(); nPos++ )
- {
+ {
bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
if( bTmpDelim != bDelim )
{
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index ce81e68fdd2e..0277ec36a780 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -5604,7 +5604,7 @@ void VCLXNumericField::setDecimalDigits( sal_Int16 Value )
double n = getValue();
pNumericFormatter->SetDecimalDigits( Value );
setValue( n );
- }
+ }
}
sal_Int16 VCLXNumericField::getDecimalDigits()
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index f36dcee2f0ef..c18f15f16495 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -514,7 +514,7 @@ void ControlModelContainerBase::insertByName( const OUString& aName, const Any&
{
Reference< beans::XPropertySet > xProps( xM, UNO_QUERY );
if ( xProps.is() )
- {
+ {
Reference< beans::XPropertySetInfo > xPropInfo = xProps->getPropertySetInfo();
@@ -530,7 +530,7 @@ void ControlModelContainerBase::insertByName( const OUString& aName, const Any&
xProps->setPropertyValue( sImageSourceProperty , aUrl );
}
- }
+ }
}
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index fb6448366978..8adb0f7a2f3a 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -1277,7 +1277,7 @@ void UnoControlModel::setFastPropertyValue( sal_Int32 nPropId, const css::uno::A
aGuard.clear();
setFastPropertyValues( 1, &nDescriptorId, &aNewValue, 1 );
fire( &nPropId, &aNewSingleValue, &aOldSingleValue, 1, false );
- }
+ }
else
setFastPropertyValues( 1, &nPropId, &rValue, 1 );
}
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index a2d01b06181d..b63d02dfd101 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -243,7 +243,7 @@ namespace ucb::ucp::ext
{
Reference< XDynamicResultSet > xSet = new ResultSet( m_xContext, this, aOpenCommand, i_rEnvironment );
aRet <<= xSet;
- }
+ }
if ( aOpenCommand.Sink.is() )
{
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index f6b187cca1a8..93d49ca2108b 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -170,12 +170,12 @@ ContentProvider::createDocumentContentIdentifier(
{
// model -> id -> content identifier -> queryContent
if ( !m_xDocsMgr.is() )
- {
+ {
throw lang::IllegalArgumentException(
"No Document Manager!",
static_cast< cppu::OWeakObject * >( this ),
1 );
- }
+ }
OUString aDocId = tdoc_ucp::OfficeDocumentsManager::queryDocumentId(xModel);
if ( aDocId.isEmpty() )
diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.cxx b/ucb/source/ucp/webdav-neon/ContentProperties.cxx
index 12bbf4f740cd..faee90874f5b 100644
--- a/ucb/source/ucp/webdav-neon/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav-neon/ContentProperties.cxx
@@ -552,7 +552,7 @@ void CachableContentProperties::addProperties(
{
if ( isCachable( rProp.Name, rProp.IsCaseSensitive ) )
m_aProps.addProperty( rProp );
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
index a50d2db55787..649838aaaae4 100644
--- a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
+++ b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
@@ -107,7 +107,7 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
dateTime.Seconds = aDateTime.Seconds;
return true;
- }
+ }
}
}
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index e470575a015b..d32f6ad7397e 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -247,7 +247,7 @@ OUString GetEnglishSearchFontName(const OUString& rInName)
rName[ i ] = c;
- }
+ }
else
{
// Only Fontnames with None-Ascii-Characters must be translated
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index ae8140526441..712c788aa3e2 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -62,7 +62,7 @@ sal_Bool SAL_CALL OTempFileService::getRemoveFile()
{
// the stream is already disconnected
throw css::uno::RuntimeException("Not connected to a file.");
- }
+ }
return mbRemoveFile;
};
@@ -98,7 +98,7 @@ OUString SAL_CALL OTempFileService::getResourceName()
if ( !mpTempFile )
{
throw css::uno::RuntimeException("Not connected to a file.");
-}
+ }
return mpTempFile->GetFileName();
};
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 050d27a19823..1c70be2c987d 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -485,7 +485,7 @@ static PointerStyle lcl_msoPointerToLOPointer( tools::Long msoPointerStyle )
{
aPointer = styles[ i ].loPointStyle;
break;
- }
+ }
}
return aPointer;
}
diff --git a/vbahelper/source/vbahelper/vbafontbase.cxx b/vbahelper/source/vbahelper/vbafontbase.cxx
index ea4278a47bcd..2610bdfc7284 100644
--- a/vbahelper/source/vbahelper/vbafontbase.cxx
+++ b/vbahelper/source/vbahelper/vbafontbase.cxx
@@ -157,7 +157,7 @@ VbaFontBase::getColorIndex()
sal_Int32 nElems = mxPalette->getCount();
sal_Int32 nIndex = -1;
for ( sal_Int32 count=0; count<nElems; ++count )
- {
+ {
sal_Int32 nPaletteColor = 0;
mxPalette->getByIndex( count ) >>= nPaletteColor;
if ( nPaletteColor == nColor )
diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index ac5174b2923d..7399311257a5 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -319,7 +319,7 @@ void scaleUp(const ScaleContext &rCtx, tools::Long nStartY, tools::Long nEndY)
ScaleFunction::generateComponent(pColorPtr0, pColorPtr1, nTempFX, nComponents2);
ScaleFunction::calculateDestination(pScanDest, nTempFY, nComponents1, nComponents2);
- }
+ }
}
}
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index 014e62aab8f3..92b3175143f2 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -187,7 +187,7 @@ BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHe
xMaskAcc->SetPixelOnData(pMaskScanLine, x, BitmapColor(*p));
p += 4;
}
- }
+ }
}
}
if (nBitCount == 32)
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f5bf3c47b427..395c52587de8 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1579,7 +1579,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
else if ( bGoRight && ( aSel.Max() < maText.getLength() ) )
{
if ( bWord )
- {
+ {
i18n::Boundary aBoundary = xBI->nextWord( maText.toString(), aSel.Max(),
GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
aSel.Max() = aBoundary.startPos;
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 42fb8231327d..24e619ff98e1 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -291,17 +291,17 @@ void NotebookBar::UpdateBackground()
Wallpaper aWallpaper(aPersona);
aWallpaper.SetStyle(WallpaperStyle::TopRight);
if (!aPersona.IsEmpty())
- {
- SetBackground(aWallpaper);
- UpdatePersonaSettings();
- GetOutDev()->SetSettings( PersonaSettings );
- }
+ {
+ SetBackground(aWallpaper);
+ UpdatePersonaSettings();
+ GetOutDev()->SetSettings( PersonaSettings );
+ }
else
- {
- SetBackground(rStyleSettings.GetDialogColor());
- UpdateDefaultSettings();
- GetOutDev()->SetSettings( DefaultSettings );
- }
+ {
+ SetBackground(rStyleSettings.GetDialogColor());
+ UpdateDefaultSettings();
+ GetOutDev()->SetSettings( DefaultSettings );
+ }
Invalidate(tools::Rectangle(Point(0,0), GetSizePixel()));
}
diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx
index 6bfb7617545c..1d22137d0fcf 100644
--- a/vcl/source/filter/ipict/ipict.cxx
+++ b/vcl/source/filter/ipict/ipict.cxx
@@ -1180,7 +1180,7 @@ void PictReader::ReadHeader()
sal_uInt32 nOffset;
int confidence[2] = { 0, 0};
for ( st = 0; st < 3 + 513; st++ )
- {
+ {
int actualConfid = 20; // the actual confidence
pPict->ResetError();
if (st < 2) nOffset = nStartPos+st*512;
@@ -1227,11 +1227,11 @@ void PictReader::ReadHeader()
if (sBuf[0] != 0x00) continue; // unrecoverable error
int numZero = 0;
do
- {
- numZero++;
- pPict->SeekRel(-1);
- pPict->ReadBytes(sBuf, 2);
- }
+ {
+ numZero++;
+ pPict->SeekRel(-1);
+ pPict->ReadBytes(sBuf, 2);
+ }
while ( sBuf[0] == 0x00 && numZero < 10);
actualConfid -= (numZero-1); // extra nop are dubious
if (!pPict->good()) continue;
@@ -1252,30 +1252,30 @@ void PictReader::ReadHeader()
if (!pPict->good()) continue;
if ( nExtVer == -2 ) // extended version 2 picture
- {
- sal_Int32 nHResFixed, nVResFixed;
- pPict->ReadInt32( nHResFixed ).ReadInt32( nVResFixed );
- pPict->ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 ); // reading the optimal bounding rect
- if (x1 > x2 || y1 > y2) continue; // bad bdbox
- if (st < 2 && actualConfid != 20) { confidence[st] = actualConfid; continue; }
-
- double fHRes = nHResFixed;
- fHRes /= 65536;
- double fVRes = nVResFixed;
- fVRes /= 65536;
- aHRes /= fHRes;
- aVRes /= fVRes;
- aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
- pPict->SeekRel( 4 ); // 4 bytes reserved
- return;
- }
+ {
+ sal_Int32 nHResFixed, nVResFixed;
+ pPict->ReadInt32( nHResFixed ).ReadInt32( nVResFixed );
+ pPict->ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 ); // reading the optimal bounding rect
+ if (x1 > x2 || y1 > y2) continue; // bad bdbox
+ if (st < 2 && actualConfid != 20) { confidence[st] = actualConfid; continue; }
+
+ double fHRes = nHResFixed;
+ fHRes /= 65536;
+ double fVRes = nVResFixed;
+ fVRes /= 65536;
+ aHRes /= fHRes;
+ aVRes /= fVRes;
+ aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
+ pPict->SeekRel( 4 ); // 4 bytes reserved
+ return;
+ }
else if (nExtVer == -1 ) { // basic version 2 picture
if (st < 2 && actualConfid != 20) { confidence[st] = actualConfid; continue; }
pPict->SeekRel( 16); // bdbox(4 fixed number)
pPict->SeekRel(4); // 4 bytes reserved
return;
}
- }
+ }
pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
}
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 5606b321af15..1d047781de4d 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -1105,9 +1105,9 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
// use the font's shortened name if needed
if ( aSearchShortName != aSearchName )
{
- PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName( aSearchShortName );
- if( pFoundData )
- {
+ PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName( aSearchShortName );
+ if( pFoundData )
+ {
#ifdef UNX
/* #96738# don't use mincho as a replacement for "MS Mincho" on X11: Mincho is
a korean bitmap font that is not suitable here. Use the font replacement table,
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 7e242d640837..5664857d3474 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -261,7 +261,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontF
for( int i = 0;
i < fontInfo->Count();
++i )
- {
+ {
PhysicalFontFace* f = fontInfo->Get( i );
if( f->GetFamilyName() == familyName )
{
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index 8423bbb1e37f..6a07eee9b619 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -103,10 +103,10 @@ Sequence< PropertyValue > OldStylePrintAdaptor::getPageParameters( int i_nPage )
void OldStylePrintAdaptor::printPage( int i_nPage ) const
{
if( i_nPage < int(mpData->maPages.size()) )
- {
- mpData->maPages[ i_nPage ].maPage.WindStart();
- mpData->maPages[ i_nPage ].maPage.Play(*getPrinter());
- }
+ {
+ mpData->maPages[ i_nPage ].maPage.WindStart();
+ mpData->maPages[ i_nPage ].maPage.Play(*getPrinter());
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index b2f6e4a874e7..724c692c8925 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -633,7 +633,7 @@ const char* OpenGLHelper::GLErrorString(GLenum errorCode)
{
return errors[i].string;
}
- }
+ }
return nullptr;
}
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index e2d04e877198..856cc5bd23a7 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -2171,7 +2171,7 @@ TransferableDataHelper TransferableDataHelper::CreateFromPrimarySelection()
TransferableDataHelper aRet;
if( xSelection.is() )
- {
+ {
SolarMutexReleaser aReleaser;
try
@@ -2179,15 +2179,15 @@ TransferableDataHelper TransferableDataHelper::CreateFromPrimarySelection()
Reference< XTransferable > xTransferable( xSelection->getContents() );
if( xTransferable.is() )
- {
+ {
aRet = TransferableDataHelper( xTransferable );
aRet.mxClipboard = xSelection;
- }
+ }
}
catch( const css::uno::Exception& )
{
}
- }
+ }
return aRet;
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 3fd3503dab80..0f3ee445ec33 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1708,14 +1708,14 @@ void ImplBorderWindow::Resize()
// since size of notebookbar changes, to make common persona for menubar
// and notebookbar persona should be set again with changed coordinates
if (!aPersona.IsEmpty())
- {
- Wallpaper aWallpaper(aPersona);
- aWallpaper.SetStyle(WallpaperStyle::TopRight);
- aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder),
- Size(aSize.Width() - nLeftBorder - nRightBorder,
- nNotebookBarHeight + nTopBorder)));
- mpNotebookBar->SetBackground(aWallpaper);
- }
+ {
+ Wallpaper aWallpaper(aPersona);
+ aWallpaper.SetStyle(WallpaperStyle::TopRight);
+ aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder),
+ Size(aSize.Width() - nLeftBorder - nRightBorder,
+ nNotebookBarHeight + nTopBorder)));
+ mpNotebookBar->SetBackground(aWallpaper);
+ }
mpNotebookBar->setPosSizePixel(
nLeftBorder, nTopBorder,
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 9399cab30527..f7135eeada0a 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -769,15 +769,16 @@ void SalDisplay::ModifierMapping()
{
KeyCode aNumLock = XKeysymToKeycode( pDisp_, XK_Num_Lock );
- if( aNumLock ) for( int i = ShiftMapIndex; i <= Mod5MapIndex; i++ )
- {
- if( pXModMap->modifiermap[i*pXModMap->max_keypermod] == aNumLock )
+ if( aNumLock )
+ for( int i = ShiftMapIndex; i <= Mod5MapIndex; i++ )
{
- bNumLockFromXS_ = False;
- nNumLockIndex_ = i;
- break;
+ if( pXModMap->modifiermap[i*pXModMap->max_keypermod] == aNumLock )
+ {
+ bNumLockFromXS_ = False;
+ nNumLockIndex_ = i;
+ break;
+ }
}
- }
}
XFreeModifiermap( pXModMap );
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 42896c694794..fe6f465b90b6 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -764,7 +764,7 @@ bool WMAdaptor::getNetWmName()
&& aRealType == XA_WINDOW
&& nFormat == 32
&& nItems != 0 )
- {
+ {
if ( ! GetGenericUnixSalData()->ErrorTrapPop( false ) )
{
GetGenericUnixSalData()->ErrorTrapPush();
@@ -850,7 +850,7 @@ bool WMAdaptor::getNetWmName()
}
GetGenericUnixSalData()->ErrorTrapPush();
}
- }
+ }
GetGenericUnixSalData()->ErrorTrapPop();
}
diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx
index 0e6556b24588..b32b34c2051a 100644
--- a/vcl/unx/generic/gdi/freetypetextrender.cxx
+++ b/vcl/unx/generic/gdi/freetypetextrender.cxx
@@ -126,7 +126,7 @@ void FreeTypeTextRenderImpl::GetDevFontList( PhysicalFontCollection* pFontCollec
aDFA.IncreaseQualityBy( 4096 );
const OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID );
rFreetypeManager.AddFontFile(rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA);
- }
+ }
// announce glyphcache fonts
rFreetypeManager.AnnounceFonts(pFontCollection);
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 6e1c392706a9..43f1b98a224a 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1042,7 +1042,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
GetDisplay()->GetRootWindow( m_nXScreen ),
&nCount );
for( int i = 0; i < nCount && !bGnomeIconSize; i++ )
- {
+ {
char* pName = XGetAtomName( GetXDisplay(), pProps[i] );
if( pName )
{
@@ -1050,7 +1050,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
bGnomeIconSize = true;
XFree( pName );
}
- }
+ }
if( pProps )
XFree( pProps );
}
diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index 1d53043f3d2b..53ac1e79df98 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -661,7 +661,7 @@ atk_object_wrapper_get_type()
static GType type = 0;
if (!type)
- {
+ {
static const GTypeInfo typeInfo =
{
sizeof (AtkObjectWrapperClass),
@@ -678,7 +678,7 @@ atk_object_wrapper_get_type()
type = g_type_register_static (ATK_TYPE_OBJECT,
"OOoAtkObj",
&typeInfo, GTypeFlags(0)) ;
- }
+ }
return type;
}
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index cb73a86c3af3..14f7762fd7b0 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -797,18 +797,18 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles()
bool bChangeFilter = true;
if ( m_pFilterVector)
for (auto const& filter : *m_pFilterVector)
- {
- if( lcl_matchFilter( filter.getFilter(), "*." + sExtension ) )
{
- if( aNewFilter.isEmpty() )
- aNewFilter = filter.getTitle();
+ if( lcl_matchFilter( filter.getFilter(), "*." + sExtension ) )
+ {
+ if( aNewFilter.isEmpty() )
+ aNewFilter = filter.getTitle();
- if( aOldFilter == filter.getTitle() )
- bChangeFilter = false;
+ if( aOldFilter == filter.getTitle() )
+ bChangeFilter = false;
- bExtensionTypedIn = true;
+ bExtensionTypedIn = true;
+ }
}
- }
if( bChangeFilter && bExtensionTypedIn )
{
gchar* pCurrentName = gtk_file_chooser_get_current_name(GTK_FILE_CHOOSER(m_pDialog));
diff --git a/vcl/unx/gtk3/hudawareness.cxx b/vcl/unx/gtk3/hudawareness.cxx
index be84933249e2..ebcbaf747fca 100644
--- a/vcl/unx/gtk3/hudawareness.cxx
+++ b/vcl/unx/gtk3/hudawareness.cxx
@@ -36,13 +36,13 @@ hud_awareness_method_call (GDBusConnection * /* connection */,
HudAwarenessHandle *handle = static_cast<HudAwarenessHandle*>(user_data);
if (g_str_equal (method_name, "HudActiveChanged"))
- {
+ {
gboolean active;
g_variant_get (parameters, "(b)", &active);
(* handle->callback) (active, handle->user_data);
- }
+ }
g_dbus_method_invocation_return_value (invocation, nullptr);
}
@@ -65,7 +65,7 @@ hud_awareness_register (GDBusConnection *connection,
vtable.method_call = hud_awareness_method_call;
if G_UNLIKELY (iface == nullptr)
- {
+ {
GError *local_error = nullptr;
info = g_dbus_node_info_new_for_xml ("<node>"
@@ -80,17 +80,17 @@ hud_awareness_register (GDBusConnection *connection,
g_assert_no_error (local_error);
iface = g_dbus_node_info_lookup_interface (info, "com.canonical.hud.Awareness");
g_assert (iface != nullptr);
- }
+ }
handle = static_cast<HudAwarenessHandle*>(g_malloc (sizeof (HudAwarenessHandle)));
object_id = g_dbus_connection_register_object (connection, object_path, iface, &vtable, handle, &g_free, error);
if (object_id == 0)
- {
+ {
g_free (handle);
return 0;
- }
+ }
handle->connection = g_object_ref(connection);
handle->callback = callback;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e02549daf430..e5823f6b43e5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3962,7 +3962,7 @@ void DomainMapper_Impl::SetNumberFormat( const OUString& rCommand,
uno::Reference< util::XNumberFormatter> xFormatter(util::NumberFormatter::create(m_xComponentContext), uno::UNO_QUERY_THROW);
xFormatter->attachNumberFormatsSupplier( xNumberSupplier );
nKey = xFormatter->detectNumberFormat( 0, rCommand );
- }
+ }
else
{
nKey = xNumberSupplier->getNumberFormats()->addNewConverted( sFormat, aUSLocale, aCurrentLocale );
@@ -6584,7 +6584,7 @@ void DomainMapper_Impl::PopFieldContext()
if(xFieldProperties.is())
SetNumberFormat( pContext->GetResult(), xFieldProperties, true );
SetFieldResult( pContext->GetResult() );
- }
+ }
//insert the field, TC or TOC
uno::Reference< text::XTextAppend > xTextAppend;
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 439d45e790f3..37eb36b78d43 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -94,7 +94,7 @@ OUString Databases::expandURL( const OUString& aURL, const Reference< uno::XComp
xFac = uri::UriReferenceFactory::create( xContext );
xMacroExpander = util::theMacroExpander::get(xContext);
- }
+ }
OUString aRetURL = aURL;
if( xMacroExpander.is() )
@@ -112,7 +112,7 @@ OUString Databases::expandURL( const OUString& aURL, const Reference< uno::XComp
aRetURL = sxUri->expand( xMacroExpander );
}
}
- }
+ }
return aRetURL;
}
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 83505b36608b..3b7ecf190cc6 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -680,7 +680,7 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext )
aDirItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None &&
aFileStatus.isValid( osl_FileStatus_Mask_FileURL ) &&
aFileStatus.isValid( osl_FileStatus_Mask_FileName ) )
- {
+ {
aFileUrl = aFileStatus.getFileURL();
aFileName = aFileStatus.getFileName();
int idx_ = aFileName.lastIndexOf( '.' );
@@ -694,7 +694,7 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext )
( str[idx_ + 2] == 'r' || str[idx_ + 2] == 'R' ) &&
( str[idx_ + 3] == 'e' || str[idx_ + 3] == 'E' ) &&
( str[idx_ + 4] == 'e' || str[idx_ + 4] == 'E' ) )
- {
+ {
OUString baseName = aFileName.copy(0,idx_).toAsciiLowerCase();
if(! showBasic && baseName == "sbasic" )
continue;
@@ -709,8 +709,8 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext )
configData.vFileURL.push_back( aFileUrl );
aFile.close();
}
- }
- }
+ }
+ }
aDirectory.close();
}
@@ -806,8 +806,8 @@ TVChildTarget::getBooleanKey(const Reference<
XHierarchicalNameAccess >& xHierAccess,
const char* key)
{
- bool ret = false;
- if( xHierAccess.is() )
+ bool ret = false;
+ if( xHierAccess.is() )
{
Any aAny;
try
@@ -821,7 +821,7 @@ TVChildTarget::getBooleanKey(const Reference<
}
aAny >>= ret;
}
- return ret;
+ return ret;
}
void TVChildTarget::subst( OUString& instpath )
@@ -1088,7 +1088,7 @@ OUString TreeFileIterator::expandURL( const OUString& aURL )
xFac = uri::UriReferenceFactory::create( m_xContext );
xMacroExpander = util::theMacroExpander::get(m_xContext);
- }
+ }
OUString aRetURL = aURL;
Reference< uri::XUriReference > uriRef;
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index b336b8b56aa1..563798b7c599 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -734,7 +734,7 @@ void SchXMLDataPointContext::startFastElement (sal_Int32 /*Element*/,
// Deprecated. New documents use the chart:data-label element
// instead in order to store custom label text.
case XML_ELEMENT(LO_EXT, XML_CUSTOM_LABEL_FIELD):
- if (!mbHasLabelParagraph)
+ if (!mbHasLabelParagraph)
{
sCustomLabelField = aIter.toString();
mDataPoint.mCustomLabels.push_back(sCustomLabelField);
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 5ed81e82a247..d9d4116a2c55 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1809,8 +1809,8 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
if( nFound & Found::SPEED && eEffect != presentation::AnimationEffect_NONE )
{
- if( eSpeed != presentation::AnimationSpeed_MEDIUM )
- {
+ if( eSpeed != presentation::AnimationSpeed_MEDIUM )
+ {
SvXMLUnitConverter::convertEnum( msBuffer, eSpeed, aXML_AnimationSpeed_EnumMap );
mrExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_SPEED, msBuffer.makeStringAndClear() );
}
@@ -1852,7 +1852,7 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_PRESENTATION, XML_SOUND, true, true );
}
- }
+ }
}
else if( aClickEventType == gsStarBasic )
{
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index b965b7a5a8f8..c61f9351ffc3 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -160,26 +160,26 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
aStemBuffer.append( rFamilyData.maStrPrefix );
if (!rParentName.isEmpty())
- {
- aStemBuffer.append("-");
- aStemBuffer.append(rParentName);
- }
+ {
+ aStemBuffer.append("-");
+ aStemBuffer.append(rParentName);
+ }
// Create a name based on the properties used
for(XMLPropertyState const & rState : maProperties)
- {
- if (rState.mnIndex == -1)
- continue;
- OUString sXMLName(rFamilyData.mxMapper->getPropertySetMapper()->GetEntryXMLName(rState.mnIndex));
- if (sXMLName.isEmpty())
- continue;
- aStemBuffer.append("-");
- aStemBuffer.append(static_cast<sal_Int32>(rFamilyData.mxMapper->getPropertySetMapper()->GetEntryNameSpace(rState.mnIndex)));
- aStemBuffer.append(":");
- aStemBuffer.append(sXMLName);
- aStemBuffer.append("=");
- aStemBuffer.append(any2string(rState.maValue));
- }
+ {
+ if (rState.mnIndex == -1)
+ continue;
+ OUString sXMLName(rFamilyData.mxMapper->getPropertySetMapper()->GetEntryXMLName(rState.mnIndex));
+ if (sXMLName.isEmpty())
+ continue;
+ aStemBuffer.append("-");
+ aStemBuffer.append(static_cast<sal_Int32>(rFamilyData.mxMapper->getPropertySetMapper()->GetEntryNameSpace(rState.mnIndex)));
+ aStemBuffer.append(":");
+ aStemBuffer.append(sXMLName);
+ aStemBuffer.append("=");
+ aStemBuffer.append(any2string(rState.maValue));
+ }
#if 0
// Finally append an incremental counter in an attempt to make identical
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 132e3f701a2e..6568d3ea9496 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -773,7 +773,7 @@ void SvxXMLNumRuleExport::exportOutline()
// style:name="..."
GetExport().CheckAttrList();
if ( !sOutlineStyleName.isEmpty() )
- {
+ {
bool bEncoded = false;
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME,
GetExport().EncodeStyleName( sOutlineStyleName,
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 9453e1963729..38ec932fe132 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -273,7 +273,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( XmlStyl
IndicesType::iterator aFind = pIndices->find(aIndex);
if( aFind != pIndices->end() )
pStyle = aFind->GetStyle();
- }
+ }
else
{
for( size_t i = 0; !pStyle && i < aStyles.size(); i++ )
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 6deb085fcba7..c4baf426bf95 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -395,8 +395,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
const sal_Int32 nColumnCount = xtableColumnsIndexAccess->getCount();
for( sal_Int32 nColumn = 0; nColumn < nColumnCount; ++nColumn )
{
- Reference< XPropertySet > xColumnProperties( xtableColumnsIndexAccess->getByIndex(nColumn) , UNO_QUERY );
- if ( xColumnProperties.is() )
+ Reference< XPropertySet > xColumnProperties( xtableColumnsIndexAccess->getByIndex(nColumn) , UNO_QUERY );
+ if ( xColumnProperties.is() )
{
// table:style-name
if( rTableInfo )
@@ -411,8 +411,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
// have identical properties. If yes, attr table:number-columns-repeated
// has to be written.
SvXMLElementExport tableColumnElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, true, true );
- }
- }
+ }
+ }
}
// ODF export for a table cell.
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 93f43ee6c082..0513dc8e5273 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -523,21 +523,21 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
break;
case FIELD_ID_DOCINFO_CREATION_TIME:
- if (GetBoolProperty(gsPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DOCINFO_CREATION_DATE;
}
break;
case FIELD_ID_DOCINFO_PRINT_TIME:
- if (GetBoolProperty(gsPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DOCINFO_PRINT_DATE;
}
break;
case FIELD_ID_DOCINFO_SAVE_TIME:
- if (GetBoolProperty(gsPropertyIsDate, xPropSet))
+ if (GetBoolProperty(gsPropertyIsDate, xPropSet))
{
nToken = FIELD_ID_DOCINFO_SAVE_DATE;
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index c74fbeb0fcd7..92b12c71cff5 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2062,7 +2062,7 @@ XMLNumberedParaContext::XMLNumberedParaContext(
XMLTextListsHelper& rTextListsHelper(
i_rImport.GetTextImport()->GetTextListHelper() );
if (m_ListId.isEmpty())
- {
+ {
SAL_WARN_IF(0 <= i_rImport.GetODFVersion().compareTo(u"1.2"), "xmloff.text", "invalid numbered-paragraph: no list-id (1.2)");
m_ListId = rTextListsHelper.GetNumberedParagraphListId(m_Level,
StyleName);