summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
Diffstat (limited to 'smoketestoo_native')
-rwxr-xr-xsmoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl14
-rwxr-xr-xsmoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java26
-rw-r--r--smoketestoo_native/data/Events.xml4
-rw-r--r--smoketestoo_native/data/Global.xml186
-rw-r--r--smoketestoo_native/data/Test_10er.xml284
-rw-r--r--smoketestoo_native/data/Test_DB.xml38
-rw-r--r--smoketestoo_native/data/Test_Ext.xml20
7 files changed, 286 insertions, 286 deletions
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl b/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl
index 83c370e11a18..11267990f01c 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl
+++ b/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,16 +25,16 @@
*
************************************************************************/
-#ifndef _com_sun_star_comp_smoketest_TestExtension_idl_
+#ifndef _com_sun_star_comp_smoketest_TestExtension_idl_
#define _com_sun_star_comp_smoketest_TestExtension_idl_
-
-#include <com/sun/star/lang/XServiceInfo.idl>
-
+
+#include <com/sun/star/lang/XServiceInfo.idl>
+
module com { module sun { module star { module comp { module smoketest {
// example service, XServiceInfo is implemented here for demonstration
- // issues. XServiceInfo must be implemented by all components.
+ // issues. XServiceInfo must be implemented by all components.
service TestExtension: ::com::sun::star::lang::XServiceInfo;
};};};};};
-#endif
+#endif
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java b/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java
index c08c719116ae..45168e800aa5 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java
+++ b/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ public class TestExtension {
*/
static private final String __serviceName =
"com.sun.star.comp.smoketest.TestExtension";
-
+
/** The initial component contextr, that gives access to
* the service manager, supported singletons, ...
* It's often later used
@@ -65,7 +65,7 @@ public class TestExtension {
* It's often later used
*/
private XMultiComponentFactory m_xMCF;
-
+
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param xmultiservicefactoryInitialization A special service factory
* could be introduced while initializing.
@@ -73,13 +73,13 @@ public class TestExtension {
public _TestExtension(XComponentContext xCompContext) {
try {
m_cmpCtx = xCompContext;
- m_xMCF = m_cmpCtx.getServiceManager();
+ m_xMCF = m_cmpCtx.getServiceManager();
}
catch( Exception e ) {
e.printStackTrace();
}
}
-
+
/** This method returns an array of all supported service names.
* @return Array of supported service names.
*/
@@ -95,7 +95,7 @@ public class TestExtension {
String[] sSupportedServiceNames = { __serviceName };
return sSupportedServiceNames;
}
-
+
/** This method returns true, if the given service will be
* supported by the component.
* @param sServiceName Service name.
@@ -104,16 +104,16 @@ public class TestExtension {
public boolean supportsService( String sServiceName ) {
return sServiceName.equals( __serviceName );
}
-
+
/** Return the class name of the component.
* @return Class name of the component.
*/
public String getImplementationName() {
return _TestExtension.class.getName();
- }
+ }
}
-
-
+
+
/**
* Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
@@ -127,11 +127,11 @@ public class TestExtension {
public static XSingleComponentFactory __getComponentFactory(String sImplName)
{
XSingleComponentFactory xFactory = null;
-
+
if ( sImplName.equals( _TestExtension.class.getName() ) )
xFactory = Factory.createComponentFactory(_TestExtension.class,
_TestExtension.getServiceNames());
-
+
return xFactory;
}
@@ -162,5 +162,5 @@ public class TestExtension {
* your component using these objects.
*/
}
-
+
}
diff --git a/smoketestoo_native/data/Events.xml b/smoketestoo_native/data/Events.xml
index 6536c1c5eafc..956a1ee40e2e 100644
--- a/smoketestoo_native/data/Events.xml
+++ b/smoketestoo_native/data/Events.xml
@@ -36,7 +36,7 @@ Sub ClickSaveTest
if not OptionsDlg.cbSaveTest.Value then
OptionsDlg.cbOpenTest.Value = false
OptionsDlg.cbOpenTest.Enabled = false
- else
+ else
OptionsDlg.cbOpenTest.Enabled = true
end If
End Sub
@@ -45,7 +45,7 @@ Sub ClickCutTest
if not OptionsDlg.cbCutTest.Value then
OptionsDlg.cbPasteTest.Value = false
OptionsDlg.cbPasteTest.Enabled = false
- else
+ else
OptionsDlg.cbPasteTest.Enabled = true
end If
End Sub
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) = &quot;Math&quot;
tableHeaders(cStHTML) = &quot;HTML&quot;
tableHeaders(cStJava) = &quot;Java&quot;
-
+
dim tableColums(5) as string
tableColums(cDocNew) = &quot;new&quot;
tableColums(cDocCut) = &quot;cut&quot;
@@ -163,60 +163,60 @@ Sub CreateStatusTable
tableColums(cDocSaveOpen8) = &quot;V8.0&quot;
tableColums(cDocSaveOpenXML) = &quot;XML&quot;
tableColums(cDocSaveOpen50) = &quot;V5.0&quot;
-&apos; tableColums(cDocClose) = &quot;close&quot;
-
+&apos; tableColums(cDocClose) = &quot;close&quot;
+
aDoc = gOutPutDoc
-
+
xText = aDoc.Text
xCursor = xText.createTextCursor()
-
-&apos; xCursor.gotoStart(FALSE)
-&apos; xCursor.GoRight (2, False)
-&apos; SetParagraphBreak (xCursor)
-&apos; SetParagraphBreak (xCursor)
+
+&apos; xCursor.gotoStart(FALSE)
+&apos; xCursor.GoRight (2, False)
+&apos; SetParagraphBreak (xCursor)
+&apos; SetParagraphBreak (xCursor)
xCursor.gotoStart(FALSE)
xCursor.GoRight (4, False)
SetParagraphBreak (xCursor)
xCursor.GoRight (1, False)
SetParagraphBreak (xCursor)
xCursor.GoRight (1, False)
-
+
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
table.initialize(7,9)
table.Name = &quot;StTab1&quot;
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)
-&apos; SetParagraphBreak (xCursor)
-&apos; SetParagraphBreak (xCursor)
-
- tableCursor.gotoStart(FALSE)
+&apos; SetParagraphBreak (xCursor)
+&apos; 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) = &quot;Extension&quot;
tableHeaders(3) = &quot;&quot;
tableHeaders(4) = &quot;&quot;
-
+
dim tableColums(5) as string
tableColums(cDBService ) = &quot;services&quot;
tableColums(cDBOpen ) = &quot;open&quot;
@@ -237,47 +237,47 @@ Sub CreateStatusTable2
tableColums(cDBDelete ) = &quot;delete&quot;
tableColums(cDBSeek ) = &quot;seek&quot;
tableColums(cDBClose ) = &quot;close&quot;
-
+
dim tableColums2(3) as string
tableColums2(cEXTService ) = &quot;services&quot;
tableColums2(cEXTInstall ) = &quot;install&quot;
tableColums2(cEXTUninstall ) = &quot;uninstall&quot;
-
+
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(&quot;com.sun.star.text.TextTable&quot;)
table.initialize(7,6)
table.Name = &quot;StTab2&quot;
&apos;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)
&apos;table = aDoc.TextTables.GetByName (&quot;StTab1&quot;)
-
+
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)
&apos;table = aDoc.TextTables.GetByName (&quot;StTab2&quot;)
-
+
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 &apos; Textdokument
+ case frmWriter
+ GetStatusType = cStWriter &apos; Textdokument
case frmCalc
- GetStatusType = cStCalc &apos;Tabellendokument
+ GetStatusType = cStCalc &apos;Tabellendokument
case frmMessage
- GetStatusType = cStMessage &apos;Nachricht
+ GetStatusType = cStMessage &apos;Nachricht
case frmImpress
- GetStatusType = cStPraesentation &apos;Präsentation
+ GetStatusType = cStPraesentation &apos;Präsentation
case frmDraw
GetStatusType = cStZeichnen &apos;Zeichnen
case frmMath
- GetStatusType = cStMath &apos;Formel
+ GetStatusType = cStMath &apos;Formel
case frmImage
- GetStatusType = cStBild &apos;Bild
+ GetStatusType = cStBild &apos;Bild
case frmHyperText
- GetStatusType = cStHTML &apos;Hypertext-Dokument
+ GetStatusType = cStHTML &apos;Hypertext-Dokument
case frmChart
- GetStatusType = cStChart &apos;Diagramm
+ GetStatusType = cStChart &apos;Diagramm
case frmJava
GetStatusType = cStJava &apos;Java
case frmDataBase
- GetStatusType = cStDataBase &apos;DataBase
+ GetStatusType = cStDataBase &apos;DataBase
case frmExtension
GetStatusType = cStExtension &apos;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()
-
+
&apos; 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(&quot;cbHTMLTest&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutPutDoc)
+ SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutPutDoc)
+ SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutPutDoc)
+ SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).getState), gOutPutDoc)
SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutPutDoc)
@@ -592,7 +592,7 @@ Sub StartTestByOptions
ClearDocFull (gOutPutDoc)
gOutPutDoc.dispose
&apos;StarDesktop.Terminate
-
+
&apos;EnableReschedule( false )
&apos;DispatchSlot( 5300 )
stop
@@ -661,18 +661,18 @@ Sub DispatchSlot(SlotID as Integer)
oUrl.Complete = &quot;slot:&quot; &amp; CStr(SlotID)
oTrans.parsestrict(oUrl)
- oDisp = StarDesktop.queryDispatch(oUrl, &quot;_self&quot;, 0)
+ oDisp = StarDesktop.queryDispatch(oUrl, &quot;_self&quot;, 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 = &quot;LibraryName&quot;
arg.Value = LibName
args(0) = arg
-
+
dim url as new com.sun.star.util.URL
dim trans as object
trans = createUnoService(&quot;com.sun.star.util.URLTransformer&quot; )
@@ -682,7 +682,7 @@ Sub LoadLibrary( LibName As String )
dim disp as object
disp = StarDesktop.currentFrame.queryDispatch( url, &quot;&quot;, 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(&quot;com.sun.star.util.URLTransformer&quot; )
url.Complete = &quot;slot:&quot; + SlotNr
trans.parsestrict( url )
-
+
disp = oDoc.CurrentController.Frame.queryDispatch( url, &quot;&quot;, 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 = &quot;&quot;
- 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
diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestoo_native/data/Test_10er.xml
index 636dc2129120..5563ce1b4894 100644
--- a/smoketestoo_native/data/Test_10er.xml
+++ b/smoketestoo_native/data/Test_10er.xml
@@ -91,7 +91,7 @@ Sub DeleteAllSavedFiles()
sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmDraw or cFltXML)
If FileExists (sFileName) then
Kill (sFileName)
- End If
+ End If
sFileName = sWorkPath+cTempFileName+&quot;.&quot;+GetDocEndings(frmWriter or cFlt50)
If FileExists (sFileName) then
Kill (sFileName)
@@ -119,22 +119,22 @@ Sub DeleteAllLogFiles()
End If
If FileExists (sWorkPath+sSCLogFileName) then
Kill (sWorkPath+sSCLogFileName)
- End If
+ End If
If FileExists (sWorkPath+sSDLogFileName) then
Kill (sWorkPath+sSDLogFileName)
- End If
+ End If
If FileExists (sWorkPath+sSMathLogFileName) then
Kill (sWorkPath+sSMathLogFileName)
- End If
+ End If
If FileExists (sWorkPath+sSImDLogFileName) then
Kill (sWorkPath+sSImDLogFileName)
- End If
+ End If
If FileExists (sWorkPath+sSChartLogFileName) then
Kill (sWorkPath+sSChartLogFileName)
- End If
+ End If
If FileExists (sWorkPath+sSHptLogFileName) then
Kill (sWorkPath+sSHptLogFileName)
- End If
+ End If
If FileExists (sWorkPath+sSMessageLogFileName) then
Kill (sWorkPath+sSMessageLogFileName)
End If
@@ -156,8 +156,8 @@ Function OpenLogDat (sFileName as String) as Integer
Dim LocaleFileChannel%
If FileExists (sWorkPath+sFileName) then
Kill (sWorkPath+sFileName)
- End If
- LocaleFileChannel% = Freefile
+ End If
+ LocaleFileChannel% = Freefile
Open sWorkPath+sFileName For Output As LocaleFileChannel%
OpenLogDat = LocaleFileChannel%
end Function
@@ -201,11 +201,11 @@ DIM nStrPos as Long
sWorkPath = GetWorkPath
sWorkPathURL = GetWorkURL
-
+
if GetSystem (sWorkPath) = &quot;windows&quot; then
sWorkPath = ConvertPathToWin (sWorkPath)
end if
-
+
&apos;search ExtensionURL
sDocURL = gOutPutDoc.URL
CompatibilityMode(true)
@@ -234,7 +234,7 @@ DIM nStrPos as Long
end if
if bMakeChartTest then
call MakeChartTest (frmChart)
- end if
+ end if
if bMakeMathTest then
call MakeNewDoc (frmMath)
end if
@@ -247,13 +247,13 @@ DIM nStrPos as Long
if bMakeExtensionTest then
call Test_Ext.TestExtensions (frmExtension)
end if
-
+
Close #MainFileChannel
end Sub
Sub WriteTestSequence (FileChannel as integer)
Print #FileChannel, &quot;Sequence of testing&quot;
-
+
if bMakeWriterTest then
WriteTests (&quot;writer : &quot;, true, FileChannel)
end if
@@ -271,7 +271,7 @@ Sub WriteTestSequence (FileChannel as integer)
end if
if bMakeChartTest then
WriteTests (&quot;chart : &quot;, false, FileChannel)
- end if
+ end if
if bMakeMathTest then
WriteTests (&quot;math : &quot;, false, FileChannel)
end if
@@ -284,13 +284,13 @@ Sub WriteTestSequence (FileChannel as integer)
if bMakeExtensionTest then
WriteExtensionTests (&quot;Extension : &quot;, FileChannel)
end if
-
+
Print #FileChannel
end Sub
Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
Dim sWriteStr as string
-
+
sWriteStr = sText
sWriteStr = sWriteStr + &quot;new&quot;
if bTestAll then
@@ -319,33 +319,33 @@ Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
sWriteStr = sWriteStr + &quot;, open 5.0&quot;
end if
end if
-
+
sWriteStr = sWriteStr + &quot;, close&quot;
-
+
Print #nFileChannel, sWriteStr
end Sub
Sub WriteDBTests (sText as string, nFileChannel as integer)
Dim sWriteStr as string
-
+
sWriteStr = sText
sWriteStr = sWriteStr + &quot;open / services&quot;
sWriteStr = sWriteStr + &quot;, insert&quot;
sWriteStr = sWriteStr + &quot;, delete&quot;
sWriteStr = sWriteStr + &quot;, seek&quot;
sWriteStr = sWriteStr + &quot;, close&quot;
-
+
Print #nFileChannel, sWriteStr
end Sub
Sub WriteExtensionTests (sText as string, nFileChannel as integer)
Dim sWriteStr as string
-
+
sWriteStr = sText
sWriteStr = sWriteStr + &quot;services&quot;
sWriteStr = sWriteStr + &quot;, install&quot;
sWriteStr = sWriteStr + &quot;, uninstall&quot;
-
+
Print #nFileChannel, sWriteStr
end Sub
@@ -354,7 +354,7 @@ Sub MakeDocTest (FilterType as Integer)
Dim sFileNameXML$, sFileName50$, sFileName8$
Dim bError as Boolean
Dim nCurrentAction as Integer
-
+
On Local Error GoTo DOCTESTERROR
nCurrentAction = cLogfileFailed
FileChannel% = OpenLogDat (GetLogFileName(FilterType))
@@ -366,7 +366,7 @@ Sub MakeDocTest (FilterType as Integer)
if not IsNull (oDoc) then
nCurrentAction = cDocCut
call CutAndPaste(FilterType, oDoc)
-&apos; bError = oDoc.CurrentController.frame.close
+&apos; bError = oDoc.CurrentController.frame.close
nCurrentAction = cDocSaveOpen8
if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt8)
@@ -381,68 +381,68 @@ Sub MakeDocTest (FilterType as Integer)
if bMakeSaveOpen50Test and IsFilterAvailable (FilterType or cFlt50) then
sFileName50 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt50)
SaveDoc (sFileName50, oDoc, GetDocFilter(FilterType or cFlt50))
- end if
-&apos; oDoc.dispose
+ end if
+&apos; oDoc.dispose
nCurrentAction = cDocClose
oDoc.close (true)
-&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
-&apos; SetStatus (FilterType, cDocClose, bError)
+&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
+&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
+&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
+&apos; SetStatus (FilterType, cDocClose, bError)
nCurrentAction = cDocSaveOpen8
if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
oDoc = LoadDoc (sFileName8)
-
-&apos; oDoc = Documents.open(sFileName)
+
+&apos; oDoc = Documents.open(sFileName)
LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, FileChannel)
LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, MainFileChannel)
SetStatus (FilterType, cDocSaveOpen8, not IsNull (oDoc))
-
+
if not IsNull (oDoc) then
-&apos; oDoc.dispose
+&apos; oDoc.dispose
nCurrentAction = cDocClose
oDoc.close (true)
- end If
+ end If
end if
-
+
nCurrentAction = cDocSaveOpenXML
if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
oDoc = LoadDoc (sFileNameXML)
-
-&apos; oDoc = Documents.open(sFileName)
+
+&apos; oDoc = Documents.open(sFileName)
LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, FileChannel)
LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, MainFileChannel)
SetStatus (FilterType, cDocSaveOpenXML, not IsNull (oDoc))
-
+
if not IsNull (oDoc) then
-&apos; oDoc.dispose
+&apos; oDoc.dispose
nCurrentAction = cDocClose
oDoc.close (true)
- end If
+ end If
end if
-
+
nCurrentAction = cDocSaveOpen50
if bMakeSaveOpen50Test and IsFilterAvailable (FilterType or cFlt50) then
oDoc = LoadDoc (sFileName50)
-
-&apos; oDoc = Documents.open(sFileName)
+
+&apos; oDoc = Documents.open(sFileName)
LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen50Doc, FileChannel)
LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen50Doc, MainFileChannel)
SetStatus (FilterType, cDocSaveOpen50, not IsNull (oDoc))
-
+
if not IsNull (oDoc) then
-&apos; oDoc.dispose
+&apos; oDoc.dispose
nCurrentAction = cDocClose
oDoc.close (true)
- end If
+ end If
end if
- end If
+ end If
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
Exit Sub &apos; Without error
-
+
DOCTESTERROR:
- If (nCurrentAction = cLogfileFailed) then
+ If (nCurrentAction = cLogfileFailed) then
SetStatus (FilterType, cDocNew, False)
Exit Sub
else
@@ -450,7 +450,7 @@ Sub MakeDocTest (FilterType as Integer)
LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
SetStatus (FilterType, nCurrentAction, False)
Close #FileChannel%
- End If
+ End If
Exit Sub &apos; With error
End Sub
@@ -462,26 +462,26 @@ Sub MakeNewDoc (FilterType as Integer)
nCurrentAction = cLogfileFailed
FileChannel% = OpenLogDat (GetLogFileName(FilterType))
nCurrentAction = cDocNew
-&apos; oDoc = Documents.Add(GetDocFilter(FilterType))
+&apos; oDoc = Documents.Add(GetDocFilter(FilterType))
oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
SetStatus (FilterType, cDocNew, not IsNull (oDoc))
if not IsNull (oDoc) then
nCurrentAction = cDocClose
-&apos; oDoc.dispose
+&apos; oDoc.dispose
oDoc.close (true)
-&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
-&apos; SetStatus (FilterType, cDocClose, bError)
- end If
+&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
+&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
+&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
+&apos; SetStatus (FilterType, cDocClose, bError)
+ end If
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
Exit Sub &apos; Without error
-
+
DOCTESTERROR2:
- If (nCurrentAction = cLogfileFailed) then
+ If (nCurrentAction = cLogfileFailed) then
SetStatus (FilterType, cDocNew, False)
Exit Sub
else
@@ -489,7 +489,7 @@ Sub MakeNewDoc (FilterType as Integer)
LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
SetStatus (FilterType, nCurrentAction, False)
Close #FileChannel%
- End If
+ End If
Exit Sub &apos; With error
End Sub
@@ -513,7 +513,7 @@ Sub MakeChartTest (FilterType as Integer)
LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
SetStatus (FilterType, cDocNew, bError)
-&apos; oDoc.dispose
+&apos; oDoc.dispose
nCurrentAction = cDocClose
oDoc.close (true)
else
@@ -524,9 +524,9 @@ Sub MakeChartTest (FilterType as Integer)
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
Exit Sub &apos; Without error
-
+
CHARTTESTERROR:
- If (nCurrentAction = cLogfileFailed) then
+ If (nCurrentAction = cLogfileFailed) then
SetStatus (FilterType, cDocNew, False)
Exit Sub
else
@@ -534,7 +534,7 @@ Sub MakeChartTest (FilterType as Integer)
LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
SetStatus (FilterType, nCurrentAction, False)
Close #FileChannel%
- End If
+ End If
Exit Sub &apos; With error
End Sub
@@ -543,17 +543,17 @@ Sub LogState (bState as Boolean, sText as String, nLocaleFileChannel as integer)
Print #nLocaleFileChannel, sText+&quot; -&gt; ok&quot;
else
Print #nLocaleFileChannel, sText+&quot; -&gt; error&quot;
- end If
+ end If
end Sub
Function GetDocEndings (DocType as Integer) as String
Select Case ( DocType )
case frmWriter or cFlt8
- GetDocEndings = &quot;odt&quot; &apos; Textdokument
+ GetDocEndings = &quot;odt&quot; &apos; Textdokument
case frmCalc or cFlt8
- GetDocEndings = &quot;ods&quot; &apos;Tabellendokument
+ GetDocEndings = &quot;ods&quot; &apos;Tabellendokument
case frmImpress or cFlt8
- GetDocEndings = &quot;odp&quot; &apos;PrÕsentation
+ GetDocEndings = &quot;odp&quot; &apos;PrÕsentation
case frmDraw or cFlt8
GetDocEndings = &quot;odg&quot; &apos;Zeichen
case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML
@@ -567,42 +567,42 @@ Function GetDocEndings (DocType as Integer) as String
case frmDraw or cFlt50
GetDocEndings = &quot;sda&quot; &apos;Zeichen 5.0
case frmWriter or cFltXML
- GetDocEndings = &quot;sxw&quot; &apos; Textdokument
+ GetDocEndings = &quot;sxw&quot; &apos; Textdokument
case frmCalc or cFltXML
- GetDocEndings = &quot;sxc&quot; &apos;Tabellendokument
+ GetDocEndings = &quot;sxc&quot; &apos;Tabellendokument
case frmImpress or cFltXML
- GetDocEndings = &quot;sxi&quot; &apos;PrÕsentation
+ GetDocEndings = &quot;sxi&quot; &apos;PrÕsentation
case frmDraw or cFltXML
GetDocEndings = &quot;sxd&quot; &apos;Zeichen
case else
GetDocEndings = &quot;&quot;
- end Select
+ end Select
end Function
Function GetDocFilter (DocType as Integer) as String
Select Case ( DocType )
- case frmWriter or cFlt8
- GetDocFilter = &quot;writer8&quot; &apos; Textdokument
+ case frmWriter or cFlt8
+ GetDocFilter = &quot;writer8&quot; &apos; Textdokument
case frmCalc or cFlt8
- GetDocFilter = &quot;calc8&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;calc8&quot; &apos;Tabellendokument
case frmImpress or cFlt8
- GetDocFilter = &quot;impress8&quot; &apos;Präsentation
+ GetDocFilter = &quot;impress8&quot; &apos;Präsentation
case frmDraw or cFlt8
GetDocFilter = &quot;draw8&quot; &apos;Zeichen
case frmMath or cFlt8
GetDocFilter = &quot;math8&quot; &apos;Formel
-
+
case frmWriter or cFltXML
- GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; Textdokument
+ GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; Textdokument
case frmCalc or cFltXML
- GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos;Tabellendokument
case frmImpress or cFltXML
- GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos;Präsentation
+ GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos;Präsentation
case frmDraw or cFltXML
GetDocFilter = &quot;StarOffice XML (Draw)&quot; &apos;Zeichen
case frmMath or cFltXML
- GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos;Formel
-
+ GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos;Formel
+
case frmHyperText, frmHyperText or cFlt50, frmHyperText or cFltXML
GetDocFilter = &quot;HTML&quot; &apos;Hypertext-Dokument
case frmWriter or cFlt50
@@ -615,69 +615,69 @@ Function GetDocFilter (DocType as Integer) as String
GetDocFilter = &quot;StarDraw 5.0&quot; &apos;Zeichen 5.0
case frmMath or cFlt50
GetDocFilter = &quot;StarMath 5.0&quot; &apos;Formel 5.0
-
+
case frmWriter or cFltNewDoc
- GetDocFilter = &quot;swriter&quot; &apos; Textdokument
+ GetDocFilter = &quot;swriter&quot; &apos; Textdokument
case frmCalc or cFltNewDoc
- GetDocFilter = &quot;scalc&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;scalc&quot; &apos;Tabellendokument
case frmMessage or cFltNewDoc
- GetDocFilter = &quot;Message&quot; &apos;Nachricht
+ GetDocFilter = &quot;Message&quot; &apos;Nachricht
case frmImpress or cFltNewDoc
- GetDocFilter = &quot;simpress&quot; &apos;Präsentation
+ GetDocFilter = &quot;simpress&quot; &apos;Präsentation
case frmDraw or cFltNewDoc
GetDocFilter = &quot;sdraw&quot; &apos;Zeichen
case frmMath or cFltNewDoc
- GetDocFilter = &quot;smath&quot; &apos;Formel
+ GetDocFilter = &quot;smath&quot; &apos;Formel
case frmImage or cFltNewDoc
- GetDocFilter = &quot;simage&quot; &apos;Bild
+ GetDocFilter = &quot;simage&quot; &apos;Bild
case frmHyperText or cFltNewDoc
GetDocFilter = &quot;swriter/web&quot; &apos;Hypertext-Dokument
case frmChart or cFltNewDoc
- GetDocFilter = &quot;schart&quot; &apos;Diagramm
+ GetDocFilter = &quot;schart&quot; &apos;Diagramm
case else
GetDocFilter = &quot;&quot;
- end Select
+ end Select
end Function
Function GetLogFileName (DocType as Integer) as String
Select Case ( DocType )
- case frmWriter
- GetLogFileName = sSWLogFileName &apos; Textdokument
+ case frmWriter
+ GetLogFileName = sSWLogFileName &apos; Textdokument
case frmCalc
- GetLogFileName = sSCLogFileName &apos;Tabellendokument
+ GetLogFileName = sSCLogFileName &apos;Tabellendokument
case frmMessage
- GetLogFileName = sSMessageLogFileName &apos;Nachricht
+ GetLogFileName = sSMessageLogFileName &apos;Nachricht
case frmImpress
- GetLogFileName = sSDLogFileName &apos;PrÕsentation
+ GetLogFileName = sSDLogFileName &apos;PrÕsentation
case frmDraw
GetLogFileName = sSDrawLogFileName &apos;Zeichnen
case frmMath
- GetLogFileName = sSMathLogFileName &apos;Formel
+ GetLogFileName = sSMathLogFileName &apos;Formel
case frmImage
- GetLogFileName = sSImDLogFileName &apos;Bild
+ GetLogFileName = sSImDLogFileName &apos;Bild
case frmHyperText
- GetLogFileName = sSHptLogFileName &apos;Hypertext-Dokument
+ GetLogFileName = sSHptLogFileName &apos;Hypertext-Dokument
case frmChart
- GetLogFileName = sSChartLogFileName &apos;Diagramm
+ GetLogFileName = sSChartLogFileName &apos;Diagramm
case frmJava
GetLogFileName = sJavaLogFileName &apos;Java
case frmDataBase
- GetLogFileName = sSDBLogFileName &apos;Database
+ GetLogFileName = sSDBLogFileName &apos;Database
case frmExtension
- GetLogFileName = sExtLogFileName &apos;Extension
+ GetLogFileName = sExtLogFileName &apos;Extension
case else
GetLogFileName = &quot;&quot;
- end Select
+ end Select
end Function
Function GetErrorMessageOnAction (nAction as Integer) as String
Select Case ( nAction )
- case cDocNew
- GetErrorMessageOnAction = cMessageNewDoc
+ case cDocNew
+ GetErrorMessageOnAction = cMessageNewDoc
case cDocCut
- GetErrorMessageOnAction = cMessageCutObj
+ GetErrorMessageOnAction = cMessageCutObj
case cDocPaste
- GetErrorMessageOnAction = cMessagePasteObj
+ GetErrorMessageOnAction = cMessagePasteObj
case cDocSaveOpen8
GetErrorMessageOnAction = cMessageSaveOpen8Doc
case cDocSaveOpenXML
@@ -688,7 +688,7 @@ Function GetErrorMessageOnAction (nAction as Integer) as String
GetErrorMessageOnAction = cMessageCloseDoc
case else
GetErrorMessageOnAction = &quot;&quot;
- end Select
+ end Select
end Function
Function IsFilterAvailable (FilterType as Integer) as boolean
@@ -705,10 +705,10 @@ Function TestJava (FilterType as Integer) as boolean
LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, FileChannel)
LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, MainFileChannel)
SetStatus (FilterType, cDocNew, not IsNull (oObj))
-
+
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
-
+
TestJava = not IsNull (oObj)
End Function
@@ -721,17 +721,17 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
Select Case ( DocType )
case frmWriter
Dim oCursor as Object
-
+
sText = &quot;AutomaticText&quot;
oText = oDoc.GetText
oCursor = oText.CreateTextCursor
oText.InsertString(oCursor, sText, true) &apos; Cursor selektiert den Text
oView = oDoc.getCurrentController
oView.Select(oCursor)
-
+
if bMakeCutTest then
call CutText (oDoc)
-
+
if oText.GetString = &quot;&quot; Then
bCutState = True
else
@@ -741,10 +741,10 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, FileChannel)
LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, MainFileChannel)
end if
-
+
if bMakePasteTest and bMakeCutTest then
call PasteText (oDoc)
-
+
if oText.GetString = sText Then
bPasteState = True
else
@@ -757,16 +757,16 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
case frmCalc
DIM oCell as Object
-
+
sText = &quot;AutomaticText&quot;
oCell = oDoc.Sheets(0).GetCellByPosition(0, 0)
oCell.String = sText
oView = oDoc.getCurrentController
oView.Select(oCell)
-
+
if bMakeCutTest then
call CutText (oDoc)
-
+
if oCell.String = &quot;&quot; Then
bCutState = True
else
@@ -776,10 +776,10 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, FileChannel)
LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, MainFileChannel)
end if
-
+
if bMakePasteTest and bMakeCutTest then
call PasteText (oDoc)
-
+
if oCell.String = sText Then
bPasteState = True
else
@@ -796,7 +796,7 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
Dim xSize as Object
Dim xPoint as Object
Dim bObjState as Boolean
-
+
xSize = CreateUnoStruct (&quot;com.sun.star.awt.Size&quot;)
xPoint = CreateUnoStruct (&quot;com.sun.star.awt.Point&quot;)
xSize.Width = 2000
@@ -804,29 +804,29 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
xPoint.x = 10000
xPoint.y = 10000
oPage = oDoc.DrawPages(0)
-
+
if DocType = frmImpress Then
oPage.Layout = 20 &apos; set page layot to none
end If
-
+
oRect = oDoc.CreateInstance(&quot;com.sun.star.drawing.RectangleShape&quot;)
oRect.Size = xSize
oRect.Position = xPoint
oPage.add(oRect)
-
+
oView = oDoc.getCurrentController
oView.Select(oRect)
-
+
&apos; Prüft ob überhaupt ein Object angelegt wurde
if oPage.count = 1 Then
bObjState = True
else
bObjState = False
end If
-
- if bMakeCutTest then
+
+ if bMakeCutTest then
call CutText (oDoc)
-
+
if (oPage.count = 0) and bObjState Then
bCutState = True
else
@@ -835,13 +835,13 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
SetStatus (DocType, cDocCut, bCutState)
LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, FileChannel)
LogState (bCutState, GetDocFilter(DocType or cFltNewDoc)+&quot; &quot;+ cMessageCutObj, MainFileChannel)
- end if
+ end if
wait (1000) &apos;wait after cut
-
+
if bMakePasteTest and bMakeCutTest then
call PasteText (oDoc)
-
+
if (oPage.count = 1) and bObjState Then
bPasteState = True
else
@@ -855,17 +855,17 @@ Sub CutAndPaste (DocType as Integer, oDoc as Object)
case frmImage
case frmHyperText
case frmChart
- end Select
+ end Select
end Sub
Sub LoadLibrary( LibName as String )
-
+
dim args(1)
dim arg as new com.sun.star.beans.PropertyValue
arg.Name = &quot;LibraryName&quot;
arg.Value = LibName
args(0) = arg
-
+
dim url as new com.sun.star.util.URL
dim trans as object
trans = createUnoService(&quot;com.sun.star.util.URLTransformer&quot; )
@@ -875,7 +875,7 @@ Sub LoadLibrary( LibName as String )
dim disp as object
disp = StarDesktop.currentFrame.queryDispatch( url, &quot;&quot;, 0 )
disp.dispatch( url, args() )
-
+
End Sub
Sub LoadDoc (DocName as String) as Object
@@ -886,7 +886,7 @@ Sub LoadDoc (DocName as String) as Object
if Left(DocName, 5 ) &lt;&gt; &quot;file:&quot; then
trans.parsestrict( url )
endif
-
+
Dim aPropArray(0) as Object
aPropArray(0) = CreateUnoStruct(&quot;com.sun.star.beans.PropertyValue&quot;)
aPropArray(0).Name = &quot;OpenFlags&quot;
@@ -894,7 +894,7 @@ Sub LoadDoc (DocName as String) as Object
dim doc as object
dim noargs()
- doc = StarDesktop.loadComponentFromURL( url.Complete, &quot;_blank&quot;, 0, aPropArray() ) &apos; XModel
+ doc = StarDesktop.loadComponentFromURL( url.Complete, &quot;_blank&quot;, 0, aPropArray() ) &apos; XModel
LoadDoc = doc
End Sub
@@ -906,16 +906,16 @@ Sub SaveDoc (DocName as String, oDoc as Object, sFilterName as string )
if Left(DocName, 5 ) &lt;&gt; &quot;file:&quot; then
trans.parsestrict( url )
endif
-
+
if not (sFilterName = &quot;&quot;) then
Dim aPropArray(0) as Object
aPropArray(0) = CreateUnoStruct(&quot;com.sun.star.beans.PropertyValue&quot;)
aPropArray(0).Name = &quot;FilterName&quot;
aPropArray(0).Value = sFilterName
-
+
oDoc.storeAsURL( url.Complete, aPropArray() )
else
MessageBox &quot;Filtername is unknown!&quot;
- end if
+ end if
end Sub
</script:module>
diff --git a/smoketestoo_native/data/Test_DB.xml b/smoketestoo_native/data/Test_DB.xml
index ebb53cf0181c..37fdc0948955 100644
--- a/smoketestoo_native/data/Test_DB.xml
+++ b/smoketestoo_native/data/Test_DB.xml
@@ -45,23 +45,23 @@ Const sTestString = &quot;Automatical Test&quot;
On Local Error GoTo DBERROR
-
+
nCurrentAction = cLogfileFailed
FileChannel% = OpenLogDat (GetLogFileName(FilterType))
nCurrentAction = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoDatabaseContext
-
+
oDBContext = CreateUnoService(cUnoDatabaseContext)
sDBName=&quot;Bibliography&quot; &apos;Names of Databases
-
+
nCurrentAction = cDBOpen
sCurrentMessage = cMessageDatabaseOpen
-
+
oDataSource = oDBContext.GetByName(sDBName)
sTable=oDataSource.Tables.ElementNames(0)
oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
-
+
LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, FileChannel)
LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, MainFileChannel)
SetStatus (FilterType, cDBOpen, not IsNull (oDBConnection))
@@ -69,9 +69,9 @@ Const sTestString = &quot;Automatical Test&quot;
Close #FileChannel%
Exit Sub
End If
-
+
&apos; Database is open now
-
+
nCurrentAction = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoRowSet
oRowSet = createUnoService(cUnoRowSet)
@@ -86,10 +86,10 @@ Const sTestString = &quot;Automatical Test&quot;
LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, MainFileChannel)
SetStatus (FilterType, cDBService, not IsNull (oRowSet))
End If
-
+
nCurrentAction = cDBInsert
sCurrentMessage = cMessageDatabaseInsert
-
+
oRowSet.ActiveConnection = oDBConnection
oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND
@@ -101,16 +101,16 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.insertRow()
nRowCount=oRowSet.RowCount
-
+
oRowSet.moveToCurrentRow()
-
+
bResult = (oRowSet.getString(5) = sTestString)
LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, FileChannel)
LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, MainFileChannel)
SetStatus (FilterType, cDBInsert, bResult)
-
+
&apos;delete only if insert passed
-
+
if (bResult) Then
nCurrentAction = cDBDelete
sCurrentMessage = cMessageDatabaseDelete
@@ -123,10 +123,10 @@ Const sTestString = &quot;Automatical Test&quot;
LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, FileChannel)
LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, MainFileChannel)
SetStatus (FilterType, cDBDelete, bResult)
- End If
+ End If
&apos; read other record
-
+
nCurrentAction = cDBSeek
sCurrentMessage = cMessageDatabaseSeek
oRowSet.first()
@@ -134,7 +134,7 @@ Const sTestString = &quot;Automatical Test&quot;
LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, FileChannel)
LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, MainFileChannel)
SetStatus (FilterType, cDBSeek, bResult)
-
+
nCurrentAction = cDBClose
sCurrentMessage = cMessageDatabaseClose
oDBConnection.Dispose()
@@ -145,9 +145,9 @@ Const sTestString = &quot;Automatical Test&quot;
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
Exit Sub &apos; Without error
-
+
DBERROR:
- If (nCurrentAction = cLogfileFailed) then
+ If (nCurrentAction = cLogfileFailed) then
SetStatus (FilterType, cDBOpen, False)
Exit Sub
else
@@ -155,7 +155,7 @@ Const sTestString = &quot;Automatical Test&quot;
LogState (False, &quot;Database &quot;+ sCurrentMessage, MainFileChannel)
SetStatus (FilterType, nCurrentAction, False)
Close #FileChannel%
- End If
+ End If
Exit Sub &apos; With error
End Sub
</script:module>
diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestoo_native/data/Test_Ext.xml
index 31d27dc7a4a7..9235b9600af9 100644
--- a/smoketestoo_native/data/Test_Ext.xml
+++ b/smoketestoo_native/data/Test_Ext.xml
@@ -41,15 +41,15 @@ Dim sImplementationNameString as String
sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
On Local Error GoTo EXTERROR
-
+
nCurrentAction = cLogfileFailed
FileChannel% = OpenLogDat (GetLogFileName(FilterType))
-
+
sCurrentMessage = cMessageExtensionService
nCurrentAction = cEXTService
- &apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
- &apos;adding the extension. The implementation is in
+ &apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
+ &apos;adding the extension. The implementation is in
&apos;javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java and the code is in juh.jar
cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment)
@@ -68,14 +68,14 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
sCurrentMessage = cMessageExtensionInstall
nCurrentAction = cEXTInstall
-
+
&apos;Add the extension. We must provide a file URL here.
&apos;By passing &quot;user&quot; we determine that the actions we perform on
&apos;XExtensionManager only affect the user installation. To modify the share installation one would pass &quot;share&quot;.
Dim props() as Object
ext_mgr.addExtension(sExtensionURL + cExtensionFileName, props, &quot;user&quot;, obj_null, cmdEnv)
-
+
&apos;Check if the extension has been added by creating a service which is contained in the extension.
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
bResult = (oTestExtension.getImplementationName = sImplementationNameString)
@@ -89,7 +89,7 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
sCurrentMessage = cMessageExtensionUninstall
nCurrentAction = cEXTUninstall
-
+
&apos;Remove the package
ext_mgr.removeExtension(&quot;org.openoffice.legacy.&quot; + cExtensionFileName, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
@@ -100,13 +100,13 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, FileChannel)
LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, MainFileChannel)
SetStatus (FilterType, cEXTUninstall, IsNull (oTestExtension))
-
+
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
Exit Sub &apos; Without error
EXTERROR:
- If (nCurrentAction = cLogfileFailed) then
+ If (nCurrentAction = cLogfileFailed) then
SetStatus (FilterType, cEXTService, False)
Exit Sub
else
@@ -114,7 +114,7 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
LogState (False, &quot;Extension &quot;+ sCurrentMessage, MainFileChannel)
SetStatus (FilterType, nCurrentAction, False)
Close #FileChannel%
- End If
+ End If
Exit Sub &apos; With error
End Sub