autosave feature help

Krisztian Pinter pin.terminator at gmail.com
Tue Mar 5 14:35:00 PST 2013


Hi Kendy!


> If it is hit, you can investigate what is going on; if not, some further
> investigation is needed I am afraid - let us know then.
>

The problem is that this checkbox I added won't save its value. I examined
the code many-many times, I used gdb for checking - like you asked - and I
still don't know what is wrong, or where to check next.

Here is what I think I know:
When something is changed on the options page, LO saves the changes when
pressing OK, otherwise it does nothing. Problem is, when my checkbox
changes, LO does nothing, as I have discovered with the debugger. In
optsave.cxx there is SfxSaveTabPage::Reset, which is the only function
where I found calls to the SaveValue member of the CheckBox class, so I
added here a call to save the value of mine.

This value is later queried in SfxSaveTabPage::FillItemSet, and stored in
an SfxItemSet. I found no calls to FillItemSet in any of the autosave
feature related files, so I suspect this function is used by whatever code
is used for managing tab pages.
In appcfg.cxx SfxApplication::SetOptions and SfxApplication::GetOptions
take and set values in an SfxItemSet object, so I guess this is another
part of the code the setting should travel through.

In autorecovery.cxx in AutoRecovery::implts_readAutoSaveConfig() these
settings are retreived by getByHierarchicalName.
Also they are referred to by macros in at least two places, and by strings
in at least four.
I added them to Recovery/Common.xcu/xcs where these identifier strings seem
to be stored, but it didn't help.

So it must be either something very obscure, or something that should be
glaringly obvious to me, but I just can't see it.

All the best,
Krisztian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130305/877c6e49/attachment.html>


More information about the LibreOffice mailing list