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 8b00f3a3c507a90046062d38e3f62c46675d620f
Author:     Gökay Şatır <[email protected]>
AuthorDate: Wed Aug 7 16:55:42 2024 +0300
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Aug 8 14:03:49 2024 +0200

    Add SdrModel "IsImpress" function.
    
    Functionalities like "SetMarkHandlesForLOKit" can now use this to send data 
selectively.
    
    Signed-off-by: Gökay Şatır <[email protected]>
    Change-Id: I8d300d1d6fe0d953f4798ec3ee0c48e258054335
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171597
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 5f0175b57d7e..68565e264bc3 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 315a89533950..7282dcd78710 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -143,6 +143,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 0d409f609f49..1c78c9dab9e9 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1218,7 +1218,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.

Reply via email to