Lars Gullik Bjønnes wrote:

> Helge Hafting <[EMAIL PROTECTED]> writes:
> | Isn't this what svn, the version control system is for?
> | If the spellchecker is removed and the new one takes
> | "too much time", you can get impatient and revert the removal?

Exactly. Of course only if you don't combine several logocal chanages in one
commit.

> Bear in mind that this is not the only thing that will happen to the
> svn repo, so "rolling" back the changes can be quite cumbersome.

Why is this thing so difficult? It should be no problem to let Abdel work on
the spell checker stuff exactly as he likes if he promises to finish it
completely, with configure support, preferences and all, and support for
aspell and ispell, either via enchant or directly in LyX, if it turns out
that enchant does not really work with one of these.
If he is willing to do that then I don't see any problem. If the bus thing
happens (which is not very likely after all), then reverting the whole
thing might still need a bit of work, but since we are not rewriting LyX
completely, only changing some interfaces at the moment, this additional
work will not be so much.

On the other hand Abdel, if keeping the other spell checkers is really
negligible extra work (I can't judge because I did not look closely at the
code), then I don't see any reason to not do that either.

> | 1.5 is not in a useable state right now anyway, how about just
> | seting a time limit on this removal thing?
> 
> Perhaps then we should get it into usable state before we do anyting
> else...
> It just crashes for me...
> 
> bformat/docstring/locale stuff.

The problem is that bformat uses at least use_facet<ctype<lyx::char_type>
>() and use_facet<num_put<lyx::char_type> >(), and both methods throw an
exception with gcc.

I have a working ctype, but don't know yet what is wrong with num_put. Since
I run out of time lately I propose to put the attached patch in as an
interim fix (in two parts, because the convert/bformat changes should not
be reverted). OK?

Maybe I can come up with something working over the weekend.


Georg


PS: I also have a pending patch for plain text output that changes the
streams to wide streams, so please don't start work on that. I can of
course send what I have if somebody is interested or I don't find time soon
to continue that work.
Index: src/support/lstrings.C
===================================================================
--- src/support/lstrings.C	(Revision 14982)
+++ src/support/lstrings.C	(Arbeitskopie)
@@ -788,9 +788,11 @@ template<>
 docstring bformat(docstring const & fmt, char * arg1)
 {
 	BOOST_ASSERT(contains(fmt, lyx::from_ascii("%1$s")));
-	docstring const str = subst(fmt, lyx::from_ascii("%1$s"), arg1);
+	docstring const str = subst(fmt, lyx::from_ascii("%1$s"), lyx::from_ascii(arg1));
 	return subst(str, lyx::from_ascii("%%"), lyx::from_ascii("%"));
 }
+
+
 template<>
 docstring bformat(docstring const & fmt, docstring arg1, docstring arg2)
 {
@@ -807,7 +809,7 @@ docstring bformat(docstring const & fmt,
 {
 	BOOST_ASSERT(contains(fmt, lyx::from_ascii("%1$s")));
 	BOOST_ASSERT(contains(fmt, lyx::from_ascii("%2$s")));
-	docstring str = subst(fmt, lyx::from_ascii("%1$s"), arg1);
+	docstring str = subst(fmt, lyx::from_ascii("%1$s"), lyx::from_ascii(arg1));
 	str = subst(fmt, lyx::from_ascii("%2$s"), arg2);
 	return subst(str, lyx::from_ascii("%%"), lyx::from_ascii("%"));
 }
Index: src/support/convert.C
===================================================================
--- src/support/convert.C	(Revision 14982)
+++ src/support/convert.C	(Arbeitskopie)
@@ -53,12 +53,14 @@ string convert<string>(int i)
 	return lexical_cast<string>(i);
 }
 
+
 template<>
 docstring convert<docstring>(int i)
 {
 	return lyx::from_ascii(lexical_cast<string>(i));
 }
 
+
 template<>
 string convert<string>(unsigned int ui)
 {
@@ -67,6 +69,13 @@ string convert<string>(unsigned int ui)
 
 
 template<>
+docstring convert<docstring>(unsigned int ui)
+{
+	return lyx::from_ascii(lexical_cast<string>(ui));
+}
+
+
+template<>
 string convert<string>(unsigned long ul)
 {
 	return lexical_cast<string>(ul);
@@ -81,6 +90,13 @@ string convert<string>(long l)
 
 
 template<>
+docstring convert<docstring>(long l)
+{
+	return lyx::from_ascii(lexical_cast<string>(l));
+}
+
+
+template<>
 string convert<string>(float f)
 {
 	return lexical_cast<string>(f);
Index: configure.ac
===================================================================
--- configure.ac	(Revision 14982)
+++ configure.ac	(Arbeitskopie)
@@ -385,11 +385,11 @@ int mkstemp(char*);
 #endif
 #endif
 
-#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
-#  define USE_BOOST_FORMAT 1
-#else
+//#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
+//#  define USE_BOOST_FORMAT 1
+//#else
 #  define USE_BOOST_FORMAT 0
-#endif
+//#endif
 
 #define BOOST_USER_CONFIG <config.h>
 
Index: development/cmake/config.h.cmake
===================================================================
--- development/cmake/config.h.cmake	(Revision 14982)
+++ development/cmake/config.h.cmake	(Arbeitskopie)
@@ -119,11 +119,11 @@
 
 #define BOOST_ALL_NO_LIB 1
 
-#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
-#  define USE_BOOST_FORMAT 1
-#else
+//#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
+//#  define USE_BOOST_FORMAT 1
+//#else
 #  define USE_BOOST_FORMAT 0
-#endif
+//#endif
 
 
 #if !defined(ENABLE_ASSERTIONS)
Index: development/scons/SConstruct
===================================================================
--- development/scons/SConstruct	(Revision 14982)
+++ development/scons/SConstruct	(Arbeitskopie)
@@ -915,11 +915,11 @@ if not fast_start or not os.path.isfile(
         ],
         config_post = '''
 
-#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
-#  define USE_BOOST_FORMAT 1
-#else
+//#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM)
+//#  define USE_BOOST_FORMAT 1
+//#else
 #  define USE_BOOST_FORMAT 0
-#endif
+//#endif
 
 #if !defined(ENABLE_ASSERTIONS)
 #  define BOOST_DISABLE_ASSERTS 1

Reply via email to