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


On 12/07/2011 03:14 AM, Fernand Vanrie wrote:
Dag Cor ,
Hi Fernand,

Fernand Vanrie wrote (06-12-11 13:17)
When have made some changes to a Dialog (stored in a Library) I trye to
make this changes persitent for future use.

Not sure if I understand you.
But I've some basic projects, where users settings/choices in a dialog are preserved for a next time the dialog is used. I do that simply by writing to some local config if the Dialog is executed and loading those settings when initialising the dialog.

Is that what you are looking for?
Yes i was also thinking on storing some settings "IN" a dialog (mis-ussing some property of a control) but in this case i have a lot of dialogs with Event URL's pointing to macro's in a document, we change the stuf to a exension and all the pointers to the macro's go the wrong way. So i tried to changes this event URL's but with no luck to make them persistent .

Thanks

Fernand

The secrets are in the methods off the dialog.model
odialog.model.read( ???)
odialog.model.write(???)
found a confusing explaination in the DSK but nullware any examples how
to use this read-write mechanism to make the changes persitent
I wrote an extension that is configurable. I store configuration options using

com.sun.star.configuration.ConfigurationProvider

I learned it well enough to use it but I am certainly not an expert on it. There is a complete example available if you install my colorizer / macro formatter (see http://extensions.libreoffice.org/extension-center/code-colorizer-formatter)

Look in the CfgFmtCode module for some example code. My guess is that you would need to create an extension to do this.

Another alternative is to directly modify a module to hold the values. This would entail replacing an entire module that would probably consist of function calls to return the data of interest. Not that difficult to do, but it feels kind of dirty.

You can also just persist the values in a configuration file. Have not given that much thought, but it should work.

Sadly, I cannot comment on directly modifying the dialog so that when it is next loaded it will contain the values of interest, but I have never done that.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

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.