mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fixed some bugs for tabulars & xforms-0.89, in vspace.C and lyxstring.
Have a look at Changelog for more details. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@209 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d2a80e12f2
commit
734751b383
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
1999-10-19 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/support/lyxstring.C (lyxstring): we permit to have a null
|
||||
pointer as assignment value and just don't assign it.
|
||||
|
||||
* src/vspace.C (nextToken): corrected this function substituting
|
||||
find_first(_not)_of with find_last_of.
|
||||
|
||||
* src/TableLayout.C (UpdateLayoutTable) (TableOptionsCB)
|
||||
(TableOptCloseCB) (TableSpeCloseCB):
|
||||
inserted fl_set_focus call for problem with fl_hide_form() in
|
||||
xforms-0.89.
|
||||
|
||||
1999-10-19 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/lyx_cb.C (LayoutsCB): fix bug where int was added to a
|
||||
|
@ -213,8 +213,13 @@ bool UpdateLayoutTable(int flag)
|
||||
fl_set_object_lcol(fd_form_table_options->radio_lt_newpage,
|
||||
FL_INACTIVE);
|
||||
}
|
||||
fl_set_button(fd_form_table_options->radio_rotate_table,table->RotateTable());
|
||||
fl_set_button(fd_form_table_options->radio_rotate_table,
|
||||
table->RotateTable());
|
||||
fl_set_focus_object(fd_form_table_options->form_table_options,
|
||||
fd_form_table_options->button_table_delete);
|
||||
} else if (fd_form_table_options->form_table_options->visible) {
|
||||
fl_set_focus_object(fd_form_table_options->form_table_options,
|
||||
fd_form_table_options->button_table_delete);
|
||||
fl_hide_form(fd_form_table_options->form_table_options);
|
||||
}
|
||||
return update;
|
||||
@ -428,21 +433,27 @@ void TableOptionsCB(FL_OBJECT *ob, long)
|
||||
current_view->currentBuffer()->text->TableFeatures(num);
|
||||
current_view->currentBuffer()->update(1);
|
||||
}
|
||||
if (num == LyXTable::DELETE_TABLE)
|
||||
if (num == LyXTable::DELETE_TABLE) {
|
||||
fl_set_focus_object(fd_form_table_options->form_table_options,
|
||||
fd_form_table_options->button_table_delete);
|
||||
fl_hide_form(fd_form_table_options->form_table_options);
|
||||
else
|
||||
} else
|
||||
UpdateLayoutTable(true);
|
||||
return;
|
||||
}
|
||||
|
||||
void TableOptCloseCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_set_focus_object(fd_form_table_options->form_table_options,
|
||||
fd_form_table_options->button_table_delete);
|
||||
fl_hide_form(fd_form_table_options->form_table_options);
|
||||
return;
|
||||
}
|
||||
|
||||
void TableSpeCloseCB(FL_OBJECT *, long)
|
||||
{
|
||||
fl_set_focus_object(fd_form_table_options->form_table_options,
|
||||
fd_form_table_options->button_table_delete);
|
||||
fl_hide_form(fd_form_table_extra->form_table_extra);
|
||||
return;
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ lyxstring::lyxstring(value_type const * s, size_type n)
|
||||
{
|
||||
Assert(s); // we don't allow null pointers
|
||||
static Srep empty_rep(0, "");
|
||||
if (*s && n) { // s is not empty string and n > 0
|
||||
if (s && *s && n) { // s is not empty string and n > 0
|
||||
rep = new Srep(min(strlen(s), n), s);
|
||||
} else {
|
||||
++empty_rep.ref;
|
||||
@ -348,9 +348,10 @@ lyxstring::lyxstring(value_type const * s, size_type n)
|
||||
|
||||
lyxstring::lyxstring(value_type const * s)
|
||||
{
|
||||
Assert(s); // we don't allow null pointers
|
||||
// yes we allow them just don't initalize them
|
||||
// Assert(s); // we don't allow null pointers
|
||||
static Srep empty_rep(0, "");
|
||||
if (*s) { // s is not empty string
|
||||
if (s && *s) { // s is not empty string
|
||||
rep = new Srep(strlen(s), s);
|
||||
} else {
|
||||
++empty_rep.ref;
|
||||
|
@ -92,8 +92,9 @@ static char nextToken (string & data)
|
||||
string::size_type i;
|
||||
|
||||
// I really mean assignment ("=") below, not equality!
|
||||
if ((i = data.find_first_not_of("0123456789.")) != string::npos) {
|
||||
if ((i = data.find_last_of("0123456789.")) != string::npos) {
|
||||
if (number_index > 3) return 'E'; // Error
|
||||
++i;
|
||||
string buffer = data.substr(0, i);
|
||||
if (sscanf (buffer.c_str(),
|
||||
"%f", &number[number_index]) == 1) {
|
||||
@ -102,9 +103,10 @@ static char nextToken (string & data)
|
||||
return 'n';
|
||||
} else
|
||||
return 'E'; // Error
|
||||
} else if (( i = data
|
||||
.find_first_of("abcdefghijklmnopqrstuvwxyz")) != string::npos) {
|
||||
} else if ((i=data.find_last_of("abcdefghijklmnopqrstuvwxyz"))
|
||||
!= string::npos) {
|
||||
if (unit_index > 3) return 'E'; // Error
|
||||
++i;
|
||||
string buffer = data.substr(0, i);
|
||||
unit[unit_index] = unitFromString (buffer);
|
||||
if (unit[unit_index] != LyXLength::UNIT_NONE) {
|
||||
|
Loading…
Reference in New Issue
Block a user