loplugin:constparam in sd

Change-Id: Ia0e35f9f89773846781f3ba336428dba71b0a05a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183295
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2025-03-25 12:50:56 +02:00
parent 8b21dd5ce3
commit 73d87a030c
13 changed files with 24 additions and 24 deletions

View File

@ -51,7 +51,7 @@ namespace
class UndoInsertOrRemoveAnnotation : public SdrUndoAction
{
public:
UndoInsertOrRemoveAnnotation(rtl::Reference<sdr::annotation::Annotation>& xAnnotation, bool bInsert);
UndoInsertOrRemoveAnnotation(const rtl::Reference<sdr::annotation::Annotation>& xAnnotation, bool bInsert);
virtual void Undo() override;
virtual void Redo() override;
@ -266,7 +266,7 @@ std::unique_ptr<SdrUndoAction> CreateUndoInsertOrRemoveAnnotation(rtl::Reference
}
}
UndoInsertOrRemoveAnnotation::UndoInsertOrRemoveAnnotation(rtl::Reference<sdr::annotation::Annotation>& xAnnotation, bool bInsert)
UndoInsertOrRemoveAnnotation::UndoInsertOrRemoveAnnotation(const rtl::Reference<sdr::annotation::Annotation>& xAnnotation, bool bInsert)
: SdrUndoAction(*xAnnotation->GetModel())
, mxAnnotation(xAnnotation)
, mbInsert(bInsert)

View File

@ -94,7 +94,7 @@ private:
sal_Int32 nOffset, sal_uInt32 nMasterNum, const OUString& aSlideName,
css::uno::Reference<css::beans::XPropertySet> const& aXBackgroundPropSet);
static void WriteDefaultColorSchemes(const FSHelperPtr& pFS);
void WriteTheme( sal_Int32 nThemeNum, model::Theme* pTheme );
void WriteTheme( sal_Int32 nThemeNum, const model::Theme* pTheme );
virtual bool ImplCreateDocument() override;
virtual bool ImplCreateMainNotes() override;

View File

@ -1454,7 +1454,7 @@ void PowerPointExport::AddLayoutIdAndRelation(const FSHelperPtr& pFS, sal_Int32
FSNS(XML_r, XML_id), sRelId);
}
static bool lcl_ContainsEquivalentObject(SdrPage* pPage, SdrObject* pObj)
static bool lcl_ContainsEquivalentObject(const SdrPage* pPage, const SdrObject* pObj)
{
bool bFound = false;
@ -1474,7 +1474,7 @@ static bool lcl_ContainsEquivalentObject(SdrPage* pPage, SdrObject* pObj)
return bFound;
}
static bool lcl_ComparePageObjects(SdrPage* pMasterPage, SdrPage* pMasterNext)
static bool lcl_ComparePageObjects(const SdrPage* pMasterPage, SdrPage* pMasterNext)
{
if (!pMasterPage || !pMasterNext)
return false;
@ -2268,7 +2268,7 @@ void PowerPointExport::WriteDefaultColorSchemes(const FSHelperPtr& pFS)
}
}
void PowerPointExport::WriteTheme(sal_Int32 nThemeNum, model::Theme* pTheme)
void PowerPointExport::WriteTheme(sal_Int32 nThemeNum, const model::Theme* pTheme)
{
if (!pTheme)
return;

View File

@ -212,7 +212,7 @@ void ToolBarModule::HandleUpdateEnd()
mpToolBarManagerLock.reset();
}
void ToolBarModule::UpdateToolbars(ViewShell* pViewShell)
void ToolBarModule::UpdateToolbars(const ViewShell* pViewShell)
{
// Update the set of visible tool bars and deactivate those that are
// no longer visible. This is done before the old view shell is

View File

@ -93,7 +93,7 @@ private:
@param pViewShell may be nullptr
*/
void UpdateToolbars(ViewShell* pViewShell);
void UpdateToolbars(const ViewShell* pViewShell);
void HandleUpdateStart();
void HandleUpdateEnd();

View File

@ -131,7 +131,7 @@ private:
Size maSlideSize;
RenderState maRenderState;
void createViewAndDraw(RenderContext& rRenderContext,
void createViewAndDraw(const RenderContext& rRenderContext,
sdr::contact::ViewObjectContactRedirector* pRedirector);
void writeBackgroundJSON(OString& rJsonMsg);
void writeJSON(OString& rJsonMsg, RenderPass const& rRenderPass);

View File

@ -45,9 +45,9 @@ public:
virtual ~TextObjectBar() override;
void GetAttrState( SfxItemSet& rSet );
static void GetAttrStateImpl(ViewShell* mpViewShell, ::sd::View* mpView, SfxItemSet& rSet, SfxShell* pTextObjectBar);
static void GetAttrStateImpl(const ViewShell* mpViewShell, ::sd::View* mpView, SfxItemSet& rSet, SfxShell* pTextObjectBar);
void GetCharState( SfxItemSet& rSet );
static void GetCharStateImpl(ViewShell* mpViewShell, ::sd::View* mpView, SfxItemSet& rSet);
static void GetCharStateImpl(const ViewShell* mpViewShell, const ::sd::View* mpView, SfxItemSet& rSet);
void Execute( SfxRequest &rReq );
static void ExecuteImpl(ViewShell* mpViewShell, ::sd::View* mpView, SfxRequest& rReq, SfxShell* pTextObjectBar);

View File

@ -3296,7 +3296,7 @@ namespace
static ImplSVEvent* AsyncUpdateSlideshow(
SlideshowImpl* pSlideshowImpl,
uno::Reference< css::drawing::XDrawPage >& rXCurrentSlide,
const uno::Reference< css::drawing::XDrawPage >& rXCurrentSlide,
SdrHintKind eHintKind)
{
AsyncUpdateSlideshowData* pNew(new AsyncUpdateSlideshowData);

View File

@ -61,8 +61,8 @@ private:
public:
ScopedVclPtrInstance<VirtualDevice> maVirtualDevice;
RenderContext(unsigned char* pBuffer, SdrModel& rModel, SdrPage& rPage, Size const& rSlideSize,
const Fraction& rScale)
RenderContext(unsigned char* pBuffer, SdrModel& rModel, const SdrPage& rPage,
Size const& rSlideSize, const Fraction& rScale)
: mrModel(rModel)
, maVirtualDevice(DeviceFormat::WITHOUT_ALPHA)
{
@ -230,7 +230,7 @@ findTextBlock(drawinglayer::primitive2d::Primitive2DContainer const& rContainer,
}
/// show/hide paragraphs in the container
void modifyParagraphs(drawinglayer::primitive2d::Primitive2DContainer& rContainer,
void modifyParagraphs(const drawinglayer::primitive2d::Primitive2DContainer& rContainer,
drawinglayer::geometry::ViewInformation2D const& rViewInformation2D,
std::deque<sal_Int32> const& rPreserveIndices, bool bRenderObject)
{
@ -668,7 +668,7 @@ Size SlideshowLayerRenderer::calculateAndSetSizePixel(Size const& rDesiredSizePi
}
void SlideshowLayerRenderer::createViewAndDraw(
RenderContext& rRenderContext, sdr::contact::ViewObjectContactRedirector* pRedirector)
const RenderContext& rRenderContext, sdr::contact::ViewObjectContactRedirector* pRedirector)
{
SdrView aView(mrModel, rRenderContext.maVirtualDevice);
aView.SetPageVisible(false);
@ -697,7 +697,7 @@ void writeContentNode(::tools::JsonWriter& aJsonWriter)
aJsonWriter.put("checksum", "%IMAGECHECKSUM%");
}
void writeBoundingBox(::tools::JsonWriter& aJsonWriter, SdrObject* pObject)
void writeBoundingBox(::tools::JsonWriter& aJsonWriter, const SdrObject* pObject)
{
auto aContentNode = aJsonWriter.startNode("bounds");
::tools::Rectangle aRectmm100 = pObject->GetCurrentBoundRect();

View File

@ -1529,7 +1529,7 @@ void AnimationsExporter::exportAnimate(const Reference<XAnimate>& xAnimate)
}
}
void GetDocStructureSlides(::tools::JsonWriter& rJsonWriter, SdXImpressDocument* pDoc,
void GetDocStructureSlides(::tools::JsonWriter& rJsonWriter, const SdXImpressDocument* pDoc,
const std::map<OUString, OUString>& rArguments)
{
auto it = rArguments.find(u"filter"_ustr);

View File

@ -126,7 +126,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet )
GetCharStateImpl(mpViewShell, mpView, rSet);
}
void TextObjectBar::GetCharStateImpl(ViewShell* mpViewShell, ::sd::View* mpView, SfxItemSet& rSet)
void TextObjectBar::GetCharStateImpl(const ViewShell* mpViewShell, const ::sd::View* mpView, SfxItemSet& rSet)
{
SfxItemSet aCharAttrSet( mpView->GetDoc().GetPool() );
mpView->GetAttributes( aCharAttrSet );
@ -155,7 +155,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
/**
* Status of attribute items.
*/
void TextObjectBar::GetAttrStateImpl(ViewShell* mpViewShell, ::sd::View* mpView, SfxItemSet& rSet, SfxShell* pTextObjectBar)
void TextObjectBar::GetAttrStateImpl(const ViewShell* mpViewShell, ::sd::View* mpView, SfxItemSet& rSet, SfxShell* pTextObjectBar)
{
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
@ -259,7 +259,7 @@ void TextObjectBar::GetAttrStateImpl(ViewShell* mpViewShell, ::sd::View* mpView,
bool bDisableDown = true;
//fdo#78151 it doesn't make sense to promote or demote outline levels in master view.
const DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >(mpViewShell);
const DrawViewShell* pDrawViewShell = dynamic_cast< const DrawViewShell* >(mpViewShell);
const bool bInMasterView = pDrawViewShell && pDrawViewShell->GetEditMode() == EditMode::MasterPage;
if (!bInMasterView)
@ -449,7 +449,7 @@ void TextObjectBar::GetAttrStateImpl(ViewShell* mpViewShell, ::sd::View* mpView,
case FN_NUM_NUMBERING_ON:
{
bool bEnable = false;
const DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >(mpViewShell);
const DrawViewShell* pDrawViewShell = dynamic_cast< const DrawViewShell* >(mpViewShell);
if (pDrawViewShell)
{
SdrView* pDrawView = pDrawViewShell->GetDrawView();

View File

@ -97,7 +97,7 @@ using namespace ::com::sun::star::linguistic2;
The list is stored in a new instance of SvxClipboardFormatItem.
*/
static ::std::unique_ptr<SvxClipboardFormatItem> GetSupportedClipboardFormats (
TransferableDataHelper& rDataHelper)
const TransferableDataHelper& rDataHelper)
{
::std::unique_ptr<SvxClipboardFormatItem> pResult (
new SvxClipboardFormatItem(SID_CLIPBOARD_FORMAT_ITEMS));

View File

@ -452,7 +452,7 @@ void ViewRedirector::createRedirectedPrimitive2DSequence(
namespace
{
void setOutlinerBgFromPage(::Outliner& rOutl, SdrPageView& rPgView, bool bScreenDisplay)
void setOutlinerBgFromPage(::Outliner& rOutl, const SdrPageView& rPgView, bool bScreenDisplay)
{
SdrPage* pPage = rPgView.GetPage();
if (pPage)