summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-07-19 13:23:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-19 20:47:20 +0200
commit0ee4b0339c3f3fd2f39f7193e2cf54df63a071b6 (patch)
tree745208074e0981b1531dedb7146f5401c5489383 /include
parentf3379949100367532d63d29731cd77a222d0606e (diff)
reduce cost of dynamic casting in SdrMarkView::CheckSingleSdrObjectHit
which shows up when navigating large complex documents with lots of shapes Change-Id: I0631daf1365387f1192815402921ada191ab6046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170760 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/svx/svdobj.hxx4
-rw-r--r--include/svx/svdoole2.hxx2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 8ddad97135ef..4692c2d36d59 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -51,6 +51,7 @@ class SdrItemPool;
class SdrModel;
class SdrObjList;
class SdrObject;
+class SdrOle2Obj;
class SdrPage;
class SdrPageView;
class SdrTextObj;
@@ -749,6 +750,7 @@ public:
void SetMarkProtect(bool bProt);
bool IsMarkProtect() const { return m_bMarkProt;}
virtual bool IsSdrTextObj() const { return false; }
+ virtual bool IsSdrOle2Obj() const { return false; }
virtual bool IsTextPath() const { return false ; }
/// Whether the aspect ratio should be kept by default when resizing.
@@ -988,6 +990,8 @@ SVXCORE_DLLPUBLIC E3dObject* DynCastE3dObject(SdrObject*);
inline const E3dObject* DynCastE3dObject(const SdrObject* p) { return DynCastE3dObject(const_cast<SdrObject*>(p)); }
SVXCORE_DLLPUBLIC SdrTextObj* DynCastSdrTextObj(SdrObject*);
inline const SdrTextObj* DynCastSdrTextObj(const SdrObject* p) { return DynCastSdrTextObj(const_cast<SdrObject*>(p)); }
+SVXCORE_DLLPUBLIC SdrOle2Obj* DynCastSdrOle2Obj(SdrObject*);
+inline const SdrOle2Obj* DynCastSdrOle2Obj(const SdrObject* p) { return DynCastSdrOle2Obj(const_cast<SdrObject*>(p)); }
struct SdrObjCreatorParams
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 43ea27fd3752..ec9a0f6b4d0e 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -183,6 +183,8 @@ public:
// #i118485# missing converter added
virtual rtl::Reference<SdrObject> DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual bool IsSdrOle2Obj() const final { return true; }
};
class SVXCORE_DLLPUBLIC SdrEmbedObjectLink final : public sfx2::SvBaseLink