[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Help for KSpread publish/subscribe
From:       Philipp =?iso-8859-1?q?M=FCller?= <philipp.mueller () gmx ! de>
Date:       2002-07-16 17:18:05
[Download RAW message or body]

Hello Nicolas,

welcome to the team, I would say ;-)

If you don't mind, some comments from my side.


Am Dienstag, 16. Juli 2002 09:55 schrieb Nicolas Schryve:
> Hi,
> If you read the koffice mailing list, you have probably seen the purpose of
> my job. If not I have add a publish/subscribe function to KSpread and I'll
> join the first 'correct' patch.

Hmm, still a lot of noise in the patch. Did you really made a "make distclean" 
before generating the diff?

> If you look at my code, you'll probably see awful mistakes and bad way to
> realize the function.

Don't mind. I wouldn't say awful and even my code is far away from clean and 
perfect ;-).

> I want to discuss with you about one of my problem : I save links's data in
> a spreadsheet (I know it's a very bad way to do it, but it is the only
> solution I have found). I've hidden those spreadsheet, so the user don't
> see how it has been made. The reason why I've done that is that the data
> are saved when you save the file.

I've seen that in the code.

> I want to change this way to save the data, but I don't know how I can do
> that. That's why I prefer to guess you in order to follow the best way.

It's quite easy and far from magic. The magic part is done by the XML/DOM 
framework.

What you need to do is to extend the methods saveXML and loadXML in 
kspread_map.cc with the code to save and load. Just have a look into the 
several existing methods in the cc-files (i.e. table and map), how it saves 
and loads text, numbers, ...
If you need more help here, just let me know.

Then you need to adjust the dtd file. This file is not necessary for the 
load/save functionality, but it should reflect the content of a file for 
validation and as a help for filter writers. How to apply an optional info (I 
think this one is optional) is out of my experience yet. I'm sure Nicolas can 
help here.

To test the save of arguments, it's quite helpful to save in XML format 
(thanks to David for this direct funtionality).

General comments:

- The dialog doesn't seem to be very complicated, so maybe the drawing code 
can be done by hand (with hbox/vbox) rather than using QtDesigner and having 
hard coded geometry settings.

- Can you replace QDialog with KDialogBase as it integrates better?

- Style:
    dlg->~URLDialog();
use
    delete dlg;
instead.

- Translation:
   KMessageBox::questionYesNo(myDlg,"Do you want to publish the data ?")==3
i18n() the text, found at several places.

- Still missing: Undo/Redo. Have a look at kspread_undo.cc and look at the 
current code. Quite easy to do. Then look at the exisiting calls in e.g. 
kspread_table.cc for undo, how to call the undo functions.

- Still missing: What happens, when a sheet is deleted. Including undo.

- Indentation: Hmmm, much to emotional for everyone, but keep a style in all 
your code ;-)

Anyway, your code is very helpful and I hope, that when you finished this one, 
you will enhance other areas too. So don't get offended by my comments, if 
you don't like them, ignore them. We need more developers and I would be a 
foul if I offend any newcomer.

Philipp
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic