From 7183b3ba237dc7718501acb512d5ae1c5d0d5f6b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 Sep 2021 15:28:38 +0200 Subject: loplugin:constmethod handle more cases remove some of the naming limitations, and handle pointer parameters better. I only let the plugin run up till vcl/ Change-Id: Ice916e0157031ab531c47f10778f406b07966251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/unx/generic/dtrans/bmp.cxx | 2 +- vcl/unx/generic/dtrans/bmp.hxx | 2 +- vcl/unx/generic/print/printerjob.cxx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl/unx/generic') diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index 87328c8712f0..ac8e50cc2e29 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -619,7 +619,7 @@ void PixmapHolder::setBitmapDataTC( const sal_uInt8* pData, XImage* pImage ) } } -bool PixmapHolder::needsConversion( const sal_uInt8* pData ) +bool PixmapHolder::needsConversion( const sal_uInt8* pData ) const { if( pData[0] != 'B' || pData[1] != 'M' ) return true; diff --git a/vcl/unx/generic/dtrans/bmp.hxx b/vcl/unx/generic/dtrans/bmp.hxx index 0f7de01fe7ef..3a37158db36f 100644 --- a/vcl/unx/generic/dtrans/bmp.hxx +++ b/vcl/unx/generic/dtrans/bmp.hxx @@ -58,7 +58,7 @@ public: // accepts bitmap file (including bitmap file header) Pixmap setBitmapData( const sal_uInt8* pData ); - bool needsConversion( const sal_uInt8* pData ); + bool needsConversion( const sal_uInt8* pData ) const; Colormap getColormap() const { return m_aColormap; } Pixmap getPixmap() const { return m_aPixmap; } diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 1ce42b6e0d40..f0ca4ebb002a 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -79,7 +79,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer) */ std::unique_ptr -PrinterJob::CreateSpoolFile (std::u16string_view rName, std::u16string_view rExtension) +PrinterJob::CreateSpoolFile (std::u16string_view rName, std::u16string_view rExtension) const { OUString aFile = OUString::Concat(rName) + rExtension; OUString aFileURL; @@ -670,7 +670,7 @@ static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue* || nWritten != static_cast(aFeature.getLength())); } -bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup ) +bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup ) const { bool bSuccess = true; -- cgit