diff options
Diffstat (limited to 'smoketestoo_native/data/Global.xml')
-rw-r--r-- | smoketestoo_native/data/Global.xml | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml index 364d2e2efcfb..43d0a14e6734 100644 --- a/smoketestoo_native/data/Global.xml +++ b/smoketestoo_native/data/Global.xml @@ -131,11 +131,11 @@ Sub Main if bShowTable then call ClearDoc (gOutPutDoc) end If - + call ClearStatus - + Call Test_10er.Main - + if bShowTable then call CreateStatusTable2 call CreateStatusTable @@ -155,7 +155,7 @@ Sub CreateStatusTable tableHeaders(cStMath) = "Math" tableHeaders(cStHTML) = "HTML" tableHeaders(cStJava) = "Java" - + dim tableColums(5) as string tableColums(cDocNew) = "new" tableColums(cDocCut) = "cut" @@ -163,60 +163,60 @@ Sub CreateStatusTable tableColums(cDocSaveOpen8) = "V8.0" tableColums(cDocSaveOpenXML) = "XML" tableColums(cDocSaveOpen50) = "V5.0" -' tableColums(cDocClose) = "close" - +' tableColums(cDocClose) = "close" + aDoc = gOutPutDoc - + xText = aDoc.Text xCursor = xText.createTextCursor() - -' xCursor.gotoStart(FALSE) -' xCursor.GoRight (2, False) -' SetParagraphBreak (xCursor) -' SetParagraphBreak (xCursor) + +' xCursor.gotoStart(FALSE) +' xCursor.GoRight (2, False) +' SetParagraphBreak (xCursor) +' SetParagraphBreak (xCursor) xCursor.gotoStart(FALSE) xCursor.GoRight (4, False) SetParagraphBreak (xCursor) xCursor.GoRight (1, False) SetParagraphBreak (xCursor) xCursor.GoRight (1, False) - + table = aDoc.createInstance("com.sun.star.text.TextTable") table.initialize(7,9) table.Name = "StTab1" xText.insertTextContent(xCursor, table, FALSE) - + tableCursor = table.createCursorByCellName(table.CellNames(0)) tableCursor.gotoStart(FALSE) tableCursor.goRight(1,FALSE) - + for i% = 0 to 7 cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.String=tableHeaders(i%) - + xCell.BackTransparent = False xCell.BackColor = cCoGrey - + tableCursor.goRight(1,FALSE) next i% - + xCursor.gotoStart(FALSE) -' SetParagraphBreak (xCursor) -' SetParagraphBreak (xCursor) - - tableCursor.gotoStart(FALSE) +' SetParagraphBreak (xCursor) +' SetParagraphBreak (xCursor) + + tableCursor.gotoStart(FALSE) cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.BackTransparent = False xCell.BackColor = cCoGrey - + for i% = 0 to 5 tableCursor.goDown(1,FALSE) cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.String=tableColums(i%) - + xCell.BackTransparent = False xCell.BackColor = cCoGrey next i% @@ -229,7 +229,7 @@ Sub CreateStatusTable2 tableHeaders(cStExtension-9) = "Extension" tableHeaders(3) = "" tableHeaders(4) = "" - + dim tableColums(5) as string tableColums(cDBService ) = "services" tableColums(cDBOpen ) = "open" @@ -237,47 +237,47 @@ Sub CreateStatusTable2 tableColums(cDBDelete ) = "delete" tableColums(cDBSeek ) = "seek" tableColums(cDBClose ) = "close" - + dim tableColums2(3) as string tableColums2(cEXTService ) = "services" tableColums2(cEXTInstall ) = "install" tableColums2(cEXTUninstall ) = "uninstall" - + aDoc = gOutPutDoc - + xText = aDoc.Text xCursor = xText.createTextCursor() - + xCursor.gotoStart(FALSE) xCursor.GoRight (4, False) SetParagraphBreak (xCursor) SetParagraphBreak (xCursor) xCursor.gotoEnd(FALSE) - + table = aDoc.createInstance("com.sun.star.text.TextTable") table.initialize(7,6) table.Name = "StTab2" 'table.RelativeWidth =500 - + xText.insertTextContent(xCursor, table, FALSE) - + tableCursor = table.createCursorByCellName(table.CellNames(0)) tableCursor.gotoStart(FALSE) tableCursor.goRight(1,FALSE) - + for i% = 0 to 5 cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.String=tableHeaders(i%) - + xCell.BackTransparent = False xCell.BackColor = cCoGrey - + tableCursor.goRight(1,FALSE) next i% - + tableCursor.gotoStart(FALSE) - + cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.BackTransparent = False @@ -288,20 +288,20 @@ Sub CreateStatusTable2 cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.String=tableColums(i%) - + xCell.BackTransparent = False xCell.BackColor = cCoGrey next i% - + tableCursor.gotoStart(FALSE) tableCursor.goRight(2,FALSE) - + for i% = 0 to 3 tableCursor.goDown(1,FALSE) cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) xCell.String=tableColums2(i%) - + xCell.BackTransparent = False xCell.BackColor = cCoGrey next i% @@ -312,27 +312,27 @@ Sub CreateDocState aDoc = gOutPutDoc table = aDoc.TextTables.GetByIndex (1) 'table = aDoc.TextTables.GetByName ("StTab1") - + for j% = 0 to 7 for i% = 0 to 5 sRangeName = GetRangeName(j%, i%+1) - + tableCursor = table.createCursorByCellName(sRangeName) - + cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) - + xCell.BackTransparent = False - + if gErrorState (j%, i%) = cLogTrue then xCell.BackColor = cCoGreen else if gErrorState (j%, i%) = cLogFalse then xCell.BackColor = cCoRed else - xCell.BackColor = cCoGrey + xCell.BackColor = cCoGrey + end If end If - end If - + next i% next j% end Sub @@ -341,27 +341,27 @@ Sub CreateSecondState aDoc = gOutPutDoc table = aDoc.TextTables.GetByIndex (0) 'table = aDoc.TextTables.GetByName ("StTab2") - + for j% = 0 to cMaxErrorStates-9 for i% = 0 to 5 sRangeName = GetRangeName(j%, i%+1) - + tableCursor = table.createCursorByCellName(sRangeName) - + cName = tableCursor.getRangeName() xCell = table.getCellByName(cName) - + xCell.BackTransparent = False - + if gErrorState (j%+9, i%) = cLogTrue then xCell.BackColor = cCoGreen else if gErrorState (j%+9, i%) = cLogFalse then xCell.BackColor = cCoRed else - xCell.BackColor = cCoGrey - end If + xCell.BackColor = cCoGrey + end If end If - + next i% next j% end Sub @@ -375,45 +375,45 @@ Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean) Dim nState as integer nStatusType = GetStatusType (nDocType) If nStatusType = cStNone then Exit Sub - - if bState then + + if bState then nState = cLogTrue else nState = cLogFalse end If - + gErrorState (nStatusType, nAction) = nState end Sub Function GetStatusType (nDocType as Integer) as Integer Select Case ( nDocType ) - case frmWriter - GetStatusType = cStWriter ' Textdokument + case frmWriter + GetStatusType = cStWriter ' Textdokument case frmCalc - GetStatusType = cStCalc 'Tabellendokument + GetStatusType = cStCalc 'Tabellendokument case frmMessage - GetStatusType = cStMessage 'Nachricht + GetStatusType = cStMessage 'Nachricht case frmImpress - GetStatusType = cStPraesentation 'Präsentation + GetStatusType = cStPraesentation 'Präsentation case frmDraw GetStatusType = cStZeichnen 'Zeichnen case frmMath - GetStatusType = cStMath 'Formel + GetStatusType = cStMath 'Formel case frmImage - GetStatusType = cStBild 'Bild + GetStatusType = cStBild 'Bild case frmHyperText - GetStatusType = cStHTML 'Hypertext-Dokument + GetStatusType = cStHTML 'Hypertext-Dokument case frmChart - GetStatusType = cStChart 'Diagramm + GetStatusType = cStChart 'Diagramm case frmJava GetStatusType = cStJava 'Java case frmDataBase - GetStatusType = cStDataBase 'DataBase + GetStatusType = cStDataBase 'DataBase case frmExtension GetStatusType = cStExtension 'Extension case else GetStatusType = cStNone - end Select + end Select end Function Sub SetParagraphBreak (aCursor as Object) @@ -456,13 +456,13 @@ Sub SetGlobalOptionsDialog () Const sLibName = cTest10Modul Const sDialogName = cOptionsDialogName - + REM get library and input stream provider oLibContainer = DialogLibraries - + REM load the library oLibContainer.loadLibrary( sLibName ) - + oLib = oLibContainer.getByName( sLibName ) oInputStreamProvider = oLib.getByName( sDialogName ) @@ -479,9 +479,9 @@ Sub ShowOptionsDlg REM show the dialog gOptionsDialog.execute() - + ' jetzt läuft der Dialog, bis ein Button gedrückt wird - + Select Case (gDlgState) case cDlgOk call SetOptions () @@ -489,7 +489,7 @@ Sub ShowOptionsDlg call SetOptions () call StartTestByOptions () end Select - + gOptionsDialog.dispose() end Sub @@ -503,9 +503,9 @@ Sub SetOptions SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl("cbHTMLTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl("cbMathTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl("cbChartTest").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl("cbJavaTest").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl("cbDatabaseTest").getState), gOutPutDoc) - SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl("cbExtensionTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl("cbJavaTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl("cbDatabaseTest").getState), gOutPutDoc) + SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl("cbExtensionTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl("cbSaveOpenXMLTest").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl("cbSaveOpen50Test").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutPutDoc) @@ -592,7 +592,7 @@ Sub StartTestByOptions ClearDocFull (gOutPutDoc) gOutPutDoc.dispose 'StarDesktop.Terminate - + 'EnableReschedule( false ) 'DispatchSlot( 5300 ) stop @@ -661,18 +661,18 @@ Sub DispatchSlot(SlotID as Integer) oUrl.Complete = "slot:" & CStr(SlotID) oTrans.parsestrict(oUrl) - oDisp = StarDesktop.queryDispatch(oUrl, "_self", 0) + oDisp = StarDesktop.queryDispatch(oUrl, "_self", 0) oDisp.dispatch(oUrl, oArg()) End Sub Sub LoadLibrary( LibName As String ) - + dim args(1) dim arg as new com.sun.star.beans.PropertyValue arg.Name = "LibraryName" arg.Value = LibName args(0) = arg - + dim url as new com.sun.star.util.URL dim trans as object trans = createUnoService("com.sun.star.util.URLTransformer" ) @@ -682,7 +682,7 @@ Sub LoadLibrary( LibName As String ) dim disp as object disp = StarDesktop.currentFrame.queryDispatch( url, "", 0 ) disp.dispatch( url, args() ) - + End Sub Sub ExecuteSlot( SlotNr As String, oDoc as Object ) @@ -690,14 +690,14 @@ Sub ExecuteSlot( SlotNr As String, oDoc as Object ) dim url as new com.sun.star.util.URL dim trans as object dim disp as object - + trans = createUnoService("com.sun.star.util.URLTransformer" ) url.Complete = "slot:" + SlotNr trans.parsestrict( url ) - + disp = oDoc.CurrentController.Frame.queryDispatch( url, "", 0 ) disp.dispatch( url, args() ) - + End Sub Sub CutText (oDoc as Object) @@ -713,7 +713,7 @@ Sub DelAllUserFields (aDoc as Object) Dim aElements as Variant Dim i% Dim aFieldMasters, aFieldMaster as Object - Dim sElement$ + Dim sElement$ aFieldMasters = aDoc.TextFieldMasters aElements = aFieldMasters.ElementNames for i = 0 to UBound(aElements) @@ -722,7 +722,7 @@ Sub DelAllUserFields (aDoc as Object) aFieldMaster = aFieldMasters.GetByName(sElement$) aFieldMaster.Dispose endif - next + next end Sub Function GetUserFieldState (sName as String, aDoc as Object) as boolean @@ -761,7 +761,7 @@ Function ReadUserField(sFieldName as String, aDoc as Object) as String ReadUserField = aMasters.GetByName (cUnoUserField+cUnoSeparator+sFieldName).Content else ReadUserField = "" - end If + end If End Function Sub WriteUserField(sValue as String, sFieldName as String, aDoc as Object, optional aCursor as Object) @@ -769,10 +769,10 @@ Sub WriteUserField(sValue as String, sFieldName as String, aDoc as Object, optio aMasters = aDoc.TextFieldMasters if aMasters.HasByName (cUnoUserField+cUnoSeparator+sFieldName) then aUserField = aMasters.GetByName (cUnoUserField+cUnoSeparator+sFieldName) - else + else aUserField = aDoc.CreateInstance (cUnoUserField) aUserField.Name = sFieldName - end if + end if aUserField.Content = sValue End Sub |