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

List:       koffice-devel
Subject:    Autosave and Templates problem
From:       jaham () gmx ! net
Date:       2008-10-28 20:54:57
Message-ID: 200810282154.57214.jaham () gmx ! net
[Download RAW message or body]

Hi folks...

I investigated why autosave does not work correctly when the user opened a 
template, modified the content and does not save it manually to another file 
before the autosave timer has run out.
When autosave kicks in it tries to save the document in the native format (see 
KoDocument::slotAutoSave). When saving it checks the outputMimeType which is a 
KoDocument internal variable to determine if it should save to oasis or the 
old native format. Unfortunately the outputMimeType is not set (i.e. is empty) 
when a template was loaded. This means it tries to save to the old native 
format. At least for Karbon that does not work, as there is no code to save to 
the old format anymore.
One solution for Karbon would be to just overload the virtual KoDocument slot 
openTemplate and set the outputMimeType to Karbon native format odg.
Another solution (also for other KOffice apps) would be to check the mimetype of 
the template in KoDocument::openTemplate and set that as the outputMimeType.

Any other ideas or suggestions?

Ciao Jan
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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