summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-30 20:44:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-01 20:57:56 +0200
commite512b53ef8ae7945131876d32121fdbbdeb1de35 (patch)
treee1b3d828d3d44c2c87b2c795fb6c43cdd0d79f2e
parent397eb9155a4b3399e78374fc8561de29b3d2cee6 (diff)
loplugin:constparams
Change-Id: I0d1ad95a9944c9077a1b9db11f2ae05f993c2b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx2
-rw-r--r--compilerplugins/clang/constparams.cxx5
-rw-r--r--sd/source/ui/inc/View.hxx2
-rw-r--r--sd/source/ui/view/sdview3.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx20
-rw-r--r--sw/source/uibase/inc/navicont.hxx2
-rw-r--r--sw/source/uibase/inc/navipi.hxx2
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx20
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
-rw-r--r--vcl/source/bitmap/impvect.cxx4
11 files changed, 33 insertions, 30 deletions
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index f181fe30669b..5cbf9ad3bc28 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -55,7 +55,7 @@ namespace vclcanvas
namespace
{
bool textureFill( OutputDevice& rOutDev,
- GraphicObject& rGraphic,
+ const GraphicObject& rGraphic,
const ::Point& rPosPixel,
const ::Size& rNextTileX,
const ::Size& rNextTileY,
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
index 17cd941f8f22..b7c13750eb5b 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -60,8 +60,11 @@ public:
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/pyuno/source/module/pyuno_struct.cxx")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/pyuno/source/module/pyuno.cxx")
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/sw/source/filter/ascii/ascatr.cxx")
- // TODO this plugin doesn't handle it well when we take the address of a poiner
+ // TODO this plugin doesn't handle it well when we take the address of a pointer
|| loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/misc/sharedstringpool.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/registry/source/regkey.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/cppu/source/uno/lbenv.cxx")
+ || loplugin::hasPathnamePrefix(fn, SRCDIR "/cppuhelper/source/implbase_ex.cxx")
)
return;
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 693e596d1084..744023acb573 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -158,7 +158,7 @@ public:
@param bOptimize if set to true, the metafile is analyzed and if only one bitmap action is
present, then is inserted as a single graphic.
*/
- bool InsertMetaFile( TransferableDataHelper& rDataHelper,
+ bool InsertMetaFile( const TransferableDataHelper& rDataHelper,
const Point& rInsertPos,
ImageMap const * pImageMap, bool bOptimize );
SdrGrafObj* InsertGraphic( const Graphic& rGraphic,
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 008dbc8eeb51..5008c8d8ddd4 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -138,7 +138,7 @@ static void ImpCheckInsertPos(Point& rPos, const Size& rSize, const ::tools::Rec
}
}
-bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPos, ImageMap const * pImageMap, bool bOptimize )
+bool View::InsertMetaFile( const TransferableDataHelper& rDataHelper, const Point& rPos, ImageMap const * pImageMap, bool bOptimize )
{
GDIMetaFile aMtf;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 913c94135acd..17b7e37df224 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2099,7 +2099,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh )
return nRet;
}
-bool SwTransferable::PasteFileContent( TransferableDataHelper& rData,
+bool SwTransferable::PasteFileContent( const TransferableDataHelper& rData,
SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg, bool bIgnoreComments )
{
TranslateId pResId = STR_CLPBRD_FORMAT_ERROR;
@@ -2441,7 +2441,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
return bRet;
}
-bool SwTransferable::PasteTargetURL( TransferableDataHelper& rData,
+bool SwTransferable::PasteTargetURL( const TransferableDataHelper& rData,
SwWrtShell& rSh, SwPasteSdr nAction,
const Point* pPt, bool bInsertGRF )
{
@@ -2558,7 +2558,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, bool bSelectFrame,
}
}
-bool SwTransferable::PasteDDE( TransferableDataHelper& rData,
+bool SwTransferable::PasteDDE( const TransferableDataHelper& rData,
SwWrtShell& rWrtShell, bool bReReadGrf,
bool bMsg )
{
@@ -2729,7 +2729,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData,
return true;
}
-bool SwTransferable::PasteSdrFormat( TransferableDataHelper& rData,
+bool SwTransferable::PasteSdrFormat( const TransferableDataHelper& rData,
SwWrtShell& rSh, SwPasteSdr nAction,
const Point* pPt, SotExchangeActionFlags nActionFlags, bool bNeedToSelectBeforePaste)
{
@@ -2755,7 +2755,7 @@ bool SwTransferable::PasteSdrFormat( TransferableDataHelper& rData,
return bRet;
}
-bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
+bool SwTransferable::PasteGrf( const TransferableDataHelper& rData, SwWrtShell& rSh,
SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt,
SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, RndStdIds nAnchorType )
{
@@ -2994,7 +2994,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
return bRet;
}
-bool SwTransferable::PasteImageMap( TransferableDataHelper& rData,
+bool SwTransferable::PasteImageMap( const TransferableDataHelper& rData,
SwWrtShell& rSh )
{
bool bRet = false;
@@ -3019,7 +3019,7 @@ bool SwTransferable::PasteImageMap( TransferableDataHelper& rData,
return bRet;
}
-bool SwTransferable::PasteAsHyperlink( TransferableDataHelper& rData,
+bool SwTransferable::PasteAsHyperlink( const TransferableDataHelper& rData,
SwWrtShell& rSh, SotClipboardFormatId nFormat )
{
bool bRet = false;
@@ -3164,7 +3164,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
return bRet;
}
-bool SwTransferable::PasteDBData( TransferableDataHelper& rData,
+bool SwTransferable::PasteDBData( const TransferableDataHelper& rData,
SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bLink,
const Point* pDragPt, bool bMsg )
{
@@ -3264,7 +3264,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData,
return bRet;
}
-bool SwTransferable::PasteFileList( TransferableDataHelper& rData,
+bool SwTransferable::PasteFileList( const TransferableDataHelper& rData,
SwWrtShell& rSh, bool bLink,
const Point* pPt, bool bMsg )
{
@@ -3306,7 +3306,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData,
return bRet;
}
-bool SwTransferable::CheckForURLOrLNKFile( TransferableDataHelper& rData,
+bool SwTransferable::CheckForURLOrLNKFile( const TransferableDataHelper& rData,
OUString& rFileName, OUString* pTitle )
{
bool bIsURLFile = false;
diff --git a/sw/source/uibase/inc/navicont.hxx b/sw/source/uibase/inc/navicont.hxx
index df831f872915..79ff0ceb4888 100644
--- a/sw/source/uibase/inc/navicont.hxx
+++ b/sw/source/uibase/inc/navicont.hxx
@@ -48,7 +48,7 @@ public:
const OUString& GetDescription() const { return aDescr; }
RegionMode GetDefaultDragType() const { return nDefDrag; }
void Copy( TransferDataContainer& rData ) const;
- bool Paste( TransferableDataHelper& rData );
+ bool Paste( const TransferableDataHelper& rData );
};
#endif
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 85eacaf826e5..670ac5fff068 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -141,7 +141,7 @@ public:
virtual void GetControlState(const sal_uInt16 /*nSId*/,
boost::property_tree::ptree& /*rState*/) override {};
- static OUString CreateDropFileName( TransferableDataHelper& rData );
+ static OUString CreateDropFileName( const TransferableDataHelper& rData );
static OUString CleanEntry(const OUString& rEntry);
RegionMode GetRegionDropMode() const {return m_nRegionMode;}
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index 5c58acf2a572..ce3cfa271253 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -104,44 +104,44 @@ class SW_DLLPUBLIC SwTransferable final : public TransferableHelper
// helper methods for the paste
static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
static void SetSelInShell( SwWrtShell& , bool , const Point* );
- static bool CheckForURLOrLNKFile( TransferableDataHelper& rData,
+ static bool CheckForURLOrLNKFile( const TransferableDataHelper& rData,
OUString& rFileName, OUString* pTitle = nullptr );
static bool TestAllowedFormat( const TransferableDataHelper& rData,
SotClipboardFormatId nFormat, SotExchangeDest nDestination );
- static bool PasteFileContent( TransferableDataHelper&,
+ static bool PasteFileContent( const TransferableDataHelper&,
SwWrtShell& rSh, SotClipboardFormatId nFormat, bool bMsg, bool bIgnoreComments = false );
static bool PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
SotClipboardFormatId nFormat, SotExchangeActionFlags nActionFlags, bool bMsg );
- static bool PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh,
+ static bool PasteTargetURL( const TransferableDataHelper& rData, SwWrtShell& rSh,
SwPasteSdr nAction, const Point* pPt, bool bInsertGRF );
- static bool PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell,
+ static bool PasteDDE( const TransferableDataHelper& rData, SwWrtShell& rWrtShell,
bool bReReadGrf, bool bMsg );
- static bool PasteSdrFormat( TransferableDataHelper& rData,
+ static bool PasteSdrFormat( const TransferableDataHelper& rData,
SwWrtShell& rSh, SwPasteSdr nAction,
const Point* pPt, SotExchangeActionFlags nActionFlags, bool bNeedToSelectBeforePaste);
- static bool PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
+ static bool PasteGrf( const TransferableDataHelper& rData, SwWrtShell& rSh,
SotClipboardFormatId nFormat, SwPasteSdr nAction, const Point* pPt,
SotExchangeActionFlags nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste, RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA );
- static bool PasteImageMap( TransferableDataHelper& rData,
+ static bool PasteImageMap( const TransferableDataHelper& rData,
SwWrtShell& rSh );
- static bool PasteAsHyperlink( TransferableDataHelper& rData,
+ static bool PasteAsHyperlink( const TransferableDataHelper& rData,
SwWrtShell& rSh, SotClipboardFormatId nFormat );
static bool PasteFileName( TransferableDataHelper& rData,
SwWrtShell& rSh, SotClipboardFormatId nFormat, SwPasteSdr nAction,
const Point* pPt, SotExchangeActionFlags nActionFlags, bool * graphicInserted );
- static bool PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh,
+ static bool PasteDBData( const TransferableDataHelper& rData, SwWrtShell& rSh,
SotClipboardFormatId nFormat, bool bLink, const Point* pDragPt,
bool bMsg );
- static bool PasteFileList( TransferableDataHelper& rData,
+ static bool PasteFileList( const TransferableDataHelper& rData,
SwWrtShell& rSh, bool bLink,
const Point* pPt, bool bMsg );
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 6e944bb11669..49bfdafe0219 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -4841,7 +4841,7 @@ void NaviContentBookmark::Copy( TransferDataContainer& rData ) const
rData.CopyByteString(SotClipboardFormatId::SONLK, sStrBuf);
}
-bool NaviContentBookmark::Paste( TransferableDataHelper& rData )
+bool NaviContentBookmark::Paste( const TransferableDataHelper& rData )
{
OUString sStr;
bool bRet = rData.GetString( SotClipboardFormatId::SONLK, sStr );
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 7124c3a6b7d9..7510e7bb65d8 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -879,7 +879,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem const *, pItem, void)
}
}
-OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
+OUString SwNavigationPI::CreateDropFileName( const TransferableDataHelper& rData )
{
OUString sFileName;
SotClipboardFormatId nFormat;
diff --git a/vcl/source/bitmap/impvect.cxx b/vcl/source/bitmap/impvect.cxx
index 1d320a2648c2..75d96aa79fc0 100644
--- a/vcl/source/bitmap/impvect.cxx
+++ b/vcl/source/bitmap/impvect.cxx
@@ -64,7 +64,7 @@ class ImplChain;
namespace ImplVectorizer
{
- static void ImplExpand( std::optional<ImplVectMap>& rMap, BitmapReadAccess* pRAcc, const Color& rColor );
+ static void ImplExpand( std::optional<ImplVectMap>& rMap, const BitmapReadAccess* pRAcc, const Color& rColor );
static void ImplCalculate( ImplVectMap& rMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce );
static bool ImplGetChain( ImplVectMap& rMap, const Point& rStartPt, ImplChain& rChain );
static bool ImplIsUp( ImplVectMap const & rMap, tools::Long nY, tools::Long nX );
@@ -778,7 +778,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
rPolyPoly = aNewPolyPoly;
}
-void ImplExpand( std::optional<ImplVectMap>& oMap, BitmapReadAccess* pRAcc, const Color& rColor )
+void ImplExpand( std::optional<ImplVectMap>& oMap, const BitmapReadAccess* pRAcc, const Color& rColor )
{
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{