include/svx/svdmodel.hxx | 3 +++ sd/source/core/drawdoc.cxx | 2 ++ svx/source/svdraw/svdmrkv.cxx | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit 558b1a9155dc6918a0731277330e27c2f72b7b13 Author: Gökay Şatır <gokaysa...@collabora.com> AuthorDate: Wed Aug 7 16:55:42 2024 +0300 Commit: Gökay ŞATIR <gokaysa...@collabora.com> CommitDate: Wed Sep 4 16:47:20 2024 +0200 Add SdrModel "IsImpress" function. Functionalities like "SetMarkHandlesForLOKit" can now use this to send data selectively. Change-Id: I8d300d1d6fe0d953f4798ec3ee0c48e258054335 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172854 Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com> Tested-by: Jenkins diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index ffd89a7dfda2..3da5a865fe13 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -269,12 +269,15 @@ private: // used to disable unique name checking during page move bool mbMakePageObjectsNamesUnique = true; + bool m_bIsImpress = false; public: SVX_DLLPRIVATE virtual bool IsCreatingDataObj() const { return false; } bool IsTransportContainer() const { return m_bTransportContainer; } bool AreControlsThemed() { return m_bThemedControls; } bool IsPasteResize() const { return m_bPasteResize; } + bool IsImpress() const { return m_bIsImpress; } + void SetImpress(bool bIsImpress) { m_bIsImpress = bIsImpress; }; void SetPasteResize(bool bOn) { m_bPasteResize=bOn; } // If a custom Pool is put here, the class will call methods // on it (Put(), Remove()). On disposal of SdrModel the pool diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 4c411f94f6f7..7bce90338b38 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -146,6 +146,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) mpDrawPageListWatcher.reset(new ImpDrawPageListWatcher(*this)); mpMasterPageListWatcher.reset(new ImpMasterPageListWatcher(*this)); + this->SetImpress(true); + InitLayoutVector(); InitObjectVector(); SetObjectShell(pDrDocSh); // for VCDrawModel diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 45c8072038bc..8526e7e51f17 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1223,7 +1223,8 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S } SdrPage *pPage = pPageView ? pPageView->GetPage(): nullptr; - if (pPage) + + if (pPage && getSdrModelFromSdrView().IsImpress()) { // Send all objects' rectangles along with the selected object's information. // Other rectangles can be used for aligning the selected object referencing the others.