[Libreoffice-commits] core.git: 2 commits - basegfx/source comphelper/source include/comphelper include/sax sax/inc sax/source shell/source unoidl/source
Noel Grandin
noel.grandin at collabora.co.uk
Mon Jul 17 09:31:09 UTC 2017
basegfx/source/polygon/b2dpolygonclipper.cxx | 2
basegfx/source/polygon/b2dpolygontriangulator.cxx | 4 -
basegfx/source/polygon/b2dtrapezoid.cxx | 2
basegfx/source/range/b2drangeclipper.cxx | 34 +++++++-------
comphelper/source/misc/accessibletexthelper.cxx | 2
comphelper/source/misc/backupfilehelper.cxx | 12 ++--
comphelper/source/misc/storagehelper.cxx | 8 +--
include/comphelper/accessibletexthelper.hxx | 2
include/comphelper/storagehelper.hxx | 6 +-
include/sax/fastattribs.hxx | 2
sax/inc/xml2utf.hxx | 2
sax/source/fastparser/legacyfastparser.cxx | 4 -
sax/source/tools/fastattribs.cxx | 2
sax/source/tools/fastserializer.cxx | 6 +-
sax/source/tools/fastserializer.hxx | 6 +-
shell/source/unix/sysshell/recently_used_file_handler.cxx | 2
unoidl/source/sourcetreeprovider.cxx | 2
17 files changed, 49 insertions(+), 49 deletions(-)
New commits:
commit d5f94d931886a55ec3229e7b860d455037266622
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jul 17 10:10:41 2017 +0200
loplugin:constparams in basegfx,sax,shell
Change-Id: I90a9d105a6db146ae64cff56983def94b9472a95
Reviewed-on: https://gerrit.libreoffice.org/40043
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx
index 76b9bf7610fa..63d3ac8c2210 100644
--- a/basegfx/source/polygon/b2dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b2dpolygonclipper.cxx
@@ -555,7 +555,7 @@ namespace basegfx
sal_uInt32 scissorLineSegment( ::basegfx::B2DPoint *in_vertex, // input buffer
sal_uInt32 in_count, // number of verts in input buffer
::basegfx::B2DPoint *out_vertex, // output buffer
- scissor_plane *pPlane, // scissoring plane
+ scissor_plane const *pPlane, // scissoring plane
const ::basegfx::B2DRectangle &rR ) // clipping rectangle
{
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index 11ed7514c838..c446bea22a6c 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -114,7 +114,7 @@ namespace basegfx
B2DPolygon maResult;
void handleClosingEdge(const B2DPoint& rStart, const B2DPoint& rEnd);
- bool CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry* pEdgeB, const B2DPoint& rTestPoint);
+ bool CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry const * pEdgeB, const B2DPoint& rTestPoint);
void createTriangle(const B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC);
public:
@@ -178,7 +178,7 @@ namespace basegfx
}
}
- bool Triangulator::CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry* pEdgeB, const B2DPoint& rTestPoint)
+ bool Triangulator::CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry const * pEdgeB, const B2DPoint& rTestPoint)
{
// inside triangle or on edge?
if(tools::isPointInTriangle(pEdgeA->getStart(), pEdgeA->getEnd(), pEdgeB->getEnd(), rTestPoint, true))
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index e60bc1fb1ce8..c92a64a3a903 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -235,7 +235,7 @@ namespace basegfx
}
/// This is a very uncommon case but why not ...
- void freeIfLast(B2DPoint *pPoint)
+ void freeIfLast(B2DPoint const *pPoint)
{
// just re-use the last point if we can.
if ( nCurPoint > 0 && pPoint == mpPointBase + nCurPoint - 1 )
diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx
index 936e31823283..c4b8d83a1b71 100644
--- a/basegfx/source/range/b2drangeclipper.cxx
+++ b/basegfx/source/range/b2drangeclipper.cxx
@@ -278,11 +278,11 @@ namespace basegfx
processing must proceed with, when going through the
list of upcoming active edges).
*/
- std::ptrdiff_t intersect( SweepLineEvent& rEvent,
- ActiveEdge& rActiveEdge,
- VectorOfPolygons& rPolygonPool,
- B2DPolyPolygon& rRes,
- bool isFinishingEdge )
+ std::ptrdiff_t intersect( SweepLineEvent const & rEvent,
+ ActiveEdge& rActiveEdge,
+ VectorOfPolygons& rPolygonPool,
+ B2DPolyPolygon& rRes,
+ bool isFinishingEdge )
{
OSL_PRECOND( !mbIsFinished,
"ImplPolygon::intersect(): called on already finished polygon!" );
@@ -338,8 +338,8 @@ namespace basegfx
}
private:
- void handleInitialOwnEdge(SweepLineEvent& rEvent,
- ActiveEdge& rActiveEdge)
+ void handleInitialOwnEdge(SweepLineEvent const & rEvent,
+ ActiveEdge& rActiveEdge)
{
const bool isActiveEdgeProceedLeft(
rActiveEdge.getEdgeDirection() == ActiveEdge::PROCEED_LEFT);
@@ -363,9 +363,9 @@ namespace basegfx
mpLeadingRightEdge = &rActiveEdge;
}
- void handleFinalOwnLeftEdge(ActiveEdge& rActiveEdge,
- VectorOfPolygons& rPolygonPool,
- B2DPolyPolygon& rRes)
+ void handleFinalOwnLeftEdge(ActiveEdge const & rActiveEdge,
+ VectorOfPolygons& rPolygonPool,
+ B2DPolyPolygon& rRes)
{
OSL_ENSURE( rActiveEdge.getEdgeDirection() == ActiveEdge::PROCEED_LEFT,
"ImplPolygon::handleFinalOwnLeftEdge(): end edge wrong polygon order" );
@@ -465,8 +465,8 @@ namespace basegfx
}
/// True when sweep line hits our own active edge
- static bool metOwnEdge(const SweepLineEvent& rEvent,
- ActiveEdge& rActiveEdge)
+ static bool metOwnEdge(SweepLineEvent const & rEvent,
+ ActiveEdge const & rActiveEdge)
{
const bool bHitOwnEdge=&rEvent.getRect() == &rActiveEdge.getRect();
return bHitOwnEdge;
@@ -604,9 +604,9 @@ namespace basegfx
@param rCurrEvent
The actual event that caused this call
*/
- void createActiveEdgesFromStartEvent( ListOfEdges& io_rEdgeList,
- VectorOfPolygons& io_rPolygonPool,
- SweepLineEvent& rCurrEvent )
+ void createActiveEdgesFromStartEvent( ListOfEdges & io_rEdgeList,
+ VectorOfPolygons & io_rPolygonPool,
+ SweepLineEvent const & rCurrEvent )
{
ListOfEdges aNewEdges;
const B2DRectangle& rRect=rCurrEvent.getRect();
@@ -686,8 +686,8 @@ namespace basegfx
aNewEdges );
}
- inline bool isSameRect(ActiveEdge& rEdge,
- const basegfx::B2DRange& rRect)
+ inline bool isSameRect(ActiveEdge const & rEdge,
+ basegfx::B2DRange const & rRect)
{
return &rEdge.getRect() == &rRect;
}
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 4147ac978f44..a7b34dd36dff 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -66,7 +66,7 @@ class SAX_DLLPUBLIC FastTokenHandlerBase
*/
static sal_Int32 getTokenFromChars(
const css::uno::Reference<css::xml::sax::XFastTokenHandler > &xTokenHandler,
- FastTokenHandlerBase *pTokenHandler /* can be NULL */,
+ const FastTokenHandlerBase *pTokenHandler /* can be NULL */,
const char *pStr, size_t nLength );
};
diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx
index 18b238844220..44e4b461293e 100644
--- a/sax/inc/xml2utf.hxx
+++ b/sax/inc/xml2utf.hxx
@@ -80,7 +80,7 @@ public:
~XMLFile2UTFConverter();
- void setInputStream( css::uno::Reference< css::io::XInputStream > &r ) { m_in = r; }
+ void setInputStream( css::uno::Reference< css::io::XInputStream > const &r ) { m_in = r; }
void setEncoding( const OString &s ) { m_sEncoding = s; }
diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx
index 81e394b4f907..f7b41fea8817 100644
--- a/sax/source/fastparser/legacyfastparser.cxx
+++ b/sax/source/fastparser/legacyfastparser.cxx
@@ -56,7 +56,7 @@ private:
public:
NamespaceHandler();
- void addNSDeclAttributes( rtl::Reference < comphelper::AttributeList >& rAttrList );
+ void addNSDeclAttributes( rtl::Reference < comphelper::AttributeList > const & rAttrList );
//XFastNamespaceHandler
virtual void SAL_CALL registerNamespace( const OUString& rNamespacePrefix, const OUString& rNamespaceURI ) override;
@@ -67,7 +67,7 @@ NamespaceHandler::NamespaceHandler()
{
}
-void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::AttributeList >& rAttrList )
+void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::AttributeList > const & rAttrList )
{
for(const auto& aNamespaceDefine : m_aNamespaceDefines)
{
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index 564f71d27b81..314f156e8dfe 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -240,7 +240,7 @@ const FastAttributeList::FastAttributeIter FastAttributeList::find( sal_Int32 nT
sal_Int32 FastTokenHandlerBase::getTokenFromChars(
const css::uno::Reference< css::xml::sax::XFastTokenHandler > &xTokenHandler,
- FastTokenHandlerBase *pTokenHandler,
+ const FastTokenHandlerBase *pTokenHandler,
const char *pToken, size_t nLen /* = 0 */ )
{
sal_Int32 nRet;
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 0642cbaac391..7c1e3c77c027 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -296,7 +296,7 @@ namespace sax_fastparser {
}
#endif
- void FastSaxSerializer::startFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList )
+ void FastSaxSerializer::startFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList )
{
if ( !mbMarkStackEmpty )
{
@@ -358,7 +358,7 @@ namespace sax_fastparser {
writeBytes(sClosingBracket, N_CHARS(sClosingBracket));
}
- void FastSaxSerializer::singleFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList )
+ void FastSaxSerializer::singleFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList )
{
if ( !mbMarkStackEmpty )
{
@@ -410,7 +410,7 @@ namespace sax_fastparser {
maTokenValues.clear();
}
- void FastSaxSerializer::writeFastAttributeList(FastAttributeList& rAttrList)
+ void FastSaxSerializer::writeFastAttributeList(FastAttributeList const & rAttrList)
{
#ifdef DBG_UTIL
::std::set<OString> DebugAttributes;
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx
index ca8b67472520..e2a4b4daccdc 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -80,7 +80,7 @@ public:
from the element.
*/
- void startFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = nullptr );
+ void startFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList = nullptr );
/** receives notification of the end of an known element.
@see startFastElement
@@ -104,7 +104,7 @@ public:
from the element.
*/
- void singleFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = nullptr );
+ void singleFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList = nullptr );
// C++ helpers
void writeId( ::sal_Int32 Element );
@@ -237,7 +237,7 @@ private:
#endif
void writeTokenValueList();
- void writeFastAttributeList(FastAttributeList& rAttrList);
+ void writeFastAttributeList(FastAttributeList const & rAttrList);
/** Forward the call to the output stream, or write to the stack.
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index e9686512d079..029880e1398e 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -272,7 +272,7 @@ namespace /* private */ {
void read_recently_used_items(
- recently_used_file& file,
+ recently_used_file const & file,
recently_used_item_list_t& item_list)
{
xml_parser xparser;
commit ff8e463ab486ae863ab3a86ce957f01ed7f8af90
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jul 17 09:53:41 2017 +0200
loplugin:constparams in comphelper,unoidl
Change-Id: I411d431bd6620c594c5dafd42af6c2a8ac285f3f
Reviewed-on: https://gerrit.libreoffice.org/40042
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx
index 279cb995e238..1dcf2f669eeb 100644
--- a/comphelper/source/misc/accessibletexthelper.cxx
+++ b/comphelper/source/misc/accessibletexthelper.cxx
@@ -78,7 +78,7 @@ namespace comphelper
}
- bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary& rBoundary, sal_Int32 nLength )
+ bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary const & rBoundary, sal_Int32 nLength )
{
return ( rBoundary.startPos >= 0 ) && ( rBoundary.startPos < nLength ) && ( rBoundary.endPos >= 0 ) && ( rBoundary.endPos <= nLength );
}
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index 8d64ee3a3ca9..7f09fb4ef579 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -71,7 +71,7 @@ namespace
return aRetval;
}
- sal_uInt32 createCrc32(FileSharedPtr& rCandidate, sal_uInt32 nOffset)
+ sal_uInt32 createCrc32(FileSharedPtr const & rCandidate, sal_uInt32 nOffset)
{
sal_uInt32 nCrc32(0);
@@ -112,7 +112,7 @@ namespace
return nCrc32;
}
- bool read_sal_uInt32(FileSharedPtr& rFile, sal_uInt32& rTarget)
+ bool read_sal_uInt32(FileSharedPtr const & rFile, sal_uInt32& rTarget)
{
sal_uInt8 aArray[4];
sal_uInt64 nBaseRead(0);
@@ -141,7 +141,7 @@ namespace
return osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(aArray), 4, &nBaseWritten) && 4 == nBaseWritten;
}
- bool read_OString(FileSharedPtr& rFile, OString& rTarget)
+ bool read_OString(FileSharedPtr const & rFile, OString& rTarget)
{
sal_uInt32 nLength(0);
@@ -474,7 +474,7 @@ namespace
}
}
- bool read_entry(FileSharedPtr& rFile)
+ bool read_entry(FileSharedPtr const & rFile)
{
// read maName
if (!read_OString(rFile, maName))
@@ -892,7 +892,7 @@ namespace
}
}
- bool read_entries(FileSharedPtr& rFile)
+ bool read_entries(FileSharedPtr const & rFile)
{
// read NumExtensionEntries
sal_uInt32 nExtEntries(0);
@@ -1249,7 +1249,7 @@ namespace
return mnCrc32;
}
- bool read_header(FileSharedPtr& rFile)
+ bool read_header(FileSharedPtr const & rFile)
{
if (!rFile)
{
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 7a1498891511..c4cc8178e298 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -495,7 +495,7 @@ static void splitPath( std::vector<OUString> &rElems,
static uno::Reference< embed::XStorage > LookupStorageAtPath(
const uno::Reference< embed::XStorage > &xParentStorage,
std::vector<OUString> &rElems, sal_uInt32 nOpenMode,
- LifecycleProxy &rNastiness )
+ LifecycleProxy const &rNastiness )
{
uno::Reference< embed::XStorage > xStorage( xParentStorage );
rNastiness.m_xBadness->push_back( xStorage );
@@ -510,7 +510,7 @@ static uno::Reference< embed::XStorage > LookupStorageAtPath(
uno::Reference< embed::XStorage > OStorageHelper::GetStorageAtPath(
const uno::Reference< embed::XStorage > &xStorage,
const OUString& rPath, sal_uInt32 nOpenMode,
- LifecycleProxy &rNastiness )
+ LifecycleProxy const &rNastiness )
{
std::vector<OUString> aElems;
splitPath( aElems, rPath );
@@ -520,7 +520,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageAtPath(
uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath(
const uno::Reference< embed::XStorage > &xParentStorage,
const OUString& rPath, sal_uInt32 nOpenMode,
- LifecycleProxy &rNastiness )
+ LifecycleProxy const &rNastiness )
{
std::vector<OUString> aElems;
splitPath( aElems, rPath );
@@ -536,7 +536,7 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath(
uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL(
uno::Reference< embed::XStorage > const& xParentStorage,
const OUString& rURL, sal_uInt32 const nOpenMode,
- LifecycleProxy & rNastiness)
+ LifecycleProxy const & rNastiness)
{
OUString path;
if (rURL.startsWithIgnoreAsciiCase("vnd.sun.star.Package:", &path))
diff --git a/include/comphelper/accessibletexthelper.hxx b/include/comphelper/accessibletexthelper.hxx
index 3b633716c2b3..5a9b07e0d7d1 100644
--- a/include/comphelper/accessibletexthelper.hxx
+++ b/include/comphelper/accessibletexthelper.hxx
@@ -50,7 +50,7 @@ namespace comphelper
css::uno::Reference < css::i18n::XBreakIterator > const & implGetBreakIterator();
css::uno::Reference < css::i18n::XCharacterClassification > const & implGetCharacterClassification();
- static bool implIsValidBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nLength );
+ static bool implIsValidBoundary( css::i18n::Boundary const & rBoundary, sal_Int32 nLength );
static bool implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength );
static bool implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength );
virtual OUString implGetText() = 0;
diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx
index 18b12178eb29..84c958fb1f23 100644
--- a/include/comphelper/storagehelper.hxx
+++ b/include/comphelper/storagehelper.hxx
@@ -181,14 +181,14 @@ public:
static css::uno::Reference< css::embed::XStorage > GetStorageAtPath(
const css::uno::Reference< css::embed::XStorage > &xStorage,
- const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy &rNastiness );
+ const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy const &rNastiness );
static css::uno::Reference< css::io::XStream > GetStreamAtPath(
const css::uno::Reference< css::embed::XStorage > &xStorage,
- const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy &rNastiness );
+ const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy const &rNastiness );
static css::uno::Reference< css::io::XStream > GetStreamAtPackageURL(
const css::uno::Reference< css::embed::XStorage > &xStorage,
const OUString& rURL, sal_uInt32 const nOpenMode,
- LifecycleProxy & rNastiness );
+ LifecycleProxy const & rNastiness );
};
}
diff --git a/unoidl/source/sourcetreeprovider.cxx b/unoidl/source/sourcetreeprovider.cxx
index 84a43e26284c..55dd2ac68d98 100644
--- a/unoidl/source/sourcetreeprovider.cxx
+++ b/unoidl/source/sourcetreeprovider.cxx
@@ -38,7 +38,7 @@ namespace {
//TODO: Bad hack to work around osl::FileStatus::getFileName not determining the
// original spelling of a file name (not even with
// osl_FileStatus_Mask_Validate):
-OUString getFileName(OUString const & uri, osl::FileStatus & status) {
+OUString getFileName(OUString const & uri, osl::FileStatus const & status) {
#if defined MACOSX
sal_Int32 i = uri.lastIndexOf('/') + 1;
OUString path;
More information about the Libreoffice-commits
mailing list