[Libreoffice-commits] core.git: compilerplugins/clang include/test sw/inc sw/source test/source testtools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 3 09:57:22 UTC 2018
compilerplugins/clang/staticconstfield.cxx | 21 +++++---
include/test/bootstrapfixture.hxx | 4 -
include/test/container/xelementaccess.hxx | 2
include/test/container/xindexaccess.hxx | 2
include/test/container/xnamecontainer.hxx | 2
include/test/container/xnamed.hxx | 2
include/test/container/xnamereplace.hxx | 2
include/test/screenshot_test.hxx | 3 -
include/test/sheet/xformulaquery.hxx | 8 +--
include/test/sheet/xnamedranges.hxx | 2
include/test/sheet/xspreadsheetdocument.hxx | 2
include/test/sheet/xspreadsheets2.hxx | 3 -
include/test/unoapi_test.hxx | 2
include/test/util/xreplaceable.hxx | 4 -
include/test/util/xsearchable.hxx | 4 -
sw/inc/EnhancedPDFExportHelper.hxx | 4 -
sw/inc/SwUndoField.hxx | 6 +-
sw/inc/ToxLinkProcessor.hxx | 8 +--
sw/inc/ToxTabStopTokenHandler.hxx | 6 +-
sw/inc/accmap.hxx | 2
sw/inc/acmplwrd.hxx | 2
sw/inc/calc.hxx | 2
sw/inc/ccoll.hxx | 4 -
sw/inc/crstate.hxx | 2
sw/inc/ddefld.hxx | 2
sw/inc/docufld.hxx | 6 +-
sw/inc/editsh.hxx | 2
sw/inc/expfld.hxx | 8 +--
sw/inc/fldbas.hxx | 2
sw/inc/fmtfld.hxx | 2
sw/inc/fmthdft.hxx | 4 -
sw/inc/frmfmt.hxx | 2
sw/inc/gotodlg.hxx | 2
sw/inc/grfatr.hxx | 2
sw/inc/hhcwrp.hxx | 2
sw/inc/hints.hxx | 28 +++++------
sw/inc/htmltbl.hxx | 36 +++++++-------
sw/inc/modcfg.hxx | 2
sw/inc/modeltoviewhelper.hxx | 6 +-
sw/inc/node.hxx | 6 +-
sw/inc/pagedesc.hxx | 2
sw/inc/prtopt.hxx | 2
sw/inc/redline.hxx | 4 -
sw/inc/shellio.hxx | 16 +++---
sw/inc/shellres.hxx | 52 ++++++++++-----------
sw/inc/splargs.hxx | 6 +-
sw/inc/swatrset.hxx | 2
sw/inc/swcli.hxx | 2
sw/inc/swscanner.hxx | 6 +-
sw/inc/tblsel.hxx | 8 +--
sw/inc/tox.hxx | 6 +-
sw/inc/txatritr.hxx | 2
sw/inc/undobj.hxx | 4 -
sw/inc/unochart.hxx | 4 -
sw/inc/unosett.hxx | 2
sw/inc/unostyle.hxx | 10 ++--
sw/inc/unotxdoc.hxx | 6 +-
sw/source/core/access/acccontext.hxx | 2
sw/source/core/access/accfrmobjmap.hxx | 6 +-
sw/source/core/access/acchyperlink.hxx | 6 +-
sw/source/core/access/accmap.cxx | 6 +-
sw/source/core/access/accpara.cxx | 2
sw/source/core/access/acctable.cxx | 4 -
sw/source/core/crsr/crbm.cxx | 2
sw/source/core/crsr/findattr.cxx | 6 +-
sw/source/core/crsr/findtxt.cxx | 4 -
sw/source/core/crsr/swcrsr.cxx | 2
sw/source/core/doc/CntntIdxStore.cxx | 4 -
sw/source/core/doc/DocumentStylePoolManager.cxx | 8 +--
sw/source/core/doc/SwStyleNameMapper.cxx | 2
sw/source/core/doc/doccomp.cxx | 2
sw/source/core/doc/docedt.cxx | 4 -
sw/source/core/doc/doctxm.cxx | 2
sw/source/core/doc/htmltbl.cxx | 6 +-
sw/source/core/doc/tblrwcl.cxx | 2
sw/source/core/docnode/ndcopy.cxx | 4 -
sw/source/core/docnode/ndtbl.cxx | 2
sw/source/core/docnode/ndtbl1.cxx | 2
sw/source/core/docnode/node2lay.cxx | 2
sw/source/core/docnode/threadmanager.hxx | 2
sw/source/core/draw/dcontact.cxx | 4 -
sw/source/core/fields/reffld.cxx | 2
sw/source/core/inc/SwUndoFmt.hxx | 4 -
sw/source/core/inc/SwUndoPageDesc.hxx | 2
sw/source/core/inc/SwXMLBlockImport.hxx | 2
sw/source/core/inc/UndoCore.hxx | 6 +-
sw/source/core/inc/UndoDelete.hxx | 4 -
sw/source/core/inc/UndoDraw.hxx | 2
sw/source/core/inc/UndoInsert.hxx | 20 ++++----
sw/source/core/inc/UndoNumbering.hxx | 18 +++----
sw/source/core/inc/UndoOverwrite.hxx | 2
sw/source/core/inc/UndoRedline.hxx | 4 -
sw/source/core/inc/UndoSplitMove.hxx | 4 -
sw/source/core/inc/UndoTable.hxx | 38 +++++++--------
sw/source/core/inc/acorrect.hxx | 12 ++--
sw/source/core/inc/blink.hxx | 2
sw/source/core/inc/docsort.hxx | 4 -
sw/source/core/inc/fieldhint.hxx | 2
sw/source/core/inc/fntcache.hxx | 2
sw/source/core/inc/frmtool.hxx | 4 -
sw/source/core/inc/mvsave.hxx | 12 ++--
sw/source/core/inc/pagedeschint.hxx | 2
sw/source/core/inc/rolbck.hxx | 4 -
sw/source/core/inc/rootfrm.hxx | 2
sw/source/core/inc/scriptinfo.hxx | 4 -
sw/source/core/inc/swblocks.hxx | 6 +-
sw/source/core/inc/swfntcch.hxx | 2
sw/source/core/inc/swfont.hxx | 2
sw/source/core/inc/tblrwcl.hxx | 4 -
sw/source/core/inc/txmsrt.hxx | 24 ++++-----
sw/source/core/inc/txtfrm.hxx | 4 -
sw/source/core/inc/unobookmark.hxx | 2
sw/source/core/inc/unoevent.hxx | 4 -
sw/source/core/inc/unoflatpara.hxx | 2
sw/source/core/layout/dbg_lay.cxx | 6 +-
sw/source/core/layout/layhelp.hxx | 14 ++---
sw/source/core/layout/layouter.cxx | 2
sw/source/core/layout/objectformattertxtfrm.hxx | 2
sw/source/core/layout/paintfrm.cxx | 10 ++--
sw/source/core/text/atrhndl.hxx | 2
sw/source/core/text/itrtxt.hxx | 2
sw/source/core/text/pordrop.hxx | 4 -
sw/source/core/text/porexp.hxx | 4 -
sw/source/core/text/porfld.hxx | 4 -
sw/source/core/text/porftn.hxx | 2
sw/source/core/text/porhyph.hxx | 2
sw/source/core/text/pormulti.hxx | 2
sw/source/core/text/porrst.hxx | 12 ++--
sw/source/core/text/txtdrop.cxx | 8 +--
sw/source/core/text/txtfly.cxx | 2
sw/source/core/text/xmldump.cxx | 2
sw/source/core/tox/tox.cxx | 4 -
sw/source/core/txtnode/fntcache.cxx | 6 +-
sw/source/core/txtnode/modeltoviewhelper.cxx | 8 +--
sw/source/core/undo/unins.cxx | 4 -
sw/source/core/undo/unovwr.cxx | 2
sw/source/core/undo/untbl.cxx | 10 ++--
sw/source/core/unocore/unocoll.cxx | 6 +-
sw/source/core/unocore/unodraw.cxx | 2
sw/source/core/unocore/unoevent.cxx | 3 -
sw/source/core/unocore/unofield.cxx | 8 +--
sw/source/core/unocore/unoidx.cxx | 2
sw/source/core/unocore/unoparagraph.cxx | 4 -
sw/source/core/unocore/unoportenum.cxx | 2
sw/source/core/unocore/unostyle.cxx | 28 +++++------
sw/source/core/unocore/unotext.cxx | 4 -
sw/source/core/view/vprint.cxx | 2
sw/source/filter/ascii/parasc.cxx | 2
sw/source/filter/basflt/fltini.cxx | 2
sw/source/filter/html/css1atr.cxx | 2
sw/source/filter/html/htmlatr.cxx | 4 -
sw/source/filter/html/htmlcss1.cxx | 6 +-
sw/source/filter/html/htmlfld.cxx | 2
sw/source/filter/html/htmlfly.hxx | 4 -
sw/source/filter/html/htmlform.cxx | 8 +--
sw/source/filter/html/htmltab.cxx | 32 ++++++-------
sw/source/filter/html/parcss1.hxx | 4 -
sw/source/filter/html/svxcss1.hxx | 6 +-
sw/source/filter/html/swcss1.hxx | 2
sw/source/filter/html/swhtml.hxx | 14 ++---
sw/source/filter/html/wrthtml.hxx | 10 ++--
sw/source/filter/inc/fltshell.hxx | 24 ++++-----
sw/source/filter/inc/msfilter.hxx | 2
sw/source/filter/inc/wrtswtbl.hxx | 30 ++++++------
sw/source/filter/ww8/WW8TableInfo.hxx | 6 +-
sw/source/filter/ww8/attributeoutputbase.hxx | 2
sw/source/filter/ww8/docxattributeoutput.cxx | 4 -
sw/source/filter/ww8/docxattributeoutput.hxx | 2
sw/source/filter/ww8/docxexport.hxx | 2
sw/source/filter/ww8/docxhelper.hxx | 2
sw/source/filter/ww8/rtfexport.hxx | 2
sw/source/filter/ww8/writerhelper.cxx | 4 -
sw/source/filter/ww8/writerwordglue.cxx | 2
sw/source/filter/ww8/wrtww8.hxx | 42 ++++++++---------
sw/source/filter/ww8/ww8glsy.hxx | 2
sw/source/filter/ww8/ww8graf.hxx | 2
sw/source/filter/ww8/ww8par.hxx | 58 ++++++++++++------------
sw/source/filter/xml/XMLRedlineImportHelper.hxx | 2
sw/source/filter/xml/xmlfmt.cxx | 4 -
sw/source/filter/xml/xmlitmap.hxx | 6 +-
sw/source/filter/xml/xmlmeta.cxx | 2
sw/source/filter/xml/xmltble.cxx | 2
sw/source/filter/xml/xmltbli.cxx | 18 +++----
sw/source/filter/xml/xmltexti.cxx | 4 -
sw/source/ui/config/optpage.cxx | 4 -
sw/source/ui/dbui/createaddresslistdialog.hxx | 2
sw/source/ui/dbui/dbinsdlg.cxx | 4 -
sw/source/ui/dbui/mmaddressblockpage.hxx | 6 +-
sw/source/ui/envelp/labelexp.cxx | 2
sw/source/ui/envelp/labfmt.hxx | 20 ++++----
sw/source/ui/frmdlg/column.cxx | 17 +++----
sw/source/ui/frmdlg/cption.cxx | 2
sw/source/ui/frmdlg/frmpage.cxx | 30 ++++++------
sw/source/ui/inc/mmresultdialogs.hxx | 18 +++----
sw/source/ui/misc/impfnote.hxx | 2
sw/source/ui/vba/vbaaddin.hxx | 2
sw/source/ui/vba/vbabookmark.hxx | 2
sw/source/ui/vba/vbaborders.cxx | 4 -
sw/source/ui/vba/vbacell.hxx | 4 -
sw/source/ui/vba/vbacells.cxx | 8 +--
sw/source/ui/vba/vbacells.hxx | 4 -
sw/source/ui/vba/vbacolumn.hxx | 2
sw/source/ui/vba/vbadialog.cxx | 2
sw/source/ui/vba/vbadocuments.cxx | 2
sw/source/ui/vba/vbafield.cxx | 2
sw/source/ui/vba/vbaheaderfooter.hxx | 4 -
sw/source/ui/vba/vbaheadersfooters.cxx | 2
sw/source/ui/vba/vbaheadersfooters.hxx | 2
sw/source/ui/vba/vbalistgallery.hxx | 2
sw/source/ui/vba/vbalisthelper.hxx | 4 -
sw/source/ui/vba/vbalistlevel.hxx | 2
sw/source/ui/vba/vbalistlevels.hxx | 2
sw/source/ui/vba/vbalisttemplates.hxx | 2
sw/source/ui/vba/vbarow.hxx | 2
sw/source/ui/vba/vbastyles.cxx | 4 -
sw/source/ui/vba/vbatemplate.hxx | 2
sw/source/ui/vba/vbavariable.hxx | 2
sw/source/uibase/app/docst.cxx | 6 +-
sw/source/uibase/config/viewopt.cxx | 4 -
sw/source/uibase/dbui/dbui.cxx | 9 ++-
sw/source/uibase/dbui/maildispatcher.cxx | 2
sw/source/uibase/dochdl/gloshdl.cxx | 6 +-
sw/source/uibase/docvw/AnchorOverlayObject.cxx | 12 ++--
sw/source/uibase/docvw/PostItMgr.cxx | 4 -
sw/source/uibase/docvw/ShadowOverlayObject.cxx | 6 +-
sw/source/uibase/docvw/edtwin.cxx | 2
sw/source/uibase/docvw/romenu.hxx | 44 +++++++++---------
sw/source/uibase/fldui/fldmgr.cxx | 10 ++--
sw/source/uibase/inc/DashedLine.hxx | 2
sw/source/uibase/inc/HeaderFooterWin.hxx | 2
sw/source/uibase/inc/break.hxx | 2
sw/source/uibase/inc/chrdlg.hxx | 2
sw/source/uibase/inc/colex.hxx | 2
sw/source/uibase/inc/column.hxx | 1
sw/source/uibase/inc/content.hxx | 18 +++----
sw/source/uibase/inc/conttree.hxx | 20 ++++----
sw/source/uibase/inc/convert.hxx | 2
sw/source/uibase/inc/cption.hxx | 2
sw/source/uibase/inc/dbinsdlg.hxx | 2
sw/source/uibase/inc/dbui.hxx | 2
sw/source/uibase/inc/drpcps.hxx | 4 -
sw/source/uibase/inc/fldmgr.hxx | 18 +++----
sw/source/uibase/inc/frmdlg.hxx | 6 +-
sw/source/uibase/inc/frmmgr.hxx | 2
sw/source/uibase/inc/gloshdl.hxx | 2
sw/source/uibase/inc/glossary.hxx | 2
sw/source/uibase/inc/hyp.hxx | 2
sw/source/uibase/inc/insfnote.hxx | 2
sw/source/uibase/inc/label.hxx | 4 -
sw/source/uibase/inc/labimg.hxx | 2
sw/source/uibase/inc/mailmergehelper.hxx | 18 +++----
sw/source/uibase/inc/mailmergewizard.hxx | 14 ++---
sw/source/uibase/inc/olmenu.hxx | 28 +++++------
sw/source/uibase/inc/optload.hxx | 22 ++++-----
sw/source/uibase/inc/optpage.hxx | 10 ++--
sw/source/uibase/inc/outline.hxx | 4 -
sw/source/uibase/inc/pview.hxx | 2
sw/source/uibase/inc/redlndlg.hxx | 24 ++++-----
sw/source/uibase/inc/scroll.hxx | 10 ++--
sw/source/uibase/inc/shdwcrsr.hxx | 2
sw/source/uibase/inc/srtdlg.hxx | 8 +--
sw/source/uibase/inc/swcont.hxx | 6 +-
sw/source/uibase/inc/swuicnttab.hxx | 16 +++---
sw/source/uibase/inc/swuiidxmrk.hxx | 6 +-
sw/source/uibase/inc/swuipardlg.hxx | 2
sw/source/uibase/inc/swwrtshitem.hxx | 2
sw/source/uibase/inc/tabledlg.hxx | 2
sw/source/uibase/inc/tablemgr.hxx | 2
sw/source/uibase/inc/tautofmt.hxx | 16 +++---
sw/source/uibase/inc/tmpdlg.hxx | 6 +-
sw/source/uibase/inc/uiitems.hxx | 4 -
sw/source/uibase/inc/uivwimp.hxx | 2
sw/source/uibase/inc/unoatxt.hxx | 6 --
sw/source/uibase/inc/unodispatch.hxx | 2
sw/source/uibase/inc/unomod.hxx | 2
sw/source/uibase/inc/unotools.hxx | 4 -
sw/source/uibase/inc/usrpref.hxx | 4 -
sw/source/uibase/inc/wrtsh.hxx | 6 +-
sw/source/uibase/lingu/sdrhhcwrap.hxx | 8 +--
sw/source/uibase/ribbar/workctrl.cxx | 8 +--
sw/source/uibase/sidebar/StylePresetsPanel.hxx | 2
sw/source/uibase/sidebar/ThemePanel.cxx | 2
sw/source/uibase/uno/unoatxt.cxx | 4 -
sw/source/uibase/uno/unomailmerge.cxx | 2
test/source/diff/diff.cxx | 4 -
test/source/screenshot_test.cxx | 10 ++--
test/source/sheet/xspreadsheets2.cxx | 21 ++++----
testtools/source/bridgetest/multi.cxx | 2
288 files changed, 900 insertions(+), 904 deletions(-)
New commits:
commit 4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 1 09:08:12 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 3 11:56:43 2018 +0200
loplugin:constfields in sw
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f
Reviewed-on: https://gerrit.libreoffice.org/61177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/staticconstfield.cxx b/compilerplugins/clang/staticconstfield.cxx
index bfc32a8c059f..79fda38531e9 100644
--- a/compilerplugins/clang/staticconstfield.cxx
+++ b/compilerplugins/clang/staticconstfield.cxx
@@ -84,13 +84,20 @@ bool StaticConstField::TraverseConstructorInitializer(CXXCtorInitializer* init)
return true;
}
- if (found)
- {
- report(DiagnosticsEngine::Warning, "field can be static const", init->getSourceLocation())
- << init->getSourceRange();
- report(DiagnosticsEngine::Note, "field here", init->getMember()->getLocation())
- << init->getMember()->getSourceRange();
- }
+ if (!found)
+ return true;
+
+ std::string fn = handler.getMainFileName();
+ loplugin::normalizeDotDotInFilePath(fn);
+
+ // unusual case where a user constructor sets a field to one value, and a copy constructor sets it to a different value
+ if (fn == SRCDIR "/sw/source/core/attr/hints.cxx")
+ return true;
+
+ report(DiagnosticsEngine::Warning, "field can be static const", init->getSourceLocation())
+ << init->getSourceRange();
+ report(DiagnosticsEngine::Note, "field here", init->getMember()->getLocation())
+ << init->getMember()->getSourceRange();
return true;
}
diff --git a/include/test/bootstrapfixture.hxx b/include/test/bootstrapfixture.hxx
index a70dca82d6e6..986ff1a7578f 100644
--- a/include/test/bootstrapfixture.hxx
+++ b/include/test/bootstrapfixture.hxx
@@ -43,8 +43,8 @@ enum ValidationFormat
// run of unit tests ...
class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase
{
- bool m_bNeedUCB;
- bool m_bAssertOnDialog;
+ bool const m_bNeedUCB;
+ bool const m_bAssertOnDialog;
public:
DECL_STATIC_LINK( BootstrapFixture, ImplInitFilterHdl, ConvertData&, bool );
diff --git a/include/test/container/xelementaccess.hxx b/include/test/container/xelementaccess.hxx
index d1830ef429ed..efdca128fe79 100644
--- a/include/test/container/xelementaccess.hxx
+++ b/include/test/container/xelementaccess.hxx
@@ -28,7 +28,7 @@ public:
virtual ~XElementAccess() {}
private:
- css::uno::Type maType;
+ css::uno::Type const maType;
};
}
diff --git a/include/test/container/xindexaccess.hxx b/include/test/container/xindexaccess.hxx
index 0496ffae9158..415008880e52 100644
--- a/include/test/container/xindexaccess.hxx
+++ b/include/test/container/xindexaccess.hxx
@@ -29,7 +29,7 @@ protected:
~XIndexAccess() {}
private:
- sal_Int32 mnItems;
+ sal_Int32 const mnItems;
};
}
diff --git a/include/test/container/xnamecontainer.hxx b/include/test/container/xnamecontainer.hxx
index 14239382340b..9ff614473795 100644
--- a/include/test/container/xnamecontainer.hxx
+++ b/include/test/container/xnamecontainer.hxx
@@ -31,7 +31,7 @@ public:
virtual ~XNameContainer() {}
private:
- OUString maNameToRemove;
+ OUString const maNameToRemove;
};
}
diff --git a/include/test/container/xnamed.hxx b/include/test/container/xnamed.hxx
index e32880685438..f9f708114f68 100644
--- a/include/test/container/xnamed.hxx
+++ b/include/test/container/xnamed.hxx
@@ -27,7 +27,7 @@ public:
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
private:
- OUString maTestName;
+ OUString const maTestName;
};
diff --git a/include/test/container/xnamereplace.hxx b/include/test/container/xnamereplace.hxx
index 9ce6dfd7192a..2d52fc2037eb 100644
--- a/include/test/container/xnamereplace.hxx
+++ b/include/test/container/xnamereplace.hxx
@@ -31,7 +31,7 @@ public:
virtual ~XNameReplace() {}
private:
- OUString maTestReplacementName;
+ OUString const maTestReplacementName;
};
diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
index 7bf8874a1361..74bcfc721d53 100644
--- a/include/test/screenshot_test.hxx
+++ b/include/test/screenshot_test.hxx
@@ -24,9 +24,6 @@ typedef std::map< OString, sal_uInt32 > mapType;
class OOO_DLLPUBLIC_TEST ScreenshotTest : public test::BootstrapFixture, public unotest::MacrosTest
{
private:
- /// the target directory for screenshots
- OUString m_aScreenshotDirectory;
-
/// The current UI language
OUString maCurrentLanguage;
diff --git a/include/test/sheet/xformulaquery.hxx b/include/test/sheet/xformulaquery.hxx
index a306a6838cf4..7beb944e192c 100644
--- a/include/test/sheet/xformulaquery.hxx
+++ b/include/test/sheet/xformulaquery.hxx
@@ -45,10 +45,10 @@ protected:
private:
css::uno::Reference<css::table::XCell> m_xCell;
- css::table::CellRangeAddress m_aCellRangeAddressDependents;
- css::table::CellRangeAddress m_aCellRangeAddressPrecedents;
- unsigned int m_nIdxDependents;
- unsigned int m_nIdxPrecedents;
+ css::table::CellRangeAddress const m_aCellRangeAddressDependents;
+ css::table::CellRangeAddress const m_aCellRangeAddressPrecedents;
+ unsigned int const m_nIdxDependents;
+ unsigned int const m_nIdxPrecedents;
};
} // namespace apitest
diff --git a/include/test/sheet/xnamedranges.hxx b/include/test/sheet/xnamedranges.hxx
index e3ba9e5f57da..9e750c333f45 100644
--- a/include/test/sheet/xnamedranges.hxx
+++ b/include/test/sheet/xnamedranges.hxx
@@ -38,7 +38,7 @@ protected:
css::uno::Reference< css::sheet::XSpreadsheet > xSheet;
private:
- OUString maNameToRemove;
+ OUString const maNameToRemove;
};
}
diff --git a/include/test/sheet/xspreadsheetdocument.hxx b/include/test/sheet/xspreadsheetdocument.hxx
index 647da836abd7..76dd7ba2d1c8 100644
--- a/include/test/sheet/xspreadsheetdocument.hxx
+++ b/include/test/sheet/xspreadsheetdocument.hxx
@@ -28,7 +28,7 @@ protected:
~XSpreadsheetDocument() {}
private:
- sal_Int32 mnSheets;
+ sal_Int32 const mnSheets;
};
}
diff --git a/include/test/sheet/xspreadsheets2.hxx b/include/test/sheet/xspreadsheets2.hxx
index bb00b95497db..345fa8b37eb7 100644
--- a/include/test/sheet/xspreadsheets2.hxx
+++ b/include/test/sheet/xspreadsheets2.hxx
@@ -54,9 +54,6 @@ private:
css::uno::Reference< css::sheet::XSpreadsheetDocument> xDestDoc;
css::uno::Reference< css::sheet::XSpreadsheet > xDestSheet;
css::uno::Reference< css::sheet::XSpreadsheet > xSrcSheet;
- OUString aSrcSheetName;
- OUString aSrcFileName;
- OUString aDestFileBase;
};
}
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 32c20997808f..7d1c64fc50e1 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -32,7 +32,7 @@ protected:
private:
- OUString m_aBaseString;
+ OUString const m_aBaseString;
};
#endif // INCLUDED_TEST_UNOAPI_TEST_HXX
diff --git a/include/test/util/xreplaceable.hxx b/include/test/util/xreplaceable.hxx
index 9f33feeb5d9d..59716f013eae 100644
--- a/include/test/util/xreplaceable.hxx
+++ b/include/test/util/xreplaceable.hxx
@@ -29,8 +29,8 @@ protected:
~XReplaceable() {}
private:
- OUString maSearchString;
- OUString maReplaceString;
+ OUString const maSearchString;
+ OUString const maReplaceString;
};
}
diff --git a/include/test/util/xsearchable.hxx b/include/test/util/xsearchable.hxx
index 99369c854be0..cb612829e1e1 100644
--- a/include/test/util/xsearchable.hxx
+++ b/include/test/util/xsearchable.hxx
@@ -28,8 +28,8 @@ public:
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
private:
- OUString maSearchString;
- sal_Int32 mnCount;
+ OUString const maSearchString;
+ sal_Int32 const mnCount;
};
}
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index 6aa5867377eb..933f7510c6e8 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -205,8 +205,8 @@ class SwEnhancedPDFExportHelper
* in a page range without empty pages, or -1 if this page is empty. */
std::vector< sal_Int32 > maPageNumberMap;
- bool mbSkipEmptyPages;
- bool mbEditEngineOnly;
+ bool const mbSkipEmptyPages;
+ bool const mbEditEngineOnly;
const SwPrintData& mrPrintData;
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index f27aed1a830c..f275e701f9bf 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -44,8 +44,8 @@ public:
class SwUndoFieldFromDoc : public SwUndoField
{
std::unique_ptr<SwField> pOldField, pNewField;
- SwMsgPoolItem * pHint;
- bool bUpdate;
+ SwMsgPoolItem * const pHint;
+ bool const bUpdate;
void DoImpl();
@@ -64,7 +64,7 @@ public:
class SwUndoFieldFromAPI : public SwUndoField
{
css::uno::Any aOldVal, aNewVal;
- sal_uInt16 nWhich;
+ sal_uInt16 const nWhich;
void DoImpl();
diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx
index e53c537b758e..989f9aff19ec 100644
--- a/sw/inc/ToxLinkProcessor.hxx
+++ b/sw/inc/ToxLinkProcessor.hxx
@@ -61,8 +61,8 @@ private:
StartedLink(sal_Int32 startPosition, const OUString& characterStyle) :
mStartPosition(startPosition), mCharacterStyle(characterStyle) {
}
- sal_Int32 mStartPosition;
- OUString mCharacterStyle;
+ sal_Int32 const mStartPosition;
+ OUString const mCharacterStyle;
};
/** A link that has been encountered while parsing a tox.
@@ -76,8 +76,8 @@ private:
{
}
SwFormatINetFormat mINetFormat;
- sal_Int32 mStartTextPos;
- sal_Int32 mEndTextPos;
+ sal_Int32 const mStartTextPos;
+ sal_Int32 const mEndTextPos;
};
std::vector<std::unique_ptr<ClosedLink>> m_ClosedLinks;
diff --git a/sw/inc/ToxTabStopTokenHandler.hxx b/sw/inc/ToxTabStopTokenHandler.hxx
index 7da924599b5e..23a66cc405db 100644
--- a/sw/inc/ToxTabStopTokenHandler.hxx
+++ b/sw/inc/ToxTabStopTokenHandler.hxx
@@ -100,10 +100,10 @@ private:
long
CalculatePageMarginFromPageDescription(const SwTextNode& targetNode) const;
- sal_uInt32 mIndexOfSectionNode;
+ sal_uInt32 const mIndexOfSectionNode;
const SwPageDesc& mDefaultPageDescription;
- bool mTabPositionIsRelativeToParagraphIndent;
- TabStopReferencePolicy mTabStopReferencePolicy;
+ bool const mTabPositionIsRelativeToParagraphIndent;
+ TabStopReferencePolicy const mTabStopReferencePolicy;
};
}
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 6e2e0e2b7984..658bb171df91 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -120,7 +120,7 @@ class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
//mpSelectedFrameMap contains the old selected objects.
std::unique_ptr<SwAccessibleContextMap_Impl> mpSeletedFrameMap;
- OUString maDocName;
+ OUString const maDocName;
//InvalidateShapeInParaSelection() method is responsible for the updating the selected states of the objects.
void InvalidateShapeInParaSelection();
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index 03199909d9c2..eea8dad22227 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -39,7 +39,7 @@ class SwAutoCompleteWord
/// contains extended strings carrying source information
editeng::SortedAutoCompleteStrings m_WordList;
- editeng::Trie m_LookupTree;
+ editeng::Trie const m_LookupTree;
SwAutoCompleteStringPtrDeque aLRULst;
std::unique_ptr<SwAutoCompleteWord_Impl> pImpl;
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 56241deed94b..ff1766d8cd39 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -193,7 +193,7 @@ class SwCalc
sal_Int32 m_nCommandPos;
SwDoc& m_rDoc;
- SvtSysLocale m_aSysLocale;
+ SvtSysLocale const m_aSysLocale;
const LocaleDataWrapper* m_pLocaleDataWrapper;
CharClass* m_pCharClass;
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 59be8f9e7cb4..180f9dbe6645 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -29,8 +29,8 @@ enum class Master_CollCondition;
struct CommandStruct
{
- Master_CollCondition nCnd;
- sal_uLong nSubCond;
+ Master_CollCondition const nCnd;
+ sal_uLong const nSubCond;
};
sal_Int16 GetCommandContextIndex( const OUString &rContextName );
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 29f959e196b8..56bbfac15f58 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -41,7 +41,7 @@ struct SwFillCursorPos
sal_uInt16 nSpaceOnlyCnt; ///< number of spaces to insert ("only spaces, no tabs" mode)
sal_uInt16 nColumnCnt; ///< number of necessary column breaks
sal_Int16 eOrient; ///< paragraph alignment
- SwFillMode eMode; ///< desired fill-up rule
+ SwFillMode const eMode; ///< desired fill-up rule
SwFillCursorPos( SwFillMode eMd ) :
nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nSpaceOnlyCnt(0), nColumnCnt( 0 ),
eOrient( css::text::HoriOrientation::NONE ), eMode( eMd )
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 510f6223874e..278e6a2963fa 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -50,7 +50,7 @@ namespace sw
// FieldType for DDE
class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
{
- OUString aName;
+ OUString const aName;
OUString aExpansion;
tools::SvRef<sfx2::SvBaseLink> refLink;
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 043e55d1e5c0..ead0f04620b4 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -376,7 +376,7 @@ public:
class SwMacroFieldType : public SwFieldType
{
- SwDoc* m_pDoc;
+ SwDoc* const m_pDoc;
public:
SwMacroFieldType(SwDoc*);
@@ -425,7 +425,7 @@ public:
class SwPostItFieldType : public SwFieldType
{
private:
- SwDoc* mpDoc;
+ SwDoc* const mpDoc;
public:
SwPostItFieldType(SwDoc* pDoc);
@@ -668,7 +668,7 @@ public:
class SwScriptFieldType : public SwFieldType
{
- SwDoc* m_pDoc;
+ SwDoc* const m_pDoc;
public:
SwScriptFieldType( SwDoc* pDoc );
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 13617fb279df..b31fd2ce9943 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -118,7 +118,7 @@ enum class ParaBreakType {
/// For querying the INet-attributes for Navigator.
struct SwGetINetAttr
{
- OUString sText;
+ OUString const sText;
const SwTextINetFormat& rINetAttr;
SwGetINetAttr( const OUString& rText, const SwTextINetFormat& rAttr )
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 3081423d3627..025ff802190f 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -45,7 +45,7 @@ OUString ReplacePoint(const OUString& sTmpName, bool bWithCommandType = false);
struct SeqFieldLstElem
{
OUString sDlgEntry;
- sal_uInt16 nSeqNo;
+ sal_uInt16 const nSeqNo;
SeqFieldLstElem( const OUString& rStr, sal_uInt16 nNo )
: sDlgEntry( rStr ), nSeqNo( nNo )
@@ -144,7 +144,7 @@ class SwSetExpField;
class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
{
- OUString m_sName;
+ OUString const m_sName;
const SwNode* m_pOutlChgNd;
OUString m_sDelim;
sal_uInt16 m_nType;
@@ -278,7 +278,7 @@ inline bool SwSetExpField::IsSequenceField() const
class SwInputFieldType : public SwFieldType
{
- SwDoc* mpDoc;
+ SwDoc* const mpDoc;
public:
SwInputFieldType( SwDoc* pDoc );
@@ -294,7 +294,7 @@ class SW_DLLPUBLIC SwInputField : public SwField
OUString maHelp;
OUString maToolTip;
sal_uInt16 mnSubType;
- bool mbIsFormField;
+ bool const mbIsFormField;
SwFormatField* mpFormatField; // attribute to which the <SwInputField> belongs to
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 0204c99510a9..e6b977b5c295 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -231,7 +231,7 @@ class SW_DLLPUBLIC SwFieldType : public SwModify, public sw::BroadcasterMixin
{
css::uno::WeakReference<css::beans::XPropertySet> m_wXFieldMaster;
- SwFieldIds m_nWhich;
+ SwFieldIds const m_nWhich;
friend void FinitUI(); ///< In order to delete pointer!
static std::vector<OUString>* s_pFieldNames;
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 1b72d3e6b83c..6c1b805e952c 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -120,7 +120,7 @@ enum class SwFormatFieldHintWhich
class SW_DLLPUBLIC SwFormatFieldHint : public SfxHint
{
const SwFormatField* m_pField;
- SwFormatFieldHintWhich m_nWhich;
+ SwFormatFieldHintWhich const m_nWhich;
const SwView* m_pView;
public:
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 7107d80d2894..e8a0c7a95e08 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -32,7 +32,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFormatHeader: public SfxPoolItem, public SwClient
{
- bool bActive; ///< Only for controlling (creation of content).
+ bool const bActive; ///< Only for controlling (creation of content).
public:
SwFormatHeader( bool bOn = false );
@@ -63,7 +63,7 @@ public:
class SW_DLLPUBLIC SwFormatFooter: public SfxPoolItem, public SwClient
{
- bool bActive; // Only for controlling (creation of content).
+ bool const bActive; // Only for controlling (creation of content).
public:
SwFormatFooter( bool bOn = false );
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index bd77ab2cff3d..f06da7bb8006 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -268,7 +268,7 @@ namespace sw
};
struct SW_DLLPUBLIC DrawFrameFormatHint final: SfxHint
{
- DrawFrameFormatHintId m_eId;
+ DrawFrameFormatHintId const m_eId;
DrawFrameFormatHint(DrawFrameFormatHintId eId) : m_eId(eId) {};
virtual ~DrawFrameFormatHint() override;
};
diff --git a/sw/inc/gotodlg.hxx b/sw/inc/gotodlg.hxx
index d45e28f1c06f..46418c660e23 100644
--- a/sw/inc/gotodlg.hxx
+++ b/sw/inc/gotodlg.hxx
@@ -36,7 +36,7 @@ public:
private:
SwView *m_pCreateView;
- SfxBindings *m_rBindings;
+ SfxBindings * const m_rBindings;
sal_uInt16 mnMaxPageCnt;
std::unique_ptr<weld::Entry> mxMtrPageCtrl;
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index 2b250a57e12b..4fff9948c883 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -80,7 +80,7 @@ public:
class SwRotationGrf : public SfxUInt16Item
{
private:
- Size aUnrotatedSize;
+ Size const aUnrotatedSize;
// tdf#115529 check and evtl. correct value, it is in 10th
// degrees and *has* to be in the range [0 .. 3600[
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 6cfdec0f2347..95aa775c76d5 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwHHCWrapper : public editeng::HangulHanjaConversion
bool m_bIsDrawObj;
bool m_bIsOtherContent;
bool m_bStartChk;
- bool m_bIsSelection; ///< true if only the selected text should be converted
+ bool const m_bIsSelection; ///< true if only the selected text should be converted
bool m_bStartDone;
bool m_bEndDone;
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index bdf2eceaa8a6..2519cf4700a9 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -64,15 +64,15 @@ public:
class SwFormatChg: public SwMsgPoolItem
{
public:
- SwFormat *pChangedFormat;
+ SwFormat * const pChangedFormat;
SwFormatChg( SwFormat *pFormat );
};
class SwInsText: public SwMsgPoolItem
{
public:
- sal_Int32 nPos;
- sal_Int32 nLen;
+ sal_Int32 const nPos;
+ sal_Int32 const nLen;
SwInsText( sal_Int32 nP, sal_Int32 nL );
};
@@ -80,7 +80,7 @@ public:
class SwDelChr: public SwMsgPoolItem
{
public:
- sal_Int32 nPos;
+ sal_Int32 const nPos;
SwDelChr( sal_Int32 nP );
};
@@ -88,8 +88,8 @@ public:
class SwDelText: public SwMsgPoolItem
{
public:
- sal_Int32 nStart;
- sal_Int32 nLen;
+ sal_Int32 const nStart;
+ sal_Int32 const nLen;
SwDelText( sal_Int32 nS, sal_Int32 nL );
};
@@ -112,8 +112,8 @@ public:
class RedlineDelText : public SfxHint
{
public:
- sal_Int32 nStart;
- sal_Int32 nLen;
+ sal_Int32 const nStart;
+ sal_Int32 const nLen;
RedlineDelText(sal_Int32 nS, sal_Int32 nL);
};
@@ -133,9 +133,9 @@ public:
class SwUpdateAttr : public SwMsgPoolItem
{
private:
- sal_Int32 m_nStart;
- sal_Int32 m_nEnd;
- sal_uInt16 m_nWhichAttr;
+ sal_Int32 const m_nStart;
+ sal_Int32 const m_nEnd;
+ sal_uInt16 const m_nWhichAttr;
public:
SwUpdateAttr( sal_Int32 nS, sal_Int32 nE, sal_uInt16 nW );
@@ -220,7 +220,7 @@ public:
*/
class SwAttrSetChg: public SwMsgPoolItem
{
- bool m_bDelSet;
+ bool const m_bDelSet;
SwAttrSet* m_pChgSet; ///< what has changed
const SwAttrSet* m_pTheChgdSet; ///< is only used to compare
public:
@@ -247,7 +247,7 @@ public:
class SwCondCollCondChg: public SwMsgPoolItem
{
public:
- SwFormat *pChangedFormat;
+ SwFormat * const pChangedFormat;
SwCondCollCondChg( SwFormat *pFormat );
};
@@ -280,7 +280,7 @@ public:
class SwStringMsgPoolItem : public SwMsgPoolItem
{
- OUString m_sStr;
+ OUString const m_sStr;
public:
const OUString& GetString() const { return m_sStr; }
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index 966b7c407f96..cc0880d5bad0 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -54,7 +54,7 @@ class SwHTMLTableLayoutCnts
sal_uInt8 nPass1Done; ///< How many times has Pass 1 been called?
sal_uInt8 nWidthSet; ///< How many times has the width been set?
- bool bNoBreakTag; ///< <NOBR>-Tag over complete content.
+ bool const bNoBreakTag; ///< <NOBR>-Tag over complete content.
public:
@@ -86,10 +86,10 @@ class SwHTMLTableLayoutCell
sal_uInt16 nRowSpan; ///< ROWSPAN of cell.
sal_uInt16 nColSpan; ///< COLSPAN of cell.
- sal_uInt16 nWidthOption; ///< Given width of cell in Twip or %.
+ sal_uInt16 const nWidthOption; ///< Given width of cell in Twip or %.
- bool bPrcWidthOption : 1; ///< nWidth is %-value.
- bool bNoWrapOption : 1; ///< NOWRAP-option.
+ bool const bPrcWidthOption : 1; ///< nWidth is %-value.
+ bool const bNoWrapOption : 1; ///< NOWRAP-option.
public:
@@ -131,7 +131,7 @@ class SwHTMLTableLayoutColumn
sal_uInt16 nWidthOption; ///< Options of <COL> or <TD>/<TH>.
bool bRelWidthOption : 1;
- bool bLeftBorder : 1;
+ bool const bLeftBorder : 1;
public:
@@ -178,11 +178,11 @@ class SwHTMLTableLayout
sal_uLong m_nMin; ///< Minimal width of table (Twips).
sal_uLong m_nMax; ///< Maximal width of table (Twips).
- sal_uInt16 m_nRows; ///< Row count.
+ sal_uInt16 const m_nRows; ///< Row count.
sal_uInt16 m_nCols; ///< Column count.
- sal_uInt16 m_nLeftMargin; ///< Space to left margin (from paragraph).
- sal_uInt16 m_nRightMargin; ///< Space to left margin (from paragraph).
+ sal_uInt16 const m_nLeftMargin; ///< Space to left margin (from paragraph).
+ sal_uInt16 const m_nRightMargin; ///< Space to left margin (from paragraph).
sal_uInt16 m_nInhAbsLeftSpace; ///< Space inherited from surrounding box
sal_uInt16 m_nInhAbsRightSpace; ///< that was added to boxes.
@@ -193,16 +193,16 @@ class SwHTMLTableLayout
sal_uInt16 m_nRelTabWidth; ///< Relative width of table.
sal_uInt16 m_nWidthOption; ///< Width of table (in Twips or %).
- sal_uInt16 m_nCellPadding; ///< Space to contents (in Twips).
- sal_uInt16 m_nCellSpacing; ///< Cell spacing (in Twips).
- sal_uInt16 m_nBorder; /** Line strength of outer border, or rather the
+ sal_uInt16 const m_nCellPadding; ///< Space to contents (in Twips).
+ sal_uInt16 const m_nCellSpacing; ///< Cell spacing (in Twips).
+ sal_uInt16 const m_nBorder; /** Line strength of outer border, or rather the
space needed for it as calculated by Netscape. */
- sal_uInt16 m_nLeftBorderWidth;
- sal_uInt16 m_nRightBorderWidth;
+ sal_uInt16 const m_nLeftBorderWidth;
+ sal_uInt16 const m_nRightBorderWidth;
sal_uInt16 m_nInhLeftBorderWidth;
sal_uInt16 m_nInhRightBorderWidth;
- sal_uInt16 m_nBorderWidth;
+ sal_uInt16 const m_nBorderWidth;
sal_uInt16 m_nDelayedResizeAbsAvail; ///< Param for delayed Resize.
sal_uInt16 m_nLastResizeAbsAvail;
@@ -210,11 +210,11 @@ class SwHTMLTableLayout
sal_uInt8 m_nPass1Done; ///< Reference-values for
sal_uInt8 m_nWidthSet; ///< the runs through loop.
- SvxAdjust m_eTableAdjust; ///< Alignment of table.
+ SvxAdjust const m_eTableAdjust; ///< Alignment of table.
- bool m_bColsOption : 1; ///< Table has a COLS-option.
- bool m_bColTags : 1; ///< Table has COL/COLGRP tags.
- bool m_bPrcWidthOption : 1; ///< Width is given in percent.
+ bool const m_bColsOption : 1; ///< Table has a COLS-option.
+ bool const m_bColTags : 1; ///< Table has COL/COLGRP tags.
+ bool const m_bPrcWidthOption : 1; ///< Width is given in percent.
bool m_bUseRelWidth : 1; ///< SwTable gets relative width.
bool m_bMustResize : 1; ///< Table width must be defined.
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index dab488078d15..bf5148bee215 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -127,7 +127,7 @@ class SwInsertConfig : public utl::ConfigItem
bool m_bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering
SwInsertTableOptions m_aInsTableOpts;
- bool m_bIsWeb;
+ bool const m_bIsWeb;
const css::uno::Sequence<OUString>& GetPropertyNames();
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
index 8c7783221757..03707596662d 100644
--- a/sw/inc/modeltoviewhelper.hxx
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -94,9 +94,9 @@ class ModelToViewHelper
, m_bVisible(bVisible)
{
}
- sal_Int32 m_nModelPos;
- sal_Int32 m_nViewPos;
- bool m_bVisible;
+ sal_Int32 const m_nModelPos;
+ sal_Int32 const m_nViewPos;
+ bool const m_bVisible;
};
typedef std::vector< ConversionMapEntry > ConversionMap;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 43ceb38e724c..b37d96ac1d04 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -81,7 +81,7 @@ class SW_DLLPUBLIC SwNode
{
friend class SwNodes;
- SwNodeType m_nNodeType;
+ SwNodeType const m_nNodeType;
/// For text nodes: level of auto format. Was put here because we had still free bits.
sal_uInt8 m_nAFormatNumLvl : 3;
@@ -100,7 +100,7 @@ private:
#ifdef DBG_UTIL
static long s_nSerial;
- long m_nSerial;
+ long const m_nSerial;
#endif
/// all SwFrameFormat that are anchored at the node
@@ -307,7 +307,7 @@ class SAL_DLLPUBLIC_RTTI SwStartNode: public SwNode
friend class SwEndNode; ///< to set the theEndOfSection !!
SwEndNode* m_pEndOfSection;
- SwStartNodeType m_eStartNodeType;
+ SwStartNodeType const m_eStartNodeType;
/// for the initial StartNode
SwStartNode( SwNodes& rNodes, sal_uLong nPos );
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 3dd5a1d2d9e1..522986f87c1b 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -354,7 +354,7 @@ class SwPageDescExt
public:
SwPageDesc m_PageDesc;
private:
- SwDoc * m_pDoc;
+ SwDoc * const m_pDoc;
OUString m_sFollow;
void SetPageDesc(const SwPageDesc & rPageDesc);
diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx
index 45eaa167d125..5c53ee1a84bd 100644
--- a/sw/inc/prtopt.hxx
+++ b/sw/inc/prtopt.hxx
@@ -25,7 +25,7 @@
class SwPrintOptions : public SwPrintData, public utl::ConfigItem
{
private:
- bool bIsWeb;
+ bool const bIsWeb;
css::uno::Sequence<OUString> GetPropertyNames();
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index a2772c17caba..7e3b94ed1d0a 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -112,7 +112,7 @@ class SW_DLLPUBLIC SwRedlineData
OUString m_sComment;
DateTime m_aStamp;
RedlineType_t m_eType;
- std::size_t m_nAuthor;
+ std::size_t const m_nAuthor;
sal_uInt16 m_nSeqNo;
public:
@@ -174,7 +174,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM
SwNodeIndex* m_pContentSect;
bool m_bDelLastPara : 1;
bool m_bIsVisible : 1;
- sal_uInt32 m_nId;
+ sal_uInt32 const m_nId;
boost::optional<long> m_oLOKLastNodeTop;
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 194ce40d0686..137cc4e4b50a 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -139,12 +139,12 @@ public:
class SW_DLLPUBLIC SwReader: public SwDocFac
{
SvStream* pStrm;
- tools::SvRef<SotStorage> pStg;
+ tools::SvRef<SotStorage> const pStg;
css::uno::Reference < css::embed::XStorage > xStg;
- SfxMedium* pMedium; // Who wants to obtain a Medium (W4W).
+ SfxMedium* const pMedium; // Who wants to obtain a Medium (W4W).
- SwPaM* pCursor;
- OUString aFileName;
+ SwPaM* const pCursor;
+ OUString const aFileName;
OUString sBaseURL;
bool mbSkipImages;
@@ -500,7 +500,7 @@ class SW_DLLPUBLIC SwWriter
css::uno::Reference < css::embed::XStorage > xStg;
SfxMedium* pMedium;
- SwPaM* pOutPam;
+ SwPaM* const pOutPam;
SwCursorShell *pShell;
SwDoc &rDoc;
@@ -527,9 +527,9 @@ ErrCode GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
struct SwReaderWriterEntry
{
Reader* pReader;
- FnGetReader fnGetReader;
- FnGetWriter fnGetWriter;
- bool bDelReader;
+ FnGetReader const fnGetReader;
+ FnGetWriter const fnGetWriter;
+ bool const bDelReader;
SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, bool bDel )
: pReader( nullptr ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 7b8d70962350..c836592ccfbd 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -25,40 +25,40 @@
struct SW_DLLPUBLIC ShellResource
{
- OUString aPostItAuthor;
- OUString aPostItPage;
- OUString aPostItLine;
+ OUString const aPostItAuthor;
+ OUString const aPostItPage;
+ OUString const aPostItLine;
// Calc error-strings.
- OUString aCalc_Syntax;
- OUString aCalc_ZeroDiv;
- OUString aCalc_Brack;
- OUString aCalc_Pow;
- OUString aCalc_Overflow;
- OUString aCalc_Default;
- OUString aCalc_Error;
+ OUString const aCalc_Syntax;
+ OUString const aCalc_ZeroDiv;
+ OUString const aCalc_Brack;
+ OUString const aCalc_Pow;
+ OUString const aCalc_Overflow;
+ OUString const aCalc_Default;
+ OUString const aCalc_Error;
// For GetRefField - referenced item not found.
- OUString aGetRefField_RefItemNotFound;
+ OUString const aGetRefField_RefItemNotFound;
// For some list boxes - string "none"
- OUString aStrNone;
+ OUString const aStrNone;
// For fixed fields.
- OUString aFixedStr;
+ OUString const aFixedStr;
// Custom fields of type css::util::Duration.
- OUString sDurationFormat;
+ OUString const sDurationFormat;
//Names of TOXs.
- OUString aTOXIndexName;
- OUString aTOXUserName;
- OUString aTOXContentName;
- OUString aTOXIllustrationsName;
- OUString aTOXObjectsName;
- OUString aTOXTablesName;
- OUString aTOXAuthoritiesName;
- OUString aTOXCitationName;
+ OUString const aTOXIndexName;
+ OUString const aTOXUserName;
+ OUString const aTOXContentName;
+ OUString const aTOXIllustrationsName;
+ OUString const aTOXObjectsName;
+ OUString const aTOXTablesName;
+ OUString const aTOXAuthoritiesName;
+ OUString const aTOXCitationName;
OUString aLinkCtrlClick;
- OUString aLinkClick;
+ OUString const aLinkClick;
std::vector<OUString> aDocInfoLst;
@@ -81,9 +81,9 @@ struct SW_DLLPUBLIC ShellResource
private:
void GetAutoFormatNameLst_() const;
mutable std::unique_ptr<std::vector<OUString>> pAutoFormatNameLst;
- OUString sPageDescFirstName;
- OUString sPageDescFollowName;
- OUString sPageDescName;
+ OUString const sPageDescFirstName;
+ OUString const sPageDescFollowName;
+ OUString const sPageDescName;
};
inline const std::vector<OUString>& ShellResource::GetAutoFormatNameLst() const
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index efd4c33e6352..0c66737205f9 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -62,8 +62,8 @@ struct SwArgsBase // used for text conversion (Hangul/Hanja, ...)
struct SwConversionArgs : SwArgsBase
{
OUString aConvText; // convertible text found
- LanguageType nConvSrcLang; // (source) language to look for
- LanguageType nConvTextLang; // language of aConvText (if the latter one was found)
+ LanguageType const nConvSrcLang; // (source) language to look for
+ LanguageType nConvTextLang; // language of aConvText (if the latter one was found)
// used for chinese translation
LanguageType nConvTargetLang; // target language of text to be changed
@@ -89,7 +89,7 @@ struct SwSpellArgs : SwArgsBase
css::uno::Reference< css::linguistic2::XSpellAlternatives > xSpellAlt;
- bool bIsGrammarCheck;
+ bool const bIsGrammarCheck;
SwSpellArgs(css::uno::Reference<
css::linguistic2::XSpellChecker1 > const &rxSplChk,
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index 3e369480bc56..397887d09429 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -141,7 +141,7 @@ private:
friend void InitCore(); // For creating/deleting of version maps.
friend void FinitCore();
- SwDoc* m_pDoc;
+ SwDoc* const m_pDoc;
public:
SwAttrPool( SwDoc* pDoc );
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
index 5149bec8fbf8..667e776ccd31 100644
--- a/sw/inc/swcli.hxx
+++ b/sw/inc/swcli.hxx
@@ -30,7 +30,7 @@ class EmbeddedObjectRef;
class SwOleClient : public SfxInPlaceClient
{
bool m_IsInDoVerb;
- bool m_IsOldCheckForOLEInCaption;
+ bool const m_IsOldCheckForOLEInCaption;
virtual void ObjectAreaChanged() override;
virtual void RequestNewObjectArea( tools::Rectangle& ) override;
diff --git a/sw/inc/swscanner.hxx b/sw/inc/swscanner.hxx
index de273d679b8b..05115ed10b27 100644
--- a/sw/inc/swscanner.hxx
+++ b/sw/inc/swscanner.hxx
@@ -31,7 +31,7 @@ class SwTextNode;
// during spell check
class SwScanner
{
- std::function<LanguageType (sal_Int32, sal_Int32, bool)> m_pGetLangOfChar;
+ std::function<LanguageType (sal_Int32, sal_Int32, bool)> const m_pGetLangOfChar;
OUString m_aWord;
const OUString m_aPreDashReplacementText;
OUString m_aText;
@@ -43,8 +43,8 @@ class SwScanner
sal_Int32 m_nLength;
sal_Int32 m_nOverriddenDashCount;
LanguageType m_aCurrentLang;
- sal_uInt16 m_nWordType;
- bool m_bClip;
+ sal_uInt16 const m_nWordType;
+ bool const m_bClip;
public:
SwScanner(const std::function<LanguageType(sal_Int32, sal_Int32, bool)>& pGetLangOfChar,
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index e7ef81b53ef3..0639db32f72e 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -121,7 +121,7 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv,
class SwSelUnion
{
SwRect m_aUnion; // The rectangle enclosing the selection.
- SwTabFrame *m_pTable; // The (Follow-)Table for the Union.
+ SwTabFrame * const m_pTable; // The (Follow-)Table for the Union.
public:
SwSelUnion( const SwRect &rRect, SwTabFrame *pTab ) :
@@ -156,9 +156,9 @@ typedef std::vector<std::unique_ptr<FndLine_>> FndLines_t;
class FndBox_
{
- SwTableBox* m_pBox;
+ SwTableBox* const m_pBox;
FndLines_t m_Lines;
- FndLine_* m_pUpper;
+ FndLine_* const m_pUpper;
SwTableLine *m_pLineBefore; // For deleting/restoring the layout.
SwTableLine *m_pLineBehind;
@@ -191,7 +191,7 @@ public:
class FndLine_
{
- SwTableLine* m_pLine;
+ SwTableLine* const m_pLine;
FndBoxes_t m_Boxes;
FndBox_* m_pUpper;
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 2ca0604d3926..e5c938e4e34e 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -159,8 +159,8 @@ public:
inline TOXTypes GetType() const;
private:
- OUString m_aName;
- TOXTypes m_eType;
+ OUString const m_aName;
+ TOXTypes const m_eType;
// @@@ public copy ctor, but no copy assignment?
SwTOXType & operator= (const SwTOXType &) = delete;
@@ -237,7 +237,7 @@ struct SW_DLLPUBLIC SwFormToken
struct SwFormTokenEqualToFormTokenType
{
- FormTokenType eType;
+ FormTokenType const eType;
SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {}
bool operator()(const SwFormToken & rToken)
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index 32b3e4bc3069..625b9cba2e1a 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -33,7 +33,7 @@ class SwScriptIterator
const OUString& m_rText;
sal_Int32 m_nChgPos;
sal_uInt16 nCurScript;
- bool bForward;
+ bool const bForward;
public:
SwScriptIterator( const OUString& rStr, sal_Int32 nStart,
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 2e84ff9c1d6e..8610ab3d38a6 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -52,7 +52,7 @@ class SwUndo
{
SwUndoId const m_nId;
RedlineFlags nOrigRedlineFlags;
- ViewShellId m_nViewShellId;
+ ViewShellId const m_nViewShellId;
bool m_isRepeatIgnored; ///< for multi-selection, only repeat 1st selection
protected:
@@ -290,7 +290,7 @@ public:
class SwUndoInsLayFormat : public SwUndoFlyBase
{
sal_uLong mnCursorSaveIndexPara; // Cursor position
- sal_Int32 mnCursorSaveIndexPos; // for undo
+ sal_Int32 const mnCursorSaveIndexPos; // for undo
public:
SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeIdx, sal_Int32 nCntIdx );
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index e3e413420217..0b4e9c73e752 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -235,8 +235,8 @@ class SwChartDataSequence :
::comphelper::OInterfaceContainerHelper2 m_aModifyListeners;
css::chart2::data::DataSequenceRole m_aRole;
- OUString m_aRowLabelText;
- OUString m_aColLabelText;
+ OUString const m_aRowLabelText;
+ OUString const m_aColLabelText;
rtl::Reference<SwChartDataProvider> m_xDataProvider;
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index e4203d3a315d..a6d49603cf7e 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -150,7 +150,7 @@ private:
SwDocShell* pDocShell; // Only if used as chapter numbering.
SwNumRule* pNumRule;
const SfxItemPropertySet* m_pPropertySet;
- bool bOwnNumRuleCreated;
+ bool const bOwnNumRuleCreated;
protected:
virtual ~SwXNumberingRules() override;
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index c59ac8602a49..4d60d9614630 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -117,7 +117,7 @@ class SwXAutoStyles :
public cppu::WeakImplHelper< css::style::XAutoStyles >,
public SwUnoCollection
{
- SwDocShell *m_pDocShell;
+ SwDocShell * const m_pDocShell;
css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoCharStyles;
css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoRubyStyles;
css::uno::Reference< css::style::XAutoStyleFamily > m_xAutoParaStyles;
@@ -146,7 +146,7 @@ class SwXAutoStyleFamily : public cppu::WeakImplHelper< css::style::XAutoStyleFa
public SwClient
{
SwDocShell *m_pDocShell;
- IStyleAccess::SwAutoStyleFamily m_eFamily;
+ IStyleAccess::SwAutoStyleFamily const m_eFamily;
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
@@ -192,9 +192,9 @@ class SwXAutoStyle : public cppu::WeakImplHelper
public SwClient
{
private:
- std::shared_ptr<SfxItemSet> mpSet;
- IStyleAccess::SwAutoStyleFamily meFamily;
- SwDoc& mrDoc;
+ std::shared_ptr<SfxItemSet> mpSet;
+ IStyleAccess::SwAutoStyleFamily const meFamily;
+ SwDoc& mrDoc;
/// @throws css::beans::UnknownPropertyException
/// @throws css::lang::WrappedTargetException
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 6bb104a168ca..66ca09b98038 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -545,7 +545,7 @@ class SwXOutlineTarget : public cppu::WeakImplHelper
>
{
const SfxItemPropertySet* pPropSet;
- OUString sOutlineText;
+ OUString const sOutlineText;
public:
SwXOutlineTarget(const OUString& rOutlineText);
@@ -597,8 +597,8 @@ public:
// After printing the view options are restored
class SwViewOptionAdjust_Impl
{
- SwViewShell * m_pShell;
- SwViewOption m_aOldViewOptions;
+ SwViewShell * m_pShell;
+ SwViewOption const m_aOldViewOptions;
public:
SwViewOptionAdjust_Impl( SwViewShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index efa0fc7e3c1b..8df61e6c044b 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -81,7 +81,7 @@ private:
std::weak_ptr<SwAccessibleMap> m_wMap;
sal_uInt32 m_nClientId; // client id in the AccessibleEventNotifier queue
- sal_Int16 m_nRole; // immutable outside constructor
+ sal_Int16 const m_nRole; // immutable outside constructor
// The current states (protected by mutex)
bool m_isShowingState : 1;
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
index ed4ecafece0f..0c33b708ae4f 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -77,9 +77,9 @@ public:
*/
private:
- LayerId m_eLayerId;
- sal_uInt32 m_nOrdNum;
- Point m_nPosNum;
+ LayerId const m_eLayerId;
+ sal_uInt32 const m_nOrdNum;
+ Point const m_nPosNum;
};
diff --git a/sw/source/core/access/acchyperlink.hxx b/sw/source/core/access/acchyperlink.hxx
index a0a3de184598..4c8f450e3e80 100644
--- a/sw/source/core/access/acchyperlink.hxx
+++ b/sw/source/core/access/acchyperlink.hxx
@@ -34,10 +34,10 @@ class SwAccessibleHyperlink :
{
friend class SwAccessibleParagraph;
friend class SwAccessibleHyperTextData;
- size_t m_nHintPosition;
+ size_t const m_nHintPosition;
::rtl::Reference< SwAccessibleParagraph > m_xParagraph;
- sal_Int32 m_nStartIndex;
- sal_Int32 m_nEndIndex;
+ sal_Int32 const m_nStartIndex;
+ sal_Int32 const m_nEndIndex;
SwAccessibleHyperlink( size_t nHintPos,
SwAccessibleParagraph *p,
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 0257733cfccd..eb6557db7bea 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -339,7 +339,7 @@ private:
SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED
// and POS_CHANGED
uno::WeakReference < XAccessible > mxAcc; // The object that fires the event
- SwAccessibleChild maFrameOrObj; // the child for CHILD_POS_CHANGED and
+ SwAccessibleChild const maFrameOrObj; // the child for CHILD_POS_CHANGED and
// the same as xAcc for any other
// event type
EventType meType; // The event type
@@ -598,8 +598,8 @@ public:
struct SwAccessibleParaSelection
{
- sal_Int32 nStartOfSelection;
- sal_Int32 nEndOfSelection;
+ sal_Int32 const nStartOfSelection;
+ sal_Int32 const nEndOfSelection;
SwAccessibleParaSelection( const sal_Int32 _nStartOfSelection,
const sal_Int32 _nEndOfSelection )
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 9f42970e2392..8015d832d3f5 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2943,7 +2943,7 @@ void SwAccessibleParagraph::deselectAccessibleChild(
class SwHyperlinkIter_Impl
{
const SwpHints *m_pHints;
- sal_Int32 m_nStt;
+ sal_Int32 const m_nStt;
sal_Int32 m_nEnd;
size_t m_nPos;
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 2d253cc3029e..5da541972e36 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -79,8 +79,8 @@ class SwAccessibleTableData_Impl
std::list < Int32Pair_Impl > maExtents; // cell extends for event processing only
Point maTabFramePos;
const SwTabFrame *mpTabFrame;
- bool mbIsInPagePreview;
- bool mbOnlyTableColumnHeader;
+ bool const mbIsInPagePreview;
+ bool const mbOnlyTableColumnHeader;
void CollectData( const SwFrame *pFrame );
void CollectExtents( const SwFrame *pFrame );
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 7a7f9186ac18..2387c128a33b 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -61,7 +61,7 @@ namespace
}
SwCursor* m_pCursor;
- SwCursorSaveState m_aSaveState;
+ SwCursorSaveState const m_aSaveState;
};
bool lcl_ReverseMarkOrderingByEnd(const IDocumentMarkAccess::pMark_t& rpFirst,
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index d0b38b1288df..6aca102e00e3 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -201,8 +201,8 @@ class SwAttrCheckArr
sal_uInt16 nArrStart, nArrLen;
sal_uInt16 nFound, nStackCnt;
SfxItemSet aCmpSet;
- bool bNoColls;
- bool bForward;
+ bool const bNoColls;
+ bool const bForward;
public:
SwAttrCheckArr( const SfxItemSet& rSet, bool bForward, bool bNoCollections );
@@ -1060,7 +1060,7 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFnCollection cons
/// parameters for search for attributes
struct SwFindParaAttr : public SwFindParas
{
- bool bValue;
+ bool const bValue;
const SfxItemSet *pSet, *pReplSet;
const i18nutil::SearchOptions2 *pSearchOpt;
SwCursor& m_rCursor;
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 4417ed395f48..60654d3aace7 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -639,8 +639,8 @@ struct SwFindParaText : public SwFindParas
const i18nutil::SearchOptions2& m_rSearchOpt;
SwCursor& m_rCursor;
utl::TextSearch m_aSText;
- bool m_bReplace;
- bool m_bSearchInNotes;
+ bool const m_bReplace;
+ bool const m_bSearchInNotes;
SwFindParaText( const i18nutil::SearchOptions2& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCursor )
: m_rSearchOpt( rOpt ), m_rCursor( rCursor ), m_aSText( utl::TextSearch::UpgradeToSearchOptions2( rOpt) ),
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 7f8086955169..9b5922c62f8f 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -60,7 +60,7 @@ static const sal_uInt16 coSrchRplcThreshold = 60000;
struct PercentHdl
{
- SwDocShell* pDSh;
+ SwDocShell* const pDSh;
sal_uLong nActPos;
bool bBack, bNodeIdx;
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 7703c1175094..0fdc1937ecae 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -89,8 +89,8 @@ namespace
struct PaMEntry
{
SwPaM* m_pPaM;
- bool m_isMark;
- sal_Int32 m_nContent;
+ bool const m_isMark;
+ sal_Int32 const m_nContent;
};
struct OffsetUpdater
{
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 1b7798db28fd..e0b44789c499 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -118,8 +118,8 @@ namespace
void lcl_SetDfltFont( DefaultFontType nFntType, SfxItemSet& rSet )
{
static struct {
- sal_uInt16 nResLngId;
- sal_uInt16 nResFntId;
+ sal_uInt16 const nResLngId;
+ sal_uInt16 const nResFntId;
} aArr[ 3 ] = {
{ RES_CHRATR_LANGUAGE, RES_CHRATR_FONT },
{ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT },
@@ -142,8 +142,8 @@ namespace
DefaultFontType nCTLFntType, SfxItemSet& rSet )
{
static struct {
- sal_uInt16 nResLngId;
- sal_uInt16 nResFntId;
+ sal_uInt16 const nResLngId;
+ sal_uInt16 const nResFntId;
DefaultFontType nFntType;
} aArr[ 3 ] = {
{ RES_CHRATR_LANGUAGE, RES_CHRATR_FONT, static_cast<DefaultFontType>(0) },
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 95c12914bf31..59a6c68be3fe 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -64,7 +64,7 @@ NameToIdHash *SwStyleNameMapper::s_pParaUIMap = nullptr,
// SwTableEntry so we can pass the length to the String CTOR
struct SwTableEntry
{
- sal_uInt8 nLength;
+ sal_uInt8 const nLength;
const sal_Char *pChar;
};
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index f632b7713708..6d7bcff2b5b8 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -92,7 +92,7 @@ private:
static sal_uLong NextIdx( const SwNode* pNd );
vector< SwCompareLine* > aLines;
- bool m_bRecordDiff;
+ bool const m_bRecordDiff;
// Truncate beginning and end and add all others to the LinesArray
void CheckRanges( CompareData& );
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 15cde84afbb4..2691b8d0b5f4 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -681,8 +681,8 @@ class SwHyphArgs : public SwInterHyphInfo
const SwNode *pStart;
const SwNode *pEnd;
SwNode *pNode;
- sal_uInt16 *pPageCnt;
- sal_uInt16 *pPageSt;
+ sal_uInt16 * const pPageCnt;
+ sal_uInt16 * const pPageSt;
sal_uInt32 nNode;
sal_Int32 nPamStart;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index bee42efe9074..1448ce84e663 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1329,7 +1329,7 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
static SwTOOElements lcl_IsSOObject( const SvGlobalName& rFactoryNm )
{
static const struct SoObjType {
- SwTOOElements nFlag;
+ SwTOOElements const nFlag;
// GlobalNameId
struct GlobalNameIds {
sal_uInt32 n1;
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 9afc28f24a87..0fe3775b2b4a 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -57,9 +57,9 @@ using namespace ::com::sun::star;
class SwHTMLTableLayoutConstraints
{
- sal_uInt16 nRow; // start row
- sal_uInt16 nCol; // start column
- sal_uInt16 nColSpan; // the column's COLSPAN
+ sal_uInt16 const nRow; // start row
+ sal_uInt16 const nCol; // start column
+ sal_uInt16 const nColSpan; // the column's COLSPAN
std::unique_ptr<SwHTMLTableLayoutConstraints> pNext; // the next constraint
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index e5e5f5ef49db..25dd8454f071 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -244,7 +244,7 @@ struct CpyPara
sal_uInt16 nCpyCnt, nInsPos;
sal_uInt16 nLnIdx, nBoxIdx;
sal_uInt8 nDelBorderFlag;
- bool bCpyContent;
+ bool const bCpyContent;
CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, CpyTabFrames& rFrameArr )
: pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrameArr(rFrameArr),
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 5ec923298e7e..f323f0a8ea58 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -44,7 +44,7 @@
struct MapTableFrameFormat
{
const SwFrameFormat *pOld;
- SwFrameFormat *pNew;
+ SwFrameFormat * const pNew;
MapTableFrameFormat( const SwFrameFormat *pOldFormat, SwFrameFormat*pNewFormat )
: pOld( pOldFormat ), pNew( pNewFormat )
{}
@@ -121,7 +121,7 @@ static bool lcl_SrchNew( const MapTableFrameFormat& rMap, SwFrameFormat** pPara
struct CopyTable
{
SwDoc* m_pDoc;
- sal_uLong m_nOldTableSttIdx;
+ sal_uLong const m_nOldTableSttIdx;
MapTableFrameFormats& m_rMapArr;
SwTableLine* m_pInsLine;
SwTableBox* m_pInsBox;
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 6de5ff89d98c..408822f08779 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1500,7 +1500,7 @@ struct DelTabPara
SwTextNode* pLastNd;
SwNodes& rNds;
SwUndoTableToText* pUndo;
- sal_Unicode cCh;
+ sal_Unicode const cCh;
DelTabPara( SwNodes& rNodes, sal_Unicode cChar, SwUndoTableToText* pU ) :
pLastNd(nullptr), rNds( rNodes ), pUndo( pU ), cCh( cChar ) {}
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 553a66407773..99a8ca078655 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -76,7 +76,7 @@ public:
private:
SwFrameFormat *pOld, *pNew;
- sal_Int16 nType;
+ sal_Int16 const nType;
};
SwTableFormatCmp::SwTableFormatCmp( SwFrameFormat *pO, SwFrameFormat *pN, sal_Int16 nT )
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 8411274ab9de..f72efbc17003 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -39,7 +39,7 @@ class SwNode2LayImpl
std::unique_ptr<SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti>> pIter;
SwModify* pMod;
std::vector<SwFrame*> mvUpperFrames; // To collect the Upper
- sal_uLong nIndex; // The Index of the to-be-inserted Nodes
+ sal_uLong const nIndex; // The Index of the to-be-inserted Nodes
bool bMaster : 1; // true => only Master, false => only Frames without Follow
bool bInit : 1; // Did we already call First() at SwClient?
diff --git a/sw/source/core/docnode/threadmanager.hxx b/sw/source/core/docnode/threadmanager.hxx
index 52db422c1f49..ab5dec95d960 100644
--- a/sw/source/core/docnode/threadmanager.hxx
+++ b/sw/source/core/docnode/threadmanager.hxx
@@ -128,7 +128,7 @@ class ThreadManager final
struct ThreadPred
{
- oslInterlockedCount mnThreadID;
+ oslInterlockedCount const mnThreadID;
explicit ThreadPred( oslInterlockedCount nThreadID )
: mnThreadID( nThreadID )
{}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 2f5da1bb4e36..b7b6c2630314 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1002,8 +1002,8 @@ class NestedUserCallHdl
{
private:
SwDrawContact* mpDrawContact;
- bool mbParentUserCallActive;
- SdrUserCallType meParentUserCallEventType;
+ bool const mbParentUserCallActive;
+ SdrUserCallType const meParentUserCallEventType;
public:
NestedUserCallHdl( SwDrawContact* _pDrawContact,
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index b80fe0403295..8211f3b18ebd 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1106,7 +1106,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark
struct RefIdsMap
{
private:
- OUString aName;
+ OUString const aName;
std::set<sal_uInt16> aIds;
std::set<sal_uInt16> aDstIds;
std::map<sal_uInt16, sal_uInt16> sequencedIds; /// ID numbers sorted by sequence number.
diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx
index 201bd2aa6463..f097a1802b4f 100644
--- a/sw/source/core/inc/SwUndoFmt.hxx
+++ b/sw/source/core/inc/SwUndoFmt.hxx
@@ -61,8 +61,8 @@ class SwUndoFormatDelete : public SwUndo
protected:
OUString sDerivedFrom;
SwDoc * pDoc;
- OUString sOldName;
- SfxItemSet aOldSet;
+ OUString const sOldName;
+ SfxItemSet const aOldSet;
sal_uInt16 nId; // FormatId related
bool bAuto;
diff --git a/sw/source/core/inc/SwUndoPageDesc.hxx b/sw/source/core/inc/SwUndoPageDesc.hxx
index a29777551855..04094ab7498d 100644
--- a/sw/source/core/inc/SwUndoPageDesc.hxx
+++ b/sw/source/core/inc/SwUndoPageDesc.hxx
@@ -67,7 +67,7 @@ public:
class SwUndoPageDescDelete : public SwUndo
{
- SwPageDescExt aOld;
+ SwPageDescExt const aOld;
SwDoc * pDoc;
void DoImpl();
diff --git a/sw/source/core/inc/SwXMLBlockImport.hxx b/sw/source/core/inc/SwXMLBlockImport.hxx
index be658b8567dc..95515d229ca4 100644
--- a/sw/source/core/inc/SwXMLBlockImport.hxx
+++ b/sw/source/core/inc/SwXMLBlockImport.hxx
@@ -65,7 +65,7 @@ protected:
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
public:
- bool bTextOnly;
+ bool const bTextOnly;
OUString &m_rText;
SwXMLTextBlockImport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index 560a92d8dba4..d5b7c2561141 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -146,7 +146,7 @@ class SwUndoFormatColl : public SwUndo, private SwUndRng
{
OUString aFormatName;
std::unique_ptr<SwHistory> pHistory;
- SwFormatColl* pFormatColl;
+ SwFormatColl* const pFormatColl;
// for correct <ReDo(..)> and <Repeat(..)>
// boolean, which indicates that the attributes are reset at the nodes
// before the format has been applied.
@@ -189,7 +189,7 @@ public:
class SwUndoSetFlyFormat : public SwUndo, public SwClient
{
SwFrameFormat* pFrameFormat; // saved FlyFormat
- SwFrameFormat* pOldFormat;
+ SwFrameFormat* const pOldFormat;
SwFrameFormat* pNewFormat;
std::unique_ptr<SfxItemSet> pItemSet; // the re-/ set attributes
sal_uLong nOldNode, nNewNode;
@@ -213,7 +213,7 @@ public:
class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng
{
- short nOffset;
+ short const nOffset;
public:
SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset );
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index f22832b18d54..b9b52583971e 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -55,10 +55,10 @@ class SwUndoDelete
bool m_bBackSp : 1; // TRUE: if Grouped and preceding content deleted
bool m_bJoinNext: 1; // TRUE: if range is selected forwards
bool m_bTableDelLastNd : 1; // TRUE: TextNode following Table inserted/deleted
- bool m_bDelFullPara : 1; // TRUE: entire Nodes were deleted
+ bool const m_bDelFullPara : 1; // TRUE: entire Nodes were deleted
bool m_bResetPgDesc : 1; // TRUE: reset PgDsc on following node
bool m_bResetPgBrk : 1; // TRUE: reset PgBreak on following node
- bool m_bFromTableCopy : 1; // TRUE: called by SwUndoTableCpyTable
+ bool const m_bFromTableCopy : 1; // TRUE: called by SwUndoTableCpyTable
bool SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
SwTextNode* pSttTextNd, SwTextNode* pEndTextNd );
diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx
index 557dba678825..e75d8b898a35 100644
--- a/sw/source/core/inc/UndoDraw.hxx
+++ b/sw/source/core/inc/UndoDraw.hxx
@@ -53,7 +53,7 @@ public:
class SwUndoDrawGroup : public SwUndo
{
std::unique_ptr<SwUndoGroupObjImpl[]> pObjArr;
- sal_uInt16 nSize;
+ sal_uInt16 const nSize;
bool bDelFormat;
public:
diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx
index 0037b46965a4..c5d8848dba20 100644
--- a/sw/source/core/inc/UndoInsert.hxx
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -46,8 +46,8 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveContent
std::unique_ptr<SwRedlineData> pRedlData;
sal_uLong nNode;
sal_Int32 nContent, nLen;
- bool bIsWordDelim : 1;
- bool bIsAppend : 1;
+ bool const bIsWordDelim : 1;
+ bool const bIsAppend : 1;
bool m_bWithRsid : 1;
const SwInsertFlags m_nInsertFlags;
@@ -167,18 +167,18 @@ class SwUndoInsertLabel : public SwUndo
} NODE;
};
- OUString sText;
+ OUString const sText;
// #i39983# the separator is drawn with a character style
- OUString sSeparator;
- OUString sNumberSeparator;
- OUString sCharacterStyle;
+ OUString const sSeparator;
+ OUString const sNumberSeparator;
+ OUString const sCharacterStyle;
// #i26791# - re-store of drawing object position no longer needed
- sal_uInt16 nFieldId;
- SwLabelType eType;
+ sal_uInt16 const nFieldId;
+ SwLabelType const eType;
SdrLayerID nLayerId; // for character objects
- bool bBefore :1;
+ bool const bBefore :1;
bool bUndoKeep :1;
- bool bCpyBrd :1;
+ bool const bCpyBrd :1;
public:
SwUndoInsertLabel( const SwLabelType eTyp, const OUString &rText,
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
index 70e6149b383e..9490f51bc0ca 100644
--- a/sw/source/core/inc/UndoNumbering.hxx
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -28,10 +28,10 @@
class SwUndoInsNum : public SwUndo, private SwUndRng
{
- SwNumRule aNumRule;
+ SwNumRule const aNumRule;
std::unique_ptr<SwHistory> pHistory;
std::unique_ptr<SwNumRule> pOldNumRule;
- OUString sReplaceRule;
+ OUString const sReplaceRule;
sal_uInt16 nLRSavePos;
public:
@@ -61,7 +61,7 @@ class SwUndoDelNum : public SwUndo, private SwUndRng
struct NodeLevel
{
sal_uLong index;
- int level;
+ int const level;
NodeLevel(sal_uLong idx, int lvl) : index(idx), level(lvl) {};
};
std::vector<NodeLevel> aNodes;
@@ -83,7 +83,7 @@ public:
class SwUndoMoveNum : public SwUndo, private SwUndRng
{
sal_uLong nNewStt;
- long nOffset;
+ long const nOffset;
public:
SwUndoMoveNum( const SwPaM& rPam, long nOffset, bool bIsOutlMv );
@@ -97,7 +97,7 @@ public:
class SwUndoNumUpDown : public SwUndo, private SwUndRng
{
- short nOffset;
+ short const nOffset;
public:
SwUndoNumUpDown( const SwPaM& rPam, short nOffset );
@@ -109,7 +109,7 @@ public:
class SwUndoNumOrNoNum : public SwUndo
{
- sal_uLong nIdx;
+ sal_uLong const nIdx;
bool mbNewNum, mbOldNum;
public:
@@ -123,10 +123,10 @@ public:
class SwUndoNumRuleStart : public SwUndo
{
- sal_uLong nIdx;
+ sal_uLong const nIdx;
sal_uInt16 nOldStt, nNewStt;
- bool bSetSttValue : 1;
- bool bFlag : 1;
+ bool const bSetSttValue : 1;
+ bool const bFlag : 1;
public:
SwUndoNumRuleStart( const SwPosition& rPos, bool bDelete );
diff --git a/sw/source/core/inc/UndoOverwrite.hxx b/sw/source/core/inc/UndoOverwrite.hxx
index a406834105be..443d13a7f347 100644
--- a/sw/source/core/inc/UndoOverwrite.hxx
+++ b/sw/source/core/inc/UndoOverwrite.hxx
@@ -70,7 +70,7 @@ struct UndoTransliterate_Data;
class SwUndoTransliterate : public SwUndo, public SwUndRng
{
std::vector< std::unique_ptr<UndoTransliterate_Data> > aChanges;
- TransliterationFlags nType;
+ TransliterationFlags const nType;
void DoTransliterate(SwDoc & rDoc, SwPaM const & rPam);
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
index 76f478ad89d6..1db832095e4e 100644
--- a/sw/source/core/inc/UndoRedline.hxx
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -33,7 +33,7 @@ class SwUndoRedline : public SwUndo, public SwUndRng
protected:
std::unique_ptr<SwRedlineData> mpRedlData;
std::unique_ptr<SwRedlineSaveDatas> mpRedlSaveData;
- SwUndoId mnUserId;
+ SwUndoId const mnUserId;
bool mbHiddenRedlines;
virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
@@ -121,7 +121,7 @@ class SwUndoCompDoc : public SwUndo, public SwUndRng
std::unique_ptr<SwRedlineData> pRedlData;
std::unique_ptr<SwUndoDelete> pUnDel, pUnDel2;
std::unique_ptr<SwRedlineSaveDatas> pRedlSaveData;
- bool bInsert;
+ bool const bInsert;
public:
SwUndoCompDoc( const SwPaM& rRg, bool bIns );
diff --git a/sw/source/core/inc/UndoSplitMove.hxx b/sw/source/core/inc/UndoSplitMove.hxx
index 08e59657c4d4..6641611da7f5 100644
--- a/sw/source/core/inc/UndoSplitMove.hxx
+++ b/sw/source/core/inc/UndoSplitMove.hxx
@@ -27,9 +27,9 @@ class SwUndoSplitNode: public SwUndo
std::unique_ptr<SwHistory> m_pHistory;
std::unique_ptr<SwRedlineData> pRedlData;
sal_uLong nNode;
- sal_Int32 nContent;
+ sal_Int32 const nContent;
bool bTableFlag : 1;
- bool bChkTableStt : 1;
+ bool const bChkTableStt : 1;
sal_uInt32 nParRsid;
public:
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 4343f09225ed..ccedcd83c06f 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -47,14 +47,14 @@ class SwTableSortBoxes;
class SwUndoInsTable : public SwUndo
{
OUString sTableNm;
- SwInsertTableOptions aInsTableOpts;
+ SwInsertTableOptions const aInsTableOpts;
std::unique_ptr<SwDDEFieldType> pDDEFieldType;
std::unique_ptr<std::vector<sal_uInt16>> pColWidth;
std::unique_ptr<SwRedlineData> pRedlData;
std::unique_ptr<SwTableAutoFormat> pAutoFormat;
sal_uLong nSttNode;
sal_uInt16 nRows, nCols;
- sal_uInt16 nAdjust;
+ sal_uInt16 const nAdjust;
public:
SwUndoInsTable( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
@@ -74,12 +74,12 @@ public:
class SwUndoTextToTable : public SwUndo, public SwUndRng
{
OUString sTableNm;
- SwInsertTableOptions aInsTableOpts;
+ SwInsertTableOptions const aInsTableOpts;
std::vector<sal_uLong> mvDelBoxes;
std::unique_ptr<SwTableAutoFormat> pAutoFormat;
SwHistory* pHistory;
- sal_Unicode cTrenner;
- sal_uInt16 nAdjust;
+ sal_Unicode const cTrenner;
+ sal_uInt16 const nAdjust;
bool bSplitEnd : 1;
public:
@@ -99,14 +99,14 @@ public:
class SwUndoTableToText : public SwUndo
{
- OUString sTableNm;
+ OUString const sTableNm;
std::unique_ptr<SwDDEFieldType> pDDEFieldType;
std::unique_ptr<SaveTable> pTableSave;
SwTableToTextSaves m_vBoxSaves;
std::unique_ptr<SwHistory> pHistory;
sal_uLong nSttNd, nEndNd;
- sal_Unicode cTrenner;
- sal_uInt16 nHdlnRpt;
+ sal_Unicode const cTrenner;
+ sal_uInt16 const nHdlnRpt;
bool bCheckNumFormat : 1;
public:
@@ -147,7 +147,7 @@ class SwUndoTableAutoFormat : public SwUndo
std::unique_ptr<SaveTable> pSaveTable;
std::vector< std::shared_ptr<SwUndoTableNumFormat> > m_Undos;
bool bSaveContentAttr;
- sal_uInt16 m_nRepeatHeading;
+ sal_uInt16 const m_nRepeatHeading;
void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext);
@@ -171,7 +171,7 @@ class SwUndoTableNdsChg : public SwUndo
struct BoxMove
{
sal_uLong index; ///< Index of this box.
- bool hasMoved; ///< Has this box been moved already.
+ bool const hasMoved; ///< Has this box been moved already.
BoxMove(sal_uLong idx, bool moved=false) : index(idx), hasMoved(moved) {};
bool operator<(const BoxMove& other) const { return index < other.index; };
};
@@ -181,8 +181,8 @@ class SwUndoTableNdsChg : public SwUndo
sal_uLong nSttNode, nCurrBox;
sal_uInt16 nCount, nRelDiff, nAbsDiff;
TableChgWidthHeightType nSetColType;
- bool bFlag;
- bool bSameHeight; // only used for SplitRow
+ bool const bFlag;
+ bool const bSameHeight; // only used for SplitRow
SwUndoTableNdsChg(SwUndoTableNdsChg const&) = delete;
SwUndoTableNdsChg& operator=(SwUndoTableNdsChg const&) = delete;
@@ -327,9 +327,9 @@ class SwUndoSplitTable : public SwUndo
std::unique_ptr<SwSaveRowSpan> mpSaveRowSpan; // stores row span values at the splitting row
std::unique_ptr<SaveTable> pSavTable;
std::unique_ptr<SwHistory> pHistory;
- SplitTable_HeadlineOption nMode;
+ SplitTable_HeadlineOption const nMode;
sal_uInt16 nFormulaEnd;
- bool bCalcNewSize;
+ bool const bCalcNewSize;
public:
SwUndoSplitTable( const SwTableNode& rTableNd, std::unique_ptr<SwSaveRowSpan> pRowSp,
@@ -352,8 +352,8 @@ class SwUndoMergeTable : public SwUndo
sal_uLong nTableNode;
std::unique_ptr<SaveTable> pSavTable, pSavHdl;
std::unique_ptr<SwHistory> pHistory;
- sal_uInt16 nMode;
- bool bWithPrev;
+ sal_uInt16 const nMode;
+ bool const bWithPrev;
public:
SwUndoMergeTable( const SwTableNode& rTableNd, const SwTableNode& rDelTableNd,
@@ -371,8 +371,8 @@ public:
class SwUndoTableHeadline : public SwUndo
{
sal_uLong nTableNd;
- sal_uInt16 nOldHeadline;
- sal_uInt16 nNewHeadline;
+ sal_uInt16 const nOldHeadline;
+ sal_uInt16 const nNewHeadline;
public:
SwUndoTableHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl );
@@ -386,7 +386,7 @@ void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx );
class SwUndoTableStyleMake : public SwUndo
{
- OUString m_sName;
+ OUString const m_sName;
std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
public:
SwUndoTableStyleMake(const OUString& rName, const SwDoc* pDoc);
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index 321aec766901..7d4c570c78b8 100644
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -89,12 +89,12 @@ public:
class SwAutoCorrExceptWord
{
- OUString m_sWord;
- ACFlags m_nFlags;
- sal_uLong m_nNode;
- sal_Int32 m_nContent;
- sal_Unicode m_cChar;
- LanguageType m_eLanguage;
+ OUString const m_sWord;
+ ACFlags const m_nFlags;
+ sal_uLong const m_nNode;
+ sal_Int32 const m_nContent;
+ sal_Unicode const m_cChar;
+ LanguageType const m_eLanguage;
bool m_bDeleted;
public:
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 61c45fda8044..c9a9f51a2d7d 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -36,7 +36,7 @@ class SwBlinkPortion
Point aPos;
const SwLinePortion *pPor;
const SwRootFrame *pFrame;
- sal_uInt16 nDir;
+ sal_uInt16 const nDir;
public:
SwBlinkPortion(const SwLinePortion* pPortion, sal_uInt16 nDirection)
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index fd224ae4d8b8..893dc28ae732 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -100,7 +100,7 @@ private:
// sort text
struct SwSortTextElement : public SwSortElement
{
- sal_uLong nOrg;
+ sal_uLong const nOrg;
SwNodeIndex aPos;
SwSortTextElement( const SwNodeIndex& rPos );
@@ -112,7 +112,7 @@ struct SwSortTextElement : public SwSortElement
// sort table
struct SwSortBoxElement : public SwSortElement
{
- sal_uInt16 nRow;
+ sal_uInt16 const nRow;
SwSortBoxElement( sal_uInt16 nRC );
virtual ~SwSortBoxElement() override;
diff --git a/sw/source/core/inc/fieldhint.hxx b/sw/source/core/inc/fieldhint.hxx
index 8821698580d5..a835f15714f6 100644
--- a/sw/source/core/inc/fieldhint.hxx
+++ b/sw/source/core/inc/fieldhint.hxx
@@ -24,7 +24,7 @@
class SwFieldHint : public SfxHint
{
- SwPaM* pPaM;
+ SwPaM* const pPaM;
public:
SwFieldHint( SwPaM* p )
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index a7400f03d0d1..1fb81bde56e8 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -87,7 +87,7 @@ class SwFntObj : public SwCacheObj
sal_uInt16 m_nPrtAscent;
sal_uInt16 m_nScrHeight;
sal_uInt16 m_nPrtHeight;
- sal_uInt16 m_nPropWidth;
+ sal_uInt16 const m_nPropWidth;
sal_uInt16 m_nZoom;
bool m_bSymbol : 1;
bool m_bPaintBlank : 1;
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 03888c4039df..3496b6d5eb59 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -207,7 +207,7 @@ protected:
SwTwips mnFlyAnchorOfstNoWrap;
bool mbHadFollow;
bool mbInvaKeep;
- bool mbValidSize;
+ bool const mbValidSize;
public:
SwFrameNotify( SwFrame *pFrame );
@@ -231,7 +231,7 @@ public:
class SwFlyNotify : public SwLayNotify
{
- SwPageFrame *pOldPage;
+ SwPageFrame * const pOldPage;
const SwRect aFrameAndSpace;
public:
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index ec0a1e412787..f070a11a5bd6 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -56,10 +56,10 @@ namespace sw { namespace mark
const SwIndex* pIdx =nullptr);
private:
- OUString m_aName;
+ OUString const m_aName;
OUString m_aShortName;
vcl::KeyCode m_aCode;
- IDocumentMarkAccess::MarkType m_eOrigBkmType;
+ IDocumentMarkAccess::MarkType const m_eOrigBkmType;
sal_uLong m_nNode1;
sal_uLong m_nNode2;
sal_Int32 m_nContent1;
@@ -98,9 +98,9 @@ void DelBookmarks(const SwNodeIndex& rStt,
* location. */
struct SaveFly
{
- sal_uLong nNdDiff; /// relative node difference
- SwFrameFormat* pFrameFormat; /// the fly's frame format
- bool bInsertPosition; /// if true, anchor _at_ insert position
+ sal_uLong const nNdDiff; /// relative node difference
+ SwFrameFormat* const pFrameFormat; /// the fly's frame format
+ bool const bInsertPosition; /// if true, anchor _at_ insert position
SaveFly( sal_uLong nNodeDiff, SwFrameFormat* pFormat, bool bInsert )
: nNdDiff( nNodeDiff ), pFrameFormat( pFormat ), bInsertPosition( bInsert )
@@ -187,7 +187,7 @@ class SaveRedlEndPosForRestore
{
std::vector<SwPosition*> mvSavArr;
std::unique_ptr<SwNodeIndex> pSavIdx;
- sal_Int32 nSavContent;
+ sal_Int32 const nSavContent;
public:
SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nContent );
diff --git a/sw/source/core/inc/pagedeschint.hxx b/sw/source/core/inc/pagedeschint.hxx
index d76aa95d3e70..1cdca3f111de 100644
--- a/sw/source/core/inc/pagedeschint.hxx
+++ b/sw/source/core/inc/pagedeschint.hxx
@@ -26,7 +26,7 @@ class SwPageDesc;
class SwPageDescHint : public SfxHint
{
- SwPageDesc* pPageDesc;
+ SwPageDesc* const pPageDesc;
public:
SwPageDescHint( SwPageDesc* p )
: pPageDesc(p)
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 27e4b96d8c07..945ed1948388 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -116,8 +116,8 @@ class SwHistorySetText : public SwHistoryHint
const sal_uLong m_nNodeIndex;
const sal_Int32 m_nStart;
const sal_Int32 m_nEnd;
- bool m_bFormatIgnoreStart : 1;
- bool m_bFormatIgnoreEnd : 1;
+ bool const m_bFormatIgnoreStart : 1;
+ bool const m_bFormatIgnoreEnd : 1;
public:
SwHistorySetText( SwTextAttr* pTextHt, sal_uLong nNode );
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index aee70da5029f..fa1c88ee79f5 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -435,7 +435,7 @@ class DisableCallbackAction
{
private:
SwRootFrame & m_rRootFrame;
- bool m_bOldCallbackActionState;
+ bool const m_bOldCallbackActionState;
public:
explicit DisableCallbackAction(SwRootFrame & rRootFrame)
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 1690b6d22eda..956a95b9623b 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -57,8 +57,8 @@ private:
//! Records a single change in direction.
struct DirectionChangeInfo
{
- TextFrameIndex position; //!< Character position at which we change direction.
- sal_uInt8 type; //!< Direction that we change to.
+ TextFrameIndex const position; //!< Character position at which we change direction.
+ sal_uInt8 const type; //!< Direction that we change to.
DirectionChangeInfo(TextFrameIndex pos, sal_uInt8 typ) : position(pos), type(typ) {};
};
std::vector<DirectionChangeInfo> m_DirectionChanges;
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index b29bd82e0b16..cce94ffc2a22 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -35,9 +35,9 @@ class SwBlockName
friend class SwImpBlocks;
sal_uInt16 nHashS, nHashL; // Hash codes for testing
public:
- OUString aShort; /// Shortname
+ OUString const aShort; /// Shortname
OUString aLong; /// Longname
- OUString aPackageName; /// Package name
+ OUString const aPackageName; /// Package name
bool bIsOnlyTextFlagInit : 1; /// Is the Flag valid?
bool bIsOnlyText : 1; /// Unformatted text
@@ -54,7 +54,7 @@ class SwImpBlocks
{
friend class SwTextBlocks;
protected:
- OUString m_aFile; // Physical file name
+ OUString const m_aFile; // Physical file name
OUString m_aName; // Logical file name
OUString m_aCurrentText; // Current text
OUString m_aShort, m_aLong; // Short- and longname (PutDoc)
diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index ebe64d841feb..585ef97d9e80 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -62,7 +62,7 @@ public:
class SwFontAccess : public SwCacheAccess
{
- SwViewShell *m_pShell;
+ SwViewShell * const m_pShell;
protected:
virtual SwCacheObj *NewObj( ) override;
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 043836bad096..ff0e5d8a0b9d 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -944,7 +944,7 @@ inline void SwFont::SetHighlightColor( const Color& aNewColor )
class SwUnderlineFont
{
Point m_aPos;
- TextFrameIndex m_nEnd;
+ TextFrameIndex const m_nEnd;
std::unique_ptr<SwFont> m_pFont;
public:
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index 01669a9efabd..97416a63f72f 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -66,7 +66,7 @@ class SwCollectTableLineBoxes
std::vector<sal_uInt16> aPosArr;
std::vector<SwTableBox*> m_Boxes;
SwHistory* pHst;
- SplitTable_HeadlineOption nMode;
+ SplitTable_HeadlineOption const nMode;
sal_uInt16 nWidth;
bool bGetFromTop : 1;
bool bGetValues : 1;
@@ -113,7 +113,7 @@ void sw_BoxSetSplitBoxFormats( SwTableBox* pBox, SwCollectTableLineBoxes* pSplPa
*/
struct SwSaveRowSpan
{
- sal_uInt16 mnSplitLine; // the line number where the table has been splitted
+ sal_uInt16 const mnSplitLine; // the line number where the table has been splitted
std::vector< long > mnRowSpans; // the row span attributes in this line
SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn );
};
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index 61091af43b8a..da33208dd297 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -45,8 +45,8 @@ enum TOXSortType
struct SwTOXSource
{
const SwContentNode* pNd;
- sal_Int32 nPos;
- bool bMainEntry;
+ sal_Int32 const nPos;
+ bool const bMainEntry;
SwTOXSource( const SwContentNode* pNode, sal_Int32 n, bool bMain )
: pNd(pNode), nPos(n), bMainEntry(bMain)
@@ -71,9 +71,9 @@ class SwTOXInternational
{
std::unique_ptr<IndexEntrySupplierWrapper> m_pIndexWrapper;
std::unique_ptr<CharClass> m_pCharClass;
- LanguageType m_eLang;
- OUString m_sSortAlgorithm;
- SwTOIOptions m_nOptions;
+ LanguageType const m_eLang;
+ OUString m_sSortAlgorithm;
+ SwTOIOptions const m_nOptions;
void Init();
@@ -125,7 +125,7 @@ struct SwTOXSortTabBase
const SwTOXInternational* pTOXIntl;
sal_uLong nPos;
sal_Int32 nCntPos;
- sal_uInt16 nType;
+ sal_uInt16 const nType;
static SwTOIOptions nOpt;
SwTOXSortTabBase( TOXSortType nType,
@@ -189,7 +189,7 @@ struct SwTOXIndex : public SwTOXSortTabBase
private:
virtual TextAndReading GetText_Impl() const override;
- sal_uInt8 nKeyLevel;
+ sal_uInt8 const nKeyLevel;
};
struct SwTOXCustom : public SwTOXSortTabBase
@@ -205,8 +205,8 @@ struct SwTOXCustom : public SwTOXSortTabBase
private:
virtual TextAndReading GetText_Impl() const override;
- TextAndReading m_aKey;
- sal_uInt16 nLev;
+ TextAndReading const m_aKey;
+ sal_uInt16 const nLev;
};
/**
@@ -238,11 +238,11 @@ struct SwTOXPara : public SwTOXSortTabBase
private:
virtual TextAndReading GetText_Impl() const override;
- SwTOXElement eType;
- sal_uInt16 m_nLevel;
+ SwTOXElement const eType;
+ sal_uInt16 const m_nLevel;
sal_Int32 nStartIndex;
sal_Int32 nEndIndex;
- OUString m_sSequenceName;
+ OUString const m_sSequenceName;
};
struct SwTOXTable : public SwTOXSortTabBase
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 0933a5e328db..5a9db1f0634a 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -907,7 +907,7 @@ public:
class SwLayoutModeModifier
{
const OutputDevice& m_rOut;
- ComplexTextLayoutFlags m_nOldLayoutMode;
+ ComplexTextLayoutFlags const m_nOldLayoutMode;
public:
SwLayoutModeModifier( const OutputDevice& rOutp );
~SwLayoutModeModifier();
@@ -918,7 +918,7 @@ public:
class SwDigitModeModifier
{
const OutputDevice& rOut;
- LanguageType nOldLanguageType;
+ LanguageType const nOldLanguageType;
public:
SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
~SwDigitModeModifier();
diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx
index 7ec058e086bd..39a9e973502f 100644
--- a/sw/source/core/inc/unobookmark.hxx
+++ b/sw/source/core/inc/unobookmark.hxx
@@ -179,7 +179,7 @@ class SwXFieldmark final
: public SwXFieldmark_Base
{
::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark();
- bool isReplacementObject;
+ bool const isReplacementObject;
SwXFieldmark(bool isReplacementObject, SwDoc* pDoc);
diff --git a/sw/source/core/inc/unoevent.hxx b/sw/source/core/inc/unoevent.hxx
index 4c6cbdc26193..dd99a5a882b8 100644
--- a/sw/source/core/inc/unoevent.hxx
+++ b/sw/source/core/inc/unoevent.hxx
@@ -54,7 +54,7 @@ public:
// All these objects are an SwXFrame, so they can use a common implementation
class SwFrameEventDescriptor : public SvEventDescriptor
{
- OUString sSwFrameEventDescriptor;
+ OUString const sSwFrameEventDescriptor;
SwXFrame& rFrame;
@@ -75,8 +75,6 @@ protected:
class SwFrameStyleEventDescriptor : public SvEventDescriptor
{
- OUString sSwFrameStyleEventDescriptor;
-
sw::ICoreFrameStyle& m_rStyle;
public:
diff --git a/sw/source/core/inc/unoflatpara.hxx b/sw/source/core/inc/unoflatpara.hxx
index f584f47a067d..5449119523e7 100644
--- a/sw/source/core/inc/unoflatpara.hxx
+++ b/sw/source/core/inc/unoflatpara.hxx
@@ -109,7 +109,7 @@ private:
SwXFlatParagraph( const SwXFlatParagraph & ) = delete;
SwXFlatParagraph & operator = ( const SwXFlatParagraph & ) = delete;
- OUString maExpandText;
+ OUString const maExpandText;
};
class SwXFlatParagraphIterator:
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index b99e56c53c7a..b3c346e81a6d 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -166,9 +166,9 @@ class SwImplEnterLeave
{
protected:
const SwFrame* pFrame; // the frame
- PROT nFunction; // the function
- DbgAction nAction; // the action if needed
- void* pParam; // further parameter
+ PROT const nFunction; // the function
+ DbgAction const nAction; // the action if needed
+ void* const pParam; // further parameter
public:
SwImplEnterLeave( const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar )
: pFrame( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 162669798f36..f4201ccb09b5 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -80,8 +80,8 @@ public:
// by controlling nested sections.
class SwActualSection
{
- SwActualSection *pUpper;
- SwSectionFrame *pSectFrame;
+ SwActualSection * const pUpper;
+ SwSectionFrame *pSectFrame;
SwSectionNode *pSectNode;
public:
SwActualSection( SwActualSection *pUpper,
@@ -142,8 +142,8 @@ class SwLayCacheIoImpl
{
private:
struct RecTypeSize {
- sal_uInt8 type;
- sal_uLong size;
+ sal_uInt8 const type;
+ sal_uLong const size;
RecTypeSize(sal_uInt8 typ, sal_uLong siz) : type(typ), size(siz) {}
};
std::vector<RecTypeSize> aRecords;
@@ -155,7 +155,7 @@ private:
sal_uInt16 nMajorVersion;
sal_uInt16 nMinorVersion;
- bool bWriteMode : 1;
+ bool const bWriteMode : 1;
bool bError : 1;
public:
@@ -202,8 +202,8 @@ public:
class SwFlyCache : public SwRect // position and size
{
public:
- sal_uLong nOrdNum; ///< Id to recognize text frames
- sal_uInt16 nPageNum; ///< page number
+ sal_uLong const nOrdNum; ///< Id to recognize text frames
+ sal_uInt16 const nPageNum; ///< page number
SwFlyCache( sal_uInt16 nP, sal_uLong nO, long nXL, long nYL, long nWL, long nHL ) :
SwRect( nXL, nYL, nWL, nHL ), nOrdNum( nO ), nPageNum( nP ){}
};
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 62e04cace373..27acb33779cb 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -46,7 +46,7 @@ public:
class SwEndnoter
{
- SwLayouter* pMaster;
+ SwLayouter* const pMaster;
SwSectionFrame* pSect;
std::unique_ptr<SwFootnoteFrames> pEndArr;
public:
diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx
index 15667b9ead60..cf3b955addb1 100644
--- a/sw/source/core/layout/objectformattertxtfrm.hxx
+++ b/sw/source/core/layout/objectformattertxtfrm.hxx
@@ -34,7 +34,7 @@ class SwObjectFormatterTextFrame : public SwObjectFormatter
SwTextFrame& mrAnchorTextFrame;
// 'master' anchor text frame
- SwTextFrame* mpMasterAnchorTextFrame;
+ SwTextFrame* const mpMasterAnchorTextFrame;
SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame,
const SwPageFrame& _rPageFrame,
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index af4ed98bfbec..487f6247b948 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4456,13 +4456,13 @@ namespace drawinglayer
{
private:
/// the transformation defining the geometry of this BorderRectangle
- basegfx::B2DHomMatrix maB2DHomMatrix;
+ basegfx::B2DHomMatrix const maB2DHomMatrix;
/// the four styles to be used
- svx::frame::Style maStyleTop;
- svx::frame::Style maStyleRight;
- svx::frame::Style maStyleBottom;
- svx::frame::Style maStyleLeft;
+ svx::frame::Style const maStyleTop;
+ svx::frame::Style const maStyleRight;
+ svx::frame::Style const maStyleBottom;
+ svx::frame::Style const maStyleLeft;
protected:
/// local decomposition.
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index e6a08f422d1b..688b0aed12c5 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -45,7 +45,7 @@ private:
class SwAttrStack
{
private:
- SwTextAttr* m_pInitialArray[ INITIAL_NUM_ATTR ];
+ SwTextAttr* m_pInitialArray[ INITIAL_NUM_ATTR ];
SwTextAttr** m_pArray;
sal_uInt16 m_nCount; // number of elements on stack
sal_uInt16 m_nSize; // number of positions in Array
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index c61e759eb289..bdf6cd043042 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -302,7 +302,7 @@ class SwHookOut
{
SwTextSizeInfo* pInf;
VclPtr<OutputDevice> pOut;
- bool bOnWin;
+ bool const bOnWin;
public:
explicit SwHookOut( SwTextSizeInfo& rInfo );
~SwHookOut();
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index f2e20517261d..2001260768dd 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -35,7 +35,7 @@ class SwDropPortionPart
{
std::unique_ptr<SwDropPortionPart> pFollow;
std::unique_ptr<SwFont> pFnt;
- TextFrameIndex nLen;
+ TextFrameIndex const nLen;
sal_uInt16 nWidth;
bool m_bJoinBorderWithNext;
bool m_bJoinBorderWithPrev;
@@ -64,7 +64,7 @@ class SwDropPortion : public SwTextPortion
std::unique_ptr<SwDropPortionPart> pPart; // due to script/attribute changes
sal_uInt16 nLines; // Line count
sal_uInt16 nDropHeight; // Height
- sal_uInt16 nDropDescent; // Distance to the next line
+ sal_uInt16 const nDropDescent; // Distance to the next line
sal_uInt16 nDistance; // Distance to the text
sal_uInt16 nFix; // Fixed position
short nY; // Y Offset
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index ad0448356495..3373cdfda8eb 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -39,7 +39,7 @@ public:
class SwBlankPortion : public SwExpandPortion
{
sal_Unicode cChar;
- bool bMulti; // For multiportion brackets
+ bool const bMulti; // For multiportion brackets
public:
SwBlankPortion( sal_Unicode cCh, bool bMult = false )
: cChar( cCh ), bMulti( bMult )
@@ -59,7 +59,7 @@ public:
class SwPostItsPortion : public SwExpandPortion
{
- bool bScript;
+ bool const bScript;
public:
explicit SwPostItsPortion( bool bScrpt );
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index d014ec9a0bce..151404197cd9 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -121,8 +121,8 @@ class SwNumberPortion : public SwFieldPortion
{
protected:
sal_uInt16 nFixWidth; // See Glues
- sal_uInt16 nMinDist; // Minimal distance to the text
- bool mbLabelAlignmentPosAndSpaceModeActive;
+ sal_uInt16 const nMinDist; // Minimal distance to the text
+ bool const mbLabelAlignmentPosAndSpaceModeActive;
public:
SwNumberPortion( const OUString &rExpand,
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index 7b0ae819dbe0..97b5275ed696 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -26,7 +26,7 @@ class SwTextFootnote;
class SwFootnotePortion : public SwFieldPortion
{
- SwTextFootnote *pFootnote;
+ SwTextFootnote * const pFootnote;
sal_uInt16 nOrigHeight;
// #i98418#
bool mbPreferredScriptTypeSet;
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 1df9b1ed6500..b00bddc1cf5d 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -37,7 +37,7 @@ public:
class SwHyphStrPortion : public SwHyphPortion
{
- OUString aExpand;
+ OUString const aExpand;
public:
explicit SwHyphStrPortion(const OUString &rStr)
: aExpand(rStr + "-")
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index f0ad72a7577c..7d3f0348a0cf 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -217,7 +217,7 @@ public:
class SwBidiPortion : public SwMultiPortion
{
- sal_uInt8 nLevel;
+ sal_uInt8 const nLevel;
public:
SwBidiPortion(TextFrameIndex nEnd, sal_uInt8 nLv);
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index cadd8f871b43..f90e7abdf5f6 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -50,9 +50,9 @@ public:
class SwKernPortion : public SwLinePortion
{
- short nKern;
- bool bBackground;
- bool bGridKern;
+ short const nKern;
+ bool const bBackground;
+ bool const bGridKern;
public:
@@ -75,7 +75,7 @@ public:
class SwArrowPortion : public SwLinePortion
{
Point aPos;
- bool bLeft;
+ bool const bLeft;
public:
explicit SwArrowPortion( const SwLinePortion &rPortion );
explicit SwArrowPortion( const SwTextPaintInfo &rInf );
@@ -91,7 +91,7 @@ public:
// The SwHangingPortion is the corresponding textportion to do that.
class SwHangingPortion : public SwTextPortion
{
- sal_uInt16 nInnerWidth;
+ sal_uInt16 const nInnerWidth;
public:
explicit SwHangingPortion( SwPosSize aSize ) : nInnerWidth( aSize.Width() )
{
@@ -122,7 +122,7 @@ class SwControlCharPortion : public SwLinePortion
private:
mutable sal_uInt16 mnViewWidth; // used to cache a calculated value
mutable sal_uInt16 mnHalfCharWidth; // used to cache a calculated value
- sal_Unicode mcChar;
+ sal_Unicode const mcChar;
public:
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 043f3eb5e376..a19d7086f5ac 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -68,10 +68,10 @@ static bool lcl_IsDropFlyInter( const SwTextFormatInfo &rInf,
class SwDropSave
{
SwTextPaintInfo* pInf;
- sal_Int32 nIdx;
- sal_Int32 nLen;
- long nX;
- long nY;
+ sal_Int32 const nIdx;
+ sal_Int32 const nLen;
+ long const nX;
+ long const nY;
public:
explicit SwDropSave( const SwTextPaintInfo &rInf );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 62ba00132d7c..e42173f7ff9e 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -67,7 +67,7 @@ namespace
// #i68520#
struct AnchoredObjOrder
{
- bool mbR2L;
+ bool const mbR2L;
SwRectFn mfnRect;
AnchoredObjOrder( const bool bR2L,
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 7ad0a25fdf98..6dc0eb71971d 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -30,7 +30,7 @@
class XmlPortionDumper:public SwPortionHandler
{
private:
- xmlTextWriterPtr writer;
+ xmlTextWriterPtr const writer;
TextFrameIndex ofs;
const OUString& m_rText;
OUString m_aLine;
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index c3ad4bf86feb..f7dca91d90d9 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -743,8 +743,8 @@ static FormTokenType lcl_GetTokenType(const OUString & sToken,
{
static struct
{
- OUString sTokenStart;
- sal_Int16 nTokenLength;
+ OUString const sTokenStart;
+ sal_Int16 const nTokenLength;
FormTokenType eTokenType;
} const aTokenArr[] = {
{ SwForm::GetFormTab().copy(0, 2), 3, TOKEN_TAB_STOP },
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index bf98f097ec47..dd377d0c1090 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -243,11 +243,11 @@ struct CalcLinePosData
{
SwDrawTextInfo& rInf;
vcl::Font& rFont;
- TextFrameIndex nCnt;
+ TextFrameIndex const nCnt;
const bool bSwitchH2V;
const bool bSwitchL2R;
- long nHalfSpace;
- long* pKernArray;
+ long const nHalfSpace;
+ long* const pKernArray;
const bool bBidiPor;
CalcLinePosData( SwDrawTextInfo& _rInf, vcl::Font& _rFont,
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index e6f5b1885f56..8c2b2c078996 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -36,7 +36,7 @@
struct FieldResult
{
- sal_Int32 m_nFieldPos;
+ sal_Int32 const m_nFieldPos;
OUString m_sExpand;
enum { NONE, FIELD, FOOTNOTE } m_eType;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list