summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-27 13:51:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-27 15:57:17 +0200
commitdf905f41a33d0d7d2cde7fad80c5b3dc3c837c10 (patch)
tree374d73a95196ada089e34dafea9d69746a520a28 /include
parentad4c7b97752b4da73808402604d6f96b39d920f5 (diff)
loplugin:constmethod in sfx2
Change-Id: Ic129a8e136dc3f3b0a36fdb83e7aa71027ada59a Reviewed-on: https://gerrit.libreoffice.org/78190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/app.hxx2
-rw-r--r--include/sfx2/brokenpackageint.hxx2
-rw-r--r--include/sfx2/checkin.hxx4
-rw-r--r--include/sfx2/childwin.hxx6
-rw-r--r--include/sfx2/classificationhelper.hxx8
-rw-r--r--include/sfx2/dinfdlg.hxx4
-rw-r--r--include/sfx2/docfile.hxx10
-rw-r--r--include/sfx2/emojicontrol.hxx2
-rw-r--r--include/sfx2/ipclient.hxx2
-rw-r--r--include/sfx2/notebookbar/SfxNotebookBar.hxx2
-rw-r--r--include/sfx2/objsh.hxx18
-rw-r--r--include/sfx2/opengrf.hxx2
-rw-r--r--include/sfx2/sfxbasecontroller.hxx4
-rw-r--r--include/sfx2/sfxbasemodel.hxx2
-rw-r--r--include/sfx2/sidebar/SidebarController.hxx2
-rw-r--r--include/sfx2/sidebar/TitleBar.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx4
-rw-r--r--include/sfx2/templatedlg.hxx2
-rw-r--r--include/sfx2/viewsh.hxx6
19 files changed, 42 insertions, 42 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index e3517d3d64db..1dbd14eaac99 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -146,7 +146,7 @@ public:
// Basic/Scripting
static bool IsXScriptURL( const OUString& rScriptURL );
static OUString ChooseScript(weld::Window *pParent);
- static void MacroOrganizer(weld::Window* pParent, sal_Int16 nTabId);
+ static void MacroOrganizer(const weld::Window* pParent, sal_Int16 nTabId);
static ErrCode CallBasic( const OUString&, BasicManager*, SbxArray *pArgs, SbxValue *pRet );
static ErrCode CallAppBasic( const OUString& i_macroName )
{ return CallBasic( i_macroName, SfxApplication::GetBasicManager(), nullptr, nullptr ); }
diff --git a/include/sfx2/brokenpackageint.hxx b/include/sfx2/brokenpackageint.hxx
index 5d822cba0084..8f6b4a580340 100644
--- a/include/sfx2/brokenpackageint.hxx
+++ b/include/sfx2/brokenpackageint.hxx
@@ -37,7 +37,7 @@ public:
~RequestPackageReparation();
RequestPackageReparation( const RequestPackageReparation&) = delete;
RequestPackageReparation& operator=( const RequestPackageReparation&) = delete;
- bool isApproved();
+ bool isApproved() const;
css::uno::Reference < css::task::XInteractionRequest > GetRequest();
};
diff --git a/include/sfx2/checkin.hxx b/include/sfx2/checkin.hxx
index 054c82cd7a7d..15840ade2550 100644
--- a/include/sfx2/checkin.hxx
+++ b/include/sfx2/checkin.hxx
@@ -24,8 +24,8 @@ public:
SfxCheckinDialog(weld::Window* pParent);
virtual ~SfxCheckinDialog() override;
- OUString GetComment();
- bool IsMajor();
+ OUString GetComment() const;
+ bool IsMajor() const;
};
#endif
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 63abda89d932..60eb83261d49 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -171,8 +171,8 @@ public:
void SetAlignment(SfxChildAlignment eAlign);
virtual void Hide();
virtual void Show( ShowFlags nFlags );
- sal_uInt16 GetPosition();
- sal_uInt16 GetType()
+ sal_uInt16 GetPosition() const;
+ sal_uInt16 GetType() const
{ return nType; }
void CreateContext( sal_uInt16 nContextId, SfxBindings& );
@@ -197,7 +197,7 @@ public:
bool WantsFocus() const;
virtual bool QueryClose();
- const css::uno::Reference< css::frame::XFrame >& GetFrame();
+ const css::uno::Reference< css::frame::XFrame >& GetFrame() const;
void SetFrame( const css::uno::Reference< css::frame::XFrame > & );
SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&);
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx
index 3f8c2d0b997c..b372c8df20fd 100644
--- a/include/sfx2/classificationhelper.hxx
+++ b/include/sfx2/classificationhelper.hxx
@@ -56,7 +56,7 @@ public:
SfxClassificationHelper(const css::uno::Reference<css::document::XDocumentProperties>& xDocumentProperties, bool bUseLocalizedPolicy = true);
~SfxClassificationHelper();
/// Get the currently selected category for eType.
- const OUString& GetBACName(SfxClassificationPolicyType eType);
+ const OUString& GetBACName(SfxClassificationPolicyType eType) const;
/// Return all possible valid category names, based on the policy.
std::vector<OUString> GetBACNames();
/// Return all possible valid category identifiers, based on the policy.
@@ -85,9 +85,9 @@ public:
bool HasDocumentFooter();
void UpdateInfobar(SfxViewFrame& rViewFrame);
- std::vector<OUString> const & GetMarkings();
- std::vector<OUString> const & GetIntellectualPropertyParts();
- std::vector<OUString> const & GetIntellectualPropertyPartNumbers();
+ std::vector<OUString> const & GetMarkings() const;
+ std::vector<OUString> const & GetIntellectualPropertyParts() const;
+ std::vector<OUString> const & GetIntellectualPropertyPartNumbers() const;
/// Does a best-effort conversion of rType to SfxClassificationPolicyType.
static SfxClassificationPolicyType stringToPolicyType(const OUString& rType);
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 8d51697334e8..87f83f339416 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -340,7 +340,7 @@ struct CustomPropertyLine
DECL_LINK(EditLoseFocusHdl, weld::Widget&, void);
DECL_LINK(BoxLoseFocusHdl, weld::Widget&, void);
- void DoTypeHdl(weld::ComboBox& rBox);
+ void DoTypeHdl(const weld::ComboBox& rBox);
void Clear();
void Hide();
@@ -401,7 +401,7 @@ public:
void BoxLoseFocus(CustomPropertyLine* pLine);
void EditLoseFocus(CustomPropertyLine* pLine);
- void Remove(CustomPropertyLine* pLine);
+ void Remove(const CustomPropertyLine* pLine);
};
// class CustomPropertiesControl -----------------------------------------
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index c5fc22c511bb..cc984157e5c1 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -142,7 +142,7 @@ public:
ErrCode GetErrorCode() const;
ErrCode GetError() const
{ return GetErrorCode().IgnoreWarning(); }
- ErrCode const & GetLastStorageCreationState();
+ ErrCode const & GetLastStorageCreationState() const;
void SetError(ErrCode nError);
@@ -203,8 +203,8 @@ public:
OUString GetBaseURL( bool bForSaving=false );
void SetInCheckIn( bool bInCheckIn );
- bool IsInCheckIn( );
- bool IsSkipImages( );
+ bool IsInCheckIn( ) const;
+ bool IsSkipImages( ) const;
SAL_DLLPRIVATE bool HasStorage_Impl() const;
@@ -238,7 +238,7 @@ public:
SAL_DLLPRIVATE void SetLongName(const OUString &rName);
SAL_DLLPRIVATE const OUString & GetLongName() const;
- SAL_DLLPRIVATE bool IsPreview_Impl();
+ SAL_DLLPRIVATE bool IsPreview_Impl() const;
SAL_DLLPRIVATE void ClearBackup_Impl();
SAL_DLLPRIVATE void SetPhysicalName_Impl(const OUString& rName);
SAL_DLLPRIVATE void CanDisposeStorage_Impl( bool bDisposeStorage );
@@ -279,7 +279,7 @@ public:
// the following two methods must be used and make sense only during saving currently
// TODO/LATER: in future the signature state should be controlled by the medium not by the document
// in this case the methods will be used generally, and might need to be renamed
- SAL_DLLPRIVATE SignatureState GetCachedSignatureState_Impl();
+ SAL_DLLPRIVATE SignatureState GetCachedSignatureState_Impl() const;
SAL_DLLPRIVATE void SetCachedSignatureState_Impl( SignatureState nState );
void SetHasEmbeddedObjects(bool bHasEmbeddedObjects);
diff --git a/include/sfx2/emojicontrol.hxx b/include/sfx2/emojicontrol.hxx
index 132fe247b774..1b5c956735d9 100644
--- a/include/sfx2/emojicontrol.hxx
+++ b/include/sfx2/emojicontrol.hxx
@@ -37,7 +37,7 @@ private:
void ConvertLabelToUnicode(sal_uInt16 nPageId);
/// Return filter according to the currently selected tab page.
- FILTER_CATEGORY getCurrentFilter();
+ FILTER_CATEGORY getCurrentFilter() const;
DECL_LINK(ActivatePageHdl, TabControl*, void);
DECL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, void);
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index eb4c2c825651..62c421c3c783 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -84,7 +84,7 @@ public:
ErrCode DoVerb( long nVerb );
void VisAreaChanged();
void ResetObject();
- bool IsUIActive();
+ bool IsUIActive() const;
virtual void FormatChanged(); // object format was changed (used for StarMath formulas aligning)
};
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index 2a30a126beaf..1a3babd53d9e 100644
--- a/include/sfx2/notebookbar/SfxNotebookBar.hxx
+++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx
@@ -54,7 +54,7 @@ public:
/** Show menu bar only in current frame */
static void ShowMenubar(SfxViewFrame const * pViewFrame, bool bShow);
static void ToggleMenubar();
- static void ReloadNotebookBar(OUString& sUIPath);
+ static void ReloadNotebookBar(const OUString& sUIPath);
private:
static bool m_bLock;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 3cdf402cc188..a25d60aa2db1 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -248,7 +248,7 @@ public:
virtual SfxObjectFactory& GetFactory() const=0;
SfxMedium * GetMedium() const { return pMedium; }
css::uno::Reference< css::document::XDocumentProperties >
- getDocProperties();
+ getDocProperties() const;
void UpdateDocInfoForSave( );
void FlushDocInfo();
bool HasName() const { return bHasName; }
@@ -338,7 +338,7 @@ public:
bool CheckIsReadonly(bool bSignScriptingContent);
void RecheckSignature(bool bAlsoRecheckScriptingSignature);
void AfterSigning(bool bSignSuccess, bool bSignScriptingContent);
- bool HasValidSignatures();
+ bool HasValidSignatures() const;
SignatureState GetDocumentSignatureState();
void SignDocumentContent(weld::Window* pDialogParent);
css::uno::Sequence<css::security::DocumentSignatureInformation> GetDocumentSignatureInformation(
@@ -427,7 +427,7 @@ public:
bool IsSecurityOptOpenReadOnly() const;
void SetSecurityOptOpenReadOnly( bool bOpenReadOnly );
- Size GetFirstPageSize();
+ Size GetFirstPageSize() const;
bool DoClose();
std::shared_ptr<GDIMetaFile> GetPreviewMetaFile( bool bFullContent = false ) const;
virtual void CancelTransfers();
@@ -538,7 +538,7 @@ public:
// Determine the position of the "Automatic" filter in the stylist
void SetAutoStyleFilterIndex(sal_uInt16 nSet);
- sal_uInt16 GetAutoStyleFilterIndex();
+ sal_uInt16 GetAutoStyleFilterIndex() const;
bool HasBasic() const;
BasicManager* GetBasicManager() const;
css::uno::Reference< css::script::XLibraryContainer >
@@ -569,8 +569,8 @@ public:
CreateAndLoadComponent( const SfxItemSet& rSet );
static SfxObjectShell* GetShellFromComponent( const css::uno::Reference< css::lang::XComponent >& xComp );
static OUString GetServiceNameFromFactory( const OUString& rFact );
- bool IsInPlaceActive();
- bool IsUIActive();
+ bool IsInPlaceActive() const;
+ bool IsUIActive() const;
static bool CopyStoragesOfUnknownMediaType(
const css::uno::Reference< css::embed::XStorage >& xSource,
@@ -581,7 +581,7 @@ public:
void EnableSetModified( bool bEnable = true );
bool IsEnableSetModified() const;
virtual void SetModified( bool bModified = true );
- bool IsModified();
+ bool IsModified() const;
/**
* @param bChart true if the file is a chart doc and FillClass should not be called
@@ -676,7 +676,7 @@ public:
const css::uno::Sequence< css::security::DocumentSignatureInformation >& aInfos );
SAL_DLLPRIVATE void CheckEncryption_Impl( const css::uno::Reference< css::task::XInteractionHandler >& xHandler );
SAL_DLLPRIVATE void SetModifyPasswordEntered( bool bEntered = true );
- SAL_DLLPRIVATE bool IsModifyPasswordEntered();
+ SAL_DLLPRIVATE bool IsModifyPasswordEntered() const;
SAL_DLLPRIVATE void InitBasicManager_Impl();
SAL_DLLPRIVATE SfxObjectShell_Impl* Get_Impl() { return pImpl.get(); }
@@ -741,7 +741,7 @@ public:
SAL_DLLPRIVATE void CheckOut( );
SAL_DLLPRIVATE void CancelCheckOut( );
SAL_DLLPRIVATE void CheckIn( );
- SAL_DLLPRIVATE css::uno::Sequence< css::document::CmisVersion > GetCmisVersions();
+ SAL_DLLPRIVATE css::uno::Sequence< css::document::CmisVersion > GetCmisVersions() const;
/** override this if you have a XmlIdRegistry. */
virtual const sfx2::IXmlIdRegistry* GetXmlIdRegistry() const { return nullptr; }
diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx
index ca70b955a017..d28f88c4f5a3 100644
--- a/include/sfx2/opengrf.hxx
+++ b/include/sfx2/opengrf.hxx
@@ -58,7 +58,7 @@ public:
OUString const & GetDetectedFilter() const;
void SetDetectedFilter(const OUString&);
- css::uno::Reference<css::ui::dialogs::XFilePickerControlAccess> const & GetFilePickerControlAccess();
+ css::uno::Reference<css::ui::dialogs::XFilePickerControlAccess> const & GetFilePickerControlAccess() const;
private:
SvxOpenGraphicDialog (const SvxOpenGraphicDialog&) = delete;
diff --git a/include/sfx2/sfxbasecontroller.hxx b/include/sfx2/sfxbasecontroller.hxx
index e15d53e4ab53..4b7237fd4386 100644
--- a/include/sfx2/sfxbasecontroller.hxx
+++ b/include/sfx2/sfxbasecontroller.hxx
@@ -179,8 +179,8 @@ public:
// either the _Impl name should vanish or there should be an "official" API
SfxViewShell* GetViewShell_Impl() const;
SAL_DLLPRIVATE bool HandleEvent_Impl( NotifyEvent const & rEvent );
- SAL_DLLPRIVATE bool HasKeyListeners_Impl();
- SAL_DLLPRIVATE bool HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE bool HasKeyListeners_Impl() const;
+ SAL_DLLPRIVATE bool HasMouseClickListeners_Impl() const;
SAL_DLLPRIVATE void SetCreationArguments_Impl( const css::uno::Sequence< css::beans::PropertyValue >& i_rCreationArgs );
SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
private:
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 92c69b5c3bc9..d625f7871029 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -715,7 +715,7 @@ private:
css::uno::Reference< css::ui::XUIConfigurationManager2 > getUIConfigurationManager2();
void impl_getPrintHelper();
SAL_DLLPRIVATE void ListenForStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage );
- SAL_DLLPRIVATE OUString GetMediumFilterName_Impl();
+ SAL_DLLPRIVATE OUString GetMediumFilterName_Impl() const;
SAL_DLLPRIVATE void postEvent_Impl( const OUString& aName, const css::uno::Reference< css::frame::XController2 >& xController = css::uno::Reference< css::frame::XController2 >() );
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index 286036b6f141..fa051bf549be 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -164,7 +164,7 @@ public:
css::uno::Reference<css::frame::XFrame> const & getXFrame() const {return mxFrame;}
- sal_Int32 getMaximumWidth() { return mnMaximumSidebarWidth; }
+ sal_Int32 getMaximumWidth() const { return mnMaximumSidebarWidth; }
void setMaximumWidth(sal_Int32 nMaximumWidth) { mnMaximumSidebarWidth = nMaximumWidth; }
private:
diff --git a/include/sfx2/sidebar/TitleBar.hxx b/include/sfx2/sidebar/TitleBar.hxx
index 2d83637888ae..f69a7ef4e047 100644
--- a/include/sfx2/sidebar/TitleBar.hxx
+++ b/include/sfx2/sidebar/TitleBar.hxx
@@ -35,7 +35,7 @@ public:
virtual void dispose() override;
void SetTitle (const OUString& rsTitle);
- const OUString& GetTitle() {return msTitle; }
+ const OUString& GetTitle() const {return msTitle; }
void SetIcon (const Image& rIcon);
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index d98af8b09090..791887059189 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -212,7 +212,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet );
void SetUserData(const OUString& rString)
{ aUserString = rString; }
- const OUString& GetUserData() { return aUserString; }
+ const OUString& GetUserData() const { return aUserString; }
virtual void FillUserData();
virtual bool IsReadOnly() const;
virtual void PageCreated (const SfxAllItemSet& aSet);
@@ -224,7 +224,7 @@ public:
}
void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
- css::uno::Reference< css::frame::XFrame > GetFrame();
+ css::uno::Reference< css::frame::XFrame > GetFrame() const;
const SfxItemSet* GetDialogExampleSet() const;
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index dd821bdf3d05..0e0e78f12dd3 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -113,7 +113,7 @@ protected:
void localSearchMoveTo (sal_uInt16 nMenuId);
/// Return filter according to the currently selected application filter.
- FILTER_APPLICATION getCurrentApplicationFilter();
+ FILTER_APPLICATION getCurrentApplicationFilter() const;
protected:
std::set<const ThumbnailViewItem*,selection_cmp_fn> maSelTemplates;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index cc76aefd6a5c..9d3312b2fa60 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -285,7 +285,7 @@ public:
const std::shared_ptr< vcl::PrinterController >& GetPrinterController() const;
void AddRemoveClipboardListener( const css::uno::Reference < css::datatransfer::clipboard::XClipboardListener>&, bool );
- css::uno::Reference< css::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier();
+ css::uno::Reference< css::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier() const;
SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const;
SAL_DLLPRIVATE void AddContextMenuInterceptor_Impl( const css::uno::Reference < css::ui::XContextMenuInterceptor >& xInterceptor );
@@ -299,8 +299,8 @@ public:
SAL_DLLPRIVATE void SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
SAL_DLLPRIVATE bool HandleNotifyEvent_Impl( NotifyEvent const & rEvent );
- SAL_DLLPRIVATE bool HasKeyListeners_Impl();
- SAL_DLLPRIVATE bool HasMouseClickListeners_Impl();
+ SAL_DLLPRIVATE bool HasKeyListeners_Impl() const;
+ SAL_DLLPRIVATE bool HasMouseClickListeners_Impl() const;
SAL_DLLPRIVATE SfxBaseController* GetBaseController_Impl() const;