Hi, >> in binfilter as read-only filters (using as filter flag >> SFX_FILTER_OPENREADONLY defined as 0x00010000L) This will make the >> opening read-only. By this way, this is not possible any more to save
> IIRC the resolution was a bit different ;-) you are right:-) > This way the user will be > unable to modify the document, unless she uses the 'create copy' > possibility, right? Exact, or first SaveAs and choosing another format. > The proposal was to load it so that it is read/write, but issue a > warning like "The format of the file you opened is legacy, and [...] > As... menu (and consequently from Save). > remove EXPORT from filter/source/config/fragments/filters/StarWriter_5_0.xcu Tested. It works (almost) fine. And since there is no EXPORT anymore, the filter is not available in SaveAs, and when clicking Save, you get the SaveAs pop-up automatically. But I have 2 points: Thus, there is a major difference: With READONLY, no lock-file is generated when the file is openend. With filter without the EXPORT, the lock-file is still generated.... This comes during the load process, where the SfxMedium::IsReadOnly() function is called in order to decide if this lock-file has to be created or not.(Not spotted the exact place yet) Actually, I think this is not a correct behaviour. If the filter is not EXPORT; there is no reason to create the lock-file ? or ??? Should I consider changing the code of the loading part, in order to not create a lock-file if the filter has not EXPORT properties? From file point of view, this is the same case: you can not save this file "as-is". Second issue I see: (I just though of it right now, did not yet test / investigate): with opening in read/write and without EXPORT filter, what happens with the auto-save option, after some changes have been done? The filter, despite write is not usable (no export). ... So ideally could it be: not export, READONLY and pop-up ?? :- / >> c) it seems there are elements in the sfx2 of binfilter that are still >> called, generated, but have no impact on the running system. > > Yes - I think Caolan's callcatches might help you here a lot. Though of it and looked, but actually not in the above case. > As outlined above, my favorite approach would be to 'disconnect' the > binfilter from the save functionality first, add the dialog on open, and dialog pop-up just at the end of loading the document ? will search for the right place. > I hope I helped a bit, yes thanks > please ask more if not really :-) Thanks regards Pierre-André _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice