Kaydet (Commit) aaf6ec88 authored tarafından wg111939's avatar wg111939

native0: 161788

üst 4dc7c5a1
...@@ -481,28 +481,34 @@ testcase tPDF_Creator ...@@ -481,28 +481,34 @@ testcase tPDF_Creator
dim sExtension() as String dim sExtension() as String
sTemp = ConvertPath ( gTesttoolPath + "graphics\required\input\export_graphic3." + ExtensionString ) sTemp = ConvertPath ( gTesttoolPath + "graphics\required\input\export_graphic3." + ExtensionString )
printlog "sTemp=" & sTemp
printlog "File load"
hFileOpen (sTemp) hFileOpen (sTemp)
sleep (30) sleep (30)
sPath = OutputGrafikTBO sPath = OutputGrafikTBO
sTemp = sPath sTemp = sPath
sPath = sPath + "L.pdf" sPath = sPath + "L.pdf"
printlog "sPath : " & sPath
sleep(1) sleep(1)
printlog "Exporting File as pdf but with txt ending.."
hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1) hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1)
name sPath as sTemp+"L.txt" name sPath as sTemp+"L.txt"
sleep (30) sleep (30)
iFileSize(3) = app.FileLen(sTemp+"L.txt") iFileSize(3) = app.FileLen(sTemp+"L.txt")
iCreatorOffset = 0 iCreatorOffset = 0
sleep 5 sleep 5
'/// load file in writer as text ///' printlog "load file in writer as text"
printlog "Load File.."
hFileOpen(sTemp+"L.txt") hFileOpen(sTemp+"L.txt")
'/// if dialog 'AsciiFilterOptionen' comes up, say OK ///' printlog "If dialog 'AsciiFilterOptionen' comes up, say OK"
printlog "Checking for FilterDialog.."
Kontext "AsciiFilterOptionen" Kontext "AsciiFilterOptionen"
If AsciiFilterOptionen.Exists(3) then If AsciiFilterOptionen.Exists(3) then
AsciiFilterOptionen.OK AsciiFilterOptionen.OK
endif endif
printlog "Selecting Filter.."
Kontext "Filterauswahl" Kontext "Filterauswahl"
If Filterauswahl.Exists then If Filterauswahl.Exists then
Filter.Select ( hGetUIFiltername("Text" )) Filter.Select ( hGetUIFiltername("Text" ))
...@@ -511,45 +517,58 @@ testcase tPDF_Creator ...@@ -511,45 +517,58 @@ testcase tPDF_Creator
sApp = gApplication sApp = gApplication
gApplication = "WRITER" gApplication = "WRITER"
sleep 5 ' wait for document to be loaded sleep 5
' /Creator printlog "Search in Doc for <</Creator<"
bTemp = hFindeImDokument ("<</Creator<",true,true) bTemp = hFindeImDokument ("<</Creator<",true,true)
if (bTemp = TRUE) then if (bTemp = TRUE) then
Printlog "OK" Printlog "OK, found."
else else
warnlog " /Creator not found in pdf file :-(" warnlog " /Creator not found in pdf file :-("
endif endif
printlog "getting Clipboard Text.."
hTypeKeys("<left><right><shift end>") hTypeKeys("<left><right><shift end>")
editcopy editcopy
sTemp = getClipboardText() sTemp = getClipboardText()
printlog "sTemp from clipboard: " & sTemp
sTemp = left(sTemp, inStr(sTemp, ">")-1) sTemp = left(sTemp, inStr(sTemp, ">")-1)
printlog "shortened sTemp: " & sTemp
sTemp2 = "" sTemp2 = ""
for i = 0 to (len(sTemp)/4)-1 for i = 0 to (len(sTemp)/4)-1
sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4)) sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
next i next i
printlog "sTemp2: " & sTemp2
printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'" printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then
warnlog "Application is different from Creator; is: '" + lCase(sTemp2) + "' should: '" + lCase(sapp) + "'" warnlog "Application is different from Creator; is: '" + lCase(sTemp2) + "' should: '" + lCase(sapp) + "'"
endif endif
printlog "iCreatorOffset: " & iCreatorOffset
iCreatorOffset = iCreatorOffset + len(sTemp) iCreatorOffset = iCreatorOffset + len(sTemp)
' /Producer printlog "iCreatorOffset + len(sTemp): " & iCreatorOffset
printlog "Search for Producer.."
bTemp = hFindeImDokument ("/Producer<") bTemp = hFindeImDokument ("/Producer<")
if (bTemp = TRUE) then if (bTemp = TRUE) then
Printlog "OK" Printlog "OK, found."
else else
warnlog " /Producer not found in pdf file :-(" warnlog " /Producer not found in pdf file :-("
endif endif
printlog "getting clipboard content.."
hTypeKeys("<left><right><shift end><shift down>") hTypeKeys("<left><right><shift end><shift down>")
editcopy editcopy
sTemp = getClipboardText() sTemp = getClipboardText()
printlog "sTemp from clipboard: " & sTemp
sTemp = left(sTemp, inStr(sTemp, ">")-1) sTemp = left(sTemp, inStr(sTemp, ">")-1)
printlog "shortened sTemp: " & sTemp
sTemp2 = "" sTemp2 = ""
printlog "len(sTemp): " & ((len(sTemp)/4)-1)
for i = 0 to (len(sTemp)/4)-1 for i = 0 to (len(sTemp)/4)-1
sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4)) sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
printlog "sTemp2: " & sTemp2
next i next i
printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'" printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
if gOOO then if gOOO then
iCreatorOffset = iCreatorOffset + len(sTemp) iCreatorOffset = iCreatorOffset + len(sTemp)
printlog "In case of OOO iCreatorOffset is: " & iCreatorOffset
else else
if bAsianLan then if bAsianLan then
iCreatorOffset = iCreatorOffset + 48 iCreatorOffset = iCreatorOffset + 48
...@@ -557,9 +576,11 @@ testcase tPDF_Creator ...@@ -557,9 +576,11 @@ testcase tPDF_Creator
warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'" warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'"
endif endif
else else
printlog "iCreatorOffset:" & iCreatorOffset
iCreatorOffset = iCreatorOffset + 52 iCreatorOffset = iCreatorOffset + 52
if (len(sTemp) <> 52) then printlog "iCreatorOffset + 52:" & iCreatorOffset
warnlog "Producer is different from 'StarOffice 8'; is: '" + sTemp2 + "'" if (len(sTemp) <> 92) then
warnlog "Producer is different from ''; is: '" + sTemp2 + "'"
endif endif
endif endif
endif endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment