xref: /AOO41X/main/framework/test/test_documentproperties.bas (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweirSub Main
2*cdf0e10cSrcweir		' Oeffnen der LOG-Datei
3*cdf0e10cSrcweir		' Es gibt 2 Moeglichgkeiten, diesen Test zu absolvieren.
4*cdf0e10cSrcweir		' 1) Ausgabe von Informationen in MessageBoxen
5*cdf0e10cSrcweir		' 2) Ausgabe von Informationen in einer LOG-Datei
6*cdf0e10cSrcweir		'
7*cdf0e10cSrcweir		' Die Methoden OpenLOG, CloseLOG, Message, ErrorMessage und InfoMessage beruecksichtigen das automatisch!
8*cdf0e10cSrcweir		' Zum Umschalten zwischen den beiden Zustaenden genuegt es, eine der folgenden
9*cdf0e10cSrcweir		' zwei Programmzeilen zu aktivieren ...
10*cdf0e10cSrcweir
11*cdf0e10cSrcweir		'bLOGOn	= cOn
12*cdf0e10cSrcweir		bLOGOn	= cOff
13*cdf0e10cSrcweir
14*cdf0e10cSrcweir		'bShowErrorsOnly		= cOn
15*cdf0e10cSrcweir		bShowErrorsOnly		= cOff
16*cdf0e10cSrcweir
17*cdf0e10cSrcweir		OpenLOG		( cTestPath + "TestDocumentProperties.log" )
18*cdf0e10cSrcweir		InfoMessage	( "Test DocumentProperties ... [start]" )
19*cdf0e10cSrcweir
20*cdf0e10cSrcweir		' Service besorgen
21*cdf0e10cSrcweir		InfoMessage ( "Service besorgen ... [start]" )
22*cdf0e10cSrcweir		aDocumentProperties = createUnoService ( "com.sun.star.document.DocumentProperties" )
23*cdf0e10cSrcweir
24*cdf0e10cSrcweir		' Erfolg abtesten
25*cdf0e10cSrcweir		if ( isnull ( aDocumentProperties ) ) then
26*cdf0e10cSrcweir			ErrorMessage ( "Service konnte nicht instanziiert werden!"	)
27*cdf0e10cSrcweir			exit sub
28*cdf0e10cSrcweir		else
29*cdf0e10cSrcweir			InfoMessage ( "Service erfolgreich instanziiert ..."	)
30*cdf0e10cSrcweir			InfoMessage ( "Service besorgen ... [ende]"				)
31*cdf0e10cSrcweir		end if
32*cdf0e10cSrcweir
33*cdf0e10cSrcweir		' Unterstuetzte Schnittstellen, Methoden und Properties anzeigen
34*cdf0e10cSrcweir		' Achtung: Methoden und Properties koennen nicht angezeigt werden ...
35*cdf0e10cSrcweir		' neues Uno <-> Basic !?
36*cdf0e10cSrcweir		msgbox	aDocumentProperties.dbg_supportedInterfaces
37*cdf0e10cSrcweir		'msgbox	aDocumentProperties.dbg_methods
38*cdf0e10cSrcweir		'msgbox	aDocumentProperties.dbg_properties
39*cdf0e10cSrcweir
40*cdf0e10cSrcweir		' Testen des Services unter normalen Bedingungen (also wie vorgesehen)
41*cdf0e10cSrcweir		bState = Test_NormalUse	( aDocumentProperties )
42*cdf0e10cSrcweir		' Fehlerstatus abfragen
43*cdf0e10cSrcweir		if ( bState = cError ) then
44*cdf0e10cSrcweir			ErrorMessage ( "Der Service arbeitet unter normalen Bedingungen nicht korrekt!" )
45*cdf0e10cSrcweir		end if
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir		bState = Test_ErrorUse	( aDocumentProperties )
48*cdf0e10cSrcweir		' Fehlerstatus abfragen
49*cdf0e10cSrcweir		if ( bState = cError ) then
50*cdf0e10cSrcweir			ErrorMessage ( "Der Service verhaelt sich in Fehlersituationen nicht korrekt!" )
51*cdf0e10cSrcweir		end if
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir		' Schliessen der Error-Logdatei
54*cdf0e10cSrcweir		InfoMessage ( "Test DocumentProperties ... [ende]" )
55*cdf0e10cSrcweir		CloseLOG
56*cdf0e10cSrcweirEnd Sub
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir'*****************************************************************************************************************
59*cdf0e10cSrcweir' Testfunktionen
60*cdf0e10cSrcweir'*****************************************************************************************************************
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir'----------------------------------------------------------------------------
63*cdf0e10cSrcweir' Testmethode: Testet den Service unter normalen Bedingungen
64*cdf0e10cSrcweir'
65*cdf0e10cSrcweir' Returnwert cOK bedeutet, dass sich das Objekt normal verhaelt ...
66*cdf0e10cSrcweir' Returnwert cError bedeutet, dass sich das ein Fehler aufgetreten ist ...
67*cdf0e10cSrcweir'----------------------------------------------------------------------------
68*cdf0e10cSrcweirFunction Test_NormalUse ( aDocumentProperties ) as Boolean
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir		' Zunaechst wird vom Erfolg des Test ausgegangen.
71*cdf0e10cSrcweir		' Sollte einer der Detail-Tests fehlschlagen, dann wird dieser Wert
72*cdf0e10cSrcweir		' zurueckgesetzt. Damit wird dann angezeigt, dass mindestens ein
73*cdf0e10cSrcweir		' Einzeltest nicht korrekt funktionierte.
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir		Test_NormalUse = cOK
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir		bState = Test_NormalUse_XPropertySet	( aDocumentProperties )
78*cdf0e10cSrcweir		if ( bState = cError ) then
79*cdf0e10cSrcweir			Test_NormalUse = cError
80*cdf0e10cSrcweir		end if
81*cdf0e10cSrcweir
82*cdf0e10cSrcweir		bState = Test_NormalUse_XNameContainer	( aDocumentProperties )
83*cdf0e10cSrcweir		if ( bState = cError ) then
84*cdf0e10cSrcweir			Test_NormalUse = cError
85*cdf0e10cSrcweir		end if
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir		bState = Test_NormalUse_XPersist		( aDocumentProperties )
88*cdf0e10cSrcweir		if ( bState = cError ) then
89*cdf0e10cSrcweir			Test_NormalUse = cError
90*cdf0e10cSrcweir		end if
91*cdf0e10cSrcweir
92*cdf0e10cSrcweirEnd Function
93*cdf0e10cSrcweir
94*cdf0e10cSrcweir'----------------------------------------------------------------------------
95*cdf0e10cSrcweir' Testmethode: Testet den Service unter Randbedingungen und provoziert Fehlerzustaende
96*cdf0e10cSrcweir'
97*cdf0e10cSrcweir' Returnwert cOK bedeutet, dass das Objekt damit keine Probleme hat ...
98*cdf0e10cSrcweir' Returnwert cError bedeutet, dass das Objekt noch nicht robust genug ist ...
99*cdf0e10cSrcweir'----------------------------------------------------------------------------
100*cdf0e10cSrcweirFunction Test_ErrorUse ( aDocumentProperties ) as Boolean
101*cdf0e10cSrcweir
102*cdf0e10cSrcweir		Test_ErrorUse = cOK
103*cdf0e10cSrcweir
104*cdf0e10cSrcweirEnd Function
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir'----------------------------------------------------------------------------
107*cdf0e10cSrcweir' Testmethode: Testen des unterstuetzten Interfaces "XPropertySet" unter normalen Bedingungen
108*cdf0e10cSrcweir'
109*cdf0e10cSrcweir' Returnwert = cOK		; wenn der Test erfolgreich war
110*cdf0e10cSrcweir' Returnwert = cError	; wenn sich das Objekt nicht korrekt verhalten hat
111*cdf0e10cSrcweir'----------------------------------------------------------------------------
112*cdf0e10cSrcweirFunction Test_NormalUse_XPropertySet ( aDocumentProperties ) as Boolean
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir		' Einschalten der Fehlerbehandlung, um Exceptions oder aehnliches abzufangen!
115*cdf0e10cSrcweir		on Error goto Test_NormalUse_XPropertySet_Error
116*cdf0e10cSrcweir
117*cdf0e10cSrcweir		InfoMessage ( "Test_NormalUse_XPropertySet ... [start]" )
118*cdf0e10cSrcweir
119*cdf0e10cSrcweir		' 1) Test der Funktion "getPropertySetInfo()"
120*cdf0e10cSrcweir		'		Da diese Funktion keine Parameter besitzt und zudem eine "get"-Methode
121*cdf0e10cSrcweir		'		darstellt, wird sie durch Basic automatisch als "Property" behandelt!
122*cdf0e10cSrcweir		'		Daher schreibt man nicht "getPropertySetInfo()" sondern nur "PropertySetInfo".
123*cdf0e10cSrcweir
124*cdf0e10cSrcweir		' Besorgen der Info
125*cdf0e10cSrcweir		PropertySetInfo = aDocumentProperties.PropertySetInfo
126*cdf0e10cSrcweir		' Und abtesten auf Gueltigkeit
127*cdf0e10cSrcweir		if ( isnull (PropertySetInfo) ) then
128*cdf0e10cSrcweir			ErrorMessage ( "getPropertySetInfo() ... Error (Keine Info bestimmbar!)" )
129*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
130*cdf0e10cSrcweir		end if
131*cdf0e10cSrcweir
132*cdf0e10cSrcweir		' Hier fehlt noch der Test der InfoStruktur! (Laesst sich unter Basic irgendwie NICHT testen!!!???)
133*cdf0e10cSrcweir		' ...
134*cdf0e10cSrcweir
135*cdf0e10cSrcweir		InfoMessage ( "getPropertySetInfo() ... OK" )
136*cdf0e10cSrcweir
137*cdf0e10cSrcweir		' 2) getPropertyValue() & setPropertyValue ()
138*cdf0e10cSrcweir		'		In diesem Service sind mehrere Properties bereits definiert und vorbelegt.
139*cdf0e10cSrcweir		'		Zum Test werden repraesentativ einige davon verwendet. Naemlich je eine
140*cdf0e10cSrcweir		'		der verschiedenen Datentypen!
141*cdf0e10cSrcweir		'		Das sind im folgenden:		OWString, sal_Bool, sal_Int16, sal_uInt16, sal_Int32, DateTime, Sequence< sal_Int8 >
142*cdf0e10cSrcweir		'									Achtung! sal_uInt16 kann in Basic so nicht dargestellt werden. Daher wird ein normaler
143*cdf0e10cSrcweir		'									Integer-Wert angenommen - Bedingung ist, das hier im Test der Wertebereich nicht
144*cdf0e10cSrcweir		'									ueberschritten wird!
145*cdf0e10cSrcweir		'		Es wird versucht den Standardwert dieser zu ermitteln und zu merken;
146*cdf0e10cSrcweir		'		dann einen neuen Wert zu setzen; sowie diesen wiederum zu lesen und mit den
147*cdf0e10cSrcweir		'		vorherigen Werten zu vergleichen!
148*cdf0e10cSrcweir
149*cdf0e10cSrcweir		' Zunaechst werden die Standardwerte dieser Properties besorgt ...
150*cdf0e10cSrcweir		sDefaultValue_OWString$		= aDocumentProperties.getPropertyValue ( "Author"			)
151*cdf0e10cSrcweir		bDefaultValue_sal_Bool		= aDocumentProperties.getPropertyValue ( "AutoloadEnabled"	)
152*cdf0e10cSrcweir		nDefaultValue_sal_Int16%	= aDocumentProperties.getPropertyValue ( "EditingCycles"	)
153*cdf0e10cSrcweir		nDefaultValue_sal_uInt16%	= aDocumentProperties.getPropertyValue ( "Priority"			)
154*cdf0e10cSrcweir		nDefaultValue_sal_Int32&	= aDocumentProperties.getPropertyValue ( "EditingDuration"	)
155*cdf0e10cSrcweir		aDefaultValue_DateTime		= aDocumentProperties.getPropertyValue ( "ModifyDate"		)
156*cdf0e10cSrcweir'		aDefaultValue_ByteSequence	= aDocumentProperties.getPropertyValue ( "ExtraData"		)
157*cdf0e10cSrcweir		aDefaultValue_ByteSequence	= aDocumentProperties.ExtraData
158*cdf0e10cSrcweir
159*cdf0e10cSrcweir		' ... dann die Werte zur Kontrolle ausgeben.
160*cdf0e10cSrcweir		ShowProperties ( aDocumentProperties )
161*cdf0e10cSrcweir
162*cdf0e10cSrcweir		InfoMessage ( "getPropertyValue() ... OK" )
163*cdf0e10cSrcweir
164*cdf0e10cSrcweir		' Jetzt werden neue Werte vereinbart ...
165*cdf0e10cSrcweir		' Diese werden so gewaehlt, das sie garantiert von den Standardwerten verschieden sind!
166*cdf0e10cSrcweir		' Dazu werden die alten auf Wert abgefragt und entsprechend die neuen gesetzt.
167*cdf0e10cSrcweir		sNewValue_OWString$		= sDefaultValue_OWString$	+ "NeuerWert"
168*cdf0e10cSrcweir		bNewValue_sal_Bool		= not bDefaultValue_sal_Bool
169*cdf0e10cSrcweir		nNewValue_sal_Int16%	= nDefaultValue_sal_Int16%	+ 1
170*cdf0e10cSrcweir		if ( nDefaultValue_sal_uInt16% = 1 ) then
171*cdf0e10cSrcweir			nNewValue_sal_uInt16% = 2
172*cdf0e10cSrcweir		else
173*cdf0e10cSrcweir			nNewValue_sal_uInt16% = 1
174*cdf0e10cSrcweir		end if
175*cdf0e10cSrcweir		nNewValue_sal_Int32&	= nDefaultValue_sal_Int32&  + 1
176*cdf0e10cSrcweir
177*cdf0e10cSrcweir		aNewValue_DateTime					= aDefaultValue_DateTime
178*cdf0e10cSrcweir		aNewValue_DateTime.HundredthSeconds	= aDefaultValue_DateTime.HundredthSeconds	+ 1
179*cdf0e10cSrcweir		aNewValue_DateTime.Seconds			= aDefaultValue_DateTime.Seconds         	+ 1
180*cdf0e10cSrcweir		aNewValue_DateTime.Minutes			= aDefaultValue_DateTime.Minutes         	+ 1
181*cdf0e10cSrcweir		aNewValue_DateTime.Hours			= aDefaultValue_DateTime.Hours           	+ 1
182*cdf0e10cSrcweir		aNewValue_DateTime.Day				= aDefaultValue_DateTime.Day             	+ 1
183*cdf0e10cSrcweir		aNewValue_DateTime.Month			= aDefaultValue_DateTime.Month           	+ 1
184*cdf0e10cSrcweir		aNewValue_DateTime.Year				= aDefaultValue_DateTime.Year            	+ 1
185*cdf0e10cSrcweir
186*cdf0e10cSrcweir		aNewValue_ByteSequence = aDefaultValue_ByteSequence
187*cdf0e10cSrcweir		nElementCount% = UBound ( aDefaultValue_ByteSequence )
188*cdf0e10cSrcweir'		for nCounter%=0 to nElementCount% step 1
189*cdf0e10cSrcweir'			aNewValue_ByteSequence(nCounter%) = ( aDefaultValue_ByteSequence(nCounter%) + 1 )
190*cdf0e10cSrcweir'		next nCounter%
191*cdf0e10cSrcweir
192*cdf0e10cSrcweir		' Anschliessend muessen diese neuen Werte gesetzt werden.
193*cdf0e10cSrcweir		aDocumentProperties.setPropertyValue ( "Author"			, sNewValue_OWString$		)
194*cdf0e10cSrcweir		aDocumentProperties.setPropertyValue ( "AutoloadEnabled", bNewValue_sal_Bool		)
195*cdf0e10cSrcweir		aDocumentProperties.setPropertyValue ( "EditingCycles"	, nNewValue_sal_Int16%		)
196*cdf0e10cSrcweir		aDocumentProperties.setPropertyValue ( "Priority"		, nNewValue_sal_uInt16%		)
197*cdf0e10cSrcweir		aDocumentProperties.setPropertyValue ( "EditingDuration", nNewValue_sal_Int32&		)
198*cdf0e10cSrcweir		aDocumentProperties.setPropertyValue ( "ModifyDate"		, aNewValue_DateTime		)
199*cdf0e10cSrcweir'		aDocumentProperties.setPropertyValue ( "ExtraData"		, aNewValue_ByteSequence	)
200*cdf0e10cSrcweir		aDocumentProperties.ExtraData = aNewValue_ByteSequence
201*cdf0e10cSrcweir
202*cdf0e10cSrcweir		' Dann lassen wir sie uns ausgeben, um sie mit den vorherigen vergleichen zu koennen.
203*cdf0e10cSrcweir		' (Das geht natuerlich nur, wenn "bLOGOn=cOn" ist - also eine LOG-Datei geschrieben wird!)
204*cdf0e10cSrcweir		ShowProperties ( aDocumentProperties )
205*cdf0e10cSrcweir
206*cdf0e10cSrcweir		' Nun werden die Properties wieder gelesen ...
207*cdf0e10cSrcweir		sLastValue_OWString$	= aDocumentProperties.getPropertyValue ( "Author"			)
208*cdf0e10cSrcweir		bLastValue_sal_Bool		= aDocumentProperties.getPropertyValue ( "AutoloadEnabled"	)
209*cdf0e10cSrcweir		nLastValue_sal_Int16%	= aDocumentProperties.getPropertyValue ( "EditingCycles"	)
210*cdf0e10cSrcweir		nLastValue_sal_uInt16%	= aDocumentProperties.getPropertyValue ( "Priority"			)
211*cdf0e10cSrcweir		nLastValue_sal_Int32&	= aDocumentProperties.getPropertyValue ( "EditingDuration"	)
212*cdf0e10cSrcweir		aLastValue_DateTime		= aDocumentProperties.getPropertyValue ( "ModifyDate"		)
213*cdf0e10cSrcweir		aLastValue_ByteSequence	= aDocumentProperties.getPropertyValue ( "ExtraData"		)
214*cdf0e10cSrcweir
215*cdf0e10cSrcweir		' ... und mit den vorher als zu setzend bestimmte Werte vergleichen!
216*cdf0e10cSrcweir		' Es duerfen KEINE Unterschiede auftreten, da sonst "setPropertyValue()" nicht korrekt funktioniert hat!
217*cdf0e10cSrcweir
218*cdf0e10cSrcweir		if ( CompareOWString			( sNewValue_OWString$,		sLastValue_OWString$	) = cDifferent ) then
219*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [OWString fehlerhaft]"		)
220*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
221*cdf0e10cSrcweir		elseif ( CompareBool			( bNewValue_sal_Bool,		bLastValue_sal_Bool		) = cDifferent ) then
222*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [sal_Bool fehlerhaft]"		)
223*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
224*cdf0e10cSrcweir		elseif ( CompareInt16			( nNewValue_sal_Int16%,		nLastValue_sal_Int16%	) = cDifferent ) then
225*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [sal_Int16 fehlerhaft]"	)
226*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
227*cdf0e10cSrcweir		elseif ( CompareInt16			( nNewValue_sal_uInt16%,	nLastValue_sal_uInt16%	) = cDifferent ) then
228*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [sal_uInt16 fehlerhaft]"	)
229*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
230*cdf0e10cSrcweir		elseif ( CompareInt32			( nNewValue_sal_Int32&,		nLastValue_sal_Int32&	) = cDifferent ) then
231*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [sal_Int32 fehlerhaft]"	)
232*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
233*cdf0e10cSrcweir		elseif ( CompareDateTime		( aNewValue_DateTime,		aLastValue_DateTime		) = cDifferent ) then
234*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [DateTime fehlerhaft]"		)
235*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
236*cdf0e10cSrcweir		elseif ( CompareByteSequence	( aNewValue_ByteSequence,	aLastValue_ByteSequence	) = cDifferent ) then
237*cdf0e10cSrcweir			ErrorMessage	( "setPropertyValue() ... Fehler [ByteSequence fehlerhaft]"	)
238*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
239*cdf0e10cSrcweir		end if
240*cdf0e10cSrcweir
241*cdf0e10cSrcweir		InfoMessage ( "setPropertyValue() ... OK" )
242*cdf0e10cSrcweir
243*cdf0e10cSrcweir		' Nun wird noch mit den zuerst ermittelten Default-Werten verglichen!
244*cdf0e10cSrcweir		' Hier MUESSEN Unterschiede auftreten, da sonst "get-" UND "setPropertyValue()" nicht korrekt funktioniert haben!
245*cdf0e10cSrcweir
246*cdf0e10cSrcweir		if ( CompareOWString			( sDefaultValue_OWString$,		sLastValue_OWString$	) = cEqual ) then
247*cdf0e10cSrcweir			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [OWString fehlerhaft]"		)
248*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
249*cdf0e10cSrcweir		elseif ( CompareBool			( bDefaultValue_sal_Bool,		bLastValue_sal_Bool		) = cEqual ) then
250*cdf0e10cSrcweir			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [sal_Bool fehlerhaft]"		)
251*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
252*cdf0e10cSrcweir		elseif ( CompareInt16			( nDefaultValue_sal_Int16%,		nLastValue_sal_Int16%	) = cEqual ) then
253*cdf0e10cSrcweir			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [sal_Int16 fehlerhaft]"	)
254*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
255*cdf0e10cSrcweir		elseif ( CompareInt16			( nDefaultValue_sal_uInt16%,	nLastValue_sal_uInt16%	) = cEqual ) then
256*cdf0e10cSrcweir			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [sal_uInt16 fehlerhaft]"	)
257*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
258*cdf0e10cSrcweir		elseif ( CompareInt32			( nDefaultValue_sal_Int32&,		nLastValue_sal_Int32&	) = cEqual ) then
259*cdf0e10cSrcweir			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [sal_Int32 fehlerhaft]"	)
260*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
261*cdf0e10cSrcweir		elseif ( CompareDateTime		( aDefaultValue_DateTime,		aLastValue_DateTime		) = cEqual ) then
262*cdf0e10cSrcweir			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [DateTime fehlerhaft]"		)
263*cdf0e10cSrcweir			goto Test_NormalUse_XPropertySet_Error
264*cdf0e10cSrcweir'		elseif ( CompareByteSequence	( aDefaultValue_ByteSequence,	aLastValue_ByteSequence	) = cEqual ) then
265*cdf0e10cSrcweir'			ErrorMessage	( "Zusammenspiel set & getPropertyValue() ... Fehler [ByteSequence fehlerhaft]"	)
266*cdf0e10cSrcweir'			goto Test_NormalUse_XPropertySet_Error
267*cdf0e10cSrcweir		end if
268*cdf0e10cSrcweir
269*cdf0e10cSrcweir		InfoMessage ( "Zusammenspiel set & getPropertyValue() ... OK" )
270*cdf0e10cSrcweir
271*cdf0e10cSrcweir		' Der Test war erfolgreich! Meldung ausgeben und zurueck zm Aufrufer.
272*cdf0e10cSrcweir		' Ausschalten der Fehlerbehandlung
273*cdf0e10cSrcweir		on Error goto 0
274*cdf0e10cSrcweir		' Meldung ausgeben
275*cdf0e10cSrcweir		InfoMessage ( "Test_NormalUse_XPropertySet ... [ende]" )
276*cdf0e10cSrcweir		' Status setzen
277*cdf0e10cSrcweir		Test_NormalUse_XPropertySet = cOK
278*cdf0e10cSrcweir		' Und Funktion beenden
279*cdf0e10cSrcweir		Exit Function
280*cdf0e10cSrcweir
281*cdf0e10cSrcweir' Es ist ein unerwartete Fehler aufgetreten! (Exception ...)
282*cdf0e10cSrcweir' Meldung ausgeben und mit Fehler zurueckkehren.
283*cdf0e10cSrcweirTest_NormalUse_XPropertySet_Error:
284*cdf0e10cSrcweir		' Ausschalten der Fehlerbehandlung
285*cdf0e10cSrcweir		on Error goto 0
286*cdf0e10cSrcweir		' Meldung ausgeben
287*cdf0e10cSrcweir		ErrorMessage ( "Test_NormalUse_XPropertySet ... [Error]" )
288*cdf0e10cSrcweir		' und Fehlerstatus setzen
289*cdf0e10cSrcweir		Test_NormalUse_XPropertySet = cError
290*cdf0e10cSrcweir		' Abbruch der Funktion erzwingen!
291*cdf0e10cSrcweir		Exit Function
292*cdf0e10cSrcweir
293*cdf0e10cSrcweirEnd Function
294*cdf0e10cSrcweir
295*cdf0e10cSrcweir'----------------------------------------------------------------------------
296*cdf0e10cSrcweir' Testmethode: Testen des unterstuetzten Interfaces "XNameContainer" unter normalen Bedingungen
297*cdf0e10cSrcweir'
298*cdf0e10cSrcweir' Returnwert = cOK		; wenn sich das Objekt korrekt verhalten hat
299*cdf0e10cSrcweir' Returnwert = cError	; wenn das Objekt noch nicht robust genug ist
300*cdf0e10cSrcweir'----------------------------------------------------------------------------
301*cdf0e10cSrcweirFunction Test_NormalUse_XNameContainer ( aDocumentProperties ) as Boolean
302*cdf0e10cSrcweir
303*cdf0e10cSrcweir		' Einschalten der Fehlerbehandlung, um Exceptions oder aehnliches abzufangen!
304*cdf0e10cSrcweir		on Error goto Test_NormalUse_XNameContainer_Error
305*cdf0e10cSrcweir
306*cdf0e10cSrcweir		InfoMessage ( "Test_NormalUse_XNameContainer ... [start]" )
307*cdf0e10cSrcweir
308*cdf0e10cSrcweir		' Da das Initialisieren im Konstruktor des Objektes und das Aufraeumen im Destruktor
309*cdf0e10cSrcweir		' automatisch geschieht und diese Methode pro Programmablauf nur einmal verwendet wird,
310*cdf0e10cSrcweir		' darf sich kein Element schon im NameContainer befinden!
311*cdf0e10cSrcweir		' Wenn doch, ist das ein Fehler!
312*cdf0e10cSrcweir		if ( aDocumentProperties.hasElements () = TRUE ) then
313*cdf0e10cSrcweir			ErrorMessage ( "Der NameConatiner sollte eigentlich leer sein, enthaelt initial aber schon Elemente!?" )
314*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
315*cdf0e10cSrcweir		end if
316*cdf0e10cSrcweir
317*cdf0e10cSrcweir		' Zunaechst werden mehrere Elemente in den NameContainer eingefuegt.
318*cdf0e10cSrcweir		sItemName_1$	= "Item 1"
319*cdf0e10cSrcweir		sItemName_2$	= "Item 2"
320*cdf0e10cSrcweir		sItemName_3$	= "Item 3"
321*cdf0e10cSrcweir		sItemName_4$	= "Item 4"
322*cdf0e10cSrcweir		sItemName_5$	= "Item 5"
323*cdf0e10cSrcweir
324*cdf0e10cSrcweir		sFirstValue_1$	= "Value 1"
325*cdf0e10cSrcweir		sFirstValue_2$	= "Value 2"
326*cdf0e10cSrcweir		sFirstValue_3$	= "Value 3"
327*cdf0e10cSrcweir		sFirstValue_4$	= "Value 4"
328*cdf0e10cSrcweir		sFirstValue_5$	= "Value 5"
329*cdf0e10cSrcweir
330*cdf0e10cSrcweir		aDocumentProperties.insertByName ( sItemName_1$, sFirstValue_1$ )
331*cdf0e10cSrcweir		aDocumentProperties.insertByName ( sItemName_2$, sFirstValue_2$ )
332*cdf0e10cSrcweir		aDocumentProperties.insertByName ( sItemName_3$, sFirstValue_3$ )
333*cdf0e10cSrcweir		aDocumentProperties.insertByName ( sItemName_4$, sFirstValue_4$ )
334*cdf0e10cSrcweir		aDocumentProperties.insertByName ( sItemName_5$, sFirstValue_5$ )
335*cdf0e10cSrcweir
336*cdf0e10cSrcweir		' Zur Kontrolle die Werte ausgeben. (Nur wichtig, wenn geloggt wird!)
337*cdf0e10cSrcweir		' Dabei wird die Methode "getElementNames()" gleich implizit mitgetestet!
338*cdf0e10cSrcweir		ShowNameContainer ( aDocumentProperties )
339*cdf0e10cSrcweir
340*cdf0e10cSrcweir		' Aber auch die Anzahl kontrollieren.
341*cdf0e10cSrcweir		' (Hier wird eine eigene BASIC-Hilfsfunktion verwendet! keine Interface-Methode)
342*cdf0e10cSrcweir		if ( getNameContainerCount ( aDocumentProperties ) <> 5 ) then
343*cdf0e10cSrcweir			ErrorMessage ( "insertByName() ... Fehler (Der NameConatiner enthaelt nicht die eingefuegten 5 Elemente!)" )
344*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
345*cdf0e10cSrcweir		end if
346*cdf0e10cSrcweir
347*cdf0e10cSrcweir		' Nun noch feststellen, ob die 5 denn auch tatsaechlich vorhanden sind.
348*cdf0e10cSrcweir		if ( aDocumentProperties.hasByName ( sItemName_1$ ) = FALSE ) then
349*cdf0e10cSrcweir			ErrorMessage	( "hasByName() ... Fehler [Element 1 nicht vorhanden!?]" )
350*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
351*cdf0e10cSrcweir		elseif ( aDocumentProperties.hasByName ( sItemName_2$ ) = FALSE ) then
352*cdf0e10cSrcweir			ErrorMessage	( "hasByName() ... Fehler [Element 2 nicht vorhanden!?]" )
353*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
354*cdf0e10cSrcweir		elseif ( aDocumentProperties.hasByName ( sItemName_3$ ) = FALSE ) then
355*cdf0e10cSrcweir			ErrorMessage	( "hasByName() ... Fehler [Element 3 nicht vorhanden!?]" )
356*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
357*cdf0e10cSrcweir		elseif ( aDocumentProperties.hasByName ( sItemName_4$ ) = FALSE ) then
358*cdf0e10cSrcweir			ErrorMessage	( "hasByName() ... Fehler [Element 4 nicht vorhanden!?]" )
359*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
360*cdf0e10cSrcweir		elseif ( aDocumentProperties.hasByName ( sItemName_5$ ) = FALSE ) then
361*cdf0e10cSrcweir			ErrorMessage	( "hasByName() ... Fehler [Element 5 nicht vorhanden!?]" )
362*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
363*cdf0e10cSrcweir		end if
364*cdf0e10cSrcweir
365*cdf0e10cSrcweir		' Dann die Werte wieder auslesen.
366*cdf0e10cSrcweir		sCompareValue_1$ = aDocumentProperties.getByName ( sItemName_1$ )
367*cdf0e10cSrcweir		sCompareValue_2$ = aDocumentProperties.getByName ( sItemName_2$ )
368*cdf0e10cSrcweir		sCompareValue_3$ = aDocumentProperties.getByName ( sItemName_3$ )
369*cdf0e10cSrcweir		sCompareValue_4$ = aDocumentProperties.getByName ( sItemName_4$ )
370*cdf0e10cSrcweir		sCompareValue_5$ = aDocumentProperties.getByName ( sItemName_5$ )
371*cdf0e10cSrcweir
372*cdf0e10cSrcweir		' Zum Vergleich die Werte ausgeben. (Nur wichtig, wenn geloggt wird!)
373*cdf0e10cSrcweir		ShowNameContainer ( aDocumentProperties )
374*cdf0e10cSrcweir
375*cdf0e10cSrcweir		' Dann die Werte automatisch vergleichen!
376*cdf0e10cSrcweir		if ( CompareOWString		( sFirstValue_1$, sCompareValue_1$ ) = cDifferent ) then
377*cdf0e10cSrcweir			ErrorMessage	( "getByName() ... Fehler [Element 1 fehlerhaft]" )
378*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
379*cdf0e10cSrcweir		elseif ( CompareOWString	( sFirstValue_2$, sCompareValue_2$ ) = cDifferent ) then
380*cdf0e10cSrcweir			ErrorMessage	( "getByName() ... Fehler [Element 2 fehlerhaft]" )
381*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
382*cdf0e10cSrcweir		elseif ( CompareOWString	( sFirstValue_3$, sCompareValue_3$ ) = cDifferent ) then
383*cdf0e10cSrcweir			ErrorMessage	( "getByName() ... Fehler [Element 3 fehlerhaft]" )
384*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
385*cdf0e10cSrcweir		elseif ( CompareOWString	( sFirstValue_4$, sCompareValue_4$ ) = cDifferent ) then
386*cdf0e10cSrcweir			ErrorMessage	( "getByName() ... Fehler [Element 4 fehlerhaft]" )
387*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
388*cdf0e10cSrcweir		elseif ( CompareOWString	( sFirstValue_5$, sCompareValue_5$ ) = cDifferent ) then
389*cdf0e10cSrcweir			ErrorMessage	( "getByName() ... Fehler [Element 5 fehlerhaft]" )
390*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
391*cdf0e10cSrcweir		end if
392*cdf0e10cSrcweir
393*cdf0e10cSrcweir		InfoMessage	( "getByName() ... OK" )
394*cdf0e10cSrcweir
395*cdf0e10cSrcweir		' Jetzt wird versucht einige der Elemente in ihrem Wert zu veraendern.
396*cdf0e10cSrcweir		sNewValue_1$	= "NewValue 1"
397*cdf0e10cSrcweir		sNewValue_2$	= "NewValue 2"
398*cdf0e10cSrcweir		sNewValue_3$	= "NewValue 3"
399*cdf0e10cSrcweir		sNewValue_4$	= "NewValue 4"
400*cdf0e10cSrcweir		sNewValue_5$	= "NewValue 5"
401*cdf0e10cSrcweir
402*cdf0e10cSrcweir		aDocumentProperties.replaceByName ( sItemName_1$, sNewValue_1$ )
403*cdf0e10cSrcweir		aDocumentProperties.replaceByName ( sItemName_2$, sNewValue_2$ )
404*cdf0e10cSrcweir		aDocumentProperties.replaceByName ( sItemName_3$, sNewValue_3$ )
405*cdf0e10cSrcweir		aDocumentProperties.replaceByName ( sItemName_4$, sNewValue_4$ )
406*cdf0e10cSrcweir		aDocumentProperties.replaceByName ( sItemName_5$, sNewValue_5$ )
407*cdf0e10cSrcweir
408*cdf0e10cSrcweir		' Zur Kontrolle die Werte ausgeben. (Nur wichtig, wenn geloggt wird!)
409*cdf0e10cSrcweir		ShowNameContainer ( aDocumentProperties )
410*cdf0e10cSrcweir
411*cdf0e10cSrcweir		' Dann die Werte wieder auslesen.
412*cdf0e10cSrcweir		sCompareValue_1$ = aDocumentProperties.getByName ( sItemName_1$ )
413*cdf0e10cSrcweir		sCompareValue_2$ = aDocumentProperties.getByName ( sItemName_2$ )
414*cdf0e10cSrcweir		sCompareValue_3$ = aDocumentProperties.getByName ( sItemName_3$ )
415*cdf0e10cSrcweir		sCompareValue_4$ = aDocumentProperties.getByName ( sItemName_4$ )
416*cdf0e10cSrcweir		sCompareValue_5$ = aDocumentProperties.getByName ( sItemName_5$ )
417*cdf0e10cSrcweir
418*cdf0e10cSrcweir		' Zum Vergleich die Werte ausgeben. (Nur wichtig, wenn geloggt wird!)
419*cdf0e10cSrcweir		ShowNameContainer ( aDocumentProperties )
420*cdf0e10cSrcweir
421*cdf0e10cSrcweir		' Dann die Werte automatisch vergleichen!
422*cdf0e10cSrcweir		if ( CompareOWString		( sNewValue_1$, sCompareValue_1$ ) = cDifferent ) then
423*cdf0e10cSrcweir			ErrorMessage	( "replaceByName() ... Fehler [Element 1 fehlerhaft]" )
424*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
425*cdf0e10cSrcweir		elseif ( CompareOWString	( sNewValue_2$, sCompareValue_2$ ) = cDifferent ) then
426*cdf0e10cSrcweir			ErrorMessage	( "replaceByName() ... Fehler [Element 2 fehlerhaft]" )
427*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
428*cdf0e10cSrcweir		elseif ( CompareOWString	( sNewValue_3$, sCompareValue_3$ ) = cDifferent ) then
429*cdf0e10cSrcweir			ErrorMessage	( "replaceByName() ... Fehler [Element 3 fehlerhaft]" )
430*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
431*cdf0e10cSrcweir		elseif ( CompareOWString	( sNewValue_4$, sCompareValue_4$ ) = cDifferent ) then
432*cdf0e10cSrcweir			ErrorMessage	( "replaceByName() ... Fehler [Element 4 fehlerhaft]" )
433*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
434*cdf0e10cSrcweir		elseif ( CompareOWString	( sNewValue_5$, sCompareValue_5$ ) = cDifferent ) then
435*cdf0e10cSrcweir			ErrorMessage	( "replaceByName() ... Fehler [Element 5 fehlerhaft]" )
436*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
437*cdf0e10cSrcweir		end if
438*cdf0e10cSrcweir
439*cdf0e10cSrcweir		InfoMessage	( "replaceByName() ... OK" )
440*cdf0e10cSrcweir
441*cdf0e10cSrcweir		' Hier sollen einige der 5 Eintraege geloescht werden.
442*cdf0e10cSrcweir		aDocumentProperties.removeByName ( sItemName_1$ )
443*cdf0e10cSrcweir		aDocumentProperties.removeByName ( sItemName_3$ )
444*cdf0e10cSrcweir
445*cdf0e10cSrcweir		' Dann wieder die Anzahl kontrollieren.
446*cdf0e10cSrcweir		' (Hier wird eine eigene BASIC-Hilfsfunktion verwendet! keine Interface-Methode)
447*cdf0e10cSrcweir		if ( getNameContainerCount ( aDocumentProperties ) <> 3 ) then
448*cdf0e10cSrcweir			ErrorMessage ( "removeByName() ... Fehler (Der NameConatiner enthaelt nicht die erwarteten 3 Elemente!)" )
449*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
450*cdf0e10cSrcweir		end if
451*cdf0e10cSrcweir
452*cdf0e10cSrcweir		' Nun noch feststellen, ob die restlichen 3 denn auch tatsaechlich die richtigen sind.
453*cdf0e10cSrcweir		if ( aDocumentProperties.hasByName ( sItemName_2$ ) = FALSE ) then
454*cdf0e10cSrcweir			ErrorMessage	( "removeByName() ... Fehler [Element 2 nicht vorhanden!?]" )
455*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
456*cdf0e10cSrcweir		elseif ( aDocumentProperties.hasByName ( sItemName_4$ ) = FALSE ) then
457*cdf0e10cSrcweir			ErrorMessage	( "removeByName() ... Fehler [Element 4 nicht vorhanden!?]" )
458*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
459*cdf0e10cSrcweir		elseif ( aDocumentProperties.hasByName ( sItemName_5$ ) = FALSE ) then
460*cdf0e10cSrcweir			ErrorMessage	( "removeByName() ... Fehler [Element 5 nicht vorhanden!?]" )
461*cdf0e10cSrcweir			goto Test_NormalUse_XNameContainer_Error
462*cdf0e10cSrcweir		end if
463*cdf0e10cSrcweir
464*cdf0e10cSrcweir		' Zur Kontrolle die Werte nochmals ausgeben. (Nur wichtig, wenn geloggt wird!)
465*cdf0e10cSrcweir		ShowNameContainer ( aDocumentProperties )
466*cdf0e10cSrcweir
467*cdf0e10cSrcweir		InfoMessage	( "removeByName() ... OK" )
468*cdf0e10cSrcweir
469*cdf0e10cSrcweir		' Der Test war erfolgreich! Meldung ausgeben und zurueck zm Aufrufer.
470*cdf0e10cSrcweir		' Ausschalten der Fehlerbehandlung
471*cdf0e10cSrcweir		on Error goto 0
472*cdf0e10cSrcweir		' Meldung ausgeben
473*cdf0e10cSrcweir		InfoMessage ( "Test_NormalUse_XNameContainer ... [ende]" )
474*cdf0e10cSrcweir		' Status setzen
475*cdf0e10cSrcweir		Test_NormalUse_XNameContainer = cOK
476*cdf0e10cSrcweir		' Und Funktion beenden
477*cdf0e10cSrcweir		Exit Function
478*cdf0e10cSrcweir
479*cdf0e10cSrcweir' Es ist ein unerwartete Fehler aufgetreten! (Exception ...)
480*cdf0e10cSrcweir' Meldung ausgeben und mit Fehler zurueckkehren.
481*cdf0e10cSrcweirTest_NormalUse_XNameContainer_Error:
482*cdf0e10cSrcweir		' Ausschalten der Fehlerbehandlung
483*cdf0e10cSrcweir		on Error goto 0
484*cdf0e10cSrcweir		' Meldung ausgeben
485*cdf0e10cSrcweir		ErrorMessage ( "Test_NormalUse_XNameContainer ... [Error]" )
486*cdf0e10cSrcweir		' und Fehlerstatus setzen
487*cdf0e10cSrcweir		Test_NormalUse_XNameContainer = cError
488*cdf0e10cSrcweir		' Abbruch der Funktion erzwingen!
489*cdf0e10cSrcweir		Exit Function
490*cdf0e10cSrcweir
491*cdf0e10cSrcweirEnd Function
492*cdf0e10cSrcweir
493*cdf0e10cSrcweir'----------------------------------------------------------------------------
494*cdf0e10cSrcweir' Testmethode: Testen des unterstuetzten Interfaces "XPersist" unter normalen Bedingungen
495*cdf0e10cSrcweir'
496*cdf0e10cSrcweir' Returnwert = cOK		; wenn der Test erfolgreich war
497*cdf0e10cSrcweir' Returnwert = cError	; wenn sich das Objekt nicht korrekt verhalten hat
498*cdf0e10cSrcweir'----------------------------------------------------------------------------
499*cdf0e10cSrcweirFunction Test_NormalUse_XPersist ( aDocumentProperties ) as Boolean
500*cdf0e10cSrcweir
501*cdf0e10cSrcweir		' Einschalten der Fehlerbehandlung, um Exceptions oder aehnliches abzufangen!
502*cdf0e10cSrcweir		on Error goto Test_NormalUse_XPersist_Error
503*cdf0e10cSrcweir
504*cdf0e10cSrcweir		InfoMessage ( "Test_NormalUse_XPersist ... [start]" )
505*cdf0e10cSrcweir
506*cdf0e10cSrcweir		' Laden der Properties aus einer Datei
507*cdf0e10cSrcweir		aDocumentProperties.read ( cTestPath + "TestDebug_in.sdw" )
508*cdf0e10cSrcweir
509*cdf0e10cSrcweir		' Zur Kontrolle anzeigen
510*cdf0e10cSrcweir		ShowProperties ( aDocumentProperties )
511*cdf0e10cSrcweir
512*cdf0e10cSrcweir		' Speichern der Properties in einer neuen Datei
513*cdf0e10cSrcweir		aDocumentProperties.write	( cTestPath + "TestDebug_Out.sdw" )
514*cdf0e10cSrcweir		aDocumentProperties.read	( cTestPath + "TestDebug_Out.sdw" )
515*cdf0e10cSrcweir
516*cdf0e10cSrcweir		' Zur Kontrolle anzeigen
517*cdf0e10cSrcweir		ShowProperties ( aDocumentProperties )
518*cdf0e10cSrcweir
519*cdf0e10cSrcweir		' Der Test war erfolgreich! Meldung ausgeben und zurueck zm Aufrufer.
520*cdf0e10cSrcweir		' Ausschalten der Fehlerbehandlung
521*cdf0e10cSrcweir		on Error goto 0
522*cdf0e10cSrcweir		' Meldung ausgeben
523*cdf0e10cSrcweir		InfoMessage ( "Test_NormalUse_XPersist ... [ende]" )
524*cdf0e10cSrcweir		' Status setzen
525*cdf0e10cSrcweir		Test_NormalUse_XPersist = cOK
526*cdf0e10cSrcweir		' Und Funktion beenden
527*cdf0e10cSrcweir		Exit Function
528*cdf0e10cSrcweir
529*cdf0e10cSrcweir' Es ist ein unerwartete Fehler aufgetreten! (Exception ...)
530*cdf0e10cSrcweir' Meldung ausgeben und mit Fehler zurueckkehren.
531*cdf0e10cSrcweirTest_NormalUse_XPersist_Error:
532*cdf0e10cSrcweir		' Ausschalten der Fehlerbehandlung
533*cdf0e10cSrcweir		on Error goto 0
534*cdf0e10cSrcweir		' Meldung ausgeben
535*cdf0e10cSrcweir		ErrorMessage ( "Test_NormalUse_XPersist ... [Error]" )
536*cdf0e10cSrcweir		' und Fehlerstatus setzen
537*cdf0e10cSrcweir		Test_NormalUse_XPersist = cError
538*cdf0e10cSrcweir		' Abbruch der Funktion erzwingen!
539*cdf0e10cSrcweir		Exit Function
540*cdf0e10cSrcweir
541*cdf0e10cSrcweirEnd Function
542*cdf0e10cSrcweir
543*cdf0e10cSrcweir'*****************************************************************************************************************
544*cdf0e10cSrcweir' Hilfsfunktionen und -methoden
545*cdf0e10cSrcweir'*****************************************************************************************************************
546*cdf0e10cSrcweir
547*cdf0e10cSrcweir'----------------------------------------------------------------------------
548*cdf0e10cSrcweir' Hilfsmethode: Oeffnet die LOG-Datei.
549*cdf0e10cSrcweir'----------------------------------------------------------------------------
550*cdf0e10cSrcweirSub OpenLOG ( sFileName$ )
551*cdf0e10cSrcweir		if ( bLOGOn = cOn ) then
552*cdf0e10cSrcweir			sLOGFileName$	= sFileName$
553*cdf0e10cSrcweir			nLOGFileHandle%	= FreeFile
554*cdf0e10cSrcweir			open sLOGFileName$ for output as nLOGFileHandle%
555*cdf0e10cSrcweir		end if
556*cdf0e10cSrcweirEnd Sub
557*cdf0e10cSrcweir
558*cdf0e10cSrcweir'----------------------------------------------------------------------------
559*cdf0e10cSrcweir' Hilfsmethode: Schliesst die LOG-Datei.
560*cdf0e10cSrcweir'----------------------------------------------------------------------------
561*cdf0e10cSrcweirSub CloseLOG
562*cdf0e10cSrcweir		if ( bLOGOn = cOn ) then
563*cdf0e10cSrcweir			close #nLOGFileHandle%
564*cdf0e10cSrcweir		end if
565*cdf0e10cSrcweirEnd Sub
566*cdf0e10cSrcweir
567*cdf0e10cSrcweir'----------------------------------------------------------------------------
568*cdf0e10cSrcweir' Hilfsmethode: Gibt einen Text in einer LOG-Datei aus.
569*cdf0e10cSrcweir'----------------------------------------------------------------------------
570*cdf0e10cSrcweirSub WriteLOG ( sMessage$ )
571*cdf0e10cSrcweir		if ( bLOGOn = cOn ) then
572*cdf0e10cSrcweir			Write #nLOGFileHandle% sMessage$
573*cdf0e10cSrcweir		end if
574*cdf0e10cSrcweirEnd Sub
575*cdf0e10cSrcweir
576*cdf0e10cSrcweir'----------------------------------------------------------------------------
577*cdf0e10cSrcweir' Hilfsmethode: Gibt eine MessageBox mit Fehlertext, Zeilennummer und Warnschild aus.
578*cdf0e10cSrcweir'----------------------------------------------------------------------------
579*cdf0e10cSrcweirSub ErrorMessage ( sMessage$ )
580*cdf0e10cSrcweir		' Entweder in die LOG-Datei schreiben oder eine MessageBox anzeigen.
581*cdf0e10cSrcweir		if ( bLOGOn = cOn ) then
582*cdf0e10cSrcweir			WriteLOG ( sMessage$ )
583*cdf0e10cSrcweir		else
584*cdf0e10cSrcweir			MsgBox ( sMessage$, 16 )
585*cdf0e10cSrcweir		end if
586*cdf0e10cSrcweirEnd Sub
587*cdf0e10cSrcweir
588*cdf0e10cSrcweir'----------------------------------------------------------------------------
589*cdf0e10cSrcweir' Hilfsmethode: Gibt eine Hinweisbox aus.
590*cdf0e10cSrcweir'----------------------------------------------------------------------------
591*cdf0e10cSrcweirSub InfoMessage ( sMessage$ )
592*cdf0e10cSrcweir		' Nur was anzeigen, wenn Nutzer es wuenscht!
593*cdf0e10cSrcweir		if ( bShowErrorsOnly = cOff ) then
594*cdf0e10cSrcweir			' Ansonsten wird entweder in die LOG-Datei geschrieben oder eine MessageBox angezeigt.
595*cdf0e10cSrcweir			if ( bLOGOn = cOn ) then
596*cdf0e10cSrcweir				WriteLOG ( sMessage$ )
597*cdf0e10cSrcweir			else
598*cdf0e10cSrcweir				MsgBox ( sMessage$, 64 )
599*cdf0e10cSrcweir			end if
600*cdf0e10cSrcweir		end if
601*cdf0e10cSrcweirEnd Sub
602*cdf0e10cSrcweir
603*cdf0e10cSrcweir'----------------------------------------------------------------------------
604*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht zwei OWString-Werte
605*cdf0e10cSrcweir'
606*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Werte identisch sind
607*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Werte verschieden sind
608*cdf0e10cSrcweir'----------------------------------------------------------------------------
609*cdf0e10cSrcweirFunction CompareOWString ( sOWString_1$, sOWString_2$ ) as Boolean
610*cdf0e10cSrcweir
611*cdf0e10cSrcweir		if ( sOWString_1$ = sOWString_2$ ) then
612*cdf0e10cSrcweir			CompareOWString = cEqual
613*cdf0e10cSrcweir		else
614*cdf0e10cSrcweir			CompareOWString = cDifferent
615*cdf0e10cSrcweir		end if
616*cdf0e10cSrcweir
617*cdf0e10cSrcweirEnd Function
618*cdf0e10cSrcweir
619*cdf0e10cSrcweir'----------------------------------------------------------------------------
620*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht zwei DateTime-Strukturen
621*cdf0e10cSrcweir'
622*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Werte identisch sind
623*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Werte verschieden sind
624*cdf0e10cSrcweir'----------------------------------------------------------------------------
625*cdf0e10cSrcweirFunction CompareDateTime ( aDateTime_1, aDateTime_2 ) as Boolean
626*cdf0e10cSrcweir
627*cdf0e10cSrcweir		if ( aDateTime_1.Day = aDateTime_2.Day and aDateTime_1.Month = aDateTime_2.Month and aDateTime_1.Year = aDateTime_2.Year and aDateTime_1.Hours = aDateTime_1.Hours and aDateTime_1.Minutes = aDateTime_1.Minutes and aDateTime_1.Seconds = aDateTime_1.Seconds and aDateTime_1.HundredthSeconds = aDateTime_1.HundredthSeconds ) then
628*cdf0e10cSrcweir			CompareDateTime = cEqual
629*cdf0e10cSrcweir		else
630*cdf0e10cSrcweir			CompareDateTime = cDifferent
631*cdf0e10cSrcweir		end if
632*cdf0e10cSrcweir
633*cdf0e10cSrcweirEnd Function
634*cdf0e10cSrcweir
635*cdf0e10cSrcweir'----------------------------------------------------------------------------
636*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht zwei ByteSequence's
637*cdf0e10cSrcweir'
638*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Werte identisch sind
639*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Werte verschieden sind
640*cdf0e10cSrcweir'----------------------------------------------------------------------------
641*cdf0e10cSrcweirFunction CompareByteSequence ( seqByteSequence_1, seqByteSequence_2 ) as Boolean
642*cdf0e10cSrcweir
643*cdf0e10cSrcweir		' Wenn beide leer sind, sind sie auch identisch !
644*cdf0e10cSrcweir		' Dieser Test mit "IsArray" ist noetig, da bei einem leeren Array die
645*cdf0e10cSrcweir		' Funktion "UBound" einen Fehler produziert!
646*cdf0e10cSrcweir		if ( IsArray ( seqByteSequence_1 ) = FALSE and IsArray ( seqByteSequence_2 ) = FALSE ) then
647*cdf0e10cSrcweir			CompareByteSequence = cEqual
648*cdf0e10cSrcweir			Exit Function
649*cdf0e10cSrcweir		end if
650*cdf0e10cSrcweir
651*cdf0e10cSrcweir		' Wenn jedoch nur eine leer ist, dann sind sie nicht identisch.
652*cdf0e10cSrcweir		if ( IsArray ( seqByteSequence_1 ) = FALSE ) or ( IsArray ( seqByteSequence_2 ) = FALSE ) then
653*cdf0e10cSrcweir			CompareByteSequence = cDifferent
654*cdf0e10cSrcweir			Exit Function
655*cdf0e10cSrcweir		end if
656*cdf0e10cSrcweir
657*cdf0e10cSrcweir		' Besorgen der Anzahl der Elemente der Sequences
658*cdf0e10cSrcweir		nElementCount_1%	=	UBound ( seqByteSequence_1 )
659*cdf0e10cSrcweir		nElementCount_2%	=	UBound ( seqByteSequence_2 )
660*cdf0e10cSrcweir
661*cdf0e10cSrcweir		' Wenn diese Anzahl schon verschieden ist, dann ...
662*cdf0e10cSrcweir		if ( nElementCount_1% <> nElementCount_2% ) then
663*cdf0e10cSrcweir			' ... sind die Sequences wohl verschieden.
664*cdf0e10cSrcweir			CompareByteSequence = cDifferent
665*cdf0e10cSrcweir			' Die Element brauchen dann nicht mehr verglichen zu werden.
666*cdf0e10cSrcweir			Exit Function
667*cdf0e10cSrcweir		end if
668*cdf0e10cSrcweir
669*cdf0e10cSrcweir		' Ansonsten werden die Elemente einzeln miteinander verglichen.
670*cdf0e10cSrcweir		for nCounter%=0 to nElementCount_1% step 1
671*cdf0e10cSrcweir			' Wenn auch nur ein paar davon verschieden ist, dann ...
672*cdf0e10cSrcweir			if ( nElementCount_1%(nCounter%) <> nElementCount_2%(nCounter%) ) then
673*cdf0e10cSrcweir				' ... kann der Vergleich abgebrochen werden!
674*cdf0e10cSrcweir				CompareByteSequence = cDifferent
675*cdf0e10cSrcweir				Exit Function
676*cdf0e10cSrcweir			end if
677*cdf0e10cSrcweir		next nCounter%
678*cdf0e10cSrcweir
679*cdf0e10cSrcweir		' Wenn man bis hier gekommen ist, dann sind die Sequences identisch.
680*cdf0e10cSrcweir		CompareByteSequence = cEqual
681*cdf0e10cSrcweir
682*cdf0e10cSrcweirEnd Function
683*cdf0e10cSrcweir
684*cdf0e10cSrcweir'----------------------------------------------------------------------------
685*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht zwei Int16-Werte
686*cdf0e10cSrcweir'
687*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Werte identisch sind
688*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Werte verschieden sind
689*cdf0e10cSrcweir'----------------------------------------------------------------------------
690*cdf0e10cSrcweirFunction CompareInt16 ( nInt16_1%, nInt16_2% ) as Boolean
691*cdf0e10cSrcweir
692*cdf0e10cSrcweir		if ( nInt16_1% = nInt16_2% ) then
693*cdf0e10cSrcweir			CompareInt16 = cEqual
694*cdf0e10cSrcweir		else
695*cdf0e10cSrcweir			CompareInt16 = cDifferent
696*cdf0e10cSrcweir		end if
697*cdf0e10cSrcweir
698*cdf0e10cSrcweirEnd Function
699*cdf0e10cSrcweir
700*cdf0e10cSrcweir'----------------------------------------------------------------------------
701*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht zwei Int32-Werte
702*cdf0e10cSrcweir'
703*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Werte identisch sind
704*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Werte verschieden sind
705*cdf0e10cSrcweir'----------------------------------------------------------------------------
706*cdf0e10cSrcweirFunction CompareInt32 ( nInt32_1&, nInt32_2& ) as Boolean
707*cdf0e10cSrcweir
708*cdf0e10cSrcweir		if ( nInt32_1& = nInt32_2& ) then
709*cdf0e10cSrcweir			CompareInt32 = cEqual
710*cdf0e10cSrcweir		else
711*cdf0e10cSrcweir			CompareInt32 = cDifferent
712*cdf0e10cSrcweir		end if
713*cdf0e10cSrcweir
714*cdf0e10cSrcweirEnd Function
715*cdf0e10cSrcweir
716*cdf0e10cSrcweir'----------------------------------------------------------------------------
717*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht zwei Bool-Werte
718*cdf0e10cSrcweir'
719*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Werte identisch sind
720*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Werte verschieden sind
721*cdf0e10cSrcweir'----------------------------------------------------------------------------
722*cdf0e10cSrcweirFunction CompareBool ( bBool_1, bBool_2 ) as Boolean
723*cdf0e10cSrcweir
724*cdf0e10cSrcweir		if ( bBool_1 = bBool_2 ) then
725*cdf0e10cSrcweir			CompareBool = cEqual
726*cdf0e10cSrcweir		else
727*cdf0e10cSrcweir			CompareBool = cDifferent
728*cdf0e10cSrcweir		end if
729*cdf0e10cSrcweir
730*cdf0e10cSrcweirEnd Function
731*cdf0e10cSrcweir
732*cdf0e10cSrcweir'----------------------------------------------------------------------------
733*cdf0e10cSrcweir' Hilfsfunktion: Vergleicht die Properties zweier Objekte um Unterschiede festzustellen.
734*cdf0e10cSrcweir'
735*cdf0e10cSrcweir' Returnwert = cEqual		; wenn Objekte von den Properties her identisch sind
736*cdf0e10cSrcweir' Returnwert = cDifferent	; wenn Objekte von den Properties her verschieden sind
737*cdf0e10cSrcweir'----------------------------------------------------------------------------
738*cdf0e10cSrcweirFunction CompareDocumentProperties ( aDocumentProperties_1, aDocumentProperties_2 ) as Boolean
739*cdf0e10cSrcweir
740*cdf0e10cSrcweir		' Besorgen der Werte und zwischenspeichern (bezogen auf Objekt 1)
741*cdf0e10cSrcweir		sAuthor_1$					= aDocumentProperties_1.getPropertyValue ( "Author"						)
742*cdf0e10cSrcweir		bAutoloadEnabled_1			= aDocumentProperties_1.getPropertyValue ( "AutoloadEnabled"			)
743*cdf0e10cSrcweir		nAutoloadSecs_1%			= aDocumentProperties_1.getPropertyValue ( "AutoloadSecs"				)
744*cdf0e10cSrcweir		sAutoLoadURL_1$				= aDocumentProperties_1.getPropertyValue ( "AutoloadURL"				)
745*cdf0e10cSrcweir		sBliendCopiesTo_1$			= aDocumentProperties_1.getPropertyValue ( "BlindCopiesTo"				)
746*cdf0e10cSrcweir		sCopiesTo_1$				= aDocumentProperties_1.getPropertyValue ( "CopiesTo"					)
747*cdf0e10cSrcweir		aCreationDate_1				= aDocumentProperties_1.getPropertyValue ( "CreationDate"				)
748*cdf0e10cSrcweir		sDefaultTarget_1$			= aDocumentProperties_1.getPropertyValue ( "DefaultTarget"				)
749*cdf0e10cSrcweir		sDescription_1$				= aDocumentProperties_1.getPropertyValue ( "Description"				)
750*cdf0e10cSrcweir		nEditingCycles_1%			= aDocumentProperties_1.getPropertyValue ( "EditingCycles"				)
751*cdf0e10cSrcweir		nEditingDuration_1&			= aDocumentProperties_1.getPropertyValue ( "EditingDuration"			)
752*cdf0e10cSrcweir		seqExtraData_1				= aDocumentProperties_1.getPropertyValue ( "ExtraData"					)
753*cdf0e10cSrcweir		sInReplyTo_1$				= aDocumentProperties_1.getPropertyValue ( "InReplyTo"					)
754*cdf0e10cSrcweir		bIsEncrypted_1				= aDocumentProperties_1.getPropertyValue ( "IsEncrypted"				)
755*cdf0e10cSrcweir		sKeywords_1$				= aDocumentProperties_1.getPropertyValue ( "Keywords"					)
756*cdf0e10cSrcweir		sMIMEType_1$				= aDocumentProperties_1.getPropertyValue ( "MIMEType"					)
757*cdf0e10cSrcweir		sModifiedBy_1$				= aDocumentProperties_1.getPropertyValue ( "ModifiedBy"					)
758*cdf0e10cSrcweir		aModifyDate_1				= aDocumentProperties_1.getPropertyValue ( "ModifyDate"					)
759*cdf0e10cSrcweir		sNewsgroups_1$				= aDocumentProperties_1.getPropertyValue ( "Newsgroups"					)
760*cdf0e10cSrcweir		sOriginal_1$				= aDocumentProperties_1.getPropertyValue ( "Original"					)
761*cdf0e10cSrcweir		bPortableGraphics_1			= aDocumentProperties_1.getPropertyValue ( "PortableGraphics"			)
762*cdf0e10cSrcweir		aPrintDate_1				= aDocumentProperties_1.getPropertyValue ( "PrintDate"					)
763*cdf0e10cSrcweir		sPrintedBy_1$				= aDocumentProperties_1.getPropertyValue ( "PrintedBy"					)
764*cdf0e10cSrcweir		nPriority_1%				= aDocumentProperties_1.getPropertyValue ( "Priority"					)
765*cdf0e10cSrcweir		bQueryTemplate_1			= aDocumentProperties_1.getPropertyValue ( "QueryTemplate"				)
766*cdf0e10cSrcweir		sRecipient_1$				= aDocumentProperties_1.getPropertyValue ( "Recipient"					)
767*cdf0e10cSrcweir		sReferences_1$				= aDocumentProperties_1.getPropertyValue ( "References"					)
768*cdf0e10cSrcweir		sReplyTo_1$					= aDocumentProperties_1.getPropertyValue ( "ReplyTo"					)
769*cdf0e10cSrcweir		bSaveGraphicsCompressed_1	= aDocumentProperties_1.getPropertyValue ( "SaveGraphicsCompressed"		)
770*cdf0e10cSrcweir		bSaveOriginalGraphics_1		= aDocumentProperties_1.getPropertyValue ( "SaveOriginalGraphics"		)
771*cdf0e10cSrcweir		bSaveVersionOnClose_1		= aDocumentProperties_1.getPropertyValue ( "SaveVersionOnClose"			)
772*cdf0e10cSrcweir		sTemplate_1$				= aDocumentProperties_1.getPropertyValue ( "Template"					)
773*cdf0e10cSrcweir		bTemplateConfig_1			= aDocumentProperties_1.getPropertyValue ( "TemplateConfig"				)
774*cdf0e10cSrcweir		aTemplateDate_1				= aDocumentProperties_1.getPropertyValue ( "TemplateDate"				)
775*cdf0e10cSrcweir		sTemplateFileName_1$		= aDocumentProperties_1.getPropertyValue ( "TemplateFileName"			)
776*cdf0e10cSrcweir		sTheme_1$					= aDocumentProperties_1.getPropertyValue ( "Theme"						)
777*cdf0e10cSrcweir		sTitle_1$					= aDocumentProperties_1.getPropertyValue ( "Title"						)
778*cdf0e10cSrcweir		bUserData_1					= aDocumentProperties_1.getPropertyValue ( "UserData"					)
779*cdf0e10cSrcweir
780*cdf0e10cSrcweir		' Besorgen der Werte und zwischenspeichern (bezogen auf Objekt 2)
781*cdf0e10cSrcweir		sAuthor_2$					= aDocumentProperties_2.getPropertyValue ( "Author"						)
782*cdf0e10cSrcweir		bAutoloadEnabled_2			= aDocumentProperties_2.getPropertyValue ( "AutoloadEnabled"			)
783*cdf0e10cSrcweir		nAutoloadSecs_2%			= aDocumentProperties_2.getPropertyValue ( "AutoloadSecs"				)
784*cdf0e10cSrcweir		sAutoLoadURL_2$				= aDocumentProperties_2.getPropertyValue ( "AutoloadURL"				)
785*cdf0e10cSrcweir		sBliendCopiesTo_2$			= aDocumentProperties_2.getPropertyValue ( "BlindCopiesTo"				)
786*cdf0e10cSrcweir		sCopiesTo_2$				= aDocumentProperties_2.getPropertyValue ( "CopiesTo"					)
787*cdf0e10cSrcweir		aCreationDate_2				= aDocumentProperties_2.getPropertyValue ( "CreationDate"				)
788*cdf0e10cSrcweir		sDefaultTarget_2$			= aDocumentProperties_2.getPropertyValue ( "DefaultTarget"				)
789*cdf0e10cSrcweir		sDescription_2$				= aDocumentProperties_2.getPropertyValue ( "Description"				)
790*cdf0e10cSrcweir		nEditingCycles_2%			= aDocumentProperties_2.getPropertyValue ( "EditingCycles"				)
791*cdf0e10cSrcweir		nEditingDuration_2&			= aDocumentProperties_2.getPropertyValue ( "EditingDuration"			)
792*cdf0e10cSrcweir		seqExtraData_2				= aDocumentProperties_2.getPropertyValue ( "ExtraData"					)
793*cdf0e10cSrcweir		sInReplyTo_2$				= aDocumentProperties_2.getPropertyValue ( "InReplyTo"					)
794*cdf0e10cSrcweir		bIsEncrypted_2				= aDocumentProperties_2.getPropertyValue ( "IsEncrypted"				)
795*cdf0e10cSrcweir		sKeywords_2$				= aDocumentProperties_2.getPropertyValue ( "Keywords"					)
796*cdf0e10cSrcweir		sMIMEType_2$				= aDocumentProperties_2.getPropertyValue ( "MIMEType"					)
797*cdf0e10cSrcweir		sModifiedBy_2$				= aDocumentProperties_2.getPropertyValue ( "ModifiedBy"					)
798*cdf0e10cSrcweir		aModifyDate_2				= aDocumentProperties_2.getPropertyValue ( "ModifyDate"					)
799*cdf0e10cSrcweir		sNewsgroups_2$				= aDocumentProperties_2.getPropertyValue ( "Newsgroups"					)
800*cdf0e10cSrcweir		sOriginal_2$				= aDocumentProperties_2.getPropertyValue ( "Original"					)
801*cdf0e10cSrcweir		bPortableGraphics_2			= aDocumentProperties_2.getPropertyValue ( "PortableGraphics"			)
802*cdf0e10cSrcweir		aPrintDate_2				= aDocumentProperties_2.getPropertyValue ( "PrintDate"					)
803*cdf0e10cSrcweir		sPrintedBy_2$				= aDocumentProperties_2.getPropertyValue ( "PrintedBy"					)
804*cdf0e10cSrcweir		nPriority_2%				= aDocumentProperties_2.getPropertyValue ( "Priority"					)
805*cdf0e10cSrcweir		bQueryTemplate_2			= aDocumentProperties_2.getPropertyValue ( "QueryTemplate"				)
806*cdf0e10cSrcweir		sRecipient_2$				= aDocumentProperties_2.getPropertyValue ( "Recipient"					)
807*cdf0e10cSrcweir		sReferences_2$				= aDocumentProperties_2.getPropertyValue ( "References"					)
808*cdf0e10cSrcweir		sReplyTo_2$					= aDocumentProperties_2.getPropertyValue ( "ReplyTo"					)
809*cdf0e10cSrcweir		bSaveGraphicsCompressed_2	= aDocumentProperties_2.getPropertyValue ( "SaveGraphicsCompressed"		)
810*cdf0e10cSrcweir		bSaveOriginalGraphics_2		= aDocumentProperties_2.getPropertyValue ( "SaveOriginalGraphics"		)
811*cdf0e10cSrcweir		bSaveVersionOnClose_2		= aDocumentProperties_2.getPropertyValue ( "SaveVersionOnClose"			)
812*cdf0e10cSrcweir		sTemplate_2$				= aDocumentProperties_2.getPropertyValue ( "Template"					)
813*cdf0e10cSrcweir		bTemplateConfig_2			= aDocumentProperties_2.getPropertyValue ( "TemplateConfig"				)
814*cdf0e10cSrcweir		aTemplateDate_2				= aDocumentProperties_2.getPropertyValue ( "TemplateDate"				)
815*cdf0e10cSrcweir		sTemplateFileName_2$		= aDocumentProperties_2.getPropertyValue ( "TemplateFileName"			)
816*cdf0e10cSrcweir		sTheme_2$					= aDocumentProperties_2.getPropertyValue ( "Theme"						)
817*cdf0e10cSrcweir		sTitle_2$					= aDocumentProperties_2.getPropertyValue ( "Title"						)
818*cdf0e10cSrcweir		bUserData_2					= aDocumentProperties_2.getPropertyValue ( "UserData"					)
819*cdf0e10cSrcweir
820*cdf0e10cSrcweir		' Als erwarteten Zielwert schon mal "Properties identisch" annehmen!!!
821*cdf0e10cSrcweir		' F�r den Fall, das nur eine diesen Anspruch nicht erf�llt, wird der Wert einfach zur�ckgesetzt.
822*cdf0e10cSrcweir		' Von da bleibt der neue Wert bestehen und zeigt an, da� sich mindestens eine Property ge�ndert hat!
823*cdf0e10cSrcweir		CompareDocumentProperties = cEqual
824*cdf0e10cSrcweir
825*cdf0e10cSrcweir		' Dann die Werte vergleichen
826*cdf0e10cSrcweir		if ( CompareOWString		( sAuthor_1$,					sAuthor_2$					) = cDifferent ) then
827*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
828*cdf0e10cSrcweir		elseif ( CompareBool		( bAutoloadEnabled_1,			bAutoloadEnabled_2			) = cDifferent ) then
829*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
830*cdf0e10cSrcweir		elseif ( CompareInt16		( nAutoloadSecs_1%,				nAutoloadSecs_2%			) = cDifferent ) then
831*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
832*cdf0e10cSrcweir		elseif ( CompareOWString	( sAutoLoadURL_1$,				sAutoLoadURL_2$				) = cDifferent ) then
833*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
834*cdf0e10cSrcweir		elseif ( CompareOWString	( sBliendCopiesTo_1$,			sBliendCopiesTo_2$			) = cDifferent ) then
835*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
836*cdf0e10cSrcweir		elseif ( CompareOWString	( sCopiesTo_1$,					sCopiesTo_2$				) = cDifferent ) then
837*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
838*cdf0e10cSrcweir		elseif ( CompareDateTime	( aCreationDate_1,				aCreationDate_2				) = cDifferent ) then
839*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
840*cdf0e10cSrcweir		elseif ( CompareOWString	( sDefaultTarget_1$,			sDefaultTarget_2$			) = cDifferent ) then
841*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
842*cdf0e10cSrcweir		elseif ( CompareOWString	( sDescription_1$,				sDescription_2$				) = cDifferent ) then
843*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
844*cdf0e10cSrcweir		elseif ( CompareInt16		( nEditingCycles_1%,			nEditingCycles_2%			) = cDifferent ) then
845*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
846*cdf0e10cSrcweir		elseif ( CompareInt32		( nEditingDuration_1&,			nEditingDuration_2&			) = cDifferent ) then
847*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
848*cdf0e10cSrcweir		elseif ( CompareByteSequence( seqExtraData_1,				seqExtraData_2				) = cDifferent ) then
849*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
850*cdf0e10cSrcweir		elseif ( CompareOWString	( sInReplyTo_1$,				sInReplyTo_2$				) = cDifferent ) then
851*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
852*cdf0e10cSrcweir		elseif ( CompareBool		( bIsEncrypted_1,				bIsEncrypted_2				) = cDifferent ) then
853*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
854*cdf0e10cSrcweir		elseif ( CompareOWString	( sKeywords_1$,					sKeywords_2$				) = cDifferent ) then
855*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
856*cdf0e10cSrcweir		elseif ( CompareOWString	( sMIMEType_1$,					sMIMEType_2$				) = cDifferent ) then
857*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
858*cdf0e10cSrcweir		elseif ( CompareOWString	( sModifiedBy_1$,				sModifiedBy_2$				) = cDifferent ) then
859*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
860*cdf0e10cSrcweir		elseif ( CompareDateTime	( aModifyDate_1,				aModifyDate_2				) = cDifferent ) then
861*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
862*cdf0e10cSrcweir		elseif ( CompareOWString	( sNewsgroups_1$,				sNewsgroups_2$				) = cDifferent ) then
863*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
864*cdf0e10cSrcweir		elseif ( CompareOWString	( sOriginal_1$,					sOriginal_2$				) = cDifferent ) then
865*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
866*cdf0e10cSrcweir		elseif ( CompareBool		( bPortableGraphics_1,			bPortableGraphics_2			) = cDifferent ) then
867*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
868*cdf0e10cSrcweir		elseif ( CompareDateTime	( aPrintDate_1,					aPrintDate_2				) = cDifferent ) then
869*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
870*cdf0e10cSrcweir		elseif ( CompareOWString	( sPrintedBy_1$,				sPrintedBy_2$				) = cDifferent ) then
871*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
872*cdf0e10cSrcweir		elseif ( CompareInt16		( nPriority_1%,					nPriority_2%				) = cDifferent ) then
873*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
874*cdf0e10cSrcweir		elseif ( CompareBool		( bQueryTemplate_1,				bQueryTemplate_2			) = cDifferent ) then
875*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
876*cdf0e10cSrcweir		elseif ( CompareOWString	( sRecipient_1$,				sRecipient_2$				) = cDifferent ) then
877*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
878*cdf0e10cSrcweir		elseif ( CompareOWString	( sReferences_1$,				sReferences_2$				) = cDifferent ) then
879*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
880*cdf0e10cSrcweir		elseif ( CompareOWString	( sReplyTo_1$,					sReplyTo_2$					) = cDifferent ) then
881*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
882*cdf0e10cSrcweir		elseif ( CompareBool		( bSaveGraphicsCompressed_1,	bSaveGraphicsCompressed_2	) = cDifferent ) then
883*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
884*cdf0e10cSrcweir		elseif ( CompareBool		( bSaveOriginalGraphics_1,		bSaveOriginalGraphics_2		) = cDifferent ) then
885*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
886*cdf0e10cSrcweir		elseif ( CompareBool		( bSaveVersionOnClose_1,		bSaveVersionOnClose_2		) = cDifferent ) then
887*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
888*cdf0e10cSrcweir		elseif ( CompareOWString	( sTemplate_1$,					sTemplate_2$				) = cDifferent ) then
889*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
890*cdf0e10cSrcweir		elseif ( CompareBool		( bTemplateConfig_1,			bTemplateConfig_2			) = cDifferent ) then
891*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
892*cdf0e10cSrcweir		elseif ( CompareDateTime	( aTemplateDate_1,				aTemplateDate_2				) = cDifferent ) then
893*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
894*cdf0e10cSrcweir		elseif ( CompareOWString	( sTemplateFileName_1$,			sTemplateFileName_2$		) = cDifferent ) then
895*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
896*cdf0e10cSrcweir		elseif ( CompareOWString	( sTheme_1$,					sTheme_2$					) = cDifferent ) then
897*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
898*cdf0e10cSrcweir		elseif ( CompareOWString	( sTitle_1$,					sTitle_2$					) = cDifferent ) then
899*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
900*cdf0e10cSrcweir		elseif ( CompareBool		( bUserData_1,					bUserData_2					) = cDifferent ) then
901*cdf0e10cSrcweir			CompareDocumentProperties = cDifferent
902*cdf0e10cSrcweir		end if
903*cdf0e10cSrcweir
904*cdf0e10cSrcweirEnd Function
905*cdf0e10cSrcweir
906*cdf0e10cSrcweir'----------------------------------------------------------------------------
907*cdf0e10cSrcweir' Hilfsfunktion: Wandelt eine Struktur des Types DateTime in einen formatierten String um
908*cdf0e10cSrcweir'----------------------------------------------------------------------------
909*cdf0e10cSrcweirFunction DateTime2String ( aDateTime ) as String
910*cdf0e10cSrcweir
911*cdf0e10cSrcweir		stempString$ = ""
912*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.Day					+ "."
913*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.Month				+ "."
914*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.Year				+ " - "
915*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.Hours				+ ":"
916*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.Minutes				+ ":"
917*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.Seconds				+ ":"
918*cdf0e10cSrcweir		stempString$ = stempString$ + aDateTime.HundredthSeconds	+ " Uhr"
919*cdf0e10cSrcweir
920*cdf0e10cSrcweir		DateTime2String = stempString$
921*cdf0e10cSrcweir
922*cdf0e10cSrcweirEnd Function
923*cdf0e10cSrcweir
924*cdf0e10cSrcweir'----------------------------------------------------------------------------
925*cdf0e10cSrcweir' Hilfsfunktion: Wandelt eine Sequence von Bytes in einen formatierten String um
926*cdf0e10cSrcweir'----------------------------------------------------------------------------
927*cdf0e10cSrcweirFunction ByteSequence2String ( seqByteSequence ) as String
928*cdf0e10cSrcweir
929*cdf0e10cSrcweir		nElementCount% = UBound ( seqByteSequence() )
930*cdf0e10cSrcweir
931*cdf0e10cSrcweir		if ( nElementCount% < 1 ) then
932*cdf0e10cSrcweir			stempString$ = "leer"
933*cdf0e10cSrcweir		else
934*cdf0e10cSrcweir			stempString$ = "{"
935*cdf0e10cSrcweir			for nCounter%=0 to nElementCount% step 1
936*cdf0e10cSrcweir				stempString$ = stempString$ + seqByteSequence(nCounter%)
937*cdf0e10cSrcweir			next nCounter%
938*cdf0e10cSrcweir			stempString$ = stempString$ + "}"
939*cdf0e10cSrcweir		end if
940*cdf0e10cSrcweir
941*cdf0e10cSrcweir		ByteSequence2String = stempString$
942*cdf0e10cSrcweir
943*cdf0e10cSrcweirEnd Function
944*cdf0e10cSrcweir
945*cdf0e10cSrcweir'----------------------------------------------------------------------------
946*cdf0e10cSrcweir' Hilfsmethode: Zeigt die aktuellen Werte ALLER Properties an
947*cdf0e10cSrcweir'----------------------------------------------------------------------------
948*cdf0e10cSrcweirSub ShowProperties ( aDocumentProperties )
949*cdf0e10cSrcweir
950*cdf0e10cSrcweir		' Besorgen der Werte und zwischenspeichern
951*cdf0e10cSrcweir		sAuthor$				= aDocumentProperties.getPropertyValue ( "Author"					)
952*cdf0e10cSrcweir		bAutoloadEnabled		= aDocumentProperties.getPropertyValue ( "AutoloadEnabled"			)
953*cdf0e10cSrcweir		nAutoloadSecs%			= aDocumentProperties.getPropertyValue ( "AutoloadSecs"				)
954*cdf0e10cSrcweir		sAutoLoadURL$			= aDocumentProperties.getPropertyValue ( "AutoloadURL"				)
955*cdf0e10cSrcweir		sBliendCopiesTo$		= aDocumentProperties.getPropertyValue ( "BlindCopiesTo"			)
956*cdf0e10cSrcweir		sCopiesTo$				= aDocumentProperties.getPropertyValue ( "CopiesTo"					)
957*cdf0e10cSrcweir		dCreationDate			= aDocumentProperties.getPropertyValue ( "CreationDate"				)
958*cdf0e10cSrcweir		sDefaultTarget$			= aDocumentProperties.getPropertyValue ( "DefaultTarget"			)
959*cdf0e10cSrcweir		sDescription$			= aDocumentProperties.getPropertyValue ( "Description"				)
960*cdf0e10cSrcweir		nEditingCycles%			= aDocumentProperties.getPropertyValue ( "EditingCycles"			)
961*cdf0e10cSrcweir		nEditingDuration&		= aDocumentProperties.getPropertyValue ( "EditingDuration"			)
962*cdf0e10cSrcweir		seqExtraData			= aDocumentProperties.getPropertyValue ( "ExtraData"				)
963*cdf0e10cSrcweir		sInReplyTo$				= aDocumentProperties.getPropertyValue ( "InReplyTo"				)
964*cdf0e10cSrcweir		bIsEncrypted			= aDocumentProperties.getPropertyValue ( "IsEncrypted"				)
965*cdf0e10cSrcweir		sKeywords$				= aDocumentProperties.getPropertyValue ( "Keywords"					)
966*cdf0e10cSrcweir		sMIMEType$				= aDocumentProperties.getPropertyValue ( "MIMEType"					)
967*cdf0e10cSrcweir		sModifiedBy$			= aDocumentProperties.getPropertyValue ( "ModifiedBy"				)
968*cdf0e10cSrcweir		dModifyDate				= aDocumentProperties.getPropertyValue ( "ModifyDate"				)
969*cdf0e10cSrcweir		sNewsgroups$			= aDocumentProperties.getPropertyValue ( "Newsgroups"				)
970*cdf0e10cSrcweir		sOriginal$				= aDocumentProperties.getPropertyValue ( "Original"					)
971*cdf0e10cSrcweir		bPortableGraphics		= aDocumentProperties.getPropertyValue ( "PortableGraphics"			)
972*cdf0e10cSrcweir		dPrintDate				= aDocumentProperties.getPropertyValue ( "PrintDate"				)
973*cdf0e10cSrcweir		sPrintedBy$				= aDocumentProperties.getPropertyValue ( "PrintedBy"				)
974*cdf0e10cSrcweir		nPriority%				= aDocumentProperties.getPropertyValue ( "Priority"					)
975*cdf0e10cSrcweir		bQueryTemplate			= aDocumentProperties.getPropertyValue ( "QueryTemplate"			)
976*cdf0e10cSrcweir		sRecipient$				= aDocumentProperties.getPropertyValue ( "Recipient"				)
977*cdf0e10cSrcweir		sReferences$			= aDocumentProperties.getPropertyValue ( "References"				)
978*cdf0e10cSrcweir		sReplyTo$				= aDocumentProperties.getPropertyValue ( "ReplyTo"					)
979*cdf0e10cSrcweir		bSaveGraphicsCompressed	= aDocumentProperties.getPropertyValue ( "SaveGraphicsCompressed"	)
980*cdf0e10cSrcweir		bSaveOriginalGraphics	= aDocumentProperties.getPropertyValue ( "SaveOriginalGraphics"		)
981*cdf0e10cSrcweir		bSaveVersionOnClose		= aDocumentProperties.getPropertyValue ( "SaveVersionOnClose"		)
982*cdf0e10cSrcweir		sTemplate$				= aDocumentProperties.getPropertyValue ( "Template"					)
983*cdf0e10cSrcweir		bTemplateConfig			= aDocumentProperties.getPropertyValue ( "TemplateConfig"			)
984*cdf0e10cSrcweir		dTemplateDate			= aDocumentProperties.getPropertyValue ( "TemplateDate"				)
985*cdf0e10cSrcweir		sTemplateFileName$		= aDocumentProperties.getPropertyValue ( "TemplateFileName"			)
986*cdf0e10cSrcweir		sTheme$					= aDocumentProperties.getPropertyValue ( "Theme"					)
987*cdf0e10cSrcweir		sTitle$					= aDocumentProperties.getPropertyValue ( "Title"					)
988*cdf0e10cSrcweir		bUserData				= aDocumentProperties.getPropertyValue ( "UserData"					)
989*cdf0e10cSrcweir
990*cdf0e10cSrcweir		' Eine Zeichenkette zusammenbasteln, welche die Werte formatiert darstellt.
991*cdf0e10cSrcweir		sOutLine$ = 			"[OWString]"		+ chr$(9) + "Author"  					+ chr$(9) + "= {" + chr$(9) + sAuthor$							+ "}" + chr$(13)
992*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "AutoloadEnabled"			+ chr$(9) + "= {" + chr$(9) + bAutoloadEnabled					+ "}" + chr$(13)
993*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Int16]"		+ chr$(9) + "AutoloadSecs"				+ chr$(9) + "= {" + chr$(9) + nAutoloadSecs%					+ "}" + chr$(13)
994*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "AutoLoadURL"				+ chr$(9) + "= {" + chr$(9) + sAutoLoadURL$						+ "}" + chr$(13)
995*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "BliendCopiesTo"			+ chr$(9) + "= {" + chr$(9) + sBliendCopiesTo$					+ "}" + chr$(13)
996*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "CopiesTo"					+ chr$(9) + "= {" + chr$(9) + sCopiesTo$						+ "}" + chr$(13)
997*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[DateTime]"		+ chr$(9) + "CreationDate"				+ chr$(9) + "= {" + chr$(9) + DateTime2String(dCreationDate)	+ "}" + chr$(13)
998*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "DefaultTarget"				+ chr$(9) + "= {" + chr$(9) + sDefaultTarget$					+ "}" + chr$(13)
999*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Description"				+ chr$(9) + "= {" + chr$(9) + sDescription$						+ "}" + chr$(13)
1000*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Int16]"		+ chr$(9) + "EditingCycles"				+ chr$(9) + "= {" + chr$(9) + nEditingCycles%					+ "}" + chr$(13)
1001*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Int32]"		+ chr$(9) + "EditingDuration"			+ chr$(9) + "= {" + chr$(9) + nEditingDuration&					+ "}" + chr$(13)
1002*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[Sequence<Byte>]"	+ chr$(9) + "ExtraData"					+ chr$(9) + "= {" + chr$(9) + ByteSequence2String(seqExtraData)	+ "}" + chr$(13)
1003*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "InReplyTo"					+ chr$(9) + "= {" + chr$(9) + sInReplyTo$						+ "}" + chr$(13)
1004*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "IsEncrypted"				+ chr$(9) + "= {" + chr$(9) + bIsEncrypted						+ "}" + chr$(13)
1005*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Keywords"					+ chr$(9) + "= {" + chr$(9) + sKeywords$						+ "}" + chr$(13)
1006*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "MIMEType"					+ chr$(9) + "= {" + chr$(9) + sMIMEType$						+ "}" + chr$(13)
1007*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "ModifiedBy"				+ chr$(9) + "= {" + chr$(9) + sModifiedBy$						+ "}" + chr$(13)
1008*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[DateTime]"		+ chr$(9) + "ModifyDate"				+ chr$(9) + "= {" + chr$(9) + DateTime2String(dModifyDate)		+ "}" + chr$(13)
1009*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Newsgroups"				+ chr$(9) + "= {" + chr$(9) + sNewsgroups$						+ "}" + chr$(13)
1010*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Original"					+ chr$(9) + "= {" + chr$(9) + sOriginal$						+ "}" + chr$(13)
1011*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "PortableGraphics"			+ chr$(9) + "= {" + chr$(9) + bPortableGraphics					+ "}" + chr$(13)
1012*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[DateTime]"		+ chr$(9) + "PrintDate"					+ chr$(9) + "= {" + chr$(9) + DateTime2String(dPrintDate)		+ "}" + chr$(13)
1013*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "PrintedBy"					+ chr$(9) + "= {" + chr$(9) + sPrintedBy$						+ "}" + chr$(13)
1014*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Int16]"		+ chr$(9) + "Priority"					+ chr$(9) + "= {" + chr$(9) + nPriority%						+ "}" + chr$(13)
1015*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "QueryTemplate"				+ chr$(9) + "= {" + chr$(9) + bQueryTemplate					+ "}" + chr$(13)
1016*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Recipient"					+ chr$(9) + "= {" + chr$(9) + sRecipient$						+ "}" + chr$(13)
1017*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "References"				+ chr$(9) + "= {" + chr$(9) + sReferences$						+ "}" + chr$(13)
1018*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "ReplyTo"					+ chr$(9) + "= {" + chr$(9) + sReplyTo$							+ "}" + chr$(13)
1019*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "SaveGraphicsCompressed"	+ chr$(9) + "= {" + chr$(9) + bSaveGraphicsCompressed			+ "}" + chr$(13)
1020*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "SaveOriginalGraphics"		+ chr$(9) + "= {" + chr$(9) + bSaveOriginalGraphics				+ "}" + chr$(13)
1021*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "SaveVersionOnClose"		+ chr$(9) + "= {" + chr$(9) + bSaveVersionOnClose				+ "}" + chr$(13)
1022*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Template"					+ chr$(9) + "= {" + chr$(9) + sTemplate$						+ "}" + chr$(13)
1023*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "TemplateConfig"			+ chr$(9) + "= {" + chr$(9) + bTemplateConfig					+ "}" + chr$(13)
1024*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[DateTime]"		+ chr$(9) + "TemplateDate"				+ chr$(9) + "= {" + chr$(9) + DateTime2String(dTemplateDate)	+ "}" + chr$(13)
1025*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "TemplateFileName"			+ chr$(9) + "= {" + chr$(9) + sTemplateFileName$				+ "}" + chr$(13)
1026*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Theme"						+ chr$(9) + "= {" + chr$(9) + sTheme$							+ "}" + chr$(13)
1027*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[OWString]"		+ chr$(9) + "Title"						+ chr$(9) + "= {" + chr$(9) + sTitle$							+ "}" + chr$(13)
1028*cdf0e10cSrcweir		sOutLine$ = sOutLine$ + "[sal_Bool]"		+ chr$(9) + "UserData"					+ chr$(9) + "= {" + chr$(9) + bUserData							+ "}"
1029*cdf0e10cSrcweir
1030*cdf0e10cSrcweir		' Ausgabe der formatierten Zeichenkette
1031*cdf0e10cSrcweir		InfoMessage ( sOutLine$ )
1032*cdf0e10cSrcweirEnd Sub
1033*cdf0e10cSrcweir
1034*cdf0e10cSrcweir'----------------------------------------------------------------------------
1035*cdf0e10cSrcweir' Hilfsmethode: Zeigt die aktuellen Elemente des NameContainers an.
1036*cdf0e10cSrcweir'----------------------------------------------------------------------------
1037*cdf0e10cSrcweirSub ShowNameContainer ( aDocumentProperties )
1038*cdf0e10cSrcweir
1039*cdf0e10cSrcweir		if ( aDocumentProperties.hasElements () = FALSE ) then
1040*cdf0e10cSrcweir			InfoMessage ( "Keine Elemente im NameContainer enthalten." )
1041*cdf0e10cSrcweir			Exit Sub
1042*cdf0e10cSrcweir		end if
1043*cdf0e10cSrcweir
1044*cdf0e10cSrcweir		aNameField		= aDocumentProperties.getElementNames ()
1045*cdf0e10cSrcweir		if ( IsArray ( aNameField ) = FALSE ) then
1046*cdf0e10cSrcweir			ErrorMessage ( "getElementNames() .... Fehler (Es konnte keine Sequence bestimmt werden!)" )
1047*cdf0e10cSrcweir			Exit Sub
1048*cdf0e10cSrcweir		end if
1049*cdf0e10cSrcweir		nElementCount%	= UBound ( aNameField () )
1050*cdf0e10cSrcweir
1051*cdf0e10cSrcweir		stempString$ = ""
1052*cdf0e10cSrcweir		for nCounter%=0 to nElementCount% step 1
1053*cdf0e10cSrcweir			stempString$ = "[" + nCounter% + "]"
1054*cdf0e10cSrcweir			stempString$ = stempString$ + chr$(9) + aNameField(nCounter%)
1055*cdf0e10cSrcweir			stempString$ = stempString$ + chr$(9) + "="
1056*cdf0e10cSrcweir			stempString$ = stempString$ + chr$(9) + aDocumentProperties.getByName ( aNameField(nCounter%) )
1057*cdf0e10cSrcweir			stempString$ = stempString$ + chr$(13)
1058*cdf0e10cSrcweir		next nCounter%
1059*cdf0e10cSrcweir
1060*cdf0e10cSrcweir		InfoMessage ( stempString$ )
1061*cdf0e10cSrcweir
1062*cdf0e10cSrcweirEnd Sub
1063*cdf0e10cSrcweir
1064*cdf0e10cSrcweir'----------------------------------------------------------------------------
1065*cdf0e10cSrcweir' Hilfsfunktion: Ermittelt die Anzahl der im NameContainer enthaltenen Elemente.
1066*cdf0e10cSrcweir'
1067*cdf0e10cSrcweir' Returnwert = Anzahl der Elemente
1068*cdf0e10cSrcweir'----------------------------------------------------------------------------
1069*cdf0e10cSrcweirFunction getNameContainerCount ( aDocumentProperties ) as Long
1070*cdf0e10cSrcweir
1071*cdf0e10cSrcweir		if ( aDocumentProperties.hasElements () = FALSE ) then
1072*cdf0e10cSrcweir			getNameContainerCount = 0
1073*cdf0e10cSrcweir			Exit Function
1074*cdf0e10cSrcweir		end if
1075*cdf0e10cSrcweir
1076*cdf0e10cSrcweir		aNameField		= aDocumentProperties.getElementNames ()
1077*cdf0e10cSrcweir		nElementCount%	= UBound ( aNameField () )
1078*cdf0e10cSrcweir
1079*cdf0e10cSrcweir		' Da die Zaehlung bei 0 beginnt, und der ermittelte Wert die obere Grenze darstellt,
1080*cdf0e10cSrcweir		' muss hier eine 1 draufgeschlagen werden.
1081*cdf0e10cSrcweir		getNameContainerCount = nElementCount% + 1
1082*cdf0e10cSrcweir
1083*cdf0e10cSrcweirEnd Function