Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


So, looking at

https://bugs.freedesktop.org/show_bug.cgi?id=33636

I see a bit of a nest of horrors around calc selections. The fundamental
intent of the dialog seems clear however:

a) The spellchecking dialog isn't modal, so you can swap from the
spell-checking dialog back to the document and back to the dialog.
b) If you were spellchecking a selection, and changed the selection
while the dialog is open and return to it, it wants to change state to
"resume" to indicate that you have to spell-check the new selection from
scratch.

When the spellcheck dialog initalizes, it uses ScSelectionState to get
the original selection, and it gets a new ScSelectionState when it gains
focus and checks if their GetSheetSelections differ to determine if the
selection changed, in order to know that spellchecking may need to be
restarted, which seems reasonable.

Unfortunately if you launch the spell-checker dialog it activates an
editview, which it uses to traverse the cells being spellchecked, and so
ScSelectionState once the dialog is first initialized returns this
editview as the active selection, i.e. see
ScSelectionState::ScSelectionState so the act of opening the
spellchecker changes the selection as far as ScSelectionState is
concerned.

It's not massively clear to me how the calc selections are expected to
work, but my thinking is that GetMarkData is an apparently reliable sane
layer, and taking a FillRangeListWithMarks from that to use as the
comparison that the selection has changed avoids the problem, and
apparently works for me.

Thoughts ?, if no-one has a better view I'll take a punt and commit it
in a few days to master.

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.