diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx index a376b804bd97..bc76a5c46614 100644 --- a/sd/source/core/annotations/Annotation.cxx +++ b/sd/source/core/annotations/Annotation.cxx @@ -51,7 +51,7 @@ namespace class UndoInsertOrRemoveAnnotation : public SdrUndoAction { public: - UndoInsertOrRemoveAnnotation(rtl::Reference& xAnnotation, bool bInsert); + UndoInsertOrRemoveAnnotation(const rtl::Reference& xAnnotation, bool bInsert); virtual void Undo() override; virtual void Redo() override; @@ -266,7 +266,7 @@ std::unique_ptr CreateUndoInsertOrRemoveAnnotation(rtl::Reference } } -UndoInsertOrRemoveAnnotation::UndoInsertOrRemoveAnnotation(rtl::Reference& xAnnotation, bool bInsert) +UndoInsertOrRemoveAnnotation::UndoInsertOrRemoveAnnotation(const rtl::Reference& xAnnotation, bool bInsert) : SdrUndoAction(*xAnnotation->GetModel()) , mxAnnotation(xAnnotation) , mbInsert(bInsert) diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index c44dc8fcfe1e..7ac7dc938067 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -94,7 +94,7 @@ private: sal_Int32 nOffset, sal_uInt32 nMasterNum, const OUString& aSlideName, css::uno::Reference 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; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 054d116e095e..98b5a1a06222 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -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; diff --git a/sd/source/ui/framework/module/ToolBarModule.cxx b/sd/source/ui/framework/module/ToolBarModule.cxx index d630df778621..441324b07d88 100644 --- a/sd/source/ui/framework/module/ToolBarModule.cxx +++ b/sd/source/ui/framework/module/ToolBarModule.cxx @@ -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 diff --git a/sd/source/ui/framework/module/ToolBarModule.hxx b/sd/source/ui/framework/module/ToolBarModule.hxx index f245e88f8562..cccdfdd6a74a 100644 --- a/sd/source/ui/framework/module/ToolBarModule.hxx +++ b/sd/source/ui/framework/module/ToolBarModule.hxx @@ -93,7 +93,7 @@ private: @param pViewShell may be nullptr */ - void UpdateToolbars(ViewShell* pViewShell); + void UpdateToolbars(const ViewShell* pViewShell); void HandleUpdateStart(); void HandleUpdateEnd(); diff --git a/sd/source/ui/inc/SlideshowLayerRenderer.hxx b/sd/source/ui/inc/SlideshowLayerRenderer.hxx index 12a944b86377..0c3ee8a025d8 100644 --- a/sd/source/ui/inc/SlideshowLayerRenderer.hxx +++ b/sd/source/ui/inc/SlideshowLayerRenderer.hxx @@ -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); diff --git a/sd/source/ui/inc/TextObjectBar.hxx b/sd/source/ui/inc/TextObjectBar.hxx index aaa008f04f93..d180a674499f 100644 --- a/sd/source/ui/inc/TextObjectBar.hxx +++ b/sd/source/ui/inc/TextObjectBar.hxx @@ -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); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index fd7384f379bb..a0df1a65ad53 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -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); diff --git a/sd/source/ui/tools/SlideshowLayerRenderer.cxx b/sd/source/ui/tools/SlideshowLayerRenderer.cxx index df5c19af4547..2a3462f2dd79 100644 --- a/sd/source/ui/tools/SlideshowLayerRenderer.cxx +++ b/sd/source/ui/tools/SlideshowLayerRenderer.cxx @@ -61,8 +61,8 @@ private: public: ScopedVclPtrInstance 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 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(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index a2fff3370033..13044d967437 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1529,7 +1529,7 @@ void AnimationsExporter::exportAnimate(const Reference& xAnimate) } } -void GetDocStructureSlides(::tools::JsonWriter& rJsonWriter, SdXImpressDocument* pDoc, +void GetDocStructureSlides(::tools::JsonWriter& rJsonWriter, const SdXImpressDocument* pDoc, const std::map& rArguments) { auto it = rArguments.find(u"filter"_ustr); diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 92c0d8a62b52..24810caf3f95 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -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(); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index a561bf46f411..0b2502d289eb 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -97,7 +97,7 @@ using namespace ::com::sun::star::linguistic2; The list is stored in a new instance of SvxClipboardFormatItem. */ static ::std::unique_ptr GetSupportedClipboardFormats ( - TransferableDataHelper& rDataHelper) + const TransferableDataHelper& rDataHelper) { ::std::unique_ptr pResult ( new SvxClipboardFormatItem(SID_CLIPBOARD_FORMAT_ITEMS)); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 5a6be3034fb8..1dfcf09ed6fd 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -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)