summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-01 14:30:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-03 08:26:03 +0200
commit07c4aa4298f062cee1894b80ef82e76d5ffcf4c7 (patch)
tree23752b23ce6d21c209c9d178420dee86c48938de /include
parent48bf5a74186140760a734091a85e85d198e6fdfa (diff)
loplugin:constfields in svtools
Change-Id: I91553f89d8f5ee42afa52d196bf86f8a92011850 Reviewed-on: https://gerrit.libreoffice.org/61186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/ServerDetailsControls.hxx2
-rw-r--r--include/svtools/accessibleruler.hxx2
-rw-r--r--include/svtools/brwbox.hxx14
-rw-r--r--include/svtools/calendar.hxx4
-rw-r--r--include/svtools/ctrlbox.hxx2
-rw-r--r--include/svtools/editbrowsebox.hxx2
-rw-r--r--include/svtools/editsyntaxhighlighter.hxx5
-rw-r--r--include/svtools/ehdl.hxx12
-rw-r--r--include/svtools/embedtransfer.hxx2
-rw-r--r--include/svtools/filechangedchecker.hxx4
-rw-r--r--include/svtools/filectrl.hxx2
-rw-r--r--include/svtools/fileview.hxx2
-rw-r--r--include/svtools/framestatuslistener.hxx2
-rw-r--r--include/svtools/htmlout.hxx2
-rw-r--r--include/svtools/imap.hxx2
-rw-r--r--include/svtools/ivctrl.hxx2
-rw-r--r--include/svtools/parhtml.hxx10
-rw-r--r--include/svtools/place.hxx2
-rw-r--r--include/svtools/ruler.hxx14
-rw-r--r--include/svtools/statusbarcontroller.hxx2
-rw-r--r--include/svtools/stringtransfer.hxx2
-rw-r--r--include/svtools/svlbitm.hxx2
-rw-r--r--include/svtools/svtabbx.hxx6
-rw-r--r--include/svtools/toolboxcontroller.hxx2
-rw-r--r--include/svtools/treelistbox.hxx2
-rw-r--r--include/svtools/unoevent.hxx2
-rw-r--r--include/svtools/valueset.hxx2
27 files changed, 53 insertions, 54 deletions
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 54d930136891..642f9d82e9b4 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -56,7 +56,7 @@ class DetailsContainer
class HostDetailsContainer : public DetailsContainer
{
private:
- sal_uInt16 m_nDefaultPort;
+ sal_uInt16 const m_nDefaultPort;
OUString m_sScheme;
OUString m_sHost;
diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx
index 4e45ce995374..d150192c1731 100644
--- a/include/svtools/accessibleruler.hxx
+++ b/include/svtools/accessibleruler.hxx
@@ -180,7 +180,7 @@ private:
tools::Rectangle GetBoundingBox();
/// Name of this object.
- ::rtl::OUString msName;
+ ::rtl::OUString const msName;
/// Reference to the parent object.
css::uno::Reference< css::accessibility::XAccessible >
diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx
index a4aa7a8ac5e0..3311843c658d 100644
--- a/include/svtools/brwbox.hxx
+++ b/include/svtools/brwbox.hxx
@@ -123,10 +123,10 @@ namespace o3tl
class BrowseEvent
{
VclPtr<vcl::Window> pWin;
- long nRow;
- tools::Rectangle aRect;
- sal_uInt16 nCol;
- sal_uInt16 nColId;
+ long const nRow;
+ tools::Rectangle const aRect;
+ sal_uInt16 const nCol;
+ sal_uInt16 const nColId;
public:
BrowseEvent( vcl::Window* pWindow,
@@ -249,9 +249,9 @@ private:
// fdo#83943, detect if making the cursor position visible is impossible to achieve
struct CursorMoveAttempt
{
- long m_nCol;
- long m_nRow;
- bool m_bScrolledToReachCell;
+ long const m_nCol;
+ long const m_nRow;
+ bool const m_bScrolledToReachCell;
CursorMoveAttempt(long nCol, long nRow, bool bScrolledToReachCell)
: m_nCol(nCol)
, m_nRow(nRow)
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 7b5ae85a94e9..ea2df0f63be0 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -142,7 +142,7 @@ class SVT_DLLPUBLIC Calendar final : public Control
Date maCurDate;
Date maOldCurDate;
Date maAnchorDate;
- Date maDropDate;
+ Date const maDropDate;
Color maSelColor;
Color maOtherColor;
sal_Int32 mnDayCount;
@@ -291,7 +291,7 @@ private:
VclPtr<Calendar> mpCalendar;
VclPtr<PushButton> mpTodayBtn;
VclPtr<PushButton> mpNoneBtn;
- Date maDefaultDate;
+ Date const maDefaultDate;
bool mbToday;
bool mbNone;
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 355fd44142a6..f6e56bec7728 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -249,7 +249,7 @@ private:
OUString m_sNone;
ScopedVclPtr<VirtualDevice> aVirDev;
Size aTxtSize;
- Color aColor;
+ Color const aColor;
Color maPaintCol;
FieldUnit eSourceUnit;
};
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 3a6d897405c0..2b8ce9ee299a 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -233,7 +233,7 @@ namespace svt
class SVT_DLLPUBLIC EditCellController : public CellController
{
IEditImplementation* m_pEditImplementation;
- bool m_bOwnImplementation; // did we create m_pEditImplementation?
+ bool const m_bOwnImplementation; // did we create m_pEditImplementation?
public:
EditCellController( Edit* _pEdit );
diff --git a/include/svtools/editsyntaxhighlighter.hxx b/include/svtools/editsyntaxhighlighter.hxx
index 33666a7ded0f..ee45651b3f86 100644
--- a/include/svtools/editsyntaxhighlighter.hxx
+++ b/include/svtools/editsyntaxhighlighter.hxx
@@ -28,9 +28,8 @@
class SVT_DLLPUBLIC MultiLineEditSyntaxHighlight : public MultiLineEdit
{
private:
- bool mbDoBracketHilight;
- SyntaxHighlighter aHighlighter;
- svtools::ColorConfig m_aColorConfig;
+ SyntaxHighlighter const aHighlighter;
+ svtools::ColorConfig const m_aColorConfig;
private:
void DoBracketHilight(sal_uInt16 aKey);
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx
index 2efbb761f4ba..99a2016e091e 100644
--- a/include/svtools/ehdl.hxx
+++ b/include/svtools/ehdl.hxx
@@ -43,10 +43,10 @@ public:
bool GetString(ErrCode nErrId, OUString &rStr) override;
private:
- sal_uInt16 nCtxId;
+ sal_uInt16 const nCtxId;
const ErrMsgCode* pIds;
- std::locale aResLocale;
- OUString aArg1;
+ std::locale const aResLocale;
+ OUString const aArg1;
};
class SVT_DLLPUBLIC SfxErrorHandler : private ErrorHandler
@@ -60,10 +60,10 @@ protected:
private:
- ErrCodeArea lStart;
- ErrCodeArea lEnd;
+ ErrCodeArea const lStart;
+ ErrCodeArea const lEnd;
const ErrMsgCode* pIds;
- std::locale aResLocale;
+ std::locale const aResLocale;
SVT_DLLPRIVATE static void GetClassString(ErrCodeClass lErrId, OUString &);
virtual bool CreateString(const ErrorInfo *, OUString &) const override;
diff --git a/include/svtools/embedtransfer.hxx b/include/svtools/embedtransfer.hxx
index 6cd0a407093d..7a6fa184b563 100644
--- a/include/svtools/embedtransfer.hxx
+++ b/include/svtools/embedtransfer.hxx
@@ -32,7 +32,7 @@ private:
css::uno::Reference< css::embed::XEmbeddedObject > m_xObj;
std::unique_ptr<Graphic> m_pGraphic;
- sal_Int64 m_nAspect;
+ sal_Int64 const m_nAspect;
OUString maParentShellID;
diff --git a/include/svtools/filechangedchecker.hxx b/include/svtools/filechangedchecker.hxx
index f9634e18919b..97a3a0617a3c 100644
--- a/include/svtools/filechangedchecker.hxx
+++ b/include/svtools/filechangedchecker.hxx
@@ -27,9 +27,9 @@ class SVT_DLLPUBLIC FileChangedChecker
{
private:
Idle mIdle;
- OUString mFileName;
+ OUString const mFileName;
TimeValue mLastModTime;
- ::std::function<void ()> mpCallback;
+ ::std::function<void ()> const mpCallback;
bool SVT_DLLPRIVATE getCurrentModTime(TimeValue& o_rValue) const;
DECL_LINK(TimerHandler, Timer *, void);
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx
index c00d3fccfa81..3e620e2350be 100644
--- a/include/svtools/filectrl.hxx
+++ b/include/svtools/filectrl.hxx
@@ -42,7 +42,7 @@ class SVT_DLLPUBLIC FileControl final : public vcl::Window
{
VclPtr<Edit> maEdit;
VclPtr<PushButton> maButton;
- OUString maButtonText;
+ OUString const maButtonText;
FileControlMode_Internal mnInternalFlags;
SVT_DLLPRIVATE void Resize() override;
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 6feb9d5c4837..9b1645fde80c 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -190,7 +190,7 @@ protected:
struct SvtContentEntry
{
- bool mbIsFolder;
+ bool const mbIsFolder;
OUString maURL;
SvtContentEntry( const OUString& rURL, bool bIsFolder ) :
diff --git a/include/svtools/framestatuslistener.hxx b/include/svtools/framestatuslistener.hxx
index f2d4d7594285..0fa756b08dc8 100644
--- a/include/svtools/framestatuslistener.hxx
+++ b/include/svtools/framestatuslistener.hxx
@@ -76,7 +76,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public css::frame::XStatusListener,
Listener( const css::util::URL& rURL, const css::uno::Reference< css::frame::XDispatch >& rDispatch ) :
aURL( rURL ), xDispatch( rDispatch ) {}
- css::util::URL aURL;
+ css::util::URL const aURL;
css::uno::Reference< css::frame::XDispatch > xDispatch;
};
diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx
index 3adbb23db673..6fbff8903609 100644
--- a/include/svtools/htmlout.hxx
+++ b/include/svtools/htmlout.hxx
@@ -38,7 +38,7 @@ struct HTMLOutEvent
{
const sal_Char *pBasicName;
const sal_Char *pJavaName;
- SvMacroItemId nEvent;
+ SvMacroItemId const nEvent;
};
struct SVT_DLLPUBLIC HTMLOutContext
diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx
index e0129bffce07..98835c15bb19 100644
--- a/include/svtools/imap.hxx
+++ b/include/svtools/imap.hxx
@@ -122,7 +122,7 @@ class IMapCompat
SvStream* pRWStm;
sal_uInt64 nCompatPos;
sal_uInt64 nTotalSize;
- StreamMode nStmMode;
+ StreamMode const nStmMode;
IMapCompat( const IMapCompat& ) = delete;
IMapCompat& operator=( const IMapCompat& ) { return *this; }
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index 11ba7f1dee1f..ce1f8c9e7ff7 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -65,7 +65,7 @@ enum class SvxIconChoiceCtrlPositionMode
class SvxIconChoiceCtrlEntry
{
- Image aImage;
+ Image const aImage;
OUString aText;
OUString aQuickHelpText;
diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx
index 53c0727fcbf9..b2ece425a87e 100644
--- a/include/svtools/parhtml.hxx
+++ b/include/svtools/parhtml.hxx
@@ -76,7 +76,7 @@ template<typename EnumT>
struct HTMLOptionEnum
{
const sal_Char *pName; // value of an HTML option
- EnumT nValue; // and corresponding value of an enum
+ EnumT const nValue; // and corresponding value of an enum
};
/** Representation of an HTML option (=attribute in a start tag).
@@ -86,9 +86,9 @@ struct HTMLOptionEnum
*/
class SVT_DLLPUBLIC HTMLOption
{
- OUString aValue; // value of the option (always as string)
- OUString aToken; // name of the option as string
- HtmlOptionId nToken; // and respective token
+ OUString const aValue; // value of the option (always as string)
+ OUString const aToken; // name of the option as string
+ HtmlOptionId const nToken; // and respective token
public:
@@ -148,7 +148,7 @@ class SVT_DLLPUBLIC HTMLParser : public SvParser<HtmlTokenId>
private:
mutable HTMLOptions maOptions; // options of the start tag
- bool bNewDoc : 1; // read new Doc?
+ bool const bNewDoc : 1; // read new Doc?
bool bIsInHeader : 1; // scan header section
bool bReadListing : 1; // read listings
bool bReadXMP : 1; // read XMP
diff --git a/include/svtools/place.hxx b/include/svtools/place.hxx
index 23dd863350bd..7053c931b892 100644
--- a/include/svtools/place.hxx
+++ b/include/svtools/place.hxx
@@ -18,7 +18,7 @@ private:
OUString msName;
INetURLObject maUrl;
- bool mbEditable;
+ bool const mbEditable;
public:
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index c89550e3f6a2..d3a532db9650 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -576,13 +576,13 @@ struct RulerSelection
struct RulerUnitData
{
- MapUnit eMapUnit; // MAP_UNIT for calculation
- long nTickUnit; // Unit divider
- double nTick1; // Minimal step
- double nTick2; // Tick quarter unit
- double nTick3; // Tick half unit
- double nTick4; // Tick whole unit
- sal_Char aUnitStr[8]; // Unit string
+ MapUnit const eMapUnit; // MAP_UNIT for calculation
+ long const nTickUnit; // Unit divider
+ double const nTick1; // Minimal step
+ double const nTick2; // Tick quarter unit
+ double const nTick3; // Tick half unit
+ double const nTick4; // Tick whole unit
+ sal_Char const aUnitStr[8]; // Unit string
};
diff --git a/include/svtools/statusbarcontroller.hxx b/include/svtools/statusbarcontroller.hxx
index 1def30e49f8c..d27adb6d6664 100644
--- a/include/svtools/statusbarcontroller.hxx
+++ b/include/svtools/statusbarcontroller.hxx
@@ -96,7 +96,7 @@ class SVT_DLLPUBLIC StatusbarController :
Listener( const css::util::URL& rURL, const css::uno::Reference< css::frame::XDispatch >& rDispatch ) :
aURL( rURL ), xDispatch( rDispatch ) {}
- css::util::URL aURL;
+ css::util::URL const aURL;
css::uno::Reference< css::frame::XDispatch > xDispatch;
};
diff --git a/include/svtools/stringtransfer.hxx b/include/svtools/stringtransfer.hxx
index fcecc9724ff1..a0b7f500ab43 100644
--- a/include/svtools/stringtransfer.hxx
+++ b/include/svtools/stringtransfer.hxx
@@ -40,7 +40,7 @@ namespace svt
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& _rFlavor, const OUString& rDestDoc ) override;
- OUString m_sContent;
+ OUString const m_sContent;
};
diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx
index 3b603f47bbcf..d0125b3a09a6 100644
--- a/include/svtools/svlbitm.hxx
+++ b/include/svtools/svlbitm.hxx
@@ -136,7 +136,7 @@ class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem
{
bool isVis;
SvLBoxButtonData* pData;
- SvLBoxButtonKind eKind;
+ SvLBoxButtonKind const eKind;
SvItemStateFlags nItemFlags;
static void ImplAdjustBoxSize( Size& io_rCtrlSize, ControlType i_eType, vcl::RenderContext const & pRenderContext);
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 3fba520202ec..65277e05f372 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -36,9 +36,9 @@ enum SvTabJustify
struct TabListBoxEventData
{
- SvTreeListEntry* m_pEntry;
- sal_uInt16 m_nColumn;
- OUString m_sOldText;
+ SvTreeListEntry* const m_pEntry;
+ sal_uInt16 const m_nColumn;
+ OUString const m_sOldText;
TabListBoxEventData( SvTreeListEntry* pEntry, sal_uInt16 nColumn, const OUString& rOldText ) :
m_pEntry( pEntry ), m_nColumn( nColumn ), m_sOldText( rOldText ) {}
diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx
index f66ad50c8dbc..75945673e8b4 100644
--- a/include/svtools/toolboxcontroller.hxx
+++ b/include/svtools/toolboxcontroller.hxx
@@ -127,7 +127,7 @@ class SVT_DLLPUBLIC ToolboxController :
Listener( const css::util::URL& rURL, const css::uno::Reference< css::frame::XDispatch >& rDispatch ) :
aURL( rURL ), xDispatch( rDispatch ) {}
- css::util::URL aURL;
+ css::util::URL const aURL;
css::uno::Reference< css::frame::XDispatch > xDispatch;
};
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index abaf5adb3e75..9f38a6ff76c0 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -770,7 +770,7 @@ public:
class SvInplaceEdit2
{
- Link<SvInplaceEdit2&,void> aCallBackHdl;
+ Link<SvInplaceEdit2&,void> const aCallBackHdl;
Accelerator aAccReturn;
Accelerator aAccEscape;
Idle aIdle;
diff --git a/include/svtools/unoevent.hxx b/include/svtools/unoevent.hxx
index bb2d438fe04f..8fd990e37c67 100644
--- a/include/svtools/unoevent.hxx
+++ b/include/svtools/unoevent.hxx
@@ -40,7 +40,7 @@ enum class SvMacroItemId : sal_uInt16;
*/
struct SvEventDescription
{
- SvMacroItemId mnEvent;
+ SvMacroItemId const mnEvent;
const sal_Char* mpEventName;
};
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 7bd827eca220..fef9fd2f4d71 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -430,7 +430,7 @@ private:
sal_uInt16 mnFirstLine;
sal_uInt16 mnSpacing;
DrawFrameStyle mnFrameStyle;
- Color maColor;
+ Color const maColor;
OUString maText;
WinBits mnStyle;
Link<SvtValueSet*,void> maDoubleClickHdl;