Document Owner:

Frank Stecher

Last document change:

22.01.2007

Status of document:

Standard

Valid for version: StarOffice8, StarOffice8 PP1, StarOffice8 PP2, StarOffice8 PP3, StarOffice8 PP4, StarOffice8 PP6

Test purpose:

Test the dbase filter


Known issues:


Preconditions of test:

Cell content of the first not empty row will only be interpreted as field name if all of the column content are strings. Otherwise names will be generated (N1 to N256) and the first row will be exported as data value. Fieldnames that should be exported must follow the criteria's for dbase III. If they do not follow the criteria's, the Header names will be forced to compare to the needs of the format by renaming them : The first character must be a letter [A-Z], if it's not an 'N' will be inserted. Only alphanumeric characters and under scores are allowed [_0-9A-Z], all other characters will be changed to an underscore. The maximum length is 10 characters. Names longer than ten characters will be shortened. Double fieldnames are not allowed, they will be changed by adding a number (2 to ...) and shortening the original name to fit the needs. If it is discovered on dbase export that a field (column) is formatted as string with more than 254 characters (dbase limit) or in an undefined field the string length exceeds 254 characters, this column will be automatically exported as memofield. All String formatted fields with less then 254 characters will be exported as is. Exceeding contents will be cut off. Check if a Warning message is displayed on saving with inappropriate Fieldtypes (wrong Content, fieldlength to short)


Test documents:

problem_dbf.ods


Testcases:

Errormessage testing for not valid Characters in the choosen encoding scheme

Status: Standard

-

Open the bugdoc and try to save it to a DBF file.
Choose Cyryllic (DOS/OS2-866/Russian) as the encoding type.
You should get an error message :

Cell $(ARG1) contains characters that are not representable in the
selected target character set "$(ARG2)".
Where $(ARG1) is replaced with the cell address, e.g. B1, and $(ARG2)
is replaced with the UI name of the character set, e.g. 
(Cyrillic  DOS/OS2-866/Russian)

Confirm the dialog and close the file.

Open a new Calc document and enter T1,c,1 into cell a1
enter 'Ö' (without quotation marks) into A2
enter another single character into A3
Save the document as DBase file with Character Encoding UTF-8
You should get a Warning like this one :

Error saving the document test.dbf:
Write Error.
Cell A2 contains a string that is longer in the selected target character set "Unicode (UTF-8)"
Than the given field width.

Do the same with T1,c,2 in A1 and 'Äü' in A2
The same Error Message should appear.

DBase Import / Export test

Status: Standard

-

Create a document with the following data types L (Logical), D (Date), C (Character) and N (Numeric) but no Header (Basic Syntax of the Headerrow: Name[,Typ[,Length[,Decimals]]])

Save the file to DBase format and close the document.
Load the resulting file.
Are where any differences except the Header ?
Are the parameters in the Header set in the correct way ?(L set correct ?)
Save it again as a new DBase file and close it.
Open the file, are where any differences (including the Header); are the parameters in the Header unchanged ?
Change the parameter in the Header (all Datatypes)
Do a save as DBase again and close the document.
Open the file again, compares the document to the header settings ?
Are the parameters in the headers the same as before ?