Re: Format hack in client.C

2004-11-11 Thread Georg Baum
Herbert Voss wrote: I have an image with an unknown format, so LyX returns user. If I save all these files as *.user then I am able to define a converter so that all these images can be previewed inside LyX. which is not possible when '' is returned, if I am not wrong here. Defining a

Re: Format hack in client.C

2004-11-11 Thread Georg Baum
Herbert Voss wrote: > I have an image with an unknown format, so LyX returns user. > If I save all these files as *.user then I am able to define > a converter so that all these images can be previewed inside > LyX. which is not possible when '' is returned, if I am not > wrong here. Defining a

Re: Format hack in client.C

2004-11-10 Thread Herbert Voss
Georg Baum wrote: Am Dienstag, 9. November 2004 09:19 schrieb Lars Gullik Bjønnes: I am quite happy with your patch... Good. with this fixed. Of course ;-) I am applying this now. I'll fix the users format later if it is needed after Herberts explanation (which he hopefully gives). I have an

Re: Format hack in client.C

2004-11-10 Thread Herbert Voss
Georg Baum wrote: Am Dienstag, 9. November 2004 09:19 schrieb Lars Gullik Bjønnes: I am quite happy with your patch... Good. with this fixed. Of course ;-) I am applying this now. I'll fix the "users" format later if it is needed after Herberts explanation (which he hopefully gives). I have an

Re: Format hack in client.C

2004-11-09 Thread Georg Baum
Lars Gullik Bjønnes wrote: Georg Baum [EMAIL PROTECTED] writes: This is a wrapper... Yes, it was a misunderstanding, I was thinking you suggested a wrapper around the wrapper, and I could not see why we want two wrappers ;-) is formatlist a member of something, or a global var? It is a

Re: Format hack in client.C

2004-11-09 Thread Georg Baum
Am Dienstag, 9. November 2004 09:19 schrieb Lars Gullik Bjønnes: I am quite happy with your patch... Good. with this fixed. Of course ;-) I am applying this now. I'll fix the users format later if it is needed after Herberts explanation (which he hopefully gives). Georg

Re: Format hack in client.C

2004-11-09 Thread Georg Baum
Lars Gullik Bjønnes wrote: > Georg Baum <[EMAIL PROTECTED]> > writes: > This is a wrapper... Yes, it was a misunderstanding, I was thinking you suggested a wrapper around the wrapper, and I could not see why we want two wrappers ;-) > is formatlist a member of something, or a global var? It is

Re: Format hack in client.C

2004-11-09 Thread Georg Baum
Am Dienstag, 9. November 2004 09:19 schrieb Lars Gullik Bjønnes: > I am quite happy with your patch... Good. > with this fixed. Of course ;-) I am applying this now. I'll fix the "users" format later if it is needed after Herberts explanation (which he hopefully gives). Georg

Re: Format hack in client.C

2004-11-08 Thread Georg Baum
diff -u -p -r1.5 ChangeLog --- src/client/ChangeLog 29 Oct 2004 15:47:53 - 1.5 +++ src/client/ChangeLog 8 Nov 2004 18:22:34 - @@ -1,3 +1,7 @@ +2004-11-08 Georg Baum [EMAIL PROTECTED] + + * client.C: remove format hack + 2004-10-29 Georg Baum [EMAIL PROTECTED] * client.C (formats): new

Re: Format hack in client.C

2004-11-08 Thread Herbert Voss
Georg Baum wrote: Here comes the patch. I removed the useless user format in the process. Now getFormatFromContents() either returns a format name or an empty string if it cannot determine the format. I even found two cases where the return value of getFormatFromContents() needed to be checked.

Re: Format hack in client.C

2004-11-08 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes wrote: Georg Baum [EMAIL PROTECTED] writes: | Would it be ok with you to have something like | Format const *Formats::getFormatFromFile(string filename) | that does what getFormatFromContents() did before your patch? Yes. One

Re: Format hack in client.C

2004-11-08 Thread Lars Gullik Bjønnes
Herbert Voss [EMAIL PROTECTED] writes: | Georg Baum wrote: Here comes the patch. I removed the useless user format in the process. Now getFormatFromContents() either returns a format name or an empty string if it cannot determine the format. I even found two cases where the return value of

Re: Format hack in client.C

2004-11-08 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes: | +string Formats::getFormatFromFile(string const filename) const | +{ | + if (filename.empty()) | + return string(); | + | + string const format = | lyx::support::getFormatFromContents(filename) This is a wrapper... is formatlist a

Re: Format hack in client.C

2004-11-08 Thread Georg Baum
Herbert Voss wrote: Georg Baum wrote: Here comes the patch. I removed the useless user format in the process. Now getFormatFromContents() either returns a format name or an empty string if it cannot determine the format. I even found two cases where the return value of

Re: Format hack in client.C

2004-11-08 Thread Georg Baum
mp; filename) const; /// int getNumber(std::string const & name) const; /// Index: src/client/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/client/ChangeLog,v retrieving revision 1.5 diff -u -p -r1.5 ChangeLog --- s

Re: Format hack in client.C

2004-11-08 Thread Herbert Voss
Georg Baum wrote: Here comes the patch. I removed the useless "user" format in the process. Now getFormatFromContents() either returns a format name or an empty string if it cannot determine the format. I even found two cases where the return value of getFormatFromContents() needed to be checked.

Re: Format hack in client.C

2004-11-08 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: > >> Georg Baum <[EMAIL PROTECTED]> >> writes: >> | Would it be ok with you to have something like >> | Format const *Formats::getFormatFromFile(string filename) >> | that does what getFormatFromContents() did before your patch?

Re: Format hack in client.C

2004-11-08 Thread Lars Gullik Bjønnes
Herbert Voss <[EMAIL PROTECTED]> writes: | Georg Baum wrote: > >> Here comes the patch. I removed the useless "user" format in the process. >> Now getFormatFromContents() either returns a format name or an empty string >> if it cannot determine the format. I even found two cases where the return

Re: Format hack in client.C

2004-11-08 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes: | +string Formats::getFormatFromFile(string const & filename) const | +{ | + if (filename.empty()) | + return string(); | + | + string const format = | lyx::support::getFormatFromContents(filename) This is a wrapper... is formatlist a

Re: Format hack in client.C

2004-11-08 Thread Georg Baum
Herbert Voss wrote: > Georg Baum wrote: > >> Here comes the patch. I removed the useless "user" format in the process. >> Now getFormatFromContents() either returns a format name or an empty >> string if it cannot determine the format. I even found two cases where >> the return value of

Format hack in client.C

2004-11-07 Thread Lars Gullik Bjønnes
This hack (dummy Format object to make libsupport link), is not acceptable. This means that the usage for Format and format.h in support/filetools.C is not acceptable and must go away. libsupport should should not include anything from core. It is a support library. I am going to apply the

Re: Format hack in client.C

2004-11-07 Thread Georg Baum
Am Sonntag, 7. November 2004 13:52 schrieb Lars Gullik Bjønnes: This hack (dummy Format object to make libsupport link), is not acceptable. Then it needs to be removed from tex2lyx, too. This means that the usage for Format and format.h in support/filetools.C is not acceptable and must go

Re: Format hack in client.C

2004-11-07 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes: | Am Sonntag, 7. November 2004 13:52 schrieb Lars Gullik Bjønnes: This hack (dummy Format object to make libsupport link), is not acceptable. | Then it needs to be removed from tex2lyx, too. This means that the usage for Format and format.h in

Format hack in client.C

2004-11-07 Thread Lars Gullik Bjønnes
This hack (dummy Format object to make libsupport link), is not acceptable. This means that the usage for Format and format.h in support/filetools.C is not acceptable and must go away. libsupport should should not include anything from "core". It is a support library. I am going to apply the

Re: Format hack in client.C

2004-11-07 Thread Georg Baum
Am Sonntag, 7. November 2004 13:52 schrieb Lars Gullik Bjønnes: > > This hack (dummy Format object to make libsupport link), is not > acceptable. Then it needs to be removed from tex2lyx, too. > This means that the usage for Format and format.h in > support/filetools.C is not acceptable and

Re: Format hack in client.C

2004-11-07 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes: | Am Sonntag, 7. November 2004 13:52 schrieb Lars Gullik Bjønnes: >> >> This hack (dummy Format object to make libsupport link), is not >> acceptable. > | Then it needs to be removed from tex2lyx, too. > >> This means that the usage for Format and format.h