Test specification: g_export_html.bas
Test purpose: Graphics Function: Export to HTML
Preconditions of the test: Working testtool environment
Test files:
id_tools.inc, g_export_html.inc
Testcases
hSetSpellHypLanguage (id_tools.inc)select a language with a dictionary, used for spellcheck, thesaurus and hyphenation
Tools->Options
select from section 'Language Settings' the item 'Languages'
check checkbox 'For the current document only' in section 'Default languages for document'
If
there is no Language defined in 'locale-file' (in same directory as
this file is) be smart and select one that supports spellchecking
cancel dialog 'Options - ' call the smart subroutine that tells you a
valid language with an dictionary Tools->Options select from section
'Language Settings' the item 'Languages' check checkbox 'For the
current document only' in section 'Default languages for document'
if
smart routine found something, select it in section 'Default languages
for document' listbox 'Western' (manual users just select a language
that has an icon in front of it ('ABC' with a checkmark)
if a Language is already defined in the textfile
select
it in section 'Default languages for document' listbox 'Western'
(manual users just select a language that has an icon in front of it
('ABC' with a checkmark) close dialog 'Options - ' with OK
hFindSpellHypLanguage (id_tools.inc)print all available languages that have a 'language module'
only necessarry for asian languages
Tools->Options
select from section 'Language Settings' the item 'Writing Aids'
click button 'Edit...' in section 'Available language modules'
print all entries from listbox 'Language'
return the first entry in the listbox
close dialog 'Edit Modules'
close dialog 'Options - '
GetDecimalSeperator (id_tools.inc)Input : number with fractionmark from 'NumericField' as String Output: '.' or ',' as String
StrToDouble (id_tools.inc)Input : {'a[. ,]b[mm cm " pi pt]' with a, b as integer} as String Output: a[. , ]b as double
GetMeasUnit (id_tools.inc)Input : Number with or
without MeasurementUnit 'NumericField' as String Output: Initials of
MeasurementUnit as String or "" when only a number
LiberalMeasurement (id_tools.inc)Input : (1. Should,
2. Actual) as Number with or without MeasurementUnit 'NumericField' as
String if input has no MeasurementUnit i take it as 'cm' (was the
default in old tests) Output: Boolean are they likely the same?
NEEDED: mathematical proofment of iTolerance, by now just some guesses :-|
reason
for this function: because SO counts internaly in 'twip???s' 'twentieth
of a point' there are some rounding errors there are also some rounding
errors because of the internal representatio of floating point numbers
in computers now lets try to get rid of them and have a nicer output in
tests...
measurement units are defined in http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src
tHtmlExport (g_export_html.inc)open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData'
create directory if not exists and delete the content, if exists user\work\html\
open application
create a rectrangle
create another rectrangle
test if no file is created, if dialog is canceld
call 'File->Export'
create the HTML filter for application :-(
select Filetype 'HTML...' aka 'WebPage'
set Filename to 'user\work\html\expo0.html'
click button 'Save'
now we are on the dialog -1- 'Assign design'
click button 'Cancel'
test if files are created
call 'File->Export'
select Filetype 'HTML...' aka 'WebPage'
Selects the first entry - which should be html
set Filename to 'user\work\html\expo.html'
click button 'Save'
now we are on the dialog -1- 'Assign design'
'New design' should be checked
click button 'Next >>'
now we are on the dialog -2- 'Publication Type & Options'
checkbox 'Standard HTML Format' is checked by default
checkbox 'Title Page' is checked by default
if applcation is impress: the checkbox 'Show notes' is enabled by default
click button 'Next >>'
now we are on the dialog -3- 'gif/jpeg & resolution & sound'
checkbox 'JPG' is checked by default
Listbox compression '75%' is selected by default
checkbox 'low monitor resolution' is checked by default
checkbox 'export sounds' is checked by default
click button 'Next >>'
now we are on the dialog -4- 'Information for the title page'
the names you entered in the options have to appeare here!
set text in field 'your homepage'
'Link to copy...' should not be checked by default
click button 'Next >>'
now we are on the dialog -5- 'select button style'
checkbox 'Text only' should be checked by default
click button 'Next >>'
now we are on the dialog -6- 'select color scheme'
'Apply color schemes from document' should be checked per default :-)
click button 'Create'
now we are on the dialog -7- 'Name HTML Design'
check number and names of created files
check if fileextension is common - .htm or .html for all files the same
check if design is created in dialog
File->Export
Set Filename to "user\work\html\expo.html"
select Filetype 'HTML...' aka 'WebPage'
click button 'save'
now 'existing design' is checkable -> check it
there has to be 1 design in the list, select and delete it
tHtmlExport_Webcast (g_export_html.inc)create directories if not exists and delete the content, if exists user\work\html\[asp|perl]\
File->Autopillot->Presentation...
Page 1 of autopilot
uncheck 'preview'
click on button 'create'
last Page of autopilot
type 7 times 'cursor right' in the field 'Select an autolayout'
set 'name' to 'Seite 1'
press button OK
create a presentation and save it for further references
start creating the presentation now
select 'click to add title' with [TAB] and press [F2] to edit the placeholder title
Type 'Unser Sonnensystem', select it.
click 'bold text' in object toolbar
press [esacpe][tab] to get out of edit mode and select the next placeholder
SlideShow->Effects
click button 'effects'
select speed 'slow' -> first item in list
select effect 'ABC v' :-)
cklick om button 'assign'
close dialog 'effects'
activate grafik insert dialog by typing [return]
insert grafik: global\input\graf_inp\borabora.jpg
select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder
insert text and select the words by typing [strg a]
format->character
set font size to '18' on tabpage 'font'
click button OK
click 'bold text' in object toolbar
SlideShow->Effects
close dialog 'effects'
create a 2nd slide with: insert->slide
select 'click to add title' with [TAB] and press [F2] to edit the placeholder title
Type 'MERKUR', select it via Edit-Select All
click 'bold text' in object toolbar
press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog
insert grafik: global\input\graf_inp\borabora.jpg
select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder
insert text and select the words by typing [strg a]
format->character
set font size to '18' on tabpage 'font'
click button OK
click 'bold text' in object toolbar
save file with impress filter : "user\work\webcast.sxi"
export as webcast ASP
File->export
select Filetype 'HTML...' aka 'WebPage'
Selects the first entry - which should be html
Set Filename to "user\work\webcst_asp.html"
click button 'save'
now we are on the dialog -1- 'Assign design'
click button 'Next >>'
now we are on the dialog -2- 'Publication Type & Options'
check 'WebCast'
check 'Active Server Pages (ASP)'
click button 'Next >>'
now we are on the dialog -3- 'gif/jpeg & resolution & sound'
check Save graphics as 'GIF'
check 'Medium (monitor) Resolution'
click button 'Create'
now we are on the dialog -7- 'Name HTML Design'
click button 'Do Not Save'
export as webcast PERL
File->export
select Filetype 'HTML...' aka 'WebPage'
Set Filename to "user\work\wbcst_p.html"
click button 'save'
click button 'save'
now we are on the dialog -1- 'Assign design'
click button 'Next >>'
now we are on the dialog -2- 'Publication Type & Options'
check 'WebCast'
check 'Perl'
'URL for listeners'
set 'URL for presentation' to 'wbcst_prl.html'
set 'URL for perl scrips' to '/WebCast/cgi-bin/'
click button 'Next >>'
now we are on the dialog -3- 'gif/jpeg & resolution & sound'
check Save graphics as 'GIF'
check 'Medium (monitor) Resolution'
click button 'Create'
fIsDocumentWritable (id_tools.inc)check if a document is writeable
parameter:
return:
true if the document is writeable otherwise false
fMakeDocumentWritable (id_tools.inc)make a document is writeable
parameter:
return:
true if the document can make writeable otherwise false
Problematic areas