diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-01 14:30:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-03 08:26:03 +0200 |
commit | 07c4aa4298f062cee1894b80ef82e76d5ffcf4c7 (patch) | |
tree | 23752b23ce6d21c209c9d178420dee86c48938de /svtools | |
parent | 48bf5a74186140760a734091a85e85d198e6fdfa (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 'svtools')
29 files changed, 82 insertions, 82 deletions
diff --git a/svtools/inc/FltCallDialogParameter.hxx b/svtools/inc/FltCallDialogParameter.hxx index d3310a078cbb..29e3fabf5fce 100644 --- a/svtools/inc/FltCallDialogParameter.hxx +++ b/svtools/inc/FltCallDialogParameter.hxx @@ -36,7 +36,7 @@ class Window; struct FltCallDialogParameter { VclPtr<vcl::Window> pWindow; - FieldUnit eFieldUnit; + FieldUnit const eFieldUnit; OUString aFilterExt; // In and Out PropertySequence for all filter dialogs diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx index ce066b6d525c..201f0035642a 100644 --- a/svtools/inc/table/tablecontrolinterface.hxx +++ b/svtools/inc/table/tablecontrolinterface.hxx @@ -91,8 +91,8 @@ namespace svt { namespace table struct TableCell { - ColPos nColumn; - RowPos nRow; + ColPos const nColumn; + RowPos const nRow; TableCellArea eArea; TableCell( ColPos const i_column, RowPos const i_row ) diff --git a/svtools/inc/uitest/uiobject.hxx b/svtools/inc/uitest/uiobject.hxx index d8a525c206ee..ff169749bf1a 100644 --- a/svtools/inc/uitest/uiobject.hxx +++ b/svtools/inc/uitest/uiobject.hxx @@ -60,7 +60,7 @@ private: VclPtr<SvTreeListBox> mxTreeList; - SvTreeListEntry* mpEntry; + SvTreeListEntry* const mpEntry; }; class SimpleTableUIObject : public TreeListUIObject diff --git a/svtools/inc/vclxaccessibleheaderbaritem.hxx b/svtools/inc/vclxaccessibleheaderbaritem.hxx index 3e6ef4823dab..e4b09ef3a655 100644 --- a/svtools/inc/vclxaccessibleheaderbaritem.hxx +++ b/svtools/inc/vclxaccessibleheaderbaritem.hxx @@ -52,7 +52,7 @@ class VCLXAccessibleHeaderBarItem final : public comphelper::OAccessibleExtended { private: VclPtr<HeaderBar> m_pHeadBar; - sal_Int32 m_nIndexInParent; + sal_Int32 const m_nIndexInParent; void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index ab8ba930d193..5c30c0955e18 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -34,10 +34,10 @@ class ButtonFrame { - tools::Rectangle aRect; - tools::Rectangle aInnerRect; - OUString aText; - bool m_bDrawDisabled; + tools::Rectangle const aRect; + tools::Rectangle const aInnerRect; + OUString const aText; + bool const m_bDrawDisabled; public: ButtonFrame( const Point& rPt, const Size& rSz, @@ -57,7 +57,7 @@ public: class BrowserColumn final { - sal_uInt16 _nId; + sal_uInt16 const _nId; sal_uLong _nOriginalWidth; sal_uLong _nWidth; OUString _aTitle; diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 378f046a3714..79c2161ab14d 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -108,8 +108,8 @@ uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme) OUString* pNames = aNames.getArray(); struct ColorConfigEntryData_Impl { - OUStringLiteral cName; - bool bCanBeVisible; + OUStringLiteral const cName; + bool const bCanBeVisible; }; static const ColorConfigEntryData_Impl cNames[] = { diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 188605a84b0d..518775457a99 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -122,7 +122,7 @@ namespace class CallbackTimer : public ::salhelper::Timer { protected: - SvtFileView_Impl* m_pTimeoutHandler; + SvtFileView_Impl* const m_pTimeoutHandler; public: explicit CallbackTimer( SvtFileView_Impl* _pHandler ) : m_pTimeoutHandler( _pHandler ) { } @@ -171,14 +171,14 @@ private: SvtFileView_Impl* mpParent; Timer maResetQuickSearch; OUString maQuickSearchText; - OUString msAccessibleDescText; - OUString msFolder; - OUString msFile; + OUString const msAccessibleDescText; + OUString const msFolder; + OUString const msFile; sal_uInt32 mnSearchIndex; bool mbResizeDisabled : 1; bool mbAutoResize : 1; bool mbEnableDelete : 1; - bool mbShowHeader; + bool const mbShowHeader; void DeleteEntries(); void DoQuickSearch( sal_Unicode rChar ); @@ -218,7 +218,7 @@ class NameTranslationList protected: INetURLObject maTransFile; // URL of file with translation entries /// for future purposes when dealing with a set of cached NameTranslationLists - OUString m_HashedURL; + OUString const m_HashedURL; private: std::unordered_map<OUString, OUString> m_Translation; const OUString maTransFileName; @@ -332,16 +332,16 @@ public: std::unique_ptr<NameTranslator_Impl> mpNameTrans; sal_uInt16 mnSortColumn; bool mbAscending : 1; - bool mbOnlyFolder : 1; + bool const mbOnlyFolder : 1; bool mbReplaceNames : 1; // translate folder names or display doc-title instead of file name sal_Int16 mnSuspendSelectCallback : 1; bool mbIsFirstResort : 1; - IntlWrapper aIntlWrapper; + IntlWrapper const aIntlWrapper; OUString maViewURL; OUString maCurrentFilter; - Image maFolderImage; + Image const maFolderImage; Link<SvtFileView*,void> maOpenDoneLink; Reference< XCommandEnvironment > mxCmdEnv; diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 117ed30b255f..07042df01dcd 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -162,7 +162,7 @@ class SvxIconChoiceCtrl_Impl Idle aVisRectChangedIdle; Idle aCallSelectHdlIdle; Size aVirtOutputSize; - Size aImageSize; + Size const aImageSize; Size aDefaultTextSize; Size aOutputSize; // Pixel VclPtr<SvtIconChoiceCtrl> pView; diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 34626f06494f..1344581737db 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -55,7 +55,7 @@ static bool bEndScrollInvalidate = true; class IcnViewEdit_Impl : public MultiLineEdit { - Link<LinkParamNone*,void> aCallBackHdl; + Link<LinkParamNone*,void> const aCallBackHdl; Accelerator aAccReturn; Accelerator aAccEscape; Idle maLoseFocusIdle; diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx index 708aaae1d116..35c342f4a80f 100644 --- a/svtools/source/contnr/treelistentry.cxx +++ b/svtools/source/contnr/treelistentry.cxx @@ -151,7 +151,7 @@ namespace { class FindByType { - SvLBoxItemType meType; + SvLBoxItemType const meType; public: explicit FindByType(SvLBoxItemType eType) : meType(eType) {} bool operator() (const std::unique_ptr<SvLBoxItem>& rpItem) const diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index a6dfa356f150..38a42a46567d 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -198,14 +198,14 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, long nGap ) class ImpLineListData { private: - BorderWidthImpl m_aWidthImpl; + BorderWidthImpl const m_aWidthImpl; - Color ( *m_pColor1Fn )( Color ); - Color ( *m_pColor2Fn )( Color ); - Color ( *m_pColorDistFn )( Color, Color ); + Color ( * const m_pColor1Fn )( Color ); + Color ( * const m_pColor2Fn )( Color ); + Color ( * const m_pColorDistFn )( Color, Color ); - long m_nMinWidth; - SvxBorderLineStyle m_nStyle; + long const m_nMinWidth; + SvxBorderLineStyle const m_nStyle; public: ImpLineListData( BorderWidthImpl aWidthImpl, SvxBorderLineStyle nStyle, @@ -358,7 +358,7 @@ namespace { class ApplyScale { - double mfScale; + double const mfScale; public: explicit ApplyScale( double fScale ) : mfScale(fScale) {} void operator() ( double& rVal ) diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 708f4ef8aa14..70a6ade68c71 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -105,7 +105,7 @@ class ImplFontListNameInfo friend class FontList; private: - OUString maSearchName; + OUString const maSearchName; ImplFontListFontMetric* mpFirst; FontListFontNameType mnType; diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 5c1f32d1cd95..352e79e13e87 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -35,8 +35,8 @@ public: sal_uInt16 mnId; HeaderBarItemBits mnBits; long mnSize; - OString maHelpId; - Image maImage; + OString const maHelpId; + Image const maImage; OUString maOutText; OUString maText; OUString maHelpText; diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index cb6586600939..5ac408552ba6 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -96,11 +96,11 @@ class SvtMatchContext_Impl: public salhelper::Thread std::vector<OUString> aCompletions; std::vector<OUString> aURLs; svtools::AsynchronLink aLink; - OUString aBaseURL; - OUString aText; + OUString const aBaseURL; + OUString const aText; VclPtr<SvtURLBox> pBox; - bool bOnlyDirectories; - bool bNoSelection; + bool const bOnlyDirectories; + bool const bNoSelection; osl::Mutex mutex_; bool stopped_; @@ -129,7 +129,7 @@ class MatchContext_Impl: public salhelper::Thread std::vector<OUString> aCompletions; std::vector<OUString> aURLs; svtools::AsynchronLink aLink; - OUString aText; + OUString const aText; URLBox* pBox; osl::Mutex mutex_; diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 16b90aedd764..400e10b10f9d 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -38,7 +38,7 @@ private: vcl::Font maLatinFont; /// The font for latin text portions. vcl::Font maAsianFont; /// The font for asian text portions. vcl::Font maCmplxFont; /// The font for complex text portions. - vcl::Font maDefltFont; /// The default font of the output device. + vcl::Font const maDefltFont; /// The default font of the output device. OUString maText; /// The text. vector< sal_Int32 > maPosVec; /// The start position of each text portion. diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 0d617312658d..cebb1172587a 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -198,14 +198,14 @@ public: struct ImplTabBarItem { - sal_uInt16 mnId; + sal_uInt16 const mnId; TabBarPageBits mnBits; OUString maText; OUString maHelpText; OUString maAuxiliaryText; // used in LayerTabBar for real layer name tools::Rectangle maRect; long mnWidth; - OString maHelpId; + OString const maHelpId; bool mbShort : 1; bool mbSelect : 1; bool mbProtect : 1; diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index ee685d283afd..2fdd85590623 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -337,7 +337,7 @@ private: css::accessibility::XAccessibleEventListener > > mxEventListeners; ::osl::Mutex maMutex; ValueSetItem* mpParent; - bool mbIsTransientChildrenDisabled; + bool const mbIsTransientChildrenDisabled; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); @@ -400,7 +400,7 @@ private: css::accessibility::XAccessibleEventListener > > mxEventListeners; ::osl::Mutex maMutex; SvtValueSetItem* mpParent; - bool mbIsTransientChildrenDisabled; + bool const mbIsTransientChildrenDisabled; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 23479c9f9eb5..292b7b3a23fa 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -122,8 +122,8 @@ namespace svt class AssigmentTransientData : public IAssigmentData { protected: - OUString m_sDSName; - OUString m_sTableName; + OUString const m_sDSName; + OUString const m_sTableName; MapString2String m_aAliases; public: @@ -431,7 +431,7 @@ void AssignmentPersistentData::ImplCommit() /// indicates that we've an odd field number. This member is for efficiency only, it's redundant. bool bOddFieldNumber : 1; /// indicates that we're working with the real persistent configuration - bool bWorkingPersistent : 1; + bool const bWorkingPersistent : 1; /// the strings to use as labels for the field selection listboxes std::vector<OUString> aFieldLabels; diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 1ccd6114c416..bb0ea1f07393 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -43,12 +43,12 @@ using namespace ::com::sun::star; struct OleObjectDescriptor { - sal_uInt32 cbSize; - ClsId clsid; - sal_uInt32 dwDrawAspect; - Size sizel; - Point pointl; - sal_uInt32 dwStatus; + sal_uInt32 const cbSize; + ClsId const clsid; + sal_uInt32 const dwDrawAspect; + Size const sizel; + Point const pointl; + sal_uInt32 const dwStatus; sal_uInt32 dwFullUserTypeName; sal_uInt32 dwSrcOfCopy; }; @@ -190,7 +190,7 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId ) { struct SotResourcePair { - SotClipboardFormatId mnSotId; + SotClipboardFormatId const mnSotId; const char* mpResId; }; diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index 99c1fde4c4ea..22b64c740772 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -26,7 +26,7 @@ MultiLineEditSyntaxHighlight::MultiLineEditSyntaxHighlight( vcl::Window* pParent, WinBits nWinStyle, - HighlighterLanguage aLanguage): MultiLineEdit(pParent,nWinStyle), mbDoBracketHilight(true), aHighlighter(aLanguage) + HighlighterLanguage aLanguage): MultiLineEdit(pParent,nWinStyle), aHighlighter(aLanguage) { EnableUpdateData(300); } @@ -109,7 +109,7 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) bool MultiLineEditSyntaxHighlight::PreNotify( NotifyEvent& rNEvt ) { - if ( mbDoBracketHilight && (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) ) + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) DoBracketHilight(rNEvt.GetKeyEvent()->GetCharCode()); return MultiLineEdit::PreNotify(rNEvt); diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx index 7d66df5a2c29..99a07021355e 100644 --- a/svtools/source/filter/exportdialog.hxx +++ b/svtools/source/filter/exportdialog.hxx @@ -99,17 +99,17 @@ private: VclPtr<OKButton> mpBtnOK; - OUString msEstimatedSizePix1; - OUString msEstimatedSizePix2; - OUString msEstimatedSizeVec; - - OUString ms1BitTreshold; - OUString ms1BitDithered; - OUString ms4BitGrayscale; - OUString ms4BitColorPalette; - OUString ms8BitGrayscale; - OUString ms8BitColorPalette; - OUString ms24BitColor; + OUString const msEstimatedSizePix1; + OUString const msEstimatedSizePix2; + OUString const msEstimatedSizeVec; + + OUString const ms1BitTreshold; + OUString const ms1BitDithered; + OUString const ms4BitGrayscale; + OUString const ms4BitColorPalette; + OUString const ms8BitGrayscale; + OUString const ms8BitColorPalette; + OUString const ms24BitColor; std::unique_ptr<FilterConfigItem> mpOptionsItem; std::unique_ptr<FilterConfigItem> mpFilterOptionsItem; @@ -124,8 +124,8 @@ private: css::awt::Size maOriginalSize; // the original graphic size in 1/100mm css::awt::Size maSize; // for vector graphics it always contains the logical size in 1/100mm - bool mbIsPixelFormat; - bool mbExportSelection; + bool const mbIsPixelFormat; + bool const mbExportSelection; bool mbGraphicsSource; // whether source document is graphics (Draw, Impress) or not (Calc, Writer) sal_Int32 mnInitialResolutionUnit; diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 6d4737334dce..60e831a5b2cb 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -46,7 +46,7 @@ class AsyncAccelExec : public cppu::WeakImplHelper<css::lang::XEventListener> private: css::uno::Reference<css::lang::XComponent> m_xFrame; css::uno::Reference< css::frame::XDispatch > m_xDispatch; - css::util::URL m_aURL; + css::util::URL const m_aURL; vcl::EventPoster m_aAsyncCallback; public: diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index f7a9a9e8a703..9456af23c7b4 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -51,9 +51,9 @@ struct SvtExtensionResIdMapping_Impl { const char* _pExt; - bool _bExt; + bool const _bExt; const char* pStrId; - SvImageId _nImgId; + SvImageId const _nImgId; }; static SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] = diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx index c51e9e7f9e4f..51d8926915fa 100644 --- a/svtools/source/misc/langhelp.cxx +++ b/svtools/source/misc/langhelp.cxx @@ -68,7 +68,7 @@ static std::unique_ptr<Idle> xLangpackInstaller; class InstallLangpack : public Idle { - std::vector<OUString> m_aPackages; + std::vector<OUString> const m_aPackages; public: explicit InstallLangpack(const std::vector<OUString>& rPackages) : Idle("install langpack") diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 28b547b329c2..355fbd4695c3 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -106,7 +106,7 @@ namespace svt public: private: - INetURLObject m_aURL; + INetURLObject const m_aURL; util::DateTime m_aLastModified; // date of last modification as reported by UCP TemplateFolderContent m_aSubContents; // sorted (by name) list of the children @@ -383,7 +383,7 @@ namespace svt bool m_bNeedsUpdate : 1; bool m_bKnowState : 1; bool m_bValidCurrentState : 1; - bool m_bAutoStoreState : 1; + bool const m_bAutoStoreState : 1; public: explicit TemplateFolderCacheImpl( bool _bAutoStoreState ); diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 8a633c49404c..ae592f241380 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -560,7 +560,7 @@ struct HTML_OptionEntry const sal_Char *sToken; const OUString *pUToken; }; - HtmlOptionId nToken; + HtmlOptionId const nToken; }; static HTML_OptionEntry aHTMLOptionTab[] = { diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index 7f01f84f3bd6..44109cb93ec8 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -142,9 +142,9 @@ namespace svt { namespace table struct ActionMapEntry { - sal_uInt16 nKeyCode; - sal_uInt16 nKeyModifier; - TableControlAction eAction; + sal_uInt16 const nKeyCode; + sal_uInt16 const nKeyModifier; + TableControlAction const eAction; } static const aKnownActions[] = { { KEY_DOWN, 0, cursorDown }, diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx index 8ba81c03d644..19939fe67c6a 100644 --- a/svtools/source/table/tablegeometry.hxx +++ b/svtools/source/table/tablegeometry.hxx @@ -85,7 +85,7 @@ namespace svt { namespace table bool impl_isValidRow( RowPos const i_row ) const; RowPos m_nRowPos; - bool m_bAllowVirtualRows; + bool const m_bAllowVirtualRows; }; @@ -120,7 +120,7 @@ namespace svt { namespace table class TableCellGeometry { private: - TableRowGeometry m_aRow; + TableRowGeometry const m_aRow; TableColumnGeometry m_aCol; public: diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 2999b5aff1a3..e863a2ed5389 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -108,7 +108,7 @@ private: static rtl::Reference<PropertySetInfo> createPropertySetInfo( sal_uInt16 nType ); - sal_uInt16 mnType; + sal_uInt16 const mnType; OUString maURL; OUString maAltText; |