1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 ' Copyright 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : global-level-1-test -> insert all OLE-Objects out of OLE-dialog into all doc-types
32 '\******************************************************************************
34 testcase tCheckTheOLEObjectDialog
36 qaerrorlog( "#i80670# The OLE retrieval routine is broken beyond repair, redesign required" )
39 Dim lListe (10) as String : Dim lListSoll (10) as String
41 Dim iCount, sCount as Integer
43 call ClosePresentationfloat()
49 case 1 : gApplication = "WRITER"
50 case 2 : gApplication = "CALC"
51 case 3 : gApplication = "IMPRESS"
52 case 4 : gApplication = "DRAW"
53 case 5 : gApplication = "MASTERDOCUMENT"
56 lListe ( 0 ) = 0 : lListSoll ( 0 ) = 0
57 printlog "check OLE-Object-Dialog for " + gApplication
63 Kontext "OLEObjektEinfuegen"
64 if ( not OLEObjektEinfuegen.exists() ) then
65 warnlog( "cannot access the OLE object dialog" )
72 for j=1 to ObjektTyp.GetItemCount
74 ListAppend ( lListe(), ObjektTyp.GetSelText )
78 iCount = ListCount ( lListe() )
80 select case gApplication
81 case "WRITER" : ListAppend ( lListSoll (), gOLECalc )
82 ListAppend ( lListSoll (), gOLEImpress )
83 ListAppend ( lListSoll (), gOLEDraw )
84 ListAppend ( lListSoll (), gOLEChart )
85 ListAppend ( lListSoll (), gOLEMath )
86 case "CALC" : ListAppend ( lListSoll (), gOLEWriter )
87 ListAppend ( lListSoll (), gOLEImpress )
88 ListAppend ( lListSoll (), gOLEDraw )
89 ListAppend ( lListSoll (), gOLEChart )
90 ListAppend ( lListSoll (), gOLEMath )
91 case "DRAW" : ListAppend ( lListSoll (), gOLECalc )
92 ListAppend ( lListSoll (), gOLEImpress )
93 ListAppend ( lListSoll (), gOLEWriter )
94 ListAppend ( lListSoll (), gOLEChart )
95 ListAppend ( lListSoll (), gOLEMath )
96 case "IMPRESS" : ListAppend ( lListSoll (), gOLECalc )
97 ListAppend ( lListSoll (), gOLEDraw )
98 ListAppend ( lListSoll (), gOLEWriter )
99 ListAppend ( lListSoll (), gOLEChart )
100 ListAppend ( lListSoll (), gOLEMath )
101 case "MASTERDOCUMENT" : ListAppend ( lListSoll (), gOLECalc )
102 ListAppend ( lListSoll (), gOLEImpress )
103 ListAppend ( lListSoll (), gOLEDraw )
104 ListAppend ( lListSoll (), gOLEChart )
105 ListAppend ( lListSoll (), gOLEMath )
108 if ( gPlatgroup = "w95" ) then
109 ListAppend ( lListSoll (), gOLEOthers )
112 ListSort ( lListSoll () )
113 sCount = ListCount ( lListSoll () )
115 if iCount <> sCount then
116 Warnlog "Expected: " + sCount + " Found: " + iCount
119 if lListe (j) <> lListSoll (j) then
120 Warnlog "Expected: '" + lListSoll (j) + "' Found: '" + lListe (j) +"'"
125 OLEObjektEinfuegen.Cancel