summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 11:29:05 +0200
committerNoel Grandin <noel@peralex.com>2016-04-13 13:27:52 +0200
commit523036daaddf466eee46183bbec9a71d45c48a41 (patch)
tree21582b9f2ac1b8714233d7cb4d4c1aba17a15c3e /include
parent746289bf97ee6eeaf8a1df6b040dd9ae29bab0ce (diff)
loplugin:passstuffbyref in sfx2
Change-Id: I8c9d6e972f74ee04c8befda3b4cabb6e9b6b2054
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/bindings.hxx2
-rw-r--r--include/sfx2/childwin.hxx2
-rw-r--r--include/sfx2/dinfdlg.hxx28
-rw-r--r--include/sfx2/docfile.hxx2
-rw-r--r--include/sfx2/dockwin.hxx4
-rw-r--r--include/sfx2/event.hxx4
-rw-r--r--include/sfx2/filedlghelper.hxx2
-rw-r--r--include/sfx2/frame.hxx4
-rw-r--r--include/sfx2/ipclient.hxx4
-rw-r--r--include/sfx2/lnkbase.hxx2
-rw-r--r--include/sfx2/minfitem.hxx6
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/sidebar/Panel.hxx2
-rw-r--r--include/sfx2/sidebar/SidebarController.hxx2
-rw-r--r--include/sfx2/sidebar/TitleBar.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx2
-rw-r--r--include/sfx2/titledockwin.hxx2
-rw-r--r--include/sfx2/viewsh.hxx2
18 files changed, 37 insertions, 37 deletions
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 256b2100fb42..b31d4e553165 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -186,7 +186,7 @@ public:
void Release( SfxControllerItem& rBinding );
SfxDispatcher* GetDispatcher() const
{ return pDispatcher; }
- css::uno::Reference< css::frame::XDispatchRecorder > GetRecorder() const;
+ const css::uno::Reference< css::frame::XDispatchRecorder >& GetRecorder() const;
css::uno::Reference < css::frame::XDispatch >
GetDispatch( const SfxSlot*, const css::util::URL& aURL, bool bMasterCommand );
SAL_DLLPRIVATE void ContextChanged_Impl();
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 8469fbc1974d..140bd0d69c5b 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -199,7 +199,7 @@ public:
bool WantsFocus() const;
virtual bool QueryClose();
- css::uno::Reference< css::frame::XFrame > GetFrame();
+ const css::uno::Reference< css::frame::XFrame >& GetFrame();
void SetFrame( const css::uno::Reference< css::frame::XFrame > & );
SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&);
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 5cd2c50b11db..f7a202eb837d 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -106,30 +106,30 @@ public:
void setAutoloadEnabled(bool i_val) { m_isAutoloadEnabled = i_val; }
sal_Int32 getAutoloadDelay() const { return m_AutoloadDelay; }
void setAutoloadDelay(sal_Int32 i_val) { m_AutoloadDelay = i_val; }
- OUString getAutoloadURL() const { return m_AutoloadURL; }
+ const OUString& getAutoloadURL() const { return m_AutoloadURL; }
void setAutoloadURL(const OUString& i_val) { m_AutoloadURL = i_val; }
- OUString getDefaultTarget() const { return m_DefaultTarget; }
+ const OUString& getDefaultTarget() const { return m_DefaultTarget; }
void setDefaultTarget(const OUString& i_val) { m_DefaultTarget = i_val; }
- OUString getTemplateName() const { return m_TemplateName; }
- OUString getAuthor() const { return m_Author; }
+ const OUString& getTemplateName() const { return m_TemplateName; }
+ const OUString& getAuthor() const { return m_Author; }
void setAuthor(const OUString& i_val) { m_Author = i_val; }
- css::util::DateTime
+ const css::util::DateTime&
getCreationDate() const { return m_CreationDate; }
void setCreationDate(const css::util::DateTime& i_val) {
m_CreationDate = i_val;
}
- OUString getModifiedBy() const { return m_ModifiedBy; }
+ const OUString& getModifiedBy() const { return m_ModifiedBy; }
void setModifiedBy(const OUString& i_val) { m_ModifiedBy = i_val; }
- css::util::DateTime
+ const css::util::DateTime&
getModificationDate() const { return m_ModificationDate; }
void setModificationDate(const css::util::DateTime& i_val) {
m_ModificationDate = i_val;
}
- OUString getPrintedBy() const { return m_PrintedBy; }
+ const OUString& getPrintedBy() const { return m_PrintedBy; }
void setPrintedBy(const OUString& i_val) { m_PrintedBy = i_val; }
- css::util::DateTime
+ const css::util::DateTime&
getPrintDate() const { return m_PrintDate; }
void setPrintDate(const css::util::DateTime& i_val) {
m_PrintDate = i_val;
@@ -138,13 +138,13 @@ public:
void setEditingCycles(sal_Int16 i_val) { m_EditingCycles = i_val; }
sal_Int32 getEditingDuration() const { return m_EditingDuration; }
void setEditingDuration(sal_Int32 i_val) { m_EditingDuration = i_val; }
- OUString getDescription() const { return m_Description; }
+ const OUString& getDescription() const { return m_Description; }
void setDescription(const OUString& i_val) { m_Description = i_val; }
- OUString getKeywords() const { return m_Keywords; }
+ const OUString& getKeywords() const { return m_Keywords; }
void setKeywords(const OUString& i_val) { m_Keywords = i_val; }
- OUString getSubject() const { return m_Subject; }
+ const OUString& getSubject() const { return m_Subject; }
void setSubject(const OUString& i_val) { m_Subject = i_val; }
- OUString getTitle() const { return m_Title; }
+ const OUString& getTitle() const { return m_Title; }
void setTitle(const OUString& i_val) { m_Title = i_val; }
/// reset user-specific data (author, modified-by, ...)
@@ -165,7 +165,7 @@ public:
void AddCustomProperty( const OUString& sName,
const css::uno::Any& rValue );
- css::uno::Sequence< css::document::CmisProperty >
+ const css::uno::Sequence< css::document::CmisProperty >&
GetCmisProperties() const { return m_aCmisProperties;}
void SetCmisProperties(const css::uno::Sequence< css::document::CmisProperty >& cmisProps );
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 150b03747b3c..487d3c36b775 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -117,7 +117,7 @@ public:
* Does not take ownership of pFlt but pFlt needs to be around as long as the SfxMedium instance.
*/
void SetFilter(const std::shared_ptr<const SfxFilter>& pFilter);
- std::shared_ptr<const SfxFilter> GetFilter() const;
+ const std::shared_ptr<const SfxFilter>& GetFilter() const;
std::shared_ptr<const SfxFilter> GetOrigFilter() const;
const OUString& GetOrigURL() const;
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index 40a7f8081293..110745f94a05 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -97,11 +97,11 @@ public:
sal_uInt16 GetType() const { return pMgr->GetType(); }
SfxChildAlignment GetAlignment() const { return pMgr->GetAlignment(); }
void SetAlignment(SfxChildAlignment eAlign) { pMgr->SetAlignment(eAlign); }
- Size GetFloatingSize() const { return aFloatSize; }
+ const Size& GetFloatingSize() const { return aFloatSize; }
void SetFloatingSize(const Size& rSize) { aFloatSize=rSize; }
void SetMinOutputSizePixel( const Size& rSize );
- Size GetMinOutputSizePixel() const;
+ const Size& GetMinOutputSizePixel() const;
virtual bool Notify( NotifyEvent& rNEvt ) override;
DECL_LINK_TYPED(TimerHdl, Idle *, void);
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index 37a71b338015..eae08b3a6ec1 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -50,7 +50,7 @@ public:
sal_uInt16 GetEventId() const
{ return nEventId; }
- OUString GetEventName() const
+ const OUString& GetEventName() const
{ return aEventName; }
SfxObjectShell* GetObjShell() const
@@ -73,7 +73,7 @@ public:
, xViewController( xController )
{}
- css::uno::Reference< css::frame::XController2 > GetController() const
+ const css::uno::Reference< css::frame::XController2 >& GetController() const
{ return xViewController; }
};
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 7bae388ab20d..5f4a24e8ce44 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -194,7 +194,7 @@ public:
OUString GetDisplayDirectory() const;
ErrCode GetGraphic( Graphic& rGraphic ) const;
- css::uno::Reference < css::ui::dialogs::XFilePicker2 > GetFilePicker() const;
+ const css::uno::Reference < css::ui::dialogs::XFilePicker2 >& GetFilePicker() const;
// XFilePickerListener methods
void SAL_CALL FileSelectionChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index ce2860d52d0c..df47419733f4 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -143,7 +143,7 @@ public:
void GetTargetList( TargetList& ) const;
void UpdateDescriptor( SfxObjectShell *pDoc );
void Resize();
- css::uno::Reference< css::frame::XFrame >
+ const css::uno::Reference< css::frame::XFrame >&
GetFrameInterface() const;
void Appear();
void AppearWithUpdate();
@@ -234,7 +234,7 @@ class SFX2_DLLPUBLIC SfxUsrAnyItem : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
SfxUsrAnyItem( sal_uInt16 nWhich, const css::uno::Any& rAny );
- css::uno::Any GetValue() const
+ const css::uno::Any& GetValue() const
{ return aValue; }
virtual bool operator==( const SfxPoolItem& ) const override;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index f94d70608e6d..3419f08e8899 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -60,14 +60,14 @@ public:
SfxViewShell* GetViewShell() const { return m_pViewSh; }
vcl::Window* GetEditWin() const { return m_pEditWin; }
- css::uno::Reference < css::embed::XEmbeddedObject > GetObject() const;
+ const css::uno::Reference < css::embed::XEmbeddedObject >& GetObject() const;
void SetObject( const css::uno::Reference < css::embed::XEmbeddedObject >& rObject );
void SetObjectState( sal_Int32 );
bool IsObjectUIActive() const;
bool IsObjectInPlaceActive() const;
void DeactivateObject();
bool SetObjArea( const Rectangle & );
- Rectangle GetObjArea() const;
+ const Rectangle& GetObjArea() const;
Rectangle GetScaledObjArea() const;
void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
void SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 9a98ddc6b837..36739c79ec17 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -123,7 +123,7 @@ public:
SvLinkSource* GetObj() const { return xObj; }
void SetLinkSourceName( const OUString & rName );
- OUString GetLinkSourceName() const { return aLinkName;}
+ const OUString& GetLinkSourceName() const { return aLinkName;}
enum UpdateResult {
SUCCESS = 0,
diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index 3356911e2e2f..a80e5757a17a 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -47,15 +47,15 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
- OUString GetMethod() const
+ const OUString& GetMethod() const
{ return aMethodName; }
void SetMethod( const OUString& r )
{ aMethodName = r; }
- OUString GetModule() const
+ const OUString& GetModule() const
{ return aModuleName; }
void SetModule( const OUString& r )
{ aModuleName = r; }
- OUString GetLib() const
+ const OUString& GetLib() const
{ return aLibName; }
void SetLib( const OUString& r )
{ aLibName = r; }
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 86e891cfe4b9..bcdbad4dcf14 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -431,7 +431,7 @@ public:
sal_uInt32 GetModifyPasswordHash() const;
bool SetModifyPasswordHash( sal_uInt32 nHash );
- css::uno::Sequence< css::beans::PropertyValue > GetModifyPasswordInfo() const;
+ const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const;
bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo );
static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc );
diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index 4d6490e8da11..2cb5e6c9e9a1 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -49,7 +49,7 @@ public:
PanelTitleBar* GetTitleBar() const;
bool IsTitleBarOptional() const { return mbIsTitleBarOptional;}
void SetUIElement (const css::uno::Reference<css::ui::XUIElement>& rxElement);
- css::uno::Reference<css::ui::XSidebarPanel> GetPanelComponent() const { return mxPanelComponent;}
+ const css::uno::Reference<css::ui::XSidebarPanel>& GetPanelComponent() const { return mxPanelComponent;}
css::uno::Reference<css::awt::XWindow> GetElementWindow();
void SetExpanded (const bool bIsExpanded);
bool IsExpanded() const { return mbIsExpanded;}
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index c968feced170..6c65867b2a76 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -145,7 +145,7 @@ public:
// std::unique_ptr<ResourceManager> GetResourceManager() { return mpResourceManager;}
- Context GetCurrentContext() const { return maCurrentContext;}
+ const Context& GetCurrentContext() const { return maCurrentContext;}
bool IsDocumentReadOnly (void) const { return mbIsDocumentReadOnly;}
void SwitchToDeck ( const ::rtl::OUString& rsDeckId);
diff --git a/include/sfx2/sidebar/TitleBar.hxx b/include/sfx2/sidebar/TitleBar.hxx
index 1e1fae598929..868e1327c0f1 100644
--- a/include/sfx2/sidebar/TitleBar.hxx
+++ b/include/sfx2/sidebar/TitleBar.hxx
@@ -36,7 +36,7 @@ public:
virtual void dispose() override;
void SetTitle (const OUString& rsTitle);
- const OUString GetTitle() {return msTitle; }
+ const OUString& GetTitle() {return msTitle; }
void SetIcon (const Image& rIcon);
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 382c250d933a..bf3a8773b3f0 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -250,7 +250,7 @@ public:
virtual sfxpg DeactivatePage( SfxItemSet* pSet );
void SetUserData(const OUString& rString)
{ aUserString = rString; }
- OUString GetUserData() { return aUserString; }
+ const OUString& GetUserData() { return aUserString; }
virtual void FillUserData();
virtual bool IsReadOnly() const;
virtual void PageCreated (const SfxAllItemSet& aSet);
diff --git a/include/sfx2/titledockwin.hxx b/include/sfx2/titledockwin.hxx
index 511818498e7f..4b21a8e9b6eb 100644
--- a/include/sfx2/titledockwin.hxx
+++ b/include/sfx2/titledockwin.hxx
@@ -53,7 +53,7 @@ namespace sfx2
/** Return the border that is painted around the inner window as
decoration.
*/
- SvBorder GetDecorationBorder() const { return m_aBorder; }
+ const SvBorder& GetDecorationBorder() const { return m_aBorder; }
protected:
// Window overridables
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 53dcd84115ae..8abf52ce7d3d 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -287,7 +287,7 @@ public:
void ExecPrint( const css::uno::Sequence < css::beans::PropertyValue >&, bool, bool );
// Like ExecPrint(), but only sets up for printing. Use Printer::ExecutePrintJob() and Printer::FinishPrintJob() afterwards.
void StartPrint( const css::uno::Sequence < css::beans::PropertyValue >&, bool, bool );
- std::shared_ptr< vcl::PrinterController > GetPrinterController() const;
+ 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();