Fixed non-functioning -xc: option when -xr: was not also specified

This commit is contained in:
vdvo 2002-05-27 16:07:29 +00:00
parent c36a503c27
commit a80a9680fe
3 changed files with 26 additions and 25 deletions

View File

@ -19,6 +19,7 @@ HEAD
* More code modularization
* Fixed handling of fonts (fixes some segfaults, closes bug 529044)
* Fixed "String Table Error" occurences in some (not all) empty cells
* Fixed non-functioning -xc: option when -xr: was not also specified
* Added some Alpha portability fixes.
0.5 04/13/02

View File

@ -7,6 +7,7 @@
- Modularize code. Separate XLS reading into a library, make a frontend with
various output formats: XML, HTML, CSV...
- Make main_line_processor()'s working buffer grow dynamically
- Improve error reporting and optional debug output
- Notes from Steve Grubb:
- Support String formulas
- Reduce memory footprint

View File

@ -633,31 +633,6 @@ void SetupExtraction(void)
{
ws_array[xp]->first_row = xr1;
ws_array[xp]->biggest_row = xr2;
if (xc1 < 0)
{
xc1 = ws_array[xp]->first_col;
xc2 = ws_array[xp]->biggest_col;
}
else if((xc1 >= ws_array[xp]->first_col)&&(xc1 <= ws_array[xp]->biggest_col)
&&(xc2 >= ws_array[xp]->first_col)&&(xc2 <= ws_array[xp]->biggest_col))
{
ws_array[xp]->first_col = xc1;
ws_array[xp]->biggest_col = xc2;
}
else
{
if (Ascii)
fprintf(stderr, "Error - Col not in range during extraction"
" (%d or %d not in [%d..%d])\n", xc1, xc2, ws_array[xp]->first_col, ws_array[xp]->biggest_col);
else
{
printf("Error - Col not in range during extraction.\n");
output_footer();
}
return;
}
}
else
{
@ -671,6 +646,30 @@ void SetupExtraction(void)
}
return;
}
if (xc1 < 0)
{
xc1 = ws_array[xp]->first_col;
xc2 = ws_array[xp]->biggest_col;
}
else if((xc1 >= ws_array[xp]->first_col)&&(xc1 <= ws_array[xp]->biggest_col)
&&(xc2 >= ws_array[xp]->first_col)&&(xc2 <= ws_array[xp]->biggest_col))
{
ws_array[xp]->first_col = xc1;
ws_array[xp]->biggest_col = xc2;
}
else
{
if (Ascii)
fprintf(stderr, "Error - Col not in range during extraction"
" (%d or %d not in [%d..%d])\n", xc1, xc2, ws_array[xp]->first_col, ws_array[xp]->biggest_col);
else
{
printf("Error - Col not in range during extraction.\n");
output_footer();
}
return;
}
}
else
{