summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-01-12 10:27:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-12 14:45:30 +0100
commit9a850dd9f3c221660b6259bdfd64a77343f2256c (patch)
treea358210df36d9df53e0e614a3bb702e0e604750c /include/svx
parenteebe4747d2d13545004937bb0267ccfc8ab9d63f (diff)
used cache value in ViewObjectContact::getPrimitive2DSequence (2nd attempt)
Rely on the cached primitives in VOC. But only enable it for calc and draw right now, by adding a flag at the SdrModel level. This way we can leave it disabled for writer, where it definitely doesn't work. Change-Id: I11ca4836eb773c0f078cdb82056c6e0309d15a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/contact/viewobjectcontact.hxx3
-rw-r--r--include/svx/svdmodel.hxx4
2 files changed, 7 insertions, 0 deletions
diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx b/include/svx/sdr/contact/viewobjectcontact.hxx
index f13f247e55c2..1be4cac81052 100644
--- a/include/svx/sdr/contact/viewobjectcontact.hxx
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -59,6 +59,9 @@ private:
// possible on-demand calculated GridOffset for non-linear ViewToDevice transformation (calc)
basegfx::B2DVector maGridOffset;
+ // used to detect ActionChanged() during primitive construction
+ int mnActionChangedCount;
+
// This bool gets set when the object gets invalidated by ActionChanged() and
// can be used from the OC to late-invalidates
bool mbLazyInvalidate : 1;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 831201de4d60..2170f78907ed 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -210,6 +210,7 @@ protected:
bool m_bPasteResize:1; // Objects are being resized due to Paste with different MapMode
bool m_bStarDrawPreviewMode:1;
bool mbDisableTextEditUsesCommonUndoManager:1;
+ bool mbVOCInvalidationIsReliable:1; // does the app reliably invalidate the VOC, or do we need to rebuild the primitives on every render?
sal_uInt16 m_nDefaultTabulator;
sal_uInt32 m_nMaxUndoCount;
@@ -612,6 +613,9 @@ public:
virtual sal_Int32 getImagePreferredDPI() const { return 0; }
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+ bool IsVOCInvalidationIsReliable() const { return mbVOCInvalidationIsReliable; }
+ void SetVOCInvalidationIsReliable(bool b) { mbVOCInvalidationIsReliable = b; }
};
/*