Index ¦ Archives ¦ RSS

On LibreOffice's ViewContact/ViewObjectContact/ObjectContact

Estimated read time: 1 minutes

I’ve recently fixed a missing-repaint problem in LibreOffice’s headless backend, but the root cause wasn’t close to the symptom I saw first. Part of the debugging process was to understand what’s the relation between sdr::contact::ViewContact, sdr::contact::ViewObjectContact and sdr::contact::ObjectContact.

See this old presentation and the review of my documentation update for the details, but the short version is that:

  • somewhat confusingly, sdr::contact::ViewContact is part of the model, and there is one sdr::contact::ViewContact object per shape

  • sdr::contact::ViewObjectContact is part of a view, and there is one sdr::contact::ViewObjectContact per shape, per view

  • finally sdr::contact::ObjectContact is part of a view, and there is one sdr::contact::ObjectContact per view

So the answer to my original Is it normal that I have two object contacts and a single view contact for a shape and two views? question is: yes, that’s expected. ;-) Hopefully the updated documentation is now more clear, the incorrect 1:N relation in the original class diagram first confused me.

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.