summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 20:33:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 22:12:02 +0200
commit592c31a8fa8729259cf42440a0a26c0322bbbba5 (patch)
tree5448499c937ca9a5fba1ecb8c6a278180359853d
parentef2e9c91d0a0483c19d0175c1b0ccb24d3f6bfbc (diff)
loplugin:returnconstval in sw
Change-Id: I15d8553bff7528f690ff92bee75d6a67037c0adf Reviewed-on: https://gerrit.libreoffice.org/78062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/inc/AnnotationWin.hxx4
-rw-r--r--sw/inc/SwStyleNameMapper.hxx4
-rw-r--r--sw/inc/anchoreddrawobject.hxx4
-rw-r--r--sw/inc/anchoredobject.hxx4
-rw-r--r--sw/inc/docufld.hxx4
-rw-r--r--sw/inc/fesh.hxx4
-rw-r--r--sw/inc/iodetect.hxx2
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/inc/swrect.hxx16
-rw-r--r--sw/inc/txtfld.hxx2
-rw-r--r--sw/inc/viewsh.hxx2
-rw-r--r--sw/source/core/bastyp/swrect.cxx12
-rw-r--r--sw/source/core/doc/DocumentListsManager.cxx4
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx6
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx10
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/inc/DocumentListsManager.hxx4
-rw-r--r--sw/source/core/inc/flyfrm.hxx4
-rw-r--r--sw/source/core/inc/frame.hxx4
-rw-r--r--sw/source/core/inc/pagefrm.hxx4
-rw-r--r--sw/source/core/inc/txtfly.hxx4
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx4
-rw-r--r--sw/source/core/layout/fly.cxx4
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/layout/ssfrm.cxx4
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/txtfly.cxx4
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
-rw-r--r--sw/source/core/unocore/unosrch.cxx4
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx4
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx13
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx2
-rw-r--r--sw/source/uibase/inc/mmconfigitem.hxx4
-rw-r--r--sw/source/uibase/inc/swruler.hxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx5
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx5
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.cxx5
44 files changed, 90 insertions, 94 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 2af2d9e56b37..18ebe2e7f8c1 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -124,8 +124,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void SetScrollbar();
void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
- const Point VirtualPos() { return mPosSize.TopLeft(); }
- const Size VirtualSize() { return mPosSize.GetSize(); }
+ Point VirtualPos() { return mPosSize.TopLeft(); }
+ Size VirtualSize() { return mPosSize.GetSize(); }
void ShowAnchorOnly(const Point &aPoint);
void ShowNote();
diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index e9e2533dd6e6..79d4f1011238 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -166,9 +166,9 @@ public:
// RES_POOLCOLL_LABEL_TABLE, RES_POOLCOLL_LABEL_FRAME
// forth and back.
// Non-matching names remain unchanged.
- SW_DLLPUBLIC static const OUString GetSpecialExtraProgName(
+ SW_DLLPUBLIC static const OUString & GetSpecialExtraProgName(
const OUString& rExtraUIName);
- static const OUString GetSpecialExtraUIName(const OUString& rExtraProgName);
+ static const OUString & GetSpecialExtraUIName(const OUString& rExtraProgName);
static const std::vector<OUString>& GetTextUINameArray();
static const std::vector<OUString>& GetListsUINameArray();
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index 5ca119f90aac..2f7a1b6a44d8 100644
--- a/sw/inc/anchoreddrawobject.hxx
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -99,7 +99,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
virtual bool SetObjTop_( const SwTwips _nTop) override;
virtual bool SetObjLeft_( const SwTwips _nLeft) override;
- virtual const SwRect GetObjBoundRect() const override;
+ virtual SwRect GetObjBoundRect() const override;
public:
@@ -119,7 +119,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
virtual const SwFrameFormat& GetFrameFormat() const override;
// accessors to the object area and its position
- virtual const SwRect GetObjRect() const override;
+ virtual SwRect GetObjRect() const override;
boost::optional<tools::Rectangle> const & GetLastObjRect() const { return maLastObjRect;}
void SetLastObjRect( const tools::Rectangle& _rNewObjRect );
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index 386cdc0f42a4..0c5c2495092a 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -189,7 +189,7 @@ class SW_DLLPUBLIC SwAnchoredObject
virtual bool SetObjTop_( const SwTwips _nTop) = 0;
virtual bool SetObjLeft_( const SwTwips _nLeft) = 0;
- virtual const SwRect GetObjBoundRect() const = 0;
+ virtual SwRect GetObjBoundRect() const = 0;
public:
virtual ~SwAnchoredObject();
@@ -316,7 +316,7 @@ class SW_DLLPUBLIC SwAnchoredObject
virtual const SwFrameFormat& GetFrameFormat() const = 0;
// accessors to the object area and its position
- virtual const SwRect GetObjRect() const = 0;
+ virtual SwRect GetObjRect() const = 0;
void SetObjTop( const SwTwips _nTop);
void SetObjLeft( const SwTwips _nLeft);
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index abdfe644a798..e6afd73af156 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -471,8 +471,8 @@ public:
virtual std::unique_ptr<SwField> Copy() const override;
const DateTime& GetDateTime() const { return m_aDateTime; }
- const Date GetDate() const { return Date(m_aDateTime.GetDate()); }
- const tools::Time GetTime() const { return tools::Time(m_aDateTime.GetTime()); }
+ Date GetDate() const { return Date(m_aDateTime.GetDate()); }
+ tools::Time GetTime() const { return tools::Time(m_aDateTime.GetTime()); }
sal_uInt32 GetPostItId() const { return m_nPostItId; }
/// Author
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 6f6a5e860802..65732d8f384f 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -458,7 +458,7 @@ public:
OUString GetFlyName() const;
/// get reference to OLE object (if there is one) for selected FlyFrame
- const css::uno::Reference < css::embed::XEmbeddedObject > GetOleRef() const;
+ css::uno::Reference < css::embed::XEmbeddedObject > GetOleRef() const;
/// Created unique name for frame.
OUString GetUniqueGrfName() const;
@@ -779,7 +779,7 @@ public:
@returns an object of class Color
*/
- const Color GetShapeBackgrd() const;
+ Color GetShapeBackgrd() const;
/** Is default horizontal text direction for selected drawing object right-to-left
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index e5223cdb7000..113468412282 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -106,7 +106,7 @@ public:
static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen,
rtl_TextEncoding *pCharSet, bool *pSwap, LineEnd *pLineEnd );
- static const OUString GetSubStorageName( const SfxFilter& rFltr );
+ static OUString GetSubStorageName( const SfxFilter& rFltr );
};
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportFODT(SvStream &rStream);
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index d696d9388472..37a689cce58b 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -146,7 +146,7 @@ protected:
public:
virtual DBManagerOptions GetMergeType() = 0;
virtual const OUString& GetSaveFilter() const = 0;
- virtual const css::uno::Sequence< css::uno::Any > GetSelection() const = 0;
+ virtual css::uno::Sequence< css::uno::Any > GetSelection() const = 0;
virtual css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const = 0;
virtual bool IsSaveSingleDoc() const = 0;
virtual bool IsGenerateFromDataBase() const = 0;
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index a09b38e81a8c..24f87ed58fce 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -133,12 +133,12 @@ public:
void SetUpperLeftCorner( const Point& rNew );
void SetUpperRightCorner( const Point& rNew );
void SetLowerLeftCorner( const Point& rNew );
- const Size Size_() const;
- const Point TopLeft() const;
- const Point TopRight() const;
- const Point BottomLeft() const;
- const Point BottomRight() const;
- const Size SwappedSize() const;
+ Size Size_() const;
+ Point TopLeft() const;
+ Point TopRight() const;
+ Point BottomLeft() const;
+ Point BottomRight() const;
+ Size SwappedSize() const;
long GetLeftDistance( long ) const;
long GetBottomDistance( long ) const;
long GetRightDistance( long ) const;
@@ -151,8 +151,8 @@ public:
typedef void (SwRect:: *SwRectSet)( const long nNew );
typedef long (SwRect:: *SwRectGet)() const;
-typedef const Point (SwRect:: *SwRectPoint)() const;
-typedef const Size (SwRect:: *SwRectSize)() const;
+typedef Point (SwRect:: *SwRectPoint)() const;
+typedef Size (SwRect:: *SwRectSize)() const;
typedef bool (SwRect:: *SwRectMax)( long ) const;
typedef long (SwRect:: *SwRectDist)( long ) const;
typedef void (SwRect:: *SwRectSetTwice)( long, long );
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 0db27ba5818a..8dd16d7b84fc 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -93,7 +93,7 @@ public:
void UpdateTextNodeContent( const OUString& rNewContent );
- const OUString GetFieldContent() const;
+ OUString GetFieldContent() const;
void UpdateFieldContent();
private:
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 0608c17c0a03..3f11b6d6fe24 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -279,7 +279,7 @@ public:
sal_uInt16 GetPageCount() const;
- const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
+ Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
SwDoc *GetDoc() const { return mxDoc.get(); } //Never 0.
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 8702d8f15733..b66e0d85f9e1 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -171,13 +171,13 @@ void SwRect::AddBottom( const long nAdd ){ m_Size.AdjustHeight(nAdd ); }
void SwRect::SetPosX( const long nNew ){ m_Point.setX(nNew); }
void SwRect::SetPosY( const long nNew ){ m_Point.setY(nNew); }
-const Size SwRect::Size_() const { return SSize(); }
-const Size SwRect::SwappedSize() const { return Size( m_Size.getHeight(), m_Size.getWidth() ); }
+Size SwRect::Size_() const { return SSize(); }
+Size SwRect::SwappedSize() const { return Size( m_Size.getHeight(), m_Size.getWidth() ); }
-const Point SwRect::TopLeft() const { return Pos(); }
-const Point SwRect::TopRight() const { return Point( m_Point.getX() + m_Size.getWidth(), m_Point.getY() ); }
-const Point SwRect::BottomLeft() const { return Point( m_Point.getX(), m_Point.getY() + m_Size.getHeight() ); }
-const Point SwRect::BottomRight() const
+Point SwRect::TopLeft() const { return Pos(); }
+Point SwRect::TopRight() const { return Point( m_Point.getX() + m_Size.getWidth(), m_Point.getY() ); }
+Point SwRect::BottomLeft() const { return Point( m_Point.getX(), m_Point.getY() + m_Size.getHeight() ); }
+Point SwRect::BottomRight() const
{ return Point( m_Point.getX() + m_Size.getWidth(), m_Point.getY() + m_Size.getHeight() ); }
long SwRect::GetLeftDistance( long nLimit ) const { return m_Point.getX() - nLimit; }
diff --git a/sw/source/core/doc/DocumentListsManager.cxx b/sw/source/core/doc/DocumentListsManager.cxx
index 38efc60084a7..5fe2c0f9cad8 100644
--- a/sw/source/core/doc/DocumentListsManager.cxx
+++ b/sw/source/core/doc/DocumentListsManager.cxx
@@ -180,7 +180,7 @@ DocumentListsManager::~DocumentListsManager()
}
-const OUString DocumentListsManager::MakeListIdUnique( const OUString& aSuggestedUniqueListId )
+OUString DocumentListsManager::MakeListIdUnique( const OUString& aSuggestedUniqueListId )
{
long nHitCount = 0;
OUString aTmpStr = aSuggestedUniqueListId;
@@ -193,7 +193,7 @@ const OUString DocumentListsManager::MakeListIdUnique( const OUString& aSuggeste
return aTmpStr;
}
-const OUString DocumentListsManager::CreateUniqueListId()
+OUString DocumentListsManager::CreateUniqueListId()
{
static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
if (bHack)
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 1768a464d3da..14d89e59418f 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -356,7 +356,7 @@ lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount)
return pProgNameArray;
}
-OUString
+const OUString &
lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName )
{
const std::vector<OUString>& rExtraArr = bIsUIName
@@ -875,13 +875,13 @@ const std::vector<OUString>& SwStyleNameMapper::GetCellStyleProgNameArray()
return *s_pCellStyleProgNameArray;
}
-const OUString
+const OUString &
SwStyleNameMapper::GetSpecialExtraProgName(const OUString& rExtraUIName)
{
return lcl_GetSpecialExtraName( rExtraUIName, true );
}
-const OUString
+const OUString &
SwStyleNameMapper::GetSpecialExtraUIName(const OUString& rExtraProgName)
{
return lcl_GetSpecialExtraName( rExtraProgName, false );
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 2d8ea2516fa7..afedbfdcc784 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -224,7 +224,7 @@ static map<sal_uInt16,OUString> & GetItemWhichMap()
return aItemWhichMap;
}
-static const OUString lcl_dbg_out(const SfxPoolItem & rItem)
+static OUString lcl_dbg_out(const SfxPoolItem & rItem)
{
OUString aStr("[ ");
@@ -248,7 +248,7 @@ const char * dbg_out(const SfxPoolItem * pItem)
return dbg_out(pItem ? lcl_dbg_out(*pItem) : OUString("(nil)"));
}
-static const OUString lcl_dbg_out(const SfxItemSet & rSet)
+static OUString lcl_dbg_out(const SfxItemSet & rSet)
{
SfxItemIter aIter(rSet);
const SfxPoolItem * pItem;
@@ -282,7 +282,7 @@ const char * dbg_out(const SfxItemSet & rSet)
return dbg_out(lcl_dbg_out(rSet));
}
-static const OUString lcl_dbg_out(const SwTextAttr & rAttr)
+static OUString lcl_dbg_out(const SwTextAttr & rAttr)
{
OUString aStr("[ ");
@@ -302,7 +302,7 @@ const char * dbg_out(const SwTextAttr & rAttr)
return dbg_out(lcl_dbg_out(rAttr));
}
-static const OUString lcl_dbg_out(const SwpHints & rHints)
+static OUString lcl_dbg_out(const SwpHints & rHints)
{
OUStringBuffer aStr("[ SwpHints\n");
@@ -425,7 +425,7 @@ const char * dbg_out(const SwFrameFormat & rFrameFormat)
return dbg_out(lcl_dbg_out(rFrameFormat));
}
-static const OUString lcl_AnchoredFrames(const SwNode & rNode)
+static OUString lcl_AnchoredFrames(const SwNode & rNode)
{
OUStringBuffer aResult("[");
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 35931eb5cd8f..552180f46525 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1453,7 +1453,7 @@ OUString SwFEShell::GetFlyName() const
return OUString();
}
-const uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const
+uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const
{
uno::Reference < embed::XEmbeddedObject > xObj;
SwFlyFrame * pFly = GetSelectedFlyFrame();
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 72c9e5443275..41b46703f017 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -3167,7 +3167,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
@returns an object of class Color
*/
-const Color SwFEShell::GetShapeBackgrd() const
+Color SwFEShell::GetShapeBackgrd() const
{
Color aRetColor;
diff --git a/sw/source/core/inc/DocumentListsManager.hxx b/sw/source/core/inc/DocumentListsManager.hxx
index ab02ab41fe8d..2ba7ececfd9a 100644
--- a/sw/source/core/inc/DocumentListsManager.hxx
+++ b/sw/source/core/inc/DocumentListsManager.hxx
@@ -62,8 +62,8 @@ class DocumentListsManager : public IDocumentListsAccess
// relation between list style and its default list
std::unordered_map<OUString, SwList*> maListStyleLists;
- const OUString CreateUniqueListId();
- const OUString MakeListIdUnique( const OUString& aSuggestedUniqueListId );
+ OUString CreateUniqueListId();
+ OUString MakeListIdUnique( const OUString& aSuggestedUniqueListId );
};
}
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index b51fd502f951..18f263cfc1db 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -138,7 +138,7 @@ protected:
virtual bool SetObjTop_( const SwTwips _nTop ) override;
virtual bool SetObjLeft_( const SwTwips _nLeft ) override;
- virtual const SwRect GetObjBoundRect() const override;
+ virtual SwRect GetObjBoundRect() const override;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
virtual void SwClientNotify(const SwModify& rMod, const SfxHint& rHint) override;
@@ -242,7 +242,7 @@ public:
virtual SwFrameFormat& GetFrameFormat() override;
virtual const SwFrameFormat& GetFrameFormat() const override;
- virtual const SwRect GetObjRect() const override;
+ virtual SwRect GetObjRect() const override;
/** method to determine if a format on the Writer fly frame is possible
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 6e0d653690c4..a966947ca94c 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -724,11 +724,11 @@ public:
// PaintArea is the area where content might be displayed.
// The margin of a page or the space between columns belongs to it.
- const SwRect GetPaintArea() const;
+ SwRect GetPaintArea() const;
// UnionFrame is the union of Frame- and PrtArea, normally identical
// to the FrameArea except in case of negative Prt margins.
- const SwRect UnionFrame( bool bBorder = false ) const;
+ SwRect UnionFrame( bool bBorder = false ) const;
virtual Size ChgSize( const Size& aNewSize );
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 0a3782cca408..95d69bd699ee 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -231,7 +231,7 @@ public:
@return reference to an instance of class Color
*/
- const Color GetDrawBackgrdColor() const;
+ Color GetDrawBackgrdColor() const;
/** paint margin area of a page
@@ -311,7 +311,7 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
- const SwRect PrtWithoutHeaderAndFooter() const;
+ SwRect PrtWithoutHeaderAndFooter() const;
// in case this is an empty page, this function returns the 'reference' page
const SwPageFrame& GetFormatPage() const;
diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index 62eda5bf7df1..ff70f1d2217b 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -59,7 +59,7 @@ class SwContourCache
};
std::vector<CacheItem> mvItems;
long nPntCnt;
- const SwRect ContourRect( const SwFormat* pFormat, const SdrObject* pObj,
+ SwRect ContourRect( const SwFormat* pFormat, const SdrObject* pObj,
const SwTextFrame* pFrame, const SwRect &rLine, const long nXPos,
const bool bRight );
@@ -77,7 +77,7 @@ public:
BoundRect (including spacing), and the line, for contour-flow,
the tools::PolyPolygon of the object gets traversed
*/
- static const SwRect CalcBoundRect( const SwAnchoredObject* pAnchoredObj,
+ static SwRect CalcBoundRect( const SwAnchoredObject* pAnchoredObj,
const SwRect &rLine,
const SwTextFrame* pFrame,
const long nXPos,
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 630aaeccfaf8..079468fdf062 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -605,7 +605,7 @@ const SwFrameFormat& SwAnchoredDrawObject::GetFrameFormat() const
return *(static_cast<SwDrawContact*>(GetUserCall(GetDrawObj()))->GetFormat());
}
-const SwRect SwAnchoredDrawObject::GetObjRect() const
+SwRect SwAnchoredDrawObject::GetObjRect() const
{
// use geometry of drawing object
//return GetDrawObj()->GetCurrentBoundRect();
@@ -613,7 +613,7 @@ const SwRect SwAnchoredDrawObject::GetObjRect() const
}
// --> #i70122#
-const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
+SwRect SwAnchoredDrawObject::GetObjBoundRect() const
{
bool bGroupShape = dynamic_cast<const SdrObjGroup*>( GetDrawObj() );
// Resize objects with relative width or height
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index a2193f24d654..728c191d753f 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2756,14 +2756,14 @@ const SwFrameFormat& SwFlyFrame::GetFrameFormat() const
return *GetFormat();
}
-const SwRect SwFlyFrame::GetObjRect() const
+SwRect SwFlyFrame::GetObjRect() const
{
return getFrameArea();
}
// #i70122#
// for Writer fly frames the bounding rectangle equals the object rectangles
-const SwRect SwFlyFrame::GetObjBoundRect() const
+SwRect SwFlyFrame::GetObjBoundRect() const
{
return GetObjRect();
}
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 637f1576cb64..65041858c291 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -3636,7 +3636,7 @@ bool IsExtraData( const SwDoc *pDoc )
}
// OD 22.09.2003 #110978#
-const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
+SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
{
SwRect aPrtWithoutHeaderFooter( getFramePrintArea() );
aPrtWithoutHeaderFooter.Pos() += getFrameArea().Pos();
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 8a99e9961360..704450f25d64 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6981,7 +6981,7 @@ void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const
*
* @return Color
*/
-const Color SwPageFrame::GetDrawBackgrdColor() const
+Color SwPageFrame::GetDrawBackgrdColor() const
{
const SvxBrushItem* pBrushItem;
const Color* pDummyColor;
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 66b133081cc7..fea37d6f3310 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -578,7 +578,7 @@ SwLayoutFrame::~SwLayoutFrame()
|* to be displayed. This region could be larger than the printarea (getFramePrintArea())
|* of the upper, it includes e.g. often the margin of the page.
|*/
-const SwRect SwFrame::GetPaintArea() const
+SwRect SwFrame::GetPaintArea() const
{
// NEW TABLES
// Cell frames may not leave their upper:
@@ -672,7 +672,7 @@ const SwRect SwFrame::GetPaintArea() const
|* The unionframe is the framearea (getFrameArea()) of a frame expanded by the
|* printarea, if there's a negative margin at the left or right side.
|*/
-const SwRect SwFrame::UnionFrame( bool bBorder ) const
+SwRect SwFrame::UnionFrame( bool bBorder ) const
{
bool bVert = IsVertical();
SwRectFn fnRect = bVert ? ( IsVertLR() ? (IsVertLRBT() ? fnRectVertL2RB2T : fnRectVertL2R) : fnRectVert ) : fnRectHori;
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index e9e6961e38e7..c56842f6a174 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -70,7 +70,7 @@ bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
SvxCaseMap::SmallCaps == rFnt.GetCaseMap();
}
-static const Color GetUnderColor( const SwFont *pFont )
+static Color GetUnderColor( const SwFont *pFont )
{
return pFont->GetUnderColor() == COL_AUTO ?
pFont->GetColor() : pFont->GetUnderColor();
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 2502c025e7e6..82b16055e82a 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -158,7 +158,7 @@ void ClrContourCache()
}
// #i68520#
-const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj,
+SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj,
const SwRect &rLine,
const SwTextFrame* pFrame,
const long nXPos,
@@ -206,7 +206,7 @@ const SwRect SwContourCache::CalcBoundRect( const SwAnchoredObject* pAnchoredObj
return aRet;
}
-const SwRect SwContourCache::ContourRect( const SwFormat* pFormat,
+SwRect SwContourCache::ContourRect( const SwFormat* pFormat,
const SdrObject* pObj, const SwTextFrame* pFrame, const SwRect &rLine,
const long nXPos, const bool bRight )
{
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index e5a09ddfb47a..fba15a6107f9 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -583,7 +583,7 @@ void SwTextInputField::NotifyContentChange( SwFormatField& rFormatField )
}
}
-const OUString SwTextInputField::GetFieldContent() const
+OUString SwTextInputField::GetFieldContent() const
{
return GetFormatField().GetField()->ExpandField(false, nullptr/*ignored anyway*/);
}
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index 603c4063e5d4..8926602e8a80 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -56,7 +56,7 @@ public:
/// @throws lang::IllegalArgumentException
/// @throws uno::RuntimeException
void SetProperties(const uno::Sequence< beans::PropertyValue >& aSearchAttribs);
- const uno::Sequence< beans::PropertyValue > GetProperties() const;
+ uno::Sequence< beans::PropertyValue > GetProperties() const;
void FillItemSet(SfxItemSet& rSet, bool bIsValueSearch) const;
bool HasAttributes() const;
@@ -89,7 +89,7 @@ void SwSearchProperties_Impl::SetProperties(const uno::Sequence< beans::Property
}
}
-const uno::Sequence< beans::PropertyValue > SwSearchProperties_Impl::GetProperties() const
+uno::Sequence< beans::PropertyValue > SwSearchProperties_Impl::GetProperties() const
{
sal_uInt32 nPropCount = 0;
for( size_t i = 0; i < aPropertyEntries.size(); i++)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index d886c0642e0e..e20d7de4a4a1 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2501,7 +2501,7 @@ sal_uInt16 SwViewShell::GetPageCount() const
return GetLayout() ? GetLayout()->GetPageNum() : 1;
}
-const Size SwViewShell::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const
+Size SwViewShell::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const
{
Size aSize;
const SwRootFrame* pTmpRoot = GetLayout();
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 741f4b4d4240..afc03351a0f0 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -52,7 +52,7 @@ SwIoDetect aFilterDetect[] =
SwIoDetect( FILTER_DOCX )
};
-const OUString SwIoSystem::GetSubStorageName( const SfxFilter& rFltr )
+OUString SwIoSystem::GetSubStorageName( const SfxFilter& rFltr )
{
// for StorageFilters also set the SubStorageName
const OUString& rUserData = rFltr.GetUserData();
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index b5d4897253ea..d8b215e48a95 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -529,7 +529,7 @@ sal_uInt32 WW8TableNodeInfo::getRow() const
return getInnerForDepth(mnDepth)->getRow();
}
-const WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getFirstInner() const
+WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getFirstInner() const
{
WW8TableNodeInfoInner::Pointer_t pResult;
@@ -539,7 +539,7 @@ const WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getFirstInner() const
return pResult;
}
-const WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getInnerForDepth(sal_uInt32 nDepth) const
+WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getInnerForDepth(sal_uInt32 nDepth) const
{
WW8TableNodeInfoInner::Pointer_t pResult;
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index e9504e650420..306313485f0b 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -203,8 +203,8 @@ public:
const SwNode * getNextNode() const { return mpNextNode;}
const Inners_t & getInners() const { return mInners;}
- const WW8TableNodeInfoInner::Pointer_t getFirstInner() const;
- const WW8TableNodeInfoInner::Pointer_t getInnerForDepth(sal_uInt32 nDepth) const;
+ WW8TableNodeInfoInner::Pointer_t getFirstInner() const;
+ WW8TableNodeInfoInner::Pointer_t getInnerForDepth(sal_uInt32 nDepth) const;
sal_uInt32 getCell() const;
sal_uInt32 getRow() const;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index dbcc97b426fb..db641e3dbfe8 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -636,7 +636,7 @@ const OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const
return pDlg->GetSaveFilter();
}
-const css::uno::Sequence< css::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const
+css::uno::Sequence< css::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const
{
return pDlg->GetSelection();
}
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 656de1e57e3e..e9f619132948 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -527,7 +527,7 @@ class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
DECL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl,SwMailMergeDlg)
virtual DBManagerOptions GetMergeType() override ;
virtual const OUString& GetSaveFilter() const override;
- virtual const css::uno::Sequence< css::uno::Any > GetSelection() const override ;
+ virtual css::uno::Sequence< css::uno::Any > GetSelection() const override ;
virtual css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const override;
virtual bool IsSaveSingleDoc() const override;
virtual bool IsGenerateFromDataBase() const override;
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 44ca78548510..316002aedf85 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -160,12 +160,11 @@ public:
SwMailMergeConfigItem_Impl();
virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
- const Sequence< OUString>
- GetAddressBlocks(bool bConvertToConfig = false) const;
+ Sequence< OUString> GetAddressBlocks(bool bConvertToConfig = false) const;
void SetAddressBlocks(
const Sequence< OUString>& rBlocks,
bool bConvertFromConfig = false);
- const uno::Sequence< OUString>
+ uno::Sequence< OUString>
GetGreetings(SwMailMergeConfigItem::Gender eType,
bool bConvertToConfig = false) const;
void SetGreetings(SwMailMergeConfigItem::Gender eType,
@@ -580,7 +579,7 @@ void SwMailMergeConfigItem_Impl::ImplCommit()
m_bUserSettingWereOverwritten = false;
}
-const Sequence< OUString> SwMailMergeConfigItem_Impl::GetAddressBlocks(
+Sequence< OUString> SwMailMergeConfigItem_Impl::GetAddressBlocks(
bool bConvertToConfig) const
{
Sequence< OUString> aRet(m_aAddressBlocks.size());
@@ -610,7 +609,7 @@ void SwMailMergeConfigItem_Impl::SetAddressBlocks(
SetModified();
}
-const Sequence< OUString> SwMailMergeConfigItem_Impl::GetGreetings(
+Sequence< OUString> SwMailMergeConfigItem_Impl::GetGreetings(
SwMailMergeConfigItem::Gender eType, bool bConvertToConfig) const
{
const std::vector< OUString>& rGreetings =
@@ -732,7 +731,7 @@ void SwMailMergeConfigItem::SetAddressBlocks(
m_pImpl->SetAddressBlocks(rBlocks);
}
-const Sequence< OUString> SwMailMergeConfigItem::GetAddressBlocks() const
+Sequence< OUString> SwMailMergeConfigItem::GetAddressBlocks() const
{
return m_pImpl->GetAddressBlocks();
}
@@ -1085,7 +1084,7 @@ void SwMailMergeConfigItem::SetGreetingLine(bool bSet, bool bInEMail)
}
}
-const Sequence< OUString> SwMailMergeConfigItem::GetGreetings(
+Sequence< OUString> SwMailMergeConfigItem::GetGreetings(
Gender eType ) const
{
return m_pImpl->GetGreetings(eType);
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index d32f1212c3d5..74c52d7ff03c 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -243,7 +243,7 @@ public:
bTopRightHandle = (pHdl->GetKind() == SdrHdlKind::Anchor_TR);
}
}
- const Point GetPosForHitTest( const OutputDevice& rOut )
+ Point GetPosForHitTest( const OutputDevice& rOut )
{
Point aHitTestPos( pHdl->GetPos() );
aHitTestPos = rOut.LogicToPixel( aHitTestPos );
diff --git a/sw/source/uibase/inc/mmconfigitem.hxx b/sw/source/uibase/inc/mmconfigitem.hxx
index 9b27e4092207..da02ec600e90 100644
--- a/sw/source/uibase/inc/mmconfigitem.hxx
+++ b/sw/source/uibase/inc/mmconfigitem.hxx
@@ -120,7 +120,7 @@ public:
bool IsHideEmptyParagraphs() const;
void SetHideEmptyParagraphs(bool bSet);
- const css::uno::Sequence<OUString> GetAddressBlocks() const;
+ css::uno::Sequence<OUString> GetAddressBlocks() const;
void SetAddressBlocks(const css::uno::Sequence< OUString>& rBlocks);
void SetCurrentAddressBlockIndex( sal_Int32 nSet );
@@ -136,7 +136,7 @@ public:
bool IsGreetingLine(bool bInEMail) const;
void SetGreetingLine(bool bSet, bool bInEMail);
- const css::uno::Sequence<OUString> GetGreetings(Gender eType) const;
+ css::uno::Sequence<OUString> GetGreetings(Gender eType) const;
void SetGreetings(Gender eType, const css::uno::Sequence< OUString>& rBlocks);
sal_Int32 GetCurrentGreeting(Gender eType) const;
diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx
index 98a444eb1aae..2dac3e6c7926 100644
--- a/sw/source/uibase/inc/swruler.hxx
+++ b/sw/source/uibase/inc/swruler.hxx
@@ -42,7 +42,7 @@ public:
* \param rRect ignored
*/
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
- const std::string CreateJsonNotification();
+ std::string CreateJsonNotification();
private:
SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 874ab6e81e1e..0597ee1761af 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -253,7 +253,7 @@ void SwCommentRuler::MouseButtonDown( const MouseEvent& rMEvt )
Invalidate();
}
-const std::string SwCommentRuler::CreateJsonNotification()
+std::string SwCommentRuler::CreateJsonNotification()
{
boost::property_tree::ptree jsonNotif;
@@ -268,8 +268,7 @@ const std::string SwCommentRuler::CreateJsonNotification()
std::stringstream aStream;
boost::property_tree::write_json(aStream, jsonNotif);
- std::string aPayload = aStream.str();
- return aPayload;
+ return aStream.str();
}
void SwCommentRuler::NotifyKit()
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 00914a59a89d..f6e389ee9ae7 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -79,7 +79,7 @@ namespace
return rPool.GetMetric( nWhich );
}
- const css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::uno::Reference< css::frame::XFrame >& rxFrame )
+ css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::uno::Reference< css::frame::XFrame >& rxFrame )
{
const css::uno::Reference< css::frame::XController >& xController = rxFrame->getController();
if ( xController.is() )
@@ -88,8 +88,7 @@ namespace
if ( xModel.is() )
{
const css::uno::Reference< css::document::XUndoManagerSupplier > xSuppUndo( xModel, css::uno::UNO_QUERY_THROW );
- const css::uno::Reference< css::document::XUndoManager > xUndoManager( xSuppUndo->getUndoManager(), css::uno::UNO_SET_THROW );
- return xUndoManager;
+ return css::uno::Reference< css::document::XUndoManager >( xSuppUndo->getUndoManager(), css::uno::UNO_SET_THROW );
}
}
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index 01a78c3e13f9..0d9844efef36 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -31,7 +31,7 @@
#include <cmdid.h>
namespace {
- const css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::uno::Reference< css::frame::XFrame >& rxFrame )
+ css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::uno::Reference< css::frame::XFrame >& rxFrame )
{
const css::uno::Reference< css::frame::XController >& xController = rxFrame->getController();
if ( xController.is() )
@@ -40,8 +40,7 @@ namespace {
if ( xModel.is() )
{
const css::uno::Reference< css::document::XUndoManagerSupplier > xSuppUndo( xModel, css::uno::UNO_QUERY_THROW );
- const css::uno::Reference< css::document::XUndoManager > xUndoManager( xSuppUndo->getUndoManager(), css::uno::UNO_SET_THROW );
- return xUndoManager;
+ return css::uno::Reference< css::document::XUndoManager >( xSuppUndo->getUndoManager(), css::uno::UNO_SET_THROW );
}
}