diff options
Diffstat (limited to 'sw/source')
39 files changed, 63 insertions, 63 deletions
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index 4976f07ca99e..2e3f9bbc3971 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -35,9 +35,9 @@ class SwListImpl const SwNodes& rNodes ); ~SwListImpl(); - const OUString GetListId() const { return msListId;} + const OUString& GetListId() const { return msListId;} - const OUString GetDefaultListStyleName() const { return msDefaultListStyleName;} + const OUString& GetDefaultListStyleName() const { return msDefaultListStyleName;} void InsertListItem( SwNodeNum& rNodeNum, const int nLevel ); diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 6ab9acca5ece..b6bc8cfc5491 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1070,7 +1070,7 @@ namespace numfunc public: static SwDefBulletConfig& getInstance(); - inline OUString GetFontname() const + const OUString& GetFontname() const { return msFontname; } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index c4e59c7083c5..185e17e14b7c 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -132,8 +132,8 @@ public: bool SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCheck); void ToSentenceStart(); - const svx::SpellPortions GetLastPortions() const { return aLastPortions;} - SpellContentPositions GetLastPositions() const {return aLastPositions;} + const svx::SpellPortions& GetLastPortions() const { return aLastPortions;} + const SpellContentPositions& GetLastPositions() const {return aLastPositions;} void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; } }; diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index bba4902f21eb..64c9948da397 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1316,7 +1316,7 @@ void SwInputField::SetHelp(const OUString & rStr) aHelp = rStr; } -OUString SwInputField::GetHelp() const +const OUString& SwInputField::GetHelp() const { return aHelp; } @@ -1326,7 +1326,7 @@ void SwInputField::SetToolTip(const OUString & rStr) aToolTip = rStr; } -OUString SwInputField::GetToolTip() const +const OUString& SwInputField::GetToolTip() const { return aToolTip; } diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index ada742b128d2..dbd1d94cba8e 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -941,7 +941,7 @@ public: void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rField, bool bField ); - OUString GetName() { return aName; } + const OUString& GetName() { return aName; } }; /// Get a sorted list of the field IDs from a document. diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index 8736273ee4c4..df6686a5bbf4 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -94,13 +94,13 @@ public: OUString GetLongName( sal_uInt16 ) const; /// Return longname for index OUString GetPackageName( sal_uInt16 ) const; /// Return packagename for index - OUString GetFileName() const {return aFile;} /// Return physical file name + const OUString& GetFileName() const {return aFile;} /// Return physical file name void SetName( const OUString& rName ) /// Logic name { aName = rName; bInfoChanged = true; } - OUString GetName() + const OUString& GetName() { return aName; } - OUString GetBaseURL() const { return sBaseURL;} + const OUString& GetBaseURL() const { return sBaseURL;} void SetBaseURL( const OUString& rURL ) { sBaseURL = rURL; } virtual sal_uLong Delete( sal_uInt16 ) = 0; diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx index 750acf5d764a..e8023c26ed47 100644 --- a/sw/source/core/text/guess.hxx +++ b/sw/source/core/text/guess.hxx @@ -54,7 +54,7 @@ public: inline sal_Int32 BreakStart() const { return nBreakStart; } inline sal_Int32 BreakPos() const {return nBreakPos; } inline sal_Int32 FieldDiff() const {return nFieldDiff; } - inline css::uno::Reference< css::linguistic2::XHyphenatedWord > HyphWord() const + const css::uno::Reference< css::linguistic2::XHyphenatedWord >& HyphWord() const { return xHyphWord; } }; diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 941589c9baaf..d62e1725e7d7 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -344,7 +344,7 @@ public: { return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->size() ) ? (*m_pKanaComp)[m_nKanaIdx] : 0; } - std::shared_ptr<vcl::TextLayoutCache> GetCachedVclData() const + const std::shared_ptr<vcl::TextLayoutCache>& GetCachedVclData() const { return m_pCachedVclData; } diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 06e6ca84b9c9..cc5e350dbefa 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -64,7 +64,7 @@ public: // #i89179# - made public inline const SwFont *GetFont() const { return pFnt; } - inline OUString GetExp() const { return aExpand; } + const OUString& GetExp() const { return aExpand; } virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx index e5fe68a125c4..2d4e9aaddd41 100644 --- a/sw/source/core/text/porftn.hxx +++ b/sw/source/core/text/porftn.hxx @@ -68,7 +68,7 @@ public: virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; void SetNumber( const OUString& rStr ) { aErgo = rStr; } - const OUString GetQuoText() const { return aExpand; } + const OUString& GetQuoText() const { return aExpand; } const OUString &GetContText() const { return aErgo; } // Field cloner for SplitGlue diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index d4a481268029..01cae73ed3b3 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -840,7 +840,7 @@ void MetaFieldManager::copyDocumentProperties(const SwDoc& rSource) m_xDocumentProperties.set(xCloneable->createClone(), uno::UNO_QUERY); } -uno::Reference<document::XDocumentProperties> MetaFieldManager::getDocumentProperties() +const uno::Reference<document::XDocumentProperties>& MetaFieldManager::getDocumentProperties() { return m_xDocumentProperties; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 5e07f5ef668b..4682d407616e 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -362,12 +362,12 @@ public: //SfxListener virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; - OUString GetStyleName() const { return m_sStyleName;} + const OUString& GetStyleName() const { return m_sStyleName;} SfxStyleFamily GetFamily() const {return m_rEntry.m_eFamily;} bool IsDescriptor() const {return m_bIsDescriptor;} bool IsConditional() const { return m_bIsConditional;} - OUString GetParentStyleName() const { return m_sParentStyleName;} + const OUString& GetParentStyleName() const { return m_sParentStyleName;} void SetDoc(SwDoc* pDc, SfxStyleSheetBasePool* pPool) { m_bIsDescriptor = false; m_pDoc = pDc; diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx index fa58306acf04..cf315afdceef 100644 --- a/sw/source/filter/ascii/wrtasc.hxx +++ b/sw/source/filter/ascii/wrtasc.hxx @@ -36,7 +36,7 @@ public: SwASCWriter( const OUString& rFilterName ); virtual ~SwASCWriter(); - OUString GetLineEnd() const { return m_sLineEnd; } + const OUString& GetLineEnd() const { return m_sLineEnd; } }; #endif // _ INCLUDED_SW_SOURCE_FILTER_ASCII_WRTASC_HXX diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 9c798ab5fcb0..4649e0015b92 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -250,7 +250,7 @@ public: inline void SetWidth( sal_uInt16 nWidth, bool bRelWidth ); const SvxBrushItem *GetBGBrush() const { return pBGBrush; } - std::shared_ptr<SvxBoxItem> GetBoxItem() const { return m_pBoxItem; } + const std::shared_ptr<SvxBoxItem>& GetBoxItem() const { return m_pBoxItem; } inline bool GetNumFormat( sal_uInt32& rNumFormat ) const; inline bool GetValue( double& rValue ) const; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 24f7cae08a1f..f77c3ec14e95 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -138,7 +138,7 @@ public: long right() const { return m_aRect.Right(); } long width() const { return m_aRect.Width(); } long height() const { return m_aRect.Height(); } - SwRect getRect() const { return m_aRect; } + const SwRect& getRect() const { return m_aRect; } WW8TableNodeInfo * getTableNodeInfo() const { return m_pNodeInfo; } unsigned long getFormatFrameWidth() const @@ -250,9 +250,9 @@ public: void setWidths(WidthsPtr pGridCols); void setRowSpans(RowSpansPtr pRowSpans); - TableBoxVectorPtr getTableBoxVector() const { return m_pTableBoxVector;} - WidthsPtr getWidths() const { return m_pWidths;} - RowSpansPtr getRowSpans() const { return m_pRowSpans;} + const TableBoxVectorPtr& getTableBoxVector() const { return m_pTableBoxVector;} + const WidthsPtr& getWidths() const { return m_pWidths;} + const RowSpansPtr& getRowSpans() const { return m_pRowSpans;} }; class WW8TableCellGrid diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 4089d295eb44..1190d3aa8a45 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -949,7 +949,7 @@ public: void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer ); /// Occasionally need to use this serializer from the outside - ::sax_fastparser::FSHelperPtr GetSerializer( ) { return m_pSerializer; } + const ::sax_fastparser::FSHelperPtr& GetSerializer( ) { return m_pSerializer; } /// Do we have any footnotes? bool HasFootnotes() const; diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 30fe79528a9d..047b497dcce5 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -268,7 +268,7 @@ public: /// Set the document default tab stop. void setDefaultTabStop( int stop ) { m_aSettings.defaultTabStop = stop; } - ::sax_fastparser::FSHelperPtr GetFS() { return mpFS; } + const ::sax_fastparser::FSHelperPtr& GetFS() { return mpFS; } void SetFS(::sax_fastparser::FSHelperPtr mpFS); diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 5be0823fed39..df227a8d2f96 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -189,7 +189,7 @@ namespace ww8 @return the best size to use to export to word */ - const Size GetSize() const { return maSize; } + const Size& GetSize() const { return maSize; } /** The layout size of the contained element @@ -197,7 +197,7 @@ namespace ww8 @return layout size */ - const Size GetLayoutSize() const + const Size& GetLayoutSize() const { return maLayoutSize; } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index a9e1b77872ce..b0b970e1c7b7 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -557,7 +557,7 @@ namespace sw explicit Position(const SwPosition &rPos); Position(const Position &rPos); operator SwPosition() const; - SwNodeIndex GetPtNode() { return maPtNode; }; + const SwNodeIndex& GetPtNode() { return maPtNode; }; sal_Int32 GetPtContent() { return mnPtContent; }; }; } @@ -583,8 +583,8 @@ class WW8FieldEntry SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); }; sal_Int32 GetPtContent() { return maStartPos.GetPtContent(); }; - OUString GetBookmarkName() { return msBookmarkName;} - OUString GetBookmarkCode() { return msMarkCode;} + const OUString& GetBookmarkName() { return msBookmarkName;} + const OUString& GetBookmarkCode() { return msMarkCode;} void SetBookmarkName(const OUString& bookmarkName); void SetBookmarkType(const OUString& bookmarkType); void SetBookmarkCode(const OUString& bookmarkCode); diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx index 0f84cf35bb6c..dce6ea9e053c 100644 --- a/sw/source/filter/ww8/ww8toolbar.hxx +++ b/sw/source/filter/ww8/ww8toolbar.hxx @@ -18,7 +18,7 @@ class Xst : public TBBase public: Xst(){} bool Read(SvStream &rS) override; - OUString getString() { return sString; } + const OUString& getString() const { return sString; } #if OSL_DEBUG_LEVEL > 1 virtual void Print( FILE* fp ) override; #endif diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx index 0a959a757e83..0a5231a20790 100644 --- a/sw/source/filter/xml/xmlimpit.hxx +++ b/sw/source/filter/xml/xmlimpit.hxx @@ -71,7 +71,7 @@ public: SvXMLUnitConverter const& rUnitConverter) const; virtual void setMapEntries( SvXMLItemMapEntriesRef rMapEntries ); - inline SvXMLItemMapEntriesRef getMapEntries() const; + inline const SvXMLItemMapEntriesRef& getMapEntries() const; /** This method is called for every item that should be set based upon an XML attribute value. */ @@ -82,7 +82,7 @@ public: const SvXMLUnitConverter& rUnitConverter ); }; -inline SvXMLItemMapEntriesRef +inline const SvXMLItemMapEntriesRef& SvXMLImportItemMapper::getMapEntries() const { return mrMapEntries; diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index c1bd01a8f8a2..bbae48f0f564 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -85,7 +85,7 @@ public: sal_Int32 FindNextStringPiece( sal_Int32 _nStart = -1 ); OUString GetResult() const; - OUString GetFieldName()const { return aFieldName; } + const OUString& GetFieldName()const { return aFieldName; } }; SwVbaReadFieldParams::SwVbaReadFieldParams( const OUString& _rData ) diff --git a/sw/source/ui/vba/vbalisthelper.hxx b/sw/source/ui/vba/vbalisthelper.hxx index 88a773ec340c..86c449fa7072 100644 --- a/sw/source/ui/vba/vbalisthelper.hxx +++ b/sw/source/ui/vba/vbalisthelper.hxx @@ -45,7 +45,7 @@ public: SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) throw( css::uno::RuntimeException ); sal_Int32 getGalleryType() const { return mnGalleryType; } - css::uno::Reference< css::container::XIndexReplace > getNumberingRules() const { return mxNumberingRules; } + const css::uno::Reference< css::container::XIndexReplace >& getNumberingRules() const { return mxNumberingRules; } css::uno::Any getPropertyValueWithNameAndLevel( sal_Int32 nLevel, const OUString& sName ) throw( css::uno::RuntimeException ); void setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const OUString& sName, const css::uno::Any& aValue ) throw( css::uno::RuntimeException ); diff --git a/sw/source/ui/vba/vbapalette.hxx b/sw/source/ui/vba/vbapalette.hxx index e20fba925800..a699681e02c5 100644 --- a/sw/source/ui/vba/vbapalette.hxx +++ b/sw/source/ui/vba/vbapalette.hxx @@ -28,7 +28,7 @@ public: VbaPalette(); // if no palette available e.g. because the document doesn't have a // palette defined then a default palette will be returned. - css::uno::Reference< css::container::XIndexAccess > getPalette() const { return mxPalette;} + const css::uno::Reference< css::container::XIndexAccess >& getPalette() const { return mxPalette;} }; #endif diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index 83cb2c641751..c9e096660a6b 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -46,10 +46,10 @@ public: SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ) throw (css::script::BasicErrorException, css::uno::RuntimeException); SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual ~SwVbaRange(); - css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; } + const css::uno::Reference< css::text::XTextDocument >& getDocument() const { return mxTextDocument; } virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::text::XText > getXText() const { return mxText; } + const css::uno::Reference< css::text::XText >& getXText() const { return mxText; } void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; } // Attribute diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 5d4914f52962..92c6112919cc 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -3046,7 +3046,7 @@ void SwDBManager::setEmbeddedName(const OUString& rEmbeddedName, SwDocShell& rDo pImpl->m_xDataSourceRemovedListener = new SwDataSourceRemovedListener(*this); } -OUString SwDBManager::getEmbeddedName() const +const OUString& SwDBManager::getEmbeddedName() const { return m_sEmbeddedName; } diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index f97f05b63d70..5e00af7fff22 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -81,7 +81,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper < XContainerListener > bool HasContext(); SwWrtShell* GetWrtShell() { return m_pWrtShell;} void SetWrtShell(SwWrtShell& rSh) { m_pWrtShell = &rSh;} - Reference<XDatabaseContext> GetContext() const {return m_xDatabaseContext;} + const Reference<XDatabaseContext>& GetContext() const {return m_xDatabaseContext;} Reference<XConnection> GetConnection(const OUString& rSourceName); }; diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx index 193db7105c78..2afa1f8cd21e 100644 --- a/sw/source/uibase/inc/break.hxx +++ b/sw/source/uibase/inc/break.hxx @@ -67,9 +67,9 @@ public: virtual ~SwBreakDlg(); virtual void dispose() override; - OUString GetTemplateName() { return aTemplate; } + const OUString& GetTemplateName() { return aTemplate; } sal_uInt16 GetKind() { return nKind; } - ::boost::optional<sal_uInt16> GetPageNumber() { return oPgNum; } + const ::boost::optional<sal_uInt16>& GetPageNumber() { return oPgNum; } }; #endif diff --git a/sw/source/uibase/inc/concustomshape.hxx b/sw/source/uibase/inc/concustomshape.hxx index d49565d196ba..e18604a3fc4d 100644 --- a/sw/source/uibase/inc/concustomshape.hxx +++ b/sw/source/uibase/inc/concustomshape.hxx @@ -44,7 +44,7 @@ class ConstCustomShape : public SwDrawBase virtual void Activate(const sal_uInt16 nSlotId) override; // activate function - OUString GetShapeType() const; + const OUString& GetShapeType() const; static OUString GetShapeTypeFromRequest( SfxRequest& rReq ); virtual void CreateDefaultObject() override; diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 96c1d5a7898c..936bbbe301a8 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -248,11 +248,11 @@ public: void StartExecuteDrag(); void DragFinished(); - static Color GetWaterCanTextColor() { return m_aWaterCanTextColor; } + static const Color& GetWaterCanTextColor() { return m_aWaterCanTextColor; } static void SetWaterCanTextColor(const Color& rCol ) { m_aWaterCanTextColor = rCol; } - static Color GetWaterCanTextBackColor() + static const Color& GetWaterCanTextBackColor() { return m_aWaterCanTextBackColor; } static void SetWaterCanTextBackColor(const Color& rCol ) { m_aWaterCanTextBackColor = rCol; } diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index 0d479b19c0e1..ff6ae62304fe 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -133,8 +133,8 @@ public: const OUString& rPar2, SwField * _pField = nullptr); - OUString GetCurFieldPar1() const { return aCurPar1; } - OUString GetCurFieldPar2() const { return aCurPar2; } + const OUString& GetCurFieldPar1() const { return aCurPar1; } + const OUString& GetCurFieldPar2() const { return aCurPar2; } // determine a field SwField* GetCurField(); @@ -143,8 +143,8 @@ public: bool ChooseMacro(const OUString &rSelMacro = OUString()); void SetMacroPath(const OUString& rPath); - inline OUString GetMacroPath() const { return sMacroPath; } - inline OUString GetMacroName() const { return sMacroName; } + const OUString& GetMacroPath() const { return sMacroPath; } + const OUString& GetMacroName() const { return sMacroName; } // previous and next of the same type bool GoNextPrev( bool bNext = true, SwFieldType* pTyp = nullptr ); diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx index 81dd8c12d7ea..18a0d8bf068b 100644 --- a/sw/source/uibase/inc/insfnote.hxx +++ b/sw/source/uibase/inc/insfnote.hxx @@ -69,7 +69,7 @@ public: virtual ~SwInsFootNoteDlg(); virtual void dispose() override; - OUString GetFontName() { return m_aFontName; } + const OUString& GetFontName() { return m_aFontName; } bool IsEndNote() { return m_pEndNoteBtn->IsChecked(); } OUString GetStr() { diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx index 43afc15e5c9c..f320cc9ce4c5 100644 --- a/sw/source/uibase/inc/javaedit.hxx +++ b/sw/source/uibase/inc/javaedit.hxx @@ -73,9 +73,9 @@ public: virtual ~SwJavaEditDialog(); virtual void dispose() override; - OUString GetScriptText() const { return aText; } + const OUString& GetScriptText() const { return aText; } - OUString GetScriptType() const { return aType; } + const OUString& GetScriptType() const { return aType; } bool IsUrl() const { return bIsUrl; } bool IsNew() const { return bNew; } diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index cbee8a01a67b..93eb20507d76 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -67,7 +67,7 @@ public: SwMailMergeConfigItem& GetConfigItem() { return m_rConfigItem;} void SetReloadDocument(const OUString& rURL) {sDocumentURL = rURL;} - OUString GetReloadDocument() const {return sDocumentURL;} + const OUString& GetReloadDocument() const {return sDocumentURL;} //next step requires loading of document void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;} diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx index 59b8cc4a0392..0b53bb0894dc 100644 --- a/sw/source/uibase/inc/mailmrge.hxx +++ b/sw/source/uibase/inc/mailmrge.hxx @@ -135,7 +135,7 @@ public: OUString GetTargetURL() const; const OUString& GetSaveFilter() const {return m_sSaveFilter;} - inline const css::uno::Sequence< css::uno::Any > GetSelection() const { return m_aSelection; } + const css::uno::Sequence< css::uno::Any >& GetSelection() const { return m_aSelection; } css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const; }; diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 3efb56ca6001..8c541e9beda6 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -253,7 +253,7 @@ public: bool HandleWheelCommands( const CommandEvent& ); - OUString GetPrevSwViewData() const { return sSwViewData; } + const OUString& GetPrevSwViewData() const { return sSwViewData; } void SetNewCursorPos( const OUString& rStr ) { sNewCursorPos = rStr; } const OUString& GetNewCursorPos() const { return sNewCursorPos; } diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 29aabdf5d4f0..eda9017bd5ab 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -108,8 +108,8 @@ public: SwForm* GetForm(CurTOXType eType); - CurTOXType GetCurrentTOXType() const { return eCurrentTOXType;} - void SetCurrentTOXType(CurTOXType eSet) + const CurTOXType& GetCurrentTOXType() const { return eCurrentTOXType;} + void SetCurrentTOXType(const CurTOXType& eSet) { eCurrentTOXType = eSet; } diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx index 528a564d8877..066ea5fd1ec4 100644 --- a/sw/source/uibase/inc/toxmgr.hxx +++ b/sw/source/uibase/inc/toxmgr.hxx @@ -143,7 +143,7 @@ public: bool IsLevelFromChapter() const {return m_bLevelFromChapter;} void SetLevelFromChapter(bool bSet) {m_bLevelFromChapter = bSet;} - OUString GetAuthBrackets() const {return m_sAuthBrackets;} + const OUString& GetAuthBrackets() const {return m_sAuthBrackets;} void SetAuthBrackets(const OUString& rSet) {m_sAuthBrackets = rSet;} bool IsAuthSequence() const {return m_bIsAuthSequence;} @@ -156,9 +156,9 @@ public: SwTOXSortKey eKey2, SwTOXSortKey eKey3); - SwTOXSortKey GetSortKey1() const {return m_eSortKey1;} - SwTOXSortKey GetSortKey2() const {return m_eSortKey2;} - SwTOXSortKey GetSortKey3() const {return m_eSortKey3;} + const SwTOXSortKey& GetSortKey1() const {return m_eSortKey1;} + const SwTOXSortKey& GetSortKey2() const {return m_eSortKey2;} + const SwTOXSortKey& GetSortKey3() const {return m_eSortKey3;} LanguageType GetLanguage() const {return m_eLanguage;} void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;} diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx index 0c7bf74f6371..96e660790cb3 100644 --- a/sw/source/uibase/ribbar/concustomshape.cxx +++ b/sw/source/uibase/ribbar/concustomshape.cxx @@ -53,7 +53,7 @@ ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin, aCustomShape = ConstCustomShape::GetShapeTypeFromRequest( rReq ); } -OUString ConstCustomShape::GetShapeType() const +const OUString& ConstCustomShape::GetShapeType() const { return aCustomShape; } |