diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 18:31:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 21:18:29 +0200 |
commit | 18f202011661397d10ca4c2fa28fcf57b62221b0 (patch) | |
tree | 5a867f5bee6205e13172bb5c61315552d5dc9870 /vcl | |
parent | 2e74c1107bc8422ee7a819722f3f0a366127330f (diff) |
loplugin:constparams
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/backendtest/GraphicsRenderTests.cxx | 2 | ||||
-rw-r--r-- | vcl/backendtest/outputdevice/common.cxx | 2 | ||||
-rw-r--r-- | vcl/inc/filter/BmpWriter.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/filter/EpsWriter.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/filter/GifWriter.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/filter/TiffWriter.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/impgraph.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/test/outputdevice.hxx | 2 | ||||
-rw-r--r-- | vcl/source/bitmap/bitmap.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/bmp/BmpWriter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/egif/egif.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/eps/eps.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/etiff/etiff.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 109 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/wall.cxx | 2 | ||||
-rw-r--r-- | vcl/source/treelist/iconview.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 6 |
22 files changed, 86 insertions, 85 deletions
diff --git a/vcl/backendtest/GraphicsRenderTests.cxx b/vcl/backendtest/GraphicsRenderTests.cxx index ad690720bb7a..1ffc8d835cd6 100644 --- a/vcl/backendtest/GraphicsRenderTests.cxx +++ b/vcl/backendtest/GraphicsRenderTests.cxx @@ -25,7 +25,7 @@ namespace { -void exportBitmapExToImage(OUString const& rImageName, BitmapEx& rBitmapEx) +void exportBitmapExToImage(OUString const& rImageName, const BitmapEx& rBitmapEx) { BitmapEx aBitmapEx(rBitmapEx); aBitmapEx.Scale(Size(500, 500), BmpScaleFlag::Fast); diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx index 065919f5b1c5..ccf78b1c2df2 100644 --- a/vcl/backendtest/outputdevice/common.cxx +++ b/vcl/backendtest/outputdevice/common.cxx @@ -617,7 +617,7 @@ basegfx::B2DPolygon OutputDeviceTestCommon::createHalfEllipsePolygon() return aPolygon; } -tools::Polygon OutputDeviceTestCommon::createClosedBezierLoop(tools::Rectangle& rRect) +tools::Polygon OutputDeviceTestCommon::createClosedBezierLoop(const tools::Rectangle& rRect) { tools::Long minX = rRect.Left(); tools::Long maxX = rRect.Right() - 2; diff --git a/vcl/inc/filter/BmpWriter.hxx b/vcl/inc/filter/BmpWriter.hxx index cc9f2a3547dd..745aeb6b695c 100644 --- a/vcl/inc/filter/BmpWriter.hxx +++ b/vcl/inc/filter/BmpWriter.hxx @@ -23,7 +23,7 @@ #include <vcl/graph.hxx> #include <vcl/FilterConfigItem.hxx> -VCL_DLLPUBLIC bool BmpWriter(SvStream& rStream, Graphic& rGraphic, +VCL_DLLPUBLIC bool BmpWriter(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/filter/EpsWriter.hxx b/vcl/inc/filter/EpsWriter.hxx index 8cb002a57c66..104b5ff6bf61 100644 --- a/vcl/inc/filter/EpsWriter.hxx +++ b/vcl/inc/filter/EpsWriter.hxx @@ -22,7 +22,7 @@ #include <vcl/graph.hxx> #include <vcl/FilterConfigItem.hxx> -VCL_DLLPUBLIC bool ExportEpsGraphic(SvStream& rStream, Graphic& rGraphic, +VCL_DLLPUBLIC bool ExportEpsGraphic(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/filter/GifWriter.hxx b/vcl/inc/filter/GifWriter.hxx index 6512c4bf6f2f..1b67039f7e71 100644 --- a/vcl/inc/filter/GifWriter.hxx +++ b/vcl/inc/filter/GifWriter.hxx @@ -22,7 +22,7 @@ #include <vcl/graph.hxx> #include <vcl/FilterConfigItem.hxx> -VCL_DLLPUBLIC bool ExportGifGraphic(SvStream& rStream, Graphic& rGraphic, +VCL_DLLPUBLIC bool ExportGifGraphic(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/filter/TiffWriter.hxx b/vcl/inc/filter/TiffWriter.hxx index a2219a687915..71bad2554f19 100644 --- a/vcl/inc/filter/TiffWriter.hxx +++ b/vcl/inc/filter/TiffWriter.hxx @@ -22,7 +22,7 @@ #include <vcl/graph.hxx> #include <vcl/FilterConfigItem.hxx> -VCL_DLLPUBLIC bool ExportTiffGraphicImport(SvStream& rStream, Graphic& rGraphic, - FilterConfigItem* pFilterConfigItem); +VCL_DLLPUBLIC bool ExportTiffGraphicImport(SvStream& rStream, const Graphic& rGraphic, + const FilterConfigItem* pFilterConfigItem); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index b7697dbb7b9e..81db551e4f49 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -218,7 +218,7 @@ public: bool isSwappedOut() const { return mbSwapOut; } OUString getSwapFileURL() const; // public only because of use in GraphicFilter - void updateFromLoadedGraphic(ImpGraphic* graphic); + void updateFromLoadedGraphic(const ImpGraphic* graphic); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx index cf10ce04b527..eceb3dd8f81e 100644 --- a/vcl/inc/test/outputdevice.hxx +++ b/vcl/inc/test/outputdevice.hxx @@ -69,7 +69,7 @@ public: static tools::Polygon createDropShapePolygon(); static basegfx::B2DPolygon createHalfEllipsePolygon(); - static tools::Polygon createClosedBezierLoop(tools::Rectangle& rRect); + static tools::Polygon createClosedBezierLoop(const tools::Rectangle& rRect); static void createHorizontalVerticalDiagonalLinePoints(tools::Rectangle rRect, Point& rHorizontalLinePoint1, Point& rHorizontalLinePoint2, diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index 1c50d35e649b..e688296aa606 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -1532,7 +1532,7 @@ static tools::Long* shiftColor(tools::Long* pColorArray, BitmapColor const& rCol *pColorArray++ = static_cast<tools::Long>(rColor.GetRed()) << 12; return pColorArray; } -static BitmapColor getColor(BitmapReadAccess *pReadAcc, tools::Long nZ) +static BitmapColor getColor(const BitmapReadAccess *pReadAcc, tools::Long nZ) { Scanline pScanlineRead = pReadAcc->GetScanline(0); if (pReadAcc->HasPalette()) diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 9cd3b545d841..7fef46a9e469 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -603,7 +603,7 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle Edit::Paint(rRenderContext, rRect); } -void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tools::Rectangle& rDDArea, +void SpinField::ImplCalcButtonAreas(const OutputDevice* pDev, const Size& rOutSz, tools::Rectangle& rDDArea, tools::Rectangle& rSpinUpArea, tools::Rectangle& rSpinDownArea) { const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); diff --git a/vcl/source/filter/bmp/BmpWriter.cxx b/vcl/source/filter/bmp/BmpWriter.cxx index e061124b89f3..a5fcedec231a 100644 --- a/vcl/source/filter/bmp/BmpWriter.cxx +++ b/vcl/source/filter/bmp/BmpWriter.cxx @@ -20,7 +20,7 @@ #include <filter/BmpWriter.hxx> #include <vcl/dibtools.hxx> -bool BmpWriter(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem) +bool BmpWriter(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem) { BitmapEx aBitmap = rGraphic.GetBitmapEx(); sal_Int32 nColor = pFilterConfigItem->ReadInt32("Color", 0); diff --git a/vcl/source/filter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx index 660ebf95333c..699b7f05d5a4 100644 --- a/vcl/source/filter/egif/egif.cxx +++ b/vcl/source/filter/egif/egif.cxx @@ -540,7 +540,7 @@ void GIFWriter::WriteTerminator() } -bool ExportGifGraphic(SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem) +bool ExportGifGraphic(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pConfigItem) { GIFWriter aWriter(rStream); return aWriter.WriteGIF(rGraphic, pConfigItem); diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx index 2da28338c97c..225857d88c0c 100644 --- a/vcl/source/filter/eps/eps.cxx +++ b/vcl/source/filter/eps/eps.cxx @@ -2662,7 +2662,7 @@ bool PSWriter::ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uInt32 //================== GraphicExport - the exported function =================== -bool ExportEpsGraphic(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem) +bool ExportEpsGraphic(SvStream & rStream, const Graphic & rGraphic, FilterConfigItem* pFilterConfigItem) { PSWriter aPSWriter; return aPSWriter.WritePS(rGraphic, rStream, pFilterConfigItem); diff --git a/vcl/source/filter/etiff/etiff.cxx b/vcl/source/filter/etiff/etiff.cxx index ca5b7934ab84..b34accab889b 100644 --- a/vcl/source/filter/etiff/etiff.cxx +++ b/vcl/source/filter/etiff/etiff.cxx @@ -577,7 +577,7 @@ void TIFFWriter::EndCompression() pTable.reset(); } -bool ExportTiffGraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem) +bool ExportTiffGraphicImport(SvStream & rStream, const Graphic & rGraphic, const FilterConfigItem* pFilterConfigItem) { TIFFWriter aWriter(rStream); return aWriter.WriteTIFF( rGraphic, pFilterConfigItem ); diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 55acc5bfd946..56b2f245cca1 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -638,7 +638,7 @@ rtl::Reference<MetaAction> SvmReader::PolyPolygonHandler() return pAction; } -rtl::Reference<MetaAction> SvmReader::TextHandler(ImplMetaReadData* pData) +rtl::Reference<MetaAction> SvmReader::TextHandler(const ImplMetaReadData* pData) { rtl::Reference<MetaTextAction> pAction(new MetaTextAction); @@ -678,7 +678,7 @@ rtl::Reference<MetaAction> SvmReader::TextHandler(ImplMetaReadData* pData) return pAction; } -rtl::Reference<MetaAction> SvmReader::TextArrayHandler(ImplMetaReadData* pData) +rtl::Reference<MetaAction> SvmReader::TextArrayHandler(const ImplMetaReadData* pData) { rtl::Reference<MetaTextArrayAction> pAction(new MetaTextArrayAction); @@ -758,7 +758,7 @@ rtl::Reference<MetaAction> SvmReader::TextArrayHandler(ImplMetaReadData* pData) return pAction; } -rtl::Reference<MetaAction> SvmReader::StretchTextHandler(ImplMetaReadData* pData) +rtl::Reference<MetaAction> SvmReader::StretchTextHandler(const ImplMetaReadData* pData) { rtl::Reference<MetaStretchTextAction> pAction(new MetaStretchTextAction); @@ -788,7 +788,7 @@ rtl::Reference<MetaAction> SvmReader::StretchTextHandler(ImplMetaReadData* pData return pAction; } -rtl::Reference<MetaAction> SvmReader::TextRectHandler(ImplMetaReadData* pData) +rtl::Reference<MetaAction> SvmReader::TextRectHandler(const ImplMetaReadData* pData) { rtl::Reference<MetaTextRectAction> pAction(new MetaTextRectAction); diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index ddc47a892547..f18fc7d624a4 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -801,12 +801,12 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } } -void SvmWriter::ActionHandler(MetaAction* pAction) +void SvmWriter::ActionHandler(const MetaAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); } -void SvmWriter::PixelHandler(MetaPixelAction* pAction) +void SvmWriter::PixelHandler(const MetaPixelAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -815,7 +815,7 @@ void SvmWriter::PixelHandler(MetaPixelAction* pAction) WriteColor(pAction->GetColor()); } -void SvmWriter::PointHandler(MetaPointAction* pAction) +void SvmWriter::PointHandler(const MetaPointAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -823,7 +823,7 @@ void SvmWriter::PointHandler(MetaPointAction* pAction) aSerializer.writePoint(pAction->GetPoint()); } -void SvmWriter::LineHandler(MetaLineAction* pAction) +void SvmWriter::LineHandler(const MetaLineAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -837,7 +837,7 @@ void SvmWriter::LineHandler(MetaLineAction* pAction) WriteLineInfo(mrStream, pAction->GetLineInfo()); } -void SvmWriter::RectHandler(MetaRectAction* pAction) +void SvmWriter::RectHandler(const MetaRectAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -846,7 +846,7 @@ void SvmWriter::RectHandler(MetaRectAction* pAction) aSerializer.writeRectangle(pAction->GetRect()); } -void SvmWriter::RoundRectHandler(MetaRoundRectAction* pAction) +void SvmWriter::RoundRectHandler(const MetaRoundRectAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -856,7 +856,7 @@ void SvmWriter::RoundRectHandler(MetaRoundRectAction* pAction) mrStream.WriteUInt32(pAction->GetHorzRound()).WriteUInt32(pAction->GetVertRound()); } -void SvmWriter::EllipseHandler(MetaEllipseAction* pAction) +void SvmWriter::EllipseHandler(const MetaEllipseAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -865,7 +865,7 @@ void SvmWriter::EllipseHandler(MetaEllipseAction* pAction) aSerializer.writeRectangle(pAction->GetRect()); } -void SvmWriter::ArcHandler(MetaArcAction* pAction) +void SvmWriter::ArcHandler(const MetaArcAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -876,7 +876,7 @@ void SvmWriter::ArcHandler(MetaArcAction* pAction) aSerializer.writePoint(pAction->GetEndPoint()); } -void SvmWriter::PieHandler(MetaPieAction* pAction) +void SvmWriter::PieHandler(const MetaPieAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -887,7 +887,7 @@ void SvmWriter::PieHandler(MetaPieAction* pAction) aSerializer.writePoint(pAction->GetEndPoint()); } -void SvmWriter::ChordHandler(MetaChordAction* pAction) +void SvmWriter::ChordHandler(const MetaChordAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -898,7 +898,7 @@ void SvmWriter::ChordHandler(MetaChordAction* pAction) aSerializer.writePoint(pAction->GetEndPoint()); } -void SvmWriter::PolyLineHandler(MetaPolyLineAction* pAction) +void SvmWriter::PolyLineHandler(const MetaPolyLineAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -916,7 +916,7 @@ void SvmWriter::PolyLineHandler(MetaPolyLineAction* pAction) pAction->GetPolygon().Write(mrStream); } -void SvmWriter::PolygonHandler(MetaPolygonAction* pAction) +void SvmWriter::PolygonHandler(const MetaPolygonAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -932,7 +932,7 @@ void SvmWriter::PolygonHandler(MetaPolygonAction* pAction) pAction->GetPolygon().Write(mrStream); } -void SvmWriter::PolyPolygonHandler(MetaPolyPolygonAction* pAction) +void SvmWriter::PolyPolygonHandler(const MetaPolyPolygonAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -966,7 +966,7 @@ void SvmWriter::PolyPolygonHandler(MetaPolyPolygonAction* pAction) } } -void SvmWriter::TextHandler(MetaTextAction* pAction, ImplMetaWriteData* pData) +void SvmWriter::TextHandler(const MetaTextAction* pAction, const ImplMetaWriteData* pData) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -980,7 +980,7 @@ void SvmWriter::TextHandler(MetaTextAction* pAction, ImplMetaWriteData* pData) write_uInt16_lenPrefixed_uInt16s_FromOUString(mrStream, pAction->GetText()); // version 2 } -void SvmWriter::TextArrayHandler(MetaTextArrayAction* pAction, ImplMetaWriteData* pData) +void SvmWriter::TextArrayHandler(const MetaTextArrayAction* pAction, const ImplMetaWriteData* pData) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -1002,7 +1002,8 @@ void SvmWriter::TextArrayHandler(MetaTextArrayAction* pAction, ImplMetaWriteData write_uInt16_lenPrefixed_uInt16s_FromOUString(mrStream, pAction->GetText()); // version 2 } -void SvmWriter::StretchTextHandler(MetaStretchTextAction* pAction, ImplMetaWriteData* pData) +void SvmWriter::StretchTextHandler(const MetaStretchTextAction* pAction, + const ImplMetaWriteData* pData) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -1017,7 +1018,7 @@ void SvmWriter::StretchTextHandler(MetaStretchTextAction* pAction, ImplMetaWrite write_uInt16_lenPrefixed_uInt16s_FromOUString(mrStream, pAction->GetText()); // version 2 } -void SvmWriter::TextRectHandler(MetaTextRectAction* pAction, ImplMetaWriteData* pData) +void SvmWriter::TextRectHandler(const MetaTextRectAction* pAction, const ImplMetaWriteData* pData) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -1030,7 +1031,7 @@ void SvmWriter::TextRectHandler(MetaTextRectAction* pAction, ImplMetaWriteData* write_uInt16_lenPrefixed_uInt16s_FromOUString(mrStream, pAction->GetText()); // version 2 } -void SvmWriter::TextLineHandler(MetaTextLineAction* pAction) +void SvmWriter::TextLineHandler(const MetaTextLineAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); @@ -1046,7 +1047,7 @@ void SvmWriter::TextLineHandler(MetaTextLineAction* pAction) mrStream.WriteUInt32(pAction->GetOverline()); } -void SvmWriter::BmpHandler(MetaBmpAction* pAction) +void SvmWriter::BmpHandler(const MetaBmpAction* pAction) { if (!pAction->GetBitmap().IsEmpty()) { @@ -1058,7 +1059,7 @@ void SvmWriter::BmpHandler(MetaBmpAction* pAction) } } -void SvmWriter::BmpScaleHandler(MetaBmpScaleAction* pAction) +void SvmWriter::BmpScaleHandler(const MetaBmpScaleAction* pAction) { if (!pAction->GetBitmap().IsEmpty()) { @@ -1071,7 +1072,7 @@ void SvmWriter::BmpScaleHandler(MetaBmpScaleAction* pAction) } } -void SvmWriter::BmpScalePartHandler(MetaBmpScalePartAction* pAction) +void SvmWriter::BmpScalePartHandler(const MetaBmpScalePartAction* pAction) { if (!pAction->GetBitmap().IsEmpty()) { @@ -1086,7 +1087,7 @@ void SvmWriter::BmpScalePartHandler(MetaBmpScalePartAction* pAction) } } -void SvmWriter::BmpExHandler(MetaBmpExAction* pAction) +void SvmWriter::BmpExHandler(const MetaBmpExAction* pAction) { if (!pAction->GetBitmapEx().GetBitmap().IsEmpty()) { @@ -1098,7 +1099,7 @@ void SvmWriter::BmpExHandler(MetaBmpExAction* pAction) } } -void SvmWriter::BmpExScaleHandler(MetaBmpExScaleAction* pAction) +void SvmWriter::BmpExScaleHandler(const MetaBmpExScaleAction* pAction) { if (!pAction->GetBitmapEx().GetBitmap().IsEmpty()) { @@ -1111,7 +1112,7 @@ void SvmWriter::BmpExScaleHandler(MetaBmpExScaleAction* pAction) } } -void SvmWriter::BmpExScalePartHandler(MetaBmpExScalePartAction* pAction) +void SvmWriter::BmpExScalePartHandler(const MetaBmpExScalePartAction* pAction) { if (!pAction->GetBitmapEx().GetBitmap().IsEmpty()) { @@ -1126,7 +1127,7 @@ void SvmWriter::BmpExScalePartHandler(MetaBmpExScalePartAction* pAction) } } -void SvmWriter::MaskHandler(MetaMaskAction* pAction) +void SvmWriter::MaskHandler(const MetaMaskAction* pAction) { if (!pAction->GetBitmap().IsEmpty()) { @@ -1138,7 +1139,7 @@ void SvmWriter::MaskHandler(MetaMaskAction* pAction) } } -void SvmWriter::MaskScaleHandler(MetaMaskScaleAction* pAction) +void SvmWriter::MaskScaleHandler(const MetaMaskScaleAction* pAction) { if (!pAction->GetBitmap().IsEmpty()) { @@ -1151,7 +1152,7 @@ void SvmWriter::MaskScaleHandler(MetaMaskScaleAction* pAction) } } -void SvmWriter::MaskScalePartHandler(MetaMaskScalePartAction* pAction) +void SvmWriter::MaskScalePartHandler(const MetaMaskScalePartAction* pAction) { if (!pAction->GetBitmap().IsEmpty()) { @@ -1167,7 +1168,7 @@ void SvmWriter::MaskScalePartHandler(MetaMaskScalePartAction* pAction) } } -void SvmWriter::GradientHandler(MetaGradientAction* pAction) +void SvmWriter::GradientHandler(const MetaGradientAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1176,7 +1177,7 @@ void SvmWriter::GradientHandler(MetaGradientAction* pAction) aSerializer.writeGradient(pAction->GetGradient()); } -void SvmWriter::GradientExHandler(MetaGradientExAction* pAction) +void SvmWriter::GradientExHandler(const MetaGradientExAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1190,7 +1191,7 @@ void SvmWriter::GradientExHandler(MetaGradientExAction* pAction) aSerializer.writeGradient(pAction->GetGradient()); } -void SvmWriter::HatchHandler(MetaHatchAction* pAction) +void SvmWriter::HatchHandler(const MetaHatchAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1203,7 +1204,7 @@ void SvmWriter::HatchHandler(MetaHatchAction* pAction) WriteHatch(mrStream, pAction->GetHatch()); } -void SvmWriter::WallpaperHandler(MetaWallpaperAction* pAction) +void SvmWriter::WallpaperHandler(const MetaWallpaperAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1211,7 +1212,7 @@ void SvmWriter::WallpaperHandler(MetaWallpaperAction* pAction) WriteWallpaper(mrStream, pAction->GetWallpaper()); } -void SvmWriter::ClipRegionHandler(MetaClipRegionAction* pAction) +void SvmWriter::ClipRegionHandler(const MetaClipRegionAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1219,7 +1220,7 @@ void SvmWriter::ClipRegionHandler(MetaClipRegionAction* pAction) mrStream.WriteBool(pAction->IsClipping()); } -void SvmWriter::ISectRectClipRegionHandler(MetaISectRectClipRegionAction* pAction) +void SvmWriter::ISectRectClipRegionHandler(const MetaISectRectClipRegionAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1227,21 +1228,21 @@ void SvmWriter::ISectRectClipRegionHandler(MetaISectRectClipRegionAction* pActio aSerializer.writeRectangle(pAction->GetRect()); } -void SvmWriter::ISectRegionClipRegionHandler(MetaISectRegionClipRegionAction* pAction) +void SvmWriter::ISectRegionClipRegionHandler(const MetaISectRegionClipRegionAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); WriteRegion(mrStream, pAction->GetRegion()); } -void SvmWriter::MoveClipRegionHandler(MetaMoveClipRegionAction* pAction) +void SvmWriter::MoveClipRegionHandler(const MetaMoveClipRegionAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); mrStream.WriteInt32(pAction->GetHorzMove()).WriteInt32(pAction->GetVertMove()); } -void SvmWriter::LineColorHandler(MetaLineColorAction* pAction) +void SvmWriter::LineColorHandler(const MetaLineColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1249,7 +1250,7 @@ void SvmWriter::LineColorHandler(MetaLineColorAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } -void SvmWriter::FillColorHandler(MetaFillColorAction* pAction) +void SvmWriter::FillColorHandler(const MetaFillColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1257,14 +1258,14 @@ void SvmWriter::FillColorHandler(MetaFillColorAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } -void SvmWriter::TextColorHandler(MetaTextColorAction* pAction) +void SvmWriter::TextColorHandler(const MetaTextColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); WriteColor(pAction->GetColor()); } -void SvmWriter::TextFillColorHandler(MetaTextFillColorAction* pAction) +void SvmWriter::TextFillColorHandler(const MetaTextFillColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1272,7 +1273,7 @@ void SvmWriter::TextFillColorHandler(MetaTextFillColorAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } -void SvmWriter::TextLineColorHandler(MetaTextLineColorAction* pAction) +void SvmWriter::TextLineColorHandler(const MetaTextLineColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1280,7 +1281,7 @@ void SvmWriter::TextLineColorHandler(MetaTextLineColorAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } -void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction) +void SvmWriter::OverlineColorHandler(const MetaOverlineColorAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1288,14 +1289,14 @@ void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } -void SvmWriter::TextAlignHandler(MetaTextAlignAction* pAction) +void SvmWriter::TextAlignHandler(const MetaTextAlignAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetTextAlign())); } -void SvmWriter::MapModeHandler(MetaMapModeAction* pAction) +void SvmWriter::MapModeHandler(const MetaMapModeAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1303,7 +1304,7 @@ void SvmWriter::MapModeHandler(MetaMapModeAction* pAction) aSerializer.writeMapMode(pAction->GetMapMode()); } -void SvmWriter::FontHandler(MetaFontAction* pAction, ImplMetaWriteData* pData) +void SvmWriter::FontHandler(const MetaFontAction* pAction, ImplMetaWriteData* pData) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1313,27 +1314,27 @@ void SvmWriter::FontHandler(MetaFontAction* pAction, ImplMetaWriteData* pData) pData->meActualCharSet = osl_getThreadTextEncoding(); } -void SvmWriter::PushHandler(MetaPushAction* pAction) +void SvmWriter::PushHandler(const MetaPushAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetFlags())); } -void SvmWriter::PopHandler(MetaPopAction* pAction) +void SvmWriter::PopHandler(const MetaPopAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); } -void SvmWriter::RasterOpHandler(MetaRasterOpAction* pAction) +void SvmWriter::RasterOpHandler(const MetaRasterOpAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetRasterOp())); } -void SvmWriter::TransparentHandler(MetaTransparentAction* pAction) +void SvmWriter::TransparentHandler(const MetaTransparentAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1354,7 +1355,7 @@ void SvmWriter::TransparentHandler(MetaTransparentAction* pAction) mrStream.WriteUInt16(pAction->GetTransparence()); } -void SvmWriter::FloatTransparentHandler(MetaFloatTransparentAction* pAction) +void SvmWriter::FloatTransparentHandler(const MetaFloatTransparentAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1368,7 +1369,7 @@ void SvmWriter::FloatTransparentHandler(MetaFloatTransparentAction* pAction) aSerializer.writeGradient(pAction->GetGradient()); } -void SvmWriter::EPSHandler(MetaEPSAction* pAction) +void SvmWriter::EPSHandler(const MetaEPSAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1383,7 +1384,7 @@ void SvmWriter::EPSHandler(MetaEPSAction* pAction) aWriter.Write(aMtf); } -void SvmWriter::RefPointHandler(MetaRefPointAction* pAction) +void SvmWriter::RefPointHandler(const MetaRefPointAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1393,7 +1394,7 @@ void SvmWriter::RefPointHandler(MetaRefPointAction* pAction) mrStream.WriteBool(pAction->IsSetting()); } -void SvmWriter::CommentHandler(MetaCommentAction* pAction) +void SvmWriter::CommentHandler(const MetaCommentAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); @@ -1404,14 +1405,14 @@ void SvmWriter::CommentHandler(MetaCommentAction* pAction) mrStream.WriteBytes(pAction->GetData(), pAction->GetDataSize()); } -void SvmWriter::LayoutModeHandler(MetaLayoutModeAction* pAction) +void SvmWriter::LayoutModeHandler(const MetaLayoutModeAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); mrStream.WriteUInt32(static_cast<sal_uInt32>(pAction->GetLayoutMode())); } -void SvmWriter::TextLanguageHandler(MetaTextLanguageAction* pAction) +void SvmWriter::TextLanguageHandler(const MetaTextLanguageAction* pAction) { mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); VersionCompatWrite aCompat(mrStream, 1); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index ae3f2209a8a8..137bd50d283c 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1381,7 +1381,7 @@ bool ImpGraphic::ensureAvailable() const return bResult; } -void ImpGraphic::updateFromLoadedGraphic(ImpGraphic* pGraphic) +void ImpGraphic::updateFromLoadedGraphic(const ImpGraphic* pGraphic) { if (mbPrepared) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index f8e17a33e8e5..ed44cdfde1ce 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8326,7 +8326,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject ) return writeBuffer( aLine.getStr(), aLine.getLength() ); } -void PDFWriterImpl::writeJPG( JPGEmit& rObject ) +void PDFWriterImpl::writeJPG( const JPGEmit& rObject ) { if (rObject.m_aReferenceXObject.hasExternalPDFData() && !m_aContext.UseReferenceXObject) { @@ -8401,7 +8401,7 @@ void PDFWriterImpl::writeJPG( JPGEmit& rObject ) writeReferenceXObject(rObject.m_aReferenceXObject); } -void PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit) +void PDFWriterImpl::writeReferenceXObject(const ReferenceXObjectEmit& rEmit) { if (rEmit.m_nFormObject <= 0) return; @@ -8666,7 +8666,7 @@ namespace } } -bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) +bool PDFWriterImpl::writeBitmapObject( const BitmapEmit& rObject, bool bMask ) { if (rObject.m_aReferenceXObject.hasExternalPDFData() && !m_aContext.UseReferenceXObject) { diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index b4f3bec50fd7..43a55ad23196 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -828,11 +828,11 @@ i12626 /* writes an XObject of type image, may create a second for the mask */ - bool writeBitmapObject( BitmapEmit& rObject, bool bMask = false ); + bool writeBitmapObject( const BitmapEmit& rObject, bool bMask = false ); - void writeJPG( JPGEmit& rEmit ); + void writeJPG( const JPGEmit& rEmit ); /// Writes the form XObject proxy for the image. - void writeReferenceXObject(ReferenceXObjectEmit& rEmit); + void writeReferenceXObject(const ReferenceXObjectEmit& rEmit); /* tries to find the bitmap by its id and returns its emit data if exists, else creates a new emit data block */ diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index a0abd9876da4..7ca75b1b1077 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -138,7 +138,7 @@ Wallpaper::Wallpaper( const BitmapEx& rBmpEx ) Wallpaper::~Wallpaper() = default; -void Wallpaper::ImplSetCachedBitmap( BitmapEx& rBmp ) const +void Wallpaper::ImplSetCachedBitmap( const BitmapEx& rBmp ) const { maCache = rBmp; } diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index 44fc3db789d4..c46862434120 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -244,7 +244,7 @@ static OUString extractPngString(const SvLBoxContextBmp* pBmpItem) } static void lcl_DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter, SvTreeListEntry* pEntry, - SvTreeListBox* pTabListBox) + const SvTreeListBox* pTabListBox) { while (pEntry) { diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 824f6214917c..8b7780c92cbb 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -172,7 +172,7 @@ extern "C" } #if !GTK_CHECK_VERSION(4, 0, 0) -static VclInputFlags categorizeEvent(GdkEvent *pEvent) +static VclInputFlags categorizeEvent(const GdkEvent *pEvent) { VclInputFlags nType = VclInputFlags::NONE; switch (gdk_event_get_event_type(pEvent)) @@ -4754,7 +4754,7 @@ namespace #endif } - void set_image(GtkButton* pButton, VirtualDevice* pDevice) + void set_image(GtkButton* pButton, const VirtualDevice* pDevice) { #if !GTK_CHECK_VERSION(4, 0, 0) gtk_button_set_always_show_image(pButton, true); @@ -8918,7 +8918,7 @@ private: public: // See: https://developer.gnome.org/Buttons/ - void use_custom_content(VirtualDevice* pDevice) + void use_custom_content(const VirtualDevice* pDevice) { GtkStyleContext *pWidgetContext = gtk_widget_get_style_context(m_pWidget); |