xref: /aoo42x/main/framework/test/typecfg/cfgview.cxx (revision b3bea0d1)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_framework.hxx"
26 
27 //_________________________________________________________________________________________________________________
28 //	my own includes
29 //_________________________________________________________________________________________________________________
30 #include <classes/servicemanager.hxx>
31 #include <classes/filtercache.hxx>
32 #include <macros/generic.hxx>
33 #include <macros/debug.hxx>
34 #include <services.h>
35 #include <filterflags.h>
36 #include <queries.h>
37 
38 //_________________________________________________________________________________________________________________
39 //	interface includes
40 //_________________________________________________________________________________________________________________
41 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
42 #include <com/sun/star/container/XNameContainer.hpp>
43 #include <com/sun/star/beans/PropertyValue.hpp>
44 
45 //_________________________________________________________________________________________________________________
46 //	other includes
47 //_________________________________________________________________________________________________________________
48 #include <comphelper/processfactory.hxx>
49 #include <vos/process.hxx>
50 #include <rtl/ustring.hxx>
51 #include <rtl/ustrbuf.hxx>
52 
53 #ifndef __SGI_STL_HASH_MAP
54 #include <hash_map>
55 #endif
56 
57 #include <vcl/event.hxx>
58 #include <vcl/svapp.hxx>
59 #include <vcl/wrkwin.hxx>
60 #include <vcl/msgbox.hxx>
61 #include <stdio.h>
62 
63 //_________________________________________________________________________________________________________________
64 //	const
65 //_________________________________________________________________________________________________________________
66 
67 #define RDBFILE                                     DECLARE_ASCII("typecfg.rdb" )
68 #define ARGUMENT_DIRNAME                            DECLARE_ASCII("-dir="       )           // argument for output directory
69 #define ARGUMENT_VERSION                            DECLARE_ASCII("-ver="       )           // argument for file version to read    [1|2|3]
70 #define ARGUMENTLENGTH                              5                                       // same length for all arguments make it easier to detect it :-)
71 #define ARGUMENTFOUND                               0                                       // OUString::compareTo returns 0 if searched string match given one
72 
73 #define MENU_HTML                                   "menu.html"
74 #define BLANK_HTML                                  "blank.html"
75 
76 #define FRAMESET_START_HTML                         "index.html"
77 #define FRAMESET_TYPES_HTML                         "fs_types.html"
78 #define FRAMESET_FILTERS_HTML                       "fs_filters.html"
79 #define FRAMESET_MODULFILTERS_HTML                  "fs_modulfilters.html"
80 #define FRAMESET_DETECTORS_HTML                     "fs_detectors.html"
81 #define FRAMESET_LOADERS_HTML                       "fs_loaders.html"
82 #define FRAMESET_INVALIDFILTERS_HTML                "fs_invalidfilters.html"
83 #define FRAMESET_INVALIDDETECTORS_HTML              "fs_invaliddetectors.html"
84 #define FRAMESET_INVALIDLOADERS_HTML                "fs_invalidloaders.html"
85 #define FRAMESET_DOUBLEFILTERUINAMES_HTML           "fs_doublefilteruinames.html"
86 
87 #define ALLTYPES_HTML                               "alltypes.html"
88 #define ALLFILTERS_HTML                             "allfilters.html"
89 #define ALLDETECTORS_HTML                           "alldetectors.html"
90 #define ALLLOADERS_HTML                             "allloaders.html"
91 
92 #define TYPEPROPERTIES_HTML                         "typeproperties.html"
93 #define FILTERPROPERTIES_HTML                       "filterproperties.html"
94 #define DETECTORPROPERTIES_HTML                     "detectorproperties.html"
95 #define LOADERPROPERTIES_HTML                       "loaderproperties.html"
96 
97 #define INVALIDFILTERS_HTML                         "invalidfilters.html"
98 #define INVALIDDETECTORS_HTML                       "invaliddetectors.html"
99 #define INVALIDLOADERS_HTML                         "invalidloaders.html"
100 
101 #define FILTERFLAGS_HTML                            "filterflags.html"
102 #define MODULFILTERS_HTML                           "modulfilters.html"
103 #define DOUBLEFILTERUINAMES_HTML                    "doublefilteruinames.html"
104 
105 #define TARGET_MENU                                 "menu"
106 #define TARGET_VIEW                                 "view"
107 #define TARGET_LIST                                 "list"
108 #define TARGET_PROPERTIES                           "properties"
109 
110 //_________________________________________________________________________________________________________________
111 //	namespace
112 //_________________________________________________________________________________________________________________
113 
114 using namespace ::std						;
115 using namespace ::vos						;
116 using namespace ::rtl						;
117 using namespace ::framework					;
118 using namespace ::comphelper				;
119 using namespace ::com::sun::star::uno		;
120 using namespace ::com::sun::star::lang		;
121 using namespace ::com::sun::star::container	;
122 using namespace ::com::sun::star::beans		;
123 
124 //_________________________________________________________________________________________________________________
125 //	defines
126 //_________________________________________________________________________________________________________________
127 
128 //_________________________________________________________________________________________________________________
129 //	declarations
130 //_________________________________________________________________________________________________________________
131 
132 /*-***************************************************************************************************************/
133 struct AppMember
134 {
135         Reference< XMultiServiceFactory >   xServiceManager     ;
136         FilterCache*                        pCache              ;
137         ::rtl::OUString                     sDirectory          ;
138         sal_Int32                           nVersion            ;
139 };
140 
141 /*-***************************************************************************************************************/
142 class CFGView : public Application
143 {
144 	//*************************************************************************************************************
145 	public:
146 		void Main();
147 
148 	//*************************************************************************************************************
149 	private:
150         void impl_parseCommandLine                  ( AppMember& rMember );
151         void impl_generateHTMLView                  ();
152 
153 	//*************************************************************************************************************
154 	private:
155         void impl_printCopyright                    ();
156         void impl_printSyntax                       ();
157         void impl_generateTypeListHTML              ();
158         void impl_generateFilterListHTML            ();
159         void impl_generateFilterModulListHTML       ();
160         void impl_generateDetectorListHTML          ();
161         void impl_generateLoaderListHTML            ();
162         void impl_generateInvalidFiltersHTML        ();
163         void impl_generateInvalidDetectorsHTML      ();
164         void impl_generateInvalidLoadersHTML        ();
165         void impl_generateFilterFlagsHTML           ();
166         void impl_generateDefaultFiltersHTML        ();
167         void impl_generateDoubleFilterUINamesHTML   ();
168         void impl_writeFile                         ( const ::rtl::OString& sFile, const ::rtl::OString& sContent );
169 
170 	//*************************************************************************************************************
171 	private:
172         AppMember m_aData ;
173 
174 };  //  class CFGView
175 
176 //_________________________________________________________________________________________________________________
177 //	global variables
178 //_________________________________________________________________________________________________________________
179 
180 CFGView gApplication;
181 
182 //*****************************************************************************************************************
Main()183 void CFGView::Main()
184 {
185     // Init global servicemanager and set it.
186     // It's necessary for other services ... e.g. configuration.
187     ServiceManager aManager;
188     ::comphelper::setProcessServiceFactory( aManager.getGlobalUNOServiceManager() );
189 
190     // Get optional commands from command line.
191     impl_parseCommandLine( m_aData );
192 
193     // Read configuration and fill cache ... use given file version (see parameter "-ver=" too)
194     m_aData.pCache = new FilterCache( m_aData.nVersion );
195 
196     // Generate view as html
197     impl_generateHTMLView();
198 
199     // Free all used memory
200     delete m_aData.pCache;
201     m_aData.pCache = NULL;
202 }
203 
204 /*-************************************************************************************************************//**
205     @short      print some info messages to stderr
206     @descr      We must show an copyright or help for using this file.
207                 This two methods do that.
208 
209     @seealso    -
210 
211     @param      -
212     @return     -
213 
214     @onerror    -
215 *//*-*************************************************************************************************************/
impl_printCopyright()216 void CFGView::impl_printCopyright()
217 {
218     fprintf( stderr, "\n(c) Copyright by Sun microsystems, 2001\n" );
219 }
220 
221 //*****************************************************************************************************************
impl_printSyntax()222 void CFGView::impl_printSyntax()
223 {
224     fprintf( stderr, "\nusing: xml2xcd -fi=<outputfile> -vi=<version input> -vo=<version output> [-wr=<true|false>]\n\n"    );
225     fprintf( stderr, "\tneccessary parameters:\n"                                                                           );
226     fprintf( stderr, "\t\t-fi=<outputfile>\tname of output file in system notation\n"                                       );
227     fprintf( stderr, "\t\t-vi=<version input>\tformat version of input xml file\n"                                          );
228     fprintf( stderr, "\t\t-vo=<version output>\tformat version of generated xcd file\n\n"                                   );
229     fprintf( stderr, "\toptional parameters:\n"                                                                             );
230     fprintf( stderr, "\t\t-wr=<true|false>\tconfig items should be writeable ... [true|false]\n"                            );
231 }
232 
233 /*-************************************************************************************************************//**
234     @short      analyze command line arguments
235     @descr      Created binary accept different command line arguments. These parameters
236                 regulate creation of this html view. Follow arguments are supported:
237                     "-dir=<directory for output files>"
238                     "-ver=<version of input file>[1|2|3]"
239 
240     @seealso    -
241 
242     @param      "rMember", reference to struct of global application member to fill arguments in it
243     @return     right filled member struct or unchanged struct if an error occur!
244 
245     @onerror    We do nothing - or warn programmer!
246 *//*-*************************************************************************************************************/
impl_parseCommandLine(AppMember & rMember)247 void CFGView::impl_parseCommandLine( AppMember& rMember )
248 {
249     ::vos::OStartupInfo aInfo                                   ;
250     ::rtl::OUString     sArgument                               ;
251     sal_Int32           nArgument   = 0                         ;
252     sal_Int32           nCount      = aInfo.getCommandArgCount();
253     sal_Int32           nMinCount   = 0                         ;
254 
255 	while( nArgument<nCount )
256 	{
257 		aInfo.getCommandArg( nArgument, sArgument );
258 
259 		//_____________________________________________________________________________________________________
260         // look for "-dir="
261         if( sArgument.compareTo( ARGUMENT_DIRNAME, ARGUMENTLENGTH ) == ARGUMENTFOUND )
262 		{
263             rMember.sDirectory = sArgument.copy( ARGUMENTLENGTH, sArgument.getLength()-ARGUMENTLENGTH );
264             ++nMinCount;
265 		}
266         else
267 		//_____________________________________________________________________________________________________
268         // look for "-ver="
269         if( sArgument.compareTo( ARGUMENT_VERSION, ARGUMENTLENGTH ) == ARGUMENTFOUND )
270 		{
271             ::rtl::OUString sVersion = sArgument.copy( ARGUMENTLENGTH, sArgument.getLength()-ARGUMENTLENGTH );
272             rMember.nVersion = sVersion.toInt32();
273             ++nMinCount;
274 		}
275 
276 		++nArgument;
277 	}
278 
279     // Show help if user don't call us right!
280     if( nMinCount != 2 )
281     {
282         impl_printSyntax();
283         exit(-1);
284     }
285 }
286 
287 //*****************************************************************************************************************
impl_generateHTMLView()288 void CFGView::impl_generateHTMLView()
289 {
290 	//-------------------------------------------------------------------------------------------------------------
291 	// generate start frameset
292 	OUStringBuffer sStartFramesetHTML( 10000 );
293 
294 	sStartFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tTypeDetection CFG\n\t\t</title>\n\t</head>\n"		);	// open html
295 	sStartFramesetHTML.appendAscii( "\t\t<frameset rows=\"25%,75%\">\n"														);	// open frameset
296 	sStartFramesetHTML.appendAscii( "\t\t\t<frame name=\""																	);	// generate frame "menu"
297 	sStartFramesetHTML.appendAscii( TARGET_MENU																				);
298 	sStartFramesetHTML.appendAscii( "\" src=\""																				);
299 	sStartFramesetHTML.appendAscii( MENU_HTML																				);
300 	sStartFramesetHTML.appendAscii( "\" title=\"List\">\n"																	);
301 	sStartFramesetHTML.appendAscii( "\t\t\t<frame name=\""																	);	// generate frame "view"
302 	sStartFramesetHTML.appendAscii( TARGET_VIEW																				);
303 	sStartFramesetHTML.appendAscii( "\" src=\""																				);
304 	sStartFramesetHTML.appendAscii( BLANK_HTML																				);
305 	sStartFramesetHTML.appendAscii( "\" title=\"Properties\">\n"															);
306 	sStartFramesetHTML.appendAscii( "\t\t</frameset>\n"																		);	// close frameset
307 	sStartFramesetHTML.appendAscii( "</html>\n"																				);	// close html
308 
309     impl_writeFile( FRAMESET_START_HTML, U2B(sStartFramesetHTML.makeStringAndClear()) );
310 
311 	//-------------------------------------------------------------------------------------------------------------
312 	// generate blank html
313 	OUStringBuffer sBlankHTML( 10000 );
314 
315 	sBlankHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tBlank\n\t\t</title>\n\t</head>\n\t<body>\n\t</body>Please select ...\n</html>\n"	);	// open html
316 
317     impl_writeFile( BLANK_HTML, U2B(sBlankHTML.makeStringAndClear()) );
318 
319 	//-------------------------------------------------------------------------------------------------------------
320 	// generate menu
321 	OUStringBuffer sMenuHTML( 10000 );
322 
323 	sMenuHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tMenu\n\t\t</title>\n\t</head>\n\t<body>\n"				);	// open html
324 	sMenuHTML.appendAscii( "\t\t<ul>\n"																					);	// open list
325 
326 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "All Types"
327 	sMenuHTML.appendAscii( FRAMESET_TYPES_HTML																			);
328 	sMenuHTML.appendAscii( "\" target=\""																				);
329 	sMenuHTML.appendAscii( TARGET_VIEW																					);
330 	sMenuHTML.appendAscii( "\">All Types</a></li>\n"																	);
331 
332 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "All Filters"
333 	sMenuHTML.appendAscii( FRAMESET_FILTERS_HTML																		);
334 	sMenuHTML.appendAscii( "\" target=\""																				);
335 	sMenuHTML.appendAscii( TARGET_VIEW																					);
336     sMenuHTML.appendAscii( "\">All Filters</a></li>\n"                                                                  );
337 
338     sMenuHTML.appendAscii( "\t\t<li><a href=\""                                                                         );  // list entry for "All Filters sorted by modules"
339     sMenuHTML.appendAscii( FRAMESET_MODULFILTERS_HTML                                                                   );
340 	sMenuHTML.appendAscii( "\" target=\""																				);
341 	sMenuHTML.appendAscii( TARGET_VIEW																					);
342     sMenuHTML.appendAscii( "\">Filters by Moduls</a></li>\n"                                                            );
343 
344 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "All Detectors"
345 	sMenuHTML.appendAscii( FRAMESET_DETECTORS_HTML																		);
346 	sMenuHTML.appendAscii( "\" target=\""																				);
347 	sMenuHTML.appendAscii( TARGET_VIEW																					);
348 	sMenuHTML.appendAscii( "\">All Detector Services</a></li>\n"														);
349 
350 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "All Loaders"
351 	sMenuHTML.appendAscii( FRAMESET_LOADERS_HTML																		);
352 	sMenuHTML.appendAscii( "\" target=\""																				);
353 	sMenuHTML.appendAscii( TARGET_VIEW																					);
354 	sMenuHTML.appendAscii( "\">All Loader Services</a></li>\n"															);
355 
356 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "Invalid Filter"
357 	sMenuHTML.appendAscii( FRAMESET_INVALIDFILTERS_HTML																	);
358 	sMenuHTML.appendAscii( "\" target=\""																				);
359 	sMenuHTML.appendAscii( TARGET_VIEW																					);
360 	sMenuHTML.appendAscii( "\">Invalid Filter</a></li>\n"																);
361 
362 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "Invalid Detect Services"
363 	sMenuHTML.appendAscii( FRAMESET_INVALIDDETECTORS_HTML																);
364 	sMenuHTML.appendAscii( "\" target=\""																				);
365 	sMenuHTML.appendAscii( TARGET_VIEW																					);
366 	sMenuHTML.appendAscii( "\">Invalid Detect Services</a></li>\n"														);
367 
368     sMenuHTML.appendAscii( "\t\t<li><a href=\""                                                                         );  // list entry for "Double Filter UINames"
369     sMenuHTML.appendAscii( FRAMESET_DOUBLEFILTERUINAMES_HTML                                                            );
370 	sMenuHTML.appendAscii( "\" target=\""																				);
371 	sMenuHTML.appendAscii( TARGET_VIEW																					);
372     sMenuHTML.appendAscii( "\">Double Filter UINames</a></li>\n"                                                        );
373 
374 	sMenuHTML.appendAscii( "\t\t<li><a href=\""																			);	// list entry for "Show Filter Flags"
375 	sMenuHTML.appendAscii( FILTERFLAGS_HTML																				);
376 	sMenuHTML.appendAscii( "\" target=\""																				);
377 	sMenuHTML.appendAscii( TARGET_VIEW																					);
378 	sMenuHTML.appendAscii( "\">Show Filter Flags</a></li>\n"															);
379 
380 	sMenuHTML.appendAscii( "\t\t</ul>\n"																				);	// close list
381 	sMenuHTML.appendAscii( "\t</body>\n</html>\n"																		);	// close html
382 
383     impl_writeFile( MENU_HTML, U2B(sMenuHTML.makeStringAndClear()) );
384 
385 	impl_generateTypeListHTML			();
386 	impl_generateFilterListHTML			();
387     impl_generateFilterModulListHTML    ();
388 	impl_generateDetectorListHTML		();
389 	impl_generateLoaderListHTML			();
390 	impl_generateInvalidFiltersHTML		();
391 	impl_generateInvalidDetectorsHTML	();
392 	impl_generateInvalidLoadersHTML		();
393 	impl_generateFilterFlagsHTML		();
394     impl_generateDoubleFilterUINamesHTML();
395 }
396 
397 //*****************************************************************************************************************
impl_generateTypeListHTML()398 void CFGView::impl_generateTypeListHTML()
399 {
400 	//-------------------------------------------------------------------------------------------------------------
401 	// generate frameset for types
402 	OUStringBuffer sTypesFramesetHTML( 10000 );
403 
404 	sTypesFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Types\n\t\t</title>\n\t</head>\n"		);	// open html
405 	sTypesFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"														);	// open frameset for cols
406 	sTypesFramesetHTML.appendAscii( "\t\t\t<frame name=\""																	);	// generate frame "list"
407 	sTypesFramesetHTML.appendAscii( TARGET_LIST																				);
408 	sTypesFramesetHTML.appendAscii( "\" src=\""																				);
409 	sTypesFramesetHTML.appendAscii( ALLTYPES_HTML																			);
410 	sTypesFramesetHTML.appendAscii( "\" title=\"List\">\n"																	);
411 	sTypesFramesetHTML.appendAscii( "\t\t\t<frame name=\""																	);	// generate frame "properties"
412 	sTypesFramesetHTML.appendAscii( TARGET_PROPERTIES																		);
413 	sTypesFramesetHTML.appendAscii( "\" src=\""																				);
414 	sTypesFramesetHTML.appendAscii( TYPEPROPERTIES_HTML																		);
415 	sTypesFramesetHTML.appendAscii( "\" title=\"Properties\">\n"															);
416 	sTypesFramesetHTML.appendAscii( "\t\t</frameset>\n"																		);	// close frameset cols
417 	sTypesFramesetHTML.appendAscii( "</html>\n"																				);	// close html
418 
419     impl_writeFile( FRAMESET_TYPES_HTML, U2B(sTypesFramesetHTML.makeStringAndClear()) );
420 
421 	//-------------------------------------------------------------------------------------------------------------
422 	// generate type list (names and links only!)
423 	// use same loop to generate type property list!
424 	OUStringBuffer sAllTypesHTML( 10000 );
425 	OUStringBuffer sTypePropHTML( 10000 );
426 
427 	sAllTypesHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tAll Types\n\t\t</title>\n\t</head>\n\t<body>\n"										);	// open html
428 	sAllTypesHTML.appendAscii( "\t\t<table border=0><tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Type</strong></td></tr>\n"	);	// open table
429 
430 	sTypePropHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tTypeProperties\n\t\t</title>\n\t</head>\n\t<body>\n"									);	// open html
431 
432     css::uno::Sequence< ::rtl::OUString > lNames = m_aData.pCache->getAllTypeNames();
433     sal_Int32                             nCount = lNames.getLength()               ;
434     for( sal_Int32 nItem=0; nItem<nCount; ++nItem )
435     {
436         ::rtl::OUString sName = lNames[nItem]                   ;
437         FileType        aItem = m_aData.pCache->getType( sName );
438 
439 		// write entry in type list table
440 		sAllTypesHTML.appendAscii	( "\t\t\t<tr>\n"																											);	// open row
441 		sAllTypesHTML.appendAscii	( "\t\t\t\t<td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">"																);	// open column "nr"
442         sAllTypesHTML.append        ( OUString::valueOf( nItem )                                                                                                );  // write nr
443 		sAllTypesHTML.appendAscii	( "</td>\n"																													);	// close column "nr"
444 		sAllTypesHTML.appendAscii	( "\t\t\t\t<td>"																											);	// open column "name"
445 		sAllTypesHTML.appendAscii	( "<a href=\""																												);	// open href="typeproperties.html#<typename>"
446 		sAllTypesHTML.appendAscii	( TYPEPROPERTIES_HTML																										);
447 		sAllTypesHTML.appendAscii	( "#"																														);
448         sAllTypesHTML.append        ( aItem.sName                                                                                                               );
449 		sAllTypesHTML.appendAscii	( "\" target=\""																											);
450 		sAllTypesHTML.appendAscii	( TARGET_PROPERTIES																											);
451 		sAllTypesHTML.appendAscii	( "\">"																														);
452         sAllTypesHTML.append        ( aItem.sName                                                                                                               );  // write name
453         sAllTypesHTML.appendAscii   ( "</a>"                                                                                                                    );  // close href
454         sAllTypesHTML.appendAscii   ( "</td>\n"                                                                                                                 );  // close column "name"
455         sAllTypesHTML.appendAscii   ( "\t\t\t</tr>\n"                                                                                                           );  // close row
456 
457         // write entry in type property table
458         sTypePropHTML.appendAscii   ( "\t\t<a name=\""                                                                                                              );  // set target="#<typename>" to follow table
459         sTypePropHTML.append        ( aItem.sName                                                                                                                   );
460         sTypePropHTML.appendAscii   ( "\"></a>"                                                                                                                     );
461         sTypePropHTML.appendAscii   ( "\t\t<table border=0>\n"                                                                                                      );  // open table
462         sTypePropHTML.appendAscii   ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Nr.</td><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">&nbsp;"  );    // generate row "Nr <value>"
463         sTypePropHTML.append        ( OUString::valueOf( nItem )                                                                                                    );
464         sTypePropHTML.appendAscii   ( "</td></tr>\n"                                                                                                                );
465         sTypePropHTML.appendAscii   ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Name</td><td valign=\"top\" align=\"top\">&nbsp;"                 );  // generate row "Name <value>"
466         sTypePropHTML.append        ( aItem.sName                                                                                                                   );
467         sTypePropHTML.appendAscii   ( "</td></tr>\n"                                                                                                                );
468         sTypePropHTML.appendAscii   ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">UIName</td><td valign=\"top\" align=\"top\">"                     );  // generate row "UIName <value>"
469         for(    ConstStringHashIterator pUIName=aItem.lUINames.begin()  ;
470                 pUIName!=aItem.lUINames.end()                           ;
471                 ++pUIName                                                       )
472 		{
473             sTypePropHTML.appendAscii   ( "&nbsp;["       );
474             sTypePropHTML.append        ( pUIName->first  );
475             sTypePropHTML.appendAscii   ( "] \""          );
476             sTypePropHTML.append        ( pUIName->second );
477             sTypePropHTML.appendAscii   ( "\"<br>"        );
478 		}
479         sTypePropHTML.appendAscii   ( "</td></tr>\n"                                                                                                            );
480 		sTypePropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">MediaType</td><td valign=\"top\" align=\"top\">&nbsp;"		);	// generate row "MediaType <value>"
481         sTypePropHTML.append        ( aItem.sMediaType                                                                                                          );
482 		sTypePropHTML.appendAscii	( "</td></tr>\n"																											);
483 		sTypePropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">ClipboardFormat</td><td valign=\"top\" align=\"top\">&nbsp;"	);	// generate row "ClipboardFormat <value>"
484         sTypePropHTML.append        ( aItem.sClipboardFormat                                                                                                    );
485 		sTypePropHTML.appendAscii	( "</td></tr>\n"																											);
486 		sTypePropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">URLPattern</td><td valign=\"top\" align=\"top\">"				);	// generate row "URLPattern <value>"
487         for(    ConstStringListIterator pPattern=aItem.lURLPattern.begin()  ;
488                 pPattern!=aItem.lURLPattern.end()                           ;
489                 ++pPattern                                                  )
490 		{
491 			sTypePropHTML.appendAscii	( "&nbsp;\"");
492 			sTypePropHTML.append		( *pPattern	);
493 			sTypePropHTML.appendAscii	( "\"<br>"	);
494 		}
495 		sTypePropHTML.appendAscii	( "</td></tr>\n"																											);
496 		sTypePropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Extensions</td><td valign=\"top\" align=\"top\">"				);	// generate row "Extensions <value>"
497         for(    ConstStringListIterator pExtension=aItem.lExtensions.begin()    ;
498                 pExtension!=aItem.lExtensions.end()                             ;
499                 ++pExtension                                                    )
500 		{
501 			sTypePropHTML.appendAscii	( "&nbsp;\""	);
502 			sTypePropHTML.append		( *pExtension	);
503 			sTypePropHTML.appendAscii	( "\"<br>"		);
504 		}
505 		sTypePropHTML.appendAscii	( "</td></tr>\n"																											);
506 		sTypePropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">DocumentIconID</td><td valign=\"top\" align=\"top\">&nbsp;"	);	// generate row "DocumentIconID <value>"
507         sTypePropHTML.append        ( OUString::valueOf( aItem.nDocumentIconID )                                                                                );
508 		sTypePropHTML.appendAscii	( "</td></tr>\n"																											);
509 		sTypePropHTML.appendAscii	( "\t\t</table>\n"																											);	// close table
510 		sTypePropHTML.appendAscii	( "\t\t<p>\n"																												);	// add space between this and following table
511 	}
512 
513 	sAllTypesHTML.appendAscii( "</table>\n"			);	// close table
514 	sAllTypesHTML.appendAscii( "</body>\n</html>\n"	);	// close html
515 
516 	sTypePropHTML.appendAscii( "</body>\n</html>\n"	);	// close html
517 
518     impl_writeFile( ALLTYPES_HTML        , U2B(sAllTypesHTML.makeStringAndClear()) );
519     impl_writeFile( TYPEPROPERTIES_HTML  , U2B(sTypePropHTML.makeStringAndClear()) );
520 }
521 
522 //*****************************************************************************************************************
impl_generateFilterListHTML()523 void CFGView::impl_generateFilterListHTML()
524 {
525 	//-------------------------------------------------------------------------------------------------------------
526 	// generate frameset for types
527 	OUStringBuffer sFiltersFramesetHTML( 10000 );
528 
529 	sFiltersFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Filters\n\t\t</title>\n\t</head>\n"		);	// open html
530 	sFiltersFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"														);	// open frameset for cols
531 	sFiltersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																	);	// generate frame "list"
532 	sFiltersFramesetHTML.appendAscii( TARGET_LIST																				);
533 	sFiltersFramesetHTML.appendAscii( "\" src=\""																				);
534 	sFiltersFramesetHTML.appendAscii( ALLFILTERS_HTML																			);
535 	sFiltersFramesetHTML.appendAscii( "\" title=\"List\">\n"																	);
536 	sFiltersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																	);	// generate frame "properties"
537 	sFiltersFramesetHTML.appendAscii( TARGET_PROPERTIES																			);
538 	sFiltersFramesetHTML.appendAscii( "\" src=\""																				);
539 	sFiltersFramesetHTML.appendAscii( FILTERPROPERTIES_HTML																		);
540 	sFiltersFramesetHTML.appendAscii( "\" title=\"Properties\">\n"																);
541 	sFiltersFramesetHTML.appendAscii( "\t\t</frameset>\n"																		);	// close frameset cols
542 	sFiltersFramesetHTML.appendAscii( "</html>\n"																				);	// close html
543 
544     impl_writeFile( FRAMESET_FILTERS_HTML, U2B(sFiltersFramesetHTML.makeStringAndClear()) );
545 
546 	//-------------------------------------------------------------------------------------------------------------
547 	// generate filter list (names and links only!)
548 	// use same loop to generate filter property list!
549 	OUStringBuffer sAllFiltersHTML( 10000 );
550 	OUStringBuffer sFilterPropHTML( 10000 );
551 
552 	sAllFiltersHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tAll Filters\n\t\t</title>\n\t</head>\n\t<body>\n"										);	// open html
553 	sAllFiltersHTML.appendAscii( "\t\t<table border=0><tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Filter</strong></td></tr>\n"	);	// open table
554 
555 	sFilterPropHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFilterProperties\n\t\t</title>\n\t</head>\n\t<body>\n"									);	// open html
556 /*
557     ::framework::StringList lFilterNames;
558     for( ConstFilterIterator pFilter=m_pData->aCFGView.begin(); pFilter!=m_pData->aCFGView.end(); ++pFilter )
559 	{
560         lFilterNames.push_back( pFilter->first );
561     }
562     ::std::stable_sort( lFilterNames.begin(), lFilterNames.end() );
563     css::uno::Sequence< ::rtl::OUString > lNames;
564     ::framework::DataContainer::convertStringVectorToSequence( lFilterNames, lNames );
565 */
566     css::uno::Sequence< ::rtl::OUString > lNames         = m_aData.pCache->getAllFilterNames()  ;
567     sal_Int32                             nFilterCounter = 0                                    ;
568     sal_Int32                             nCount         = lNames.getLength()                   ;
569     Filter                                aFilter                                               ;
570     for( nFilterCounter=0; nFilterCounter<nCount; ++nFilterCounter )
571 	{
572         aFilter = m_aData.pCache->getFilter( lNames[nFilterCounter] );
573 
574 		// write entry in filter list table
575 		sAllFiltersHTML.appendAscii	( "\t\t\t<tr>\n"																											);	// open row
576 		sAllFiltersHTML.appendAscii	( "\t\t\t\t<td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">"																);	// open column "nr"
577 		sAllFiltersHTML.append		( OUString::valueOf( nFilterCounter )																						);	// write nr
578 		sAllFiltersHTML.appendAscii	( "</td>\n"																													);	// close column "nr"
579 		sAllFiltersHTML.appendAscii	( "\t\t\t\t<td>"																											);	// open column "name"
580 		sAllFiltersHTML.appendAscii	( "<a href=\""																												);	// open href="filterproperties.html#<filtername>"
581 		sAllFiltersHTML.appendAscii	( FILTERPROPERTIES_HTML																										);
582 		sAllFiltersHTML.appendAscii	( "#"																														);
583         sAllFiltersHTML.append      ( aFilter.sName                                                                                                             );
584 		sAllFiltersHTML.appendAscii	( "\" target=\""																											);
585 		sAllFiltersHTML.appendAscii	( TARGET_PROPERTIES																											);
586 		sAllFiltersHTML.appendAscii	( "\">"																														);
587         sAllFiltersHTML.append      ( aFilter.sName                                                                                                             );  // write name
588 		sAllFiltersHTML.appendAscii	( "</a>"																													);	// close href
589 		sAllFiltersHTML.appendAscii	( "</td>\n"																													);	// close column "name"
590 		sAllFiltersHTML.appendAscii	( "\t\t\t</tr>\n"																											);	// close row
591 
592 		// write entry in filter property table
593 		sFilterPropHTML.appendAscii	( "\t\t<a name=\""																											);	// set target="#<typename>" to follow table
594         sFilterPropHTML.append      ( aFilter.sName                                                                                                             );
595 		sFilterPropHTML.appendAscii	( "\"></a>"																													);
596 		sFilterPropHTML.appendAscii	( "\t\t<table border=0>\n"			   																						);	// open table
597 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Nr.</td><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">&nbsp;");	// generate row "Nr <value>"
598 		sFilterPropHTML.append		( OUString::valueOf( nFilterCounter )																						);
599 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
600 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Name</td><td valign=\"top\" align=\"top\">&nbsp;"				);	// generate row "Name <value>"
601         sFilterPropHTML.append      ( aFilter.sName                                                                                                             );
602 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
603         sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Order</td><td valign=\"top\" align=\"top\">&nbsp;\""          );  // generate row "Order <value>"
604         sFilterPropHTML.append      ( aFilter.nOrder                                                                                                            );
605 		sFilterPropHTML.appendAscii	( "\"</td></tr>\n"																											);
606 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Type</td><td valign=\"top\" align=\"top\">&nbsp;\""			);	// generate row "Type <value>"
607         sFilterPropHTML.append      ( aFilter.sType                                                                                                             );
608 		sFilterPropHTML.appendAscii	( "\"</td></tr>\n"																											);
609         sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">UIName</td><td valign=\"top\" align=\"top\">"                 );  // generate row "UIName <value>"
610         for(    ConstStringHashIterator pUIName=aFilter.lUINames.begin()  ;
611                 pUIName!=aFilter.lUINames.end()                           ;
612                 ++pUIName                                                 )
613 		{
614             sFilterPropHTML.appendAscii   ( "&nbsp;["       );
615             sFilterPropHTML.append        ( pUIName->first  );
616             sFilterPropHTML.appendAscii   ( "] \""          );
617             sFilterPropHTML.append        ( pUIName->second );
618             sFilterPropHTML.appendAscii   ( "\"<br>"        );
619 		}
620         sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                          );
621 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">DocumentService</td><td valign=\"top\" align=\"top\">&nbsp;"	);	// generate row "DocumentService <value>"
622         sFilterPropHTML.append      ( aFilter.sDocumentService                                                                                          );
623 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
624 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">FilterService</td><td valign=\"top\" align=\"top\">&nbsp;"	);	// generate row "FilterService <value>"
625         sFilterPropHTML.append      ( aFilter.sFilterService                                                                                            );
626 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
627 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Flags</td><td valign=\"top\" align=\"top\">&nbsp;"			);	// generate row "Flags <value>"
628         if( aFilter.nFlags & FILTERFLAG_IMPORT          ) { sFilterPropHTML.append( FILTERFLAGNAME_IMPORT          ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
629         if( aFilter.nFlags & FILTERFLAG_EXPORT          ) { sFilterPropHTML.append( FILTERFLAGNAME_EXPORT          ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
630         if( aFilter.nFlags & FILTERFLAG_TEMPLATE        ) { sFilterPropHTML.append( FILTERFLAGNAME_TEMPLATE        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
631         if( aFilter.nFlags & FILTERFLAG_INTERNAL        ) { sFilterPropHTML.append( FILTERFLAGNAME_INTERNAL        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
632         if( aFilter.nFlags & FILTERFLAG_TEMPLATEPATH    ) { sFilterPropHTML.append( FILTERFLAGNAME_TEMPLATEPATH    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
633         if( aFilter.nFlags & FILTERFLAG_OWN             ) { sFilterPropHTML.append( FILTERFLAGNAME_OWN             ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
634         if( aFilter.nFlags & FILTERFLAG_ALIEN           ) { sFilterPropHTML.append( FILTERFLAGNAME_ALIEN           ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
635         if( aFilter.nFlags & FILTERFLAG_USESOPTIONS     ) { sFilterPropHTML.append( FILTERFLAGNAME_USESOPTIONS     ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
636         if( aFilter.nFlags & FILTERFLAG_DEFAULT         ) { sFilterPropHTML.append( FILTERFLAGNAME_DEFAULT         ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
637         if( aFilter.nFlags & FILTERFLAG_NOTINFILEDIALOG ) { sFilterPropHTML.append( FILTERFLAGNAME_NOTINFILEDIALOG ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
638         if( aFilter.nFlags & FILTERFLAG_NOTINCHOOSER    ) { sFilterPropHTML.append( FILTERFLAGNAME_NOTINCHOOSER    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
639         if( aFilter.nFlags & FILTERFLAG_ASYNCHRON       ) { sFilterPropHTML.append( FILTERFLAGNAME_ASYNCHRON       ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
640         if( aFilter.nFlags & FILTERFLAG_READONLY        ) { sFilterPropHTML.append( FILTERFLAGNAME_READONLY        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
641         if( aFilter.nFlags & FILTERFLAG_NOTINSTALLED    ) { sFilterPropHTML.append( FILTERFLAGNAME_NOTINSTALLED    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
642         if( aFilter.nFlags & FILTERFLAG_CONSULTSERVICE  ) { sFilterPropHTML.append( FILTERFLAGNAME_CONSULTSERVICE  ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
643         if( aFilter.nFlags & FILTERFLAG_3RDPARTYFILTER  ) { sFilterPropHTML.append( FILTERFLAGNAME_3RDPARTYFILTER  ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
644         if( aFilter.nFlags & FILTERFLAG_PACKED          ) { sFilterPropHTML.append( FILTERFLAGNAME_PACKED          ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
645         if( aFilter.nFlags & FILTERFLAG_SILENTEXPORT    ) { sFilterPropHTML.append( FILTERFLAGNAME_SILENTEXPORT    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
646         if( aFilter.nFlags & FILTERFLAG_BROWSERPREFERED ) { sFilterPropHTML.append( FILTERFLAGNAME_BROWSERPREFERED ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
647         if( aFilter.nFlags & FILTERFLAG_PREFERED        ) { sFilterPropHTML.append( FILTERFLAGNAME_PREFERED        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
648 
649         sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
650 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">UserData</td><td valign=\"top\" align=\"top\">"				);	// generate row "UserData <value>"
651         for(    ConstStringListIterator pUserData=aFilter.lUserData.begin() ;
652                 pUserData!=aFilter.lUserData.end()                          ;
653                 ++pUserData                                                 )
654 		{
655 			sFilterPropHTML.appendAscii	( "&nbsp;\""	);
656 			sFilterPropHTML.append		( *pUserData	);
657 			sFilterPropHTML.appendAscii	( "\"<br>"		);
658 		}
659 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
660 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">FileFormatVersion</td><td valign=\"top\" align=\"top\">&nbsp;");	// generate row "FileFormatVersion <value>"
661         sFilterPropHTML.append      ( OUString::valueOf( aFilter.nFileFormatVersion )                                                                           );
662 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
663 		sFilterPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">TemplateName</td><td valign=\"top\" align=\"top\">&nbsp;"		);	// generate row "TemplateName <value>"
664         sFilterPropHTML.append      ( aFilter.sTemplateName                                                                                                     );
665 		sFilterPropHTML.appendAscii	( "</td></tr>\n"																											);
666 		sFilterPropHTML.appendAscii	( "\t\t</table>\n"																											);	// close table
667 		sFilterPropHTML.appendAscii	( "\t\t<p>\n"																												);	// add space between this and following table
668 	}
669 
670 	sAllFiltersHTML.appendAscii( "</table>\n"			);	// close table
671 	sAllFiltersHTML.appendAscii( "</body>\n</html>\n"	);	// close html
672 
673 	sFilterPropHTML.appendAscii( "</body>\n</html>\n"	);	// close html
674 
675     impl_writeFile( ALLFILTERS_HTML      , U2B(sAllFiltersHTML.makeStringAndClear()) );
676     impl_writeFile( FILTERPROPERTIES_HTML, U2B(sFilterPropHTML.makeStringAndClear()) );
677 }
678 
679 //*****************************************************************************************************************
impl_generateFilterModulListHTML()680 void CFGView::impl_generateFilterModulListHTML()
681 {
682 	//-------------------------------------------------------------------------------------------------------------
683     // generate frameset for filters sorted by modules
684 	OUStringBuffer sFiltersFramesetHTML( 10000 );
685 
686     sFiltersFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Filters sorted by modules\n\t\t</title>\n\t</head>\n" );  // open html
687     sFiltersFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"                                                                   );  // open frameset for cols
688     sFiltersFramesetHTML.appendAscii( "\t\t\t<frame name=\""                                                                                );  // generate frame "list"
689     sFiltersFramesetHTML.appendAscii( TARGET_LIST                                                                                           );
690     sFiltersFramesetHTML.appendAscii( "\" src=\""                                                                                           );
691     sFiltersFramesetHTML.appendAscii( MODULFILTERS_HTML                                                                                     );
692     sFiltersFramesetHTML.appendAscii( "\" title=\"List\">\n"                                                                                );
693     sFiltersFramesetHTML.appendAscii( "\t\t\t<frame name=\""                                                                                );  // generate frame "properties"
694     sFiltersFramesetHTML.appendAscii( TARGET_PROPERTIES                                                                                     );
695     sFiltersFramesetHTML.appendAscii( "\" src=\""                                                                                           );
696     sFiltersFramesetHTML.appendAscii( FILTERPROPERTIES_HTML                                                                                 );
697     sFiltersFramesetHTML.appendAscii( "\" title=\"Properties\">\n"                                                                          );
698     sFiltersFramesetHTML.appendAscii( "\t\t</frameset>\n"                                                                                   );  // close frameset cols
699     sFiltersFramesetHTML.appendAscii( "</html>\n"                                                                                           );  // close html
700 
701     impl_writeFile( FRAMESET_FILTERS_HTML, U2B(sFiltersFramesetHTML.makeStringAndClear()) );
702 
703 	//-------------------------------------------------------------------------------------------------------------
704 	// generate filter list (names and links only!)
705 	// use same loop to generate filter property list!
706 	OUStringBuffer sAllFiltersHTML( 10000 );
707 	OUStringBuffer sFilterPropHTML( 10000 );
708 
709 	sAllFiltersHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tAll Filters\n\t\t</title>\n\t</head>\n\t<body>\n"										);	// open html
710 	sAllFiltersHTML.appendAscii( "\t\t<table border=0><tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Filter</strong></td></tr>\n"	);	// open table
711 
712 	sFilterPropHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFilterProperties\n\t\t</title>\n\t</head>\n\t<body>\n"									);	// open html
713 
714     css::uno::Sequence< ::rtl::OUString > lWriter ;
715     css::uno::Sequence< ::rtl::OUString > lWeb    ;
716     css::uno::Sequence< ::rtl::OUString > lGlobal ;
717     css::uno::Sequence< ::rtl::OUString > lChart  ;
718     css::uno::Sequence< ::rtl::OUString > lCalc   ;
719     css::uno::Sequence< ::rtl::OUString > lImpress;
720     css::uno::Sequence< ::rtl::OUString > lDraw   ;
721     css::uno::Sequence< ::rtl::OUString > lMath   ;
722     css::uno::Sequence< ::rtl::OUString > lGraphic;
723     css::uno::Sequence< ::rtl::OUString > lDefault;
724     css::uno::Sequence< ::rtl::OUString > lNames  ;
725 
726     m_aData.pCache->queryFilters( FILTERQUERY_TEXTDOCUMENT_WITHDEFAULT        ) >>= lWriter   ;
727     m_aData.pCache->queryFilters( FILTERQUERY_WEBDOCUMENT_WITHDEFAULT         ) >>= lWeb      ;
728     m_aData.pCache->queryFilters( FILTERQUERY_GLOBALDOCUMENT_WITHDEFAULT      ) >>= lGlobal   ;
729     m_aData.pCache->queryFilters( FILTERQUERY_CHARTDOCUMENT_WITHDEFAULT       ) >>= lChart    ;
730     m_aData.pCache->queryFilters( FILTERQUERY_SPREADSHEETDOCUMENT_WITHDEFAULT ) >>= lCalc     ;
731     m_aData.pCache->queryFilters( FILTERQUERY_PRESENTATIONDOCUMENT_WITHDEFAULT) >>= lImpress  ;
732     m_aData.pCache->queryFilters( FILTERQUERY_DRAWINGDOCUMENT_WITHDEFAULT     ) >>= lDraw     ;
733     m_aData.pCache->queryFilters( FILTERQUERY_FORMULARPROPERTIES_WITHDEFAULT  ) >>= lMath     ;
734     m_aData.pCache->queryFilters( FILTERQUERY_GRAPHICFILTERS                  ) >>= lGraphic  ;
735     m_aData.pCache->queryFilters( FILTERQUERY_DEFAULTFILTERS                  ) >>= lDefault  ;
736 
737     sal_Int32       nModuls       = 0;
738     sal_Int32       nFilters      = 0;
739     sal_Int32       nModulCount   = 0;
740     sal_Int32       nFilterCount  = 0;
741     Filter          aFilter          ;
742     ::rtl::OString  sModul           ;
743 
744     for( nModuls=0; nModuls<nModulCount; ++nModuls )
745     {
746         switch( nModuls )
747         {
748             case 0: {
749                         lNames = lWriter;
750                         sModul = "Writer";
751                     }
752                     break;
753             case 1: {
754                         lNames = lWeb    ;
755                         sModul = "Web";
756                     }
757                     break;
758             case 2: {
759                         lNames = lGlobal ;
760                         sModul = "GlobalDokument";
761                     }
762                     break;
763             case 3: {
764                         lNames = lChart  ;
765                         sModul = "Chart";
766                     }
767                     break;
768             case 4: {
769                         lNames = lCalc   ;
770                         sModul = "Calc";
771                     }
772                     break;
773             case 5: {
774                         lNames = lImpress;
775                         sModul = "Impress";
776                     }
777                     break;
778             case 6: {
779                         lNames = lDraw   ;
780                         sModul = "Draw";
781                     }
782                     break;
783             case 7: {
784                         lNames = lMath   ;
785                         sModul = "Math";
786                     }
787                     break;
788             case 8: {
789                         lNames = lGraphic;
790                         sModul = "Graphic";
791                     }
792                     break;
793             case 9: {
794                         lNames = lDefault;
795                         sModul = "Default Filter!";
796                     }
797                     break;
798         }
799 
800         sAllFiltersHTML.appendAscii ( "\t\t\t<tr>\n"                                                                        );
801         sAllFiltersHTML.appendAscii ( "\t\t\t\t<td bgcolor=#000000 fgcolor=#ffffff valign=\"top\" align=\"top\">-</td>\n"   );
802         sAllFiltersHTML.appendAscii ( "\t\t\t\t<td bgcolor=#000000 fgcolor=#ffffff valign=\"top\" align=\"top\">"           );
803         sAllFiltersHTML.appendAscii ( sModul                                                                                );
804         sAllFiltersHTML.appendAscii ( "</td>\n"                                                                             );
805         sAllFiltersHTML.appendAscii ( "\t\t\t</tr>\n"                                                                       );
806 
807         nFilterCount = lNames.getLength();
808 
809         for( nFilters=0; nFilters<nFilterCount; ++nFilters )
810         {
811             aFilter = m_aData.pCache->getFilter( lNames[nFilters] );
812 
813             // write entry in filter list table
814             sAllFiltersHTML.appendAscii ( "\t\t\t<tr>\n"                                                                                                            );  // open row
815             sAllFiltersHTML.appendAscii ( "\t\t\t\t<td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">"                                                               );  // open column "nr"
816             sAllFiltersHTML.append      ( OUString::valueOf( nFilters )                                                                                             );  // write nr
817             sAllFiltersHTML.appendAscii ( "</td>\n"                                                                                                                 );  // close column "nr"
818             sAllFiltersHTML.appendAscii ( "\t\t\t\t<td>"                                                                                                            );  // open column "name"
819             sAllFiltersHTML.appendAscii ( "<a href=\""                                                                                                              );  // open href="filterproperties.html#<filtername>"
820             sAllFiltersHTML.appendAscii ( FILTERPROPERTIES_HTML                                                                                                     );
821             sAllFiltersHTML.appendAscii ( "#"                                                                                                                       );
822             sAllFiltersHTML.append      ( aFilter.sName                                                                                                             );
823             sAllFiltersHTML.appendAscii ( "\" target=\""                                                                                                            );
824             sAllFiltersHTML.appendAscii ( TARGET_PROPERTIES                                                                                                         );
825             sAllFiltersHTML.appendAscii ( "\">"                                                                                                                     );
826             sAllFiltersHTML.append      ( aFilter.sName                                                                                                             );  // write name
827             sAllFiltersHTML.appendAscii ( "</a>"                                                                                                                    );  // close href
828             sAllFiltersHTML.appendAscii ( "</td>\n"                                                                                                                 );  // close column "name"
829             sAllFiltersHTML.appendAscii ( "\t\t\t</tr>\n"                                                                                                           );  // close row
830 
831             // write entry in filter property table
832             sFilterPropHTML.appendAscii ( "\t\t<a name=\""                                                                                                          );  // set target="#<typename>" to follow table
833             sFilterPropHTML.append      ( aFilter.sName                                                                                                             );
834             sFilterPropHTML.appendAscii ( "\"></a>"                                                                                                                 );
835             sFilterPropHTML.appendAscii ( "\t\t<table border=0>\n"                                                                                                  );  // open table
836             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Nr.</td><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">&nbsp;");    // generate row "Nr <value>"
837             sFilterPropHTML.append      ( OUString::valueOf( nFilters )                                                                                             );
838             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
839             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Name</td><td valign=\"top\" align=\"top\">&nbsp;"             );  // generate row "Name <value>"
840             sFilterPropHTML.append      ( aFilter.sName                                                                                                             );
841             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
842             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Order</td><td valign=\"top\" align=\"top\">&nbsp;\""          );  // generate row "Order <value>"
843             sFilterPropHTML.append      ( aFilter.nOrder                                                                                                            );
844             sFilterPropHTML.appendAscii ( "\"</td></tr>\n"                                                                                                          );
845             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Type</td><td valign=\"top\" align=\"top\">&nbsp;\""           );  // generate row "Type <value>"
846             sFilterPropHTML.append      ( aFilter.sType                                                                                                             );
847             sFilterPropHTML.appendAscii ( "\"</td></tr>\n"                                                                                                          );
848             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">UIName</td><td valign=\"top\" align=\"top\">"                 );  // generate row "UIName <value>"
849             for(    ConstStringHashIterator pUIName=aFilter.lUINames.begin()  ;
850                     pUIName!=aFilter.lUINames.end()                           ;
851                     ++pUIName                                                 )
852             {
853                 sFilterPropHTML.appendAscii   ( "&nbsp;["       );
854                 sFilterPropHTML.append        ( pUIName->first  );
855                 sFilterPropHTML.appendAscii   ( "] \""          );
856                 sFilterPropHTML.append        ( pUIName->second );
857                 sFilterPropHTML.appendAscii   ( "\"<br>"        );
858             }
859             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                          );
860             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">DocumentService</td><td valign=\"top\" align=\"top\">&nbsp;"  );  // generate row "DocumentService <value>"
861             sFilterPropHTML.append      ( aFilter.sDocumentService                                                                                          );
862             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
863             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">FilterService</td><td valign=\"top\" align=\"top\">&nbsp;"    );  // generate row "FilterService <value>"
864             sFilterPropHTML.append      ( aFilter.sFilterService                                                                                            );
865             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
866             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Flags</td><td valign=\"top\" align=\"top\">&nbsp;"            );  // generate row "Flags <value>"
867             if( aFilter.nFlags & FILTERFLAG_IMPORT          ) { sFilterPropHTML.append( FILTERFLAGNAME_IMPORT          ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
868             if( aFilter.nFlags & FILTERFLAG_EXPORT          ) { sFilterPropHTML.append( FILTERFLAGNAME_EXPORT          ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
869             if( aFilter.nFlags & FILTERFLAG_TEMPLATE        ) { sFilterPropHTML.append( FILTERFLAGNAME_TEMPLATE        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
870             if( aFilter.nFlags & FILTERFLAG_INTERNAL        ) { sFilterPropHTML.append( FILTERFLAGNAME_INTERNAL        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
871             if( aFilter.nFlags & FILTERFLAG_TEMPLATEPATH    ) { sFilterPropHTML.append( FILTERFLAGNAME_TEMPLATEPATH    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
872             if( aFilter.nFlags & FILTERFLAG_OWN             ) { sFilterPropHTML.append( FILTERFLAGNAME_OWN             ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
873             if( aFilter.nFlags & FILTERFLAG_ALIEN           ) { sFilterPropHTML.append( FILTERFLAGNAME_ALIEN           ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
874             if( aFilter.nFlags & FILTERFLAG_USESOPTIONS     ) { sFilterPropHTML.append( FILTERFLAGNAME_USESOPTIONS     ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
875             if( aFilter.nFlags & FILTERFLAG_DEFAULT         ) { sFilterPropHTML.append( FILTERFLAGNAME_DEFAULT         ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
876             if( aFilter.nFlags & FILTERFLAG_NOTINFILEDIALOG ) { sFilterPropHTML.append( FILTERFLAGNAME_NOTINFILEDIALOG ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
877             if( aFilter.nFlags & FILTERFLAG_NOTINCHOOSER    ) { sFilterPropHTML.append( FILTERFLAGNAME_NOTINCHOOSER    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
878             if( aFilter.nFlags & FILTERFLAG_ASYNCHRON       ) { sFilterPropHTML.append( FILTERFLAGNAME_ASYNCHRON       ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
879             if( aFilter.nFlags & FILTERFLAG_READONLY        ) { sFilterPropHTML.append( FILTERFLAGNAME_READONLY        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
880             if( aFilter.nFlags & FILTERFLAG_NOTINSTALLED    ) { sFilterPropHTML.append( FILTERFLAGNAME_NOTINSTALLED    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
881             if( aFilter.nFlags & FILTERFLAG_CONSULTSERVICE  ) { sFilterPropHTML.append( FILTERFLAGNAME_CONSULTSERVICE  ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
882             if( aFilter.nFlags & FILTERFLAG_3RDPARTYFILTER  ) { sFilterPropHTML.append( FILTERFLAGNAME_3RDPARTYFILTER  ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
883             if( aFilter.nFlags & FILTERFLAG_PACKED          ) { sFilterPropHTML.append( FILTERFLAGNAME_PACKED          ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
884             if( aFilter.nFlags & FILTERFLAG_SILENTEXPORT    ) { sFilterPropHTML.append( FILTERFLAGNAME_SILENTEXPORT    ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
885             if( aFilter.nFlags & FILTERFLAG_BROWSERPREFERED ) { sFilterPropHTML.append( FILTERFLAGNAME_BROWSERPREFERED ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
886             if( aFilter.nFlags & FILTERFLAG_PREFERED        ) { sFilterPropHTML.append( FILTERFLAGNAME_PREFERED        ); sFilterPropHTML.appendAscii( "<br>&nbsp;" ); };
887 
888             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
889             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">UserData</td><td valign=\"top\" align=\"top\">"               );  // generate row "UserData <value>"
890             for(    ConstStringListIterator pUserData=aFilter.lUserData.begin() ;
891                     pUserData!=aFilter.lUserData.end()                          ;
892                     ++pUserData                                                 )
893             {
894                 sFilterPropHTML.appendAscii ( "&nbsp;\""    );
895                 sFilterPropHTML.append      ( *pUserData    );
896                 sFilterPropHTML.appendAscii ( "\"<br>"      );
897             }
898             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
899             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">FileFormatVersion</td><td valign=\"top\" align=\"top\">&nbsp;");  // generate row "FileFormatVersion <value>"
900             sFilterPropHTML.append      ( OUString::valueOf( aFilter.nFileFormatVersion )                                                                           );
901             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
902             sFilterPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">TemplateName</td><td valign=\"top\" align=\"top\">&nbsp;"     );  // generate row "TemplateName <value>"
903             sFilterPropHTML.append      ( aFilter.sTemplateName                                                                                                     );
904             sFilterPropHTML.appendAscii ( "</td></tr>\n"                                                                                                            );
905             sFilterPropHTML.appendAscii ( "\t\t</table>\n"                                                                                                          );  // close table
906             sFilterPropHTML.appendAscii ( "\t\t<p>\n"                                                                                                               );  // add space between this and following table
907         }
908     }
909 
910 	sAllFiltersHTML.appendAscii( "</table>\n"			);	// close table
911 	sAllFiltersHTML.appendAscii( "</body>\n</html>\n"	);	// close html
912 
913 	sFilterPropHTML.appendAscii( "</body>\n</html>\n"	);	// close html
914 
915     impl_writeFile( ALLFILTERS_HTML      , U2B(sAllFiltersHTML.makeStringAndClear()) );
916     impl_writeFile( FILTERPROPERTIES_HTML, U2B(sFilterPropHTML.makeStringAndClear()) );
917 }
918 
919 //*****************************************************************************************************************
impl_generateDetectorListHTML()920 void CFGView::impl_generateDetectorListHTML()
921 {
922 	//-------------------------------------------------------------------------------------------------------------
923 	// generate frameset for detector services
924 	OUStringBuffer sDetectorsFramesetHTML( 10000 );
925 
926 	sDetectorsFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Detector Services\n\t\t</title>\n\t</head>\n"	);	// open html
927 	sDetectorsFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"																);	// open frameset for cols
928 	sDetectorsFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "list"
929 	sDetectorsFramesetHTML.appendAscii( TARGET_LIST																						);
930 	sDetectorsFramesetHTML.appendAscii( "\" src=\""																						);
931 	sDetectorsFramesetHTML.appendAscii( ALLDETECTORS_HTML																				);
932 	sDetectorsFramesetHTML.appendAscii( "\" title=\"List\">\n"																			);
933 	sDetectorsFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "properties"
934 	sDetectorsFramesetHTML.appendAscii( TARGET_PROPERTIES																				);
935 	sDetectorsFramesetHTML.appendAscii( "\" src=\""																						);
936 	sDetectorsFramesetHTML.appendAscii( DETECTORPROPERTIES_HTML																			);
937 	sDetectorsFramesetHTML.appendAscii( "\" title=\"Properties\">\n"																	);
938 	sDetectorsFramesetHTML.appendAscii( "\t\t</frameset>\n"																				);	// close frameset cols
939 	sDetectorsFramesetHTML.appendAscii( "</html>\n"																						);	// close html
940 
941     impl_writeFile( FRAMESET_DETECTORS_HTML, U2B(sDetectorsFramesetHTML.makeStringAndClear()) );
942 
943 	//-------------------------------------------------------------------------------------------------------------
944 	// generate detector list (names and links only!)
945 	// use same loop to generate detector property list!
946 	OUStringBuffer sAllDetectorsHTML( 10000 );
947 	OUStringBuffer sDetectorPropHTML( 10000 );
948 
949 	sAllDetectorsHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tAll Detectors\n\t\t</title>\n\t</head>\n\t<body>\n"										);	// open html
950 	sAllDetectorsHTML.appendAscii( "\t\t<table border=0><tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Detector</strong></td></tr>\n"	);	// open table
951 
952 	sDetectorPropHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tDetectorProperties\n\t\t</title>\n\t</head>\n\t<body>\n"									);	// open html
953 
954     css::uno::Sequence< ::rtl::OUString > lNames = m_aData.pCache->getAllDetectorNames();
955     sal_Int32                             nCount = lNames.getLength()                   ;
956     for( sal_Int32 nItem=0; nItem<nCount; ++nItem )
957 	{
958         Detector aDetector = m_aData.pCache->getDetector( lNames[nItem] );
959 
960 		// write entry in detector list table
961 		sAllDetectorsHTML.appendAscii	( "\t\t\t<tr>\n"																											);	// open row
962 		sAllDetectorsHTML.appendAscii	( "\t\t\t\t<td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">"																);	// open column "nr"
963         sAllDetectorsHTML.append        ( OUString::valueOf( nItem )                                                                                                );  // write nr
964 		sAllDetectorsHTML.appendAscii	( "</td>\n"																													);	// close column "nr"
965 		sAllDetectorsHTML.appendAscii	( "\t\t\t\t<td>"																											);	// open column "name"
966 		sAllDetectorsHTML.appendAscii	( "<a href=\""																												);	// open href="detectorproperties.html#<detectorname>"
967 		sAllDetectorsHTML.appendAscii	( DETECTORPROPERTIES_HTML																									);
968 		sAllDetectorsHTML.appendAscii	( "#"																														);
969         sAllDetectorsHTML.append        ( aDetector.sName                                                                                                           );
970 		sAllDetectorsHTML.appendAscii	( "\" target=\""																											);
971 		sAllDetectorsHTML.appendAscii	( TARGET_PROPERTIES																											);
972 		sAllDetectorsHTML.appendAscii	( "\">"																														);
973         sAllDetectorsHTML.append        ( aDetector.sName                                                                                                           );  // write name
974 		sAllDetectorsHTML.appendAscii	( "</a>"																													);	// close href
975 		sAllDetectorsHTML.appendAscii	( "</td>\n"																													);	// close column "name"
976 		sAllDetectorsHTML.appendAscii	( "\t\t\t</tr>\n"																											);	// close row
977 
978 		// write entry in detector property table
979 		sDetectorPropHTML.appendAscii	( "\t\t<a name=\""																											);	// set target="#<detectorname>" to follow table
980         sDetectorPropHTML.append        ( aDetector.sName                                                                                                           );
981 		sDetectorPropHTML.appendAscii	( "\"></a>"																													);
982 		sDetectorPropHTML.appendAscii	( "\t\t<table border=0>\n"			   																						);	// open table
983 		sDetectorPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Nr.</td><td valign=\"top\" align=\"top\">&nbsp;"				);	// generate row "Nr <value>"
984         sDetectorPropHTML.append        ( OUString::valueOf( nItem )                                                                                                );
985 		sDetectorPropHTML.appendAscii	( "</td></tr>\n"																											);
986 		sDetectorPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Name</td><td valign=\"top\" align=\"top\">&nbsp;"				);	// generate row "Name <value>"
987         sDetectorPropHTML.append        ( aDetector.sName                                                                                                           );
988 		sDetectorPropHTML.appendAscii	( "</td></tr>\n"																											);
989 		sDetectorPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Types</td><td valign=\"top\" align=\"top\">"					);	// generate row "Types <value>"
990         for(    ConstStringListIterator pType=aDetector.lTypes.begin()  ;
991                 pType!=aDetector.lTypes.end()                           ;
992                 ++pType                                                 )
993 		{
994 			sDetectorPropHTML.appendAscii	( "&nbsp;\"");
995 			sDetectorPropHTML.append		( *pType	);
996 			sDetectorPropHTML.appendAscii	( "\"<br>"	);
997 		}
998 
999 		sDetectorPropHTML.appendAscii	( "\t\t</table>\n"																											);	// close table
1000 		sDetectorPropHTML.appendAscii	( "\t\t<p>\n"																												);	// add space between this and following table
1001 	}
1002 
1003 	sAllDetectorsHTML.appendAscii( "</table>\n"			);	// close table
1004 	sAllDetectorsHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1005 
1006 	sDetectorPropHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1007 
1008     impl_writeFile( ALLDETECTORS_HTML        , U2B(sAllDetectorsHTML.makeStringAndClear()) );
1009     impl_writeFile( DETECTORPROPERTIES_HTML  , U2B(sDetectorPropHTML.makeStringAndClear()) );
1010 }
1011 
1012 //*****************************************************************************************************************
impl_generateLoaderListHTML()1013 void CFGView::impl_generateLoaderListHTML()
1014 {
1015 	//-------------------------------------------------------------------------------------------------------------
1016 	// generate frameset for loader services
1017 	OUStringBuffer sLoadersFramesetHTML( 10000 );
1018 
1019 	sLoadersFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Loader Services\n\t\t</title>\n\t</head>\n"	);	// open html
1020 	sLoadersFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"															);	// open frameset for cols
1021 	sLoadersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																		);	// generate frame "list"
1022 	sLoadersFramesetHTML.appendAscii( TARGET_LIST																					);
1023 	sLoadersFramesetHTML.appendAscii( "\" src=\""																					);
1024 	sLoadersFramesetHTML.appendAscii( ALLLOADERS_HTML																				);
1025 	sLoadersFramesetHTML.appendAscii( "\" title=\"List\">\n"																		);
1026 	sLoadersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																		);	// generate frame "properties"
1027 	sLoadersFramesetHTML.appendAscii( TARGET_PROPERTIES																				);
1028 	sLoadersFramesetHTML.appendAscii( "\" src=\""																					);
1029 	sLoadersFramesetHTML.appendAscii( LOADERPROPERTIES_HTML																			);
1030 	sLoadersFramesetHTML.appendAscii( "\" title=\"Properties\">\n"																	);
1031 	sLoadersFramesetHTML.appendAscii( "\t\t</frameset>\n"																			);	// close frameset cols
1032 	sLoadersFramesetHTML.appendAscii( "</html>\n"																					);	// close html
1033 
1034     impl_writeFile( FRAMESET_LOADERS_HTML, U2B(sLoadersFramesetHTML.makeStringAndClear()) );
1035 
1036 	//-------------------------------------------------------------------------------------------------------------
1037 	// generate loader list (names and links only!)
1038 	// use same loop to generate loader property list!
1039 	OUStringBuffer sAllLoadersHTML( 10000 );
1040 	OUStringBuffer sLoaderPropHTML( 10000 );
1041 
1042 	sAllLoadersHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tAll Loaders\n\t\t</title>\n\t</head>\n\t<body>\n"										);	// open html
1043 	sAllLoadersHTML.appendAscii( "\t\t<table border=0><tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Loader</strong></td></tr>\n"	);	// open table
1044 
1045 	sLoaderPropHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tLoaderProperties\n\t\t</title>\n\t</head>\n\t<body>\n"									);	// open html
1046 
1047     css::uno::Sequence< ::rtl::OUString > lNames = m_aData.pCache->getAllLoaderNames();
1048     sal_Int32                             nCount = lNames.getLength()                 ;
1049     for( sal_Int32 nItem=0; nItem<nCount; ++nItem )
1050 	{
1051         Loader aLoader = m_aData.pCache->getLoader( lNames[nItem] );
1052 
1053 		// write entry in loader list table
1054 		sAllLoadersHTML.appendAscii	( "\t\t\t<tr>\n"																											);	// open row
1055 		sAllLoadersHTML.appendAscii	( "\t\t\t\t<td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">"																);	// open column "nr"
1056         sAllLoadersHTML.append      ( OUString::valueOf( nItem )                                                                                                );  // write nr
1057 		sAllLoadersHTML.appendAscii	( "</td>\n"																													);	// close column "nr"
1058 		sAllLoadersHTML.appendAscii	( "\t\t\t\t<td>"																											);	// open column "name"
1059 		sAllLoadersHTML.appendAscii	( "<a href=\""																												);	// open href="loaderproperties.html#<loadername>"
1060 		sAllLoadersHTML.appendAscii	( LOADERPROPERTIES_HTML																										);
1061 		sAllLoadersHTML.appendAscii	( "#"																														);
1062         sAllLoadersHTML.append      ( aLoader.sName                                                                                                             );
1063 		sAllLoadersHTML.appendAscii	( "\" target=\""																											);
1064 		sAllLoadersHTML.appendAscii	( TARGET_PROPERTIES																											);
1065 		sAllLoadersHTML.appendAscii	( "\">"																														);
1066         sAllLoadersHTML.append      ( aLoader.sName                                                                                                             );  // write name
1067 		sAllLoadersHTML.appendAscii	( "</a>"																													);	// close href
1068 		sAllLoadersHTML.appendAscii	( "</td>\n"																													);	// close column "name"
1069 		sAllLoadersHTML.appendAscii	( "\t\t\t</tr>\n"																											);	// close row
1070 
1071 		// write entry in loader property table
1072 		sLoaderPropHTML.appendAscii	( "\t\t<a name=\""																											);	// set target="#<loadername>" to follow table
1073         sLoaderPropHTML.append      ( aLoader.sName                                                                                                             );
1074 		sLoaderPropHTML.appendAscii	( "\"></a>"																													);
1075 		sLoaderPropHTML.appendAscii	( "\t\t<table border=0>\n"			   																						);	// open table
1076 		sLoaderPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Nr.</td><td valign=\"top\" align=\"top\">&nbsp;"				);	// generate row "Nr <value>"
1077         sLoaderPropHTML.append      ( OUString::valueOf( nItem )                                                                                                );
1078 		sLoaderPropHTML.appendAscii	( "</td></tr>\n"																											);
1079 		sLoaderPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Name</td><td valign=\"top\" align=\"top\">&nbsp;"				);	// generate row "Name <value>"
1080         sLoaderPropHTML.append      ( aLoader.sName                                                                                                             );
1081 		sLoaderPropHTML.appendAscii	( "</td></tr>\n"																											);
1082         sLoaderPropHTML.appendAscii ( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">UIName</td><td valign=\"top\" align=\"top\">"                 );  // generate row "UIName <value>"
1083         for(    ConstStringHashIterator pUIName=aLoader.lUINames.begin()  ;
1084                 pUIName!=aLoader.lUINames.end()                           ;
1085                 ++pUIName                                                 )
1086 		{
1087             sLoaderPropHTML.appendAscii   ( "&nbsp;["       );
1088             sLoaderPropHTML.append        ( pUIName->first  );
1089             sLoaderPropHTML.appendAscii   ( "] \""          );
1090             sLoaderPropHTML.append        ( pUIName->second );
1091             sLoaderPropHTML.appendAscii   ( "\"<br>"        );
1092 		}
1093 		sLoaderPropHTML.appendAscii	( "</td></tr>\n"																											);
1094 		sLoaderPropHTML.appendAscii	( "\t\t\t<tr><td bgcolor=#f5f9d5 valign=\"top\" align=\"top\">Types</td><td valign=\"top\" align=\"top\">"					);	// generate row "Types <value>"
1095         for(    ConstStringListIterator pType=aLoader.lTypes.begin()    ;
1096                 pType!=aLoader.lTypes.end()                             ;
1097                 ++pType                                                 )
1098 		{
1099 			sLoaderPropHTML.appendAscii	( "&nbsp;\"");
1100 			sLoaderPropHTML.append		( *pType	);
1101 			sLoaderPropHTML.appendAscii	( "\"<br>"	);
1102 		}
1103 
1104 		sLoaderPropHTML.appendAscii	( "\t\t</table>\n"																											);	// close table
1105 		sLoaderPropHTML.appendAscii	( "\t\t<p>\n"																												);	// add space between this and following table
1106 	}
1107 
1108 	sAllLoadersHTML.appendAscii( "</table>\n"			);	// close table
1109 	sAllLoadersHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1110 
1111 	sLoaderPropHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1112 
1113     impl_writeFile( ALLLOADERS_HTML      , U2B(sAllLoadersHTML.makeStringAndClear()) );
1114     impl_writeFile( LOADERPROPERTIES_HTML, U2B(sLoaderPropHTML.makeStringAndClear()) );
1115 }
1116 
1117 //*****************************************************************************************************************
impl_generateInvalidFiltersHTML()1118 void CFGView::impl_generateInvalidFiltersHTML()
1119 {
1120 	//-------------------------------------------------------------------------------------------------------------
1121 	// generate frameset for invalid filters
1122 	OUStringBuffer sInvalidFiltersFramesetHTML( 10000 );
1123 
1124 	sInvalidFiltersFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Invalid Filters\n\t\t</title>\n\t</head>\n"	);	// open html
1125 	sInvalidFiltersFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"															);	// open frameset for cols
1126 	sInvalidFiltersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "list"
1127 	sInvalidFiltersFramesetHTML.appendAscii( TARGET_LIST																					);
1128 	sInvalidFiltersFramesetHTML.appendAscii( "\" src=\""																					);
1129 	sInvalidFiltersFramesetHTML.appendAscii( INVALIDFILTERS_HTML																			);
1130 	sInvalidFiltersFramesetHTML.appendAscii( "\" title=\"List\">\n"																			);
1131 	sInvalidFiltersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "properties"
1132 	sInvalidFiltersFramesetHTML.appendAscii( TARGET_PROPERTIES																				);
1133 	sInvalidFiltersFramesetHTML.appendAscii( "\" src=\""																					);
1134 	sInvalidFiltersFramesetHTML.appendAscii( FILTERPROPERTIES_HTML																			);
1135 	sInvalidFiltersFramesetHTML.appendAscii( "\" title=\"Properties\">\n"																	);
1136 	sInvalidFiltersFramesetHTML.appendAscii( "\t\t</frameset>\n"																			);	// close frameset cols
1137 	sInvalidFiltersFramesetHTML.appendAscii( "</html>\n"																					);	// close html
1138 
1139     impl_writeFile( FRAMESET_INVALIDFILTERS_HTML, U2B(sInvalidFiltersFramesetHTML.makeStringAndClear()) );
1140 
1141 	//-------------------------------------------------------------------------------------------------------------
1142 	// Search invalid registered filters!
1143 	OUStringBuffer sInvalidFilterHTML( 10000 );
1144 
1145 	sInvalidFilterHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tInvalid Filter\n\t\t</title>\n\t</head>\n\t<body>\n"																			);	// open html
1146 	sInvalidFilterHTML.appendAscii( "\t\tPlease check follow filter entries in configuration. They are registered for invalid types!<p>\n"																);	// write "Note"
1147 	sInvalidFilterHTML.appendAscii( "\t\t<table border=0>\n"															 																				);	// open table
1148 	sInvalidFilterHTML.appendAscii( "\t<tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Filter</strong></td><td bgcolor=#ff8040><strong>Wrong Type</strong></td></tr>\n"	);	// generate table header
1149 
1150     css::uno::Sequence< ::rtl::OUString > lFilters     = m_aData.pCache->getAllFilterNames();
1151     sal_Int32                             nFilterCount = lFilters.getLength()               ;
1152     css::uno::Sequence< ::rtl::OUString > lTypes       = m_aData.pCache->getAllTypeNames()  ;
1153     sal_Int32                             nTypeCount   = lTypes.getLength()                 ;
1154     FileType                              aType  ;
1155     Filter                                aFilter;
1156     for( sal_Int32 nFilter=0; nFilter<nFilterCount; ++nFilter )
1157 	{
1158         aFilter = m_aData.pCache->getFilter( lFilters[nFilter] );
1159 		sal_Bool bFound = sal_False;
1160         for( sal_Int32 nType=0; nType<nTypeCount; ++nType )
1161         {
1162             aType = m_aData.pCache->getType( lTypes[nType] );
1163             if( aFilter.sType == aType.sName )
1164 			{
1165 				bFound = sal_True;
1166 				break;
1167 			}
1168 		}
1169 		if( bFound == sal_False )
1170 		{
1171 			sInvalidFilterHTML.appendAscii	( "\t<tr><td bgcolor=#ff0000 color=#00ffff>"		);	// generate row for invalid filter entry
1172             sInvalidFilterHTML.append       ( OUString::valueOf( nFilter )                      );
1173 			sInvalidFilterHTML.appendAscii	( "</td><td><a href=\""								);
1174 			sInvalidFilterHTML.appendAscii	( FILTERPROPERTIES_HTML								);
1175 			sInvalidFilterHTML.appendAscii	( "#"												);
1176             sInvalidFilterHTML.append       ( aFilter.sName                                     );
1177 			sInvalidFilterHTML.appendAscii	( "\" target=\""									);
1178 			sInvalidFilterHTML.appendAscii	( TARGET_PROPERTIES									);
1179 			sInvalidFilterHTML.appendAscii	( "\">"												);
1180             sInvalidFilterHTML.append       ( aFilter.sName                                     );
1181 			sInvalidFilterHTML.appendAscii	( "\"</a></td><td>\""								);
1182             sInvalidFilterHTML.append       ( aFilter.sType                                     );
1183 			sInvalidFilterHTML.appendAscii	( "\"</td></tr>\n"									);
1184 		}
1185 	}
1186 	sInvalidFilterHTML.appendAscii( "</table>\n"			);	// close table
1187 	sInvalidFilterHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1188     impl_writeFile( INVALIDFILTERS_HTML, U2B(sInvalidFilterHTML.makeStringAndClear()) );
1189 }
1190 
1191 //*****************************************************************************************************************
impl_generateInvalidDetectorsHTML()1192 void CFGView::impl_generateInvalidDetectorsHTML()
1193 {
1194 	//-------------------------------------------------------------------------------------------------------------
1195 	// generate frameset for invalid detectors
1196 	OUStringBuffer sInvalidDetectorsFramesetHTML( 10000 );
1197 
1198 	sInvalidDetectorsFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Invalid Detectors\n\t\t</title>\n\t</head>\n"	);	// open html
1199 	sInvalidDetectorsFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"																);	// open frameset for cols
1200 	sInvalidDetectorsFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "list"
1201 	sInvalidDetectorsFramesetHTML.appendAscii( TARGET_LIST																						);
1202 	sInvalidDetectorsFramesetHTML.appendAscii( "\" src=\""																						);
1203 	sInvalidDetectorsFramesetHTML.appendAscii( INVALIDDETECTORS_HTML																			);
1204 	sInvalidDetectorsFramesetHTML.appendAscii( "\" title=\"List\">\n"																			);
1205 	sInvalidDetectorsFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "properties"
1206 	sInvalidDetectorsFramesetHTML.appendAscii( TARGET_PROPERTIES																				);
1207 	sInvalidDetectorsFramesetHTML.appendAscii( "\" src=\""																						);
1208 	sInvalidDetectorsFramesetHTML.appendAscii( DETECTORPROPERTIES_HTML																			);
1209 	sInvalidDetectorsFramesetHTML.appendAscii( "\" title=\"Properties\">\n"																		);
1210 	sInvalidDetectorsFramesetHTML.appendAscii( "\t\t</frameset>\n"																				);	// close frameset cols
1211 	sInvalidDetectorsFramesetHTML.appendAscii( "</html>\n"																						);	// close html
1212 
1213     impl_writeFile( FRAMESET_INVALIDDETECTORS_HTML, U2B(sInvalidDetectorsFramesetHTML.makeStringAndClear()) );
1214 
1215 	//-------------------------------------------------------------------------------------------------------------
1216 	// Search invalid registered detect services!
1217 	OUStringBuffer sInvalidDetectorsHTML( 10000 );
1218 
1219 	sInvalidDetectorsHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tInvalid Detector Services\n\t\t</title>\n\t</head>\n\t<body>\n"			);	// open html
1220 	sInvalidDetectorsHTML.appendAscii( "\t\tPlease check follow detect service entries in configuration. They are registered for invalid types!<p>\n"	);	// write "Note"
1221 	sInvalidDetectorsHTML.appendAscii( "\t\t<table border=0>\n"															 								);	// open table
1222 	sInvalidDetectorsHTML.appendAscii( "\t<tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Detector</strong></td></tr>\n"	);	// generate table header
1223 
1224     css::uno::Sequence< ::rtl::OUString > lDetectors     = m_aData.pCache->getAllDetectorNames();
1225     sal_Int32                             nDetectorCount = lDetectors.getLength()               ;
1226     css::uno::Sequence< ::rtl::OUString > lTypes       = m_aData.pCache->getAllTypeNames()  ;
1227     sal_Int32                             nTypeCount   = lTypes.getLength()                 ;
1228     FileType                              aType    ;
1229     Detector                              aDetector;
1230     for( sal_Int32 nDetector=0; nDetector<nDetectorCount; ++nDetector )
1231 	{
1232         aDetector = m_aData.pCache->getDetector( lDetectors[nDetector] );
1233 		sal_Bool bFound = sal_False;
1234         for( sal_Int32 nType=0; nType<nTypeCount; ++nType )
1235         {
1236             aType = m_aData.pCache->getType( lTypes[nType] );
1237             for( ConstStringListIterator pTypeListEntry=aDetector.lTypes.begin(); pTypeListEntry!=aDetector.lTypes.end(); ++pTypeListEntry )
1238 			{
1239                 if( *pTypeListEntry == aType.sName )
1240 				{
1241 					bFound = sal_True;
1242 					break;
1243 				}
1244 			}
1245 		}
1246 		if( bFound == sal_False )
1247 		{
1248 			sInvalidDetectorsHTML.appendAscii	( "\t<tr><td bgcolor=#ff0000 color=#00ffff>"		);	// generate row for invalid detector entry
1249             sInvalidDetectorsHTML.append        ( OUString::valueOf( nDetector )                    );
1250 			sInvalidDetectorsHTML.appendAscii	( "</td><td><a href=\""								);
1251 			sInvalidDetectorsHTML.appendAscii	( DETECTORPROPERTIES_HTML							);
1252 			sInvalidDetectorsHTML.appendAscii	( "#"												);
1253             sInvalidDetectorsHTML.append        ( aDetector.sName                                   );
1254 			sInvalidDetectorsHTML.appendAscii	( "\" target=\""									);
1255 			sInvalidDetectorsHTML.appendAscii	( TARGET_PROPERTIES									);
1256 			sInvalidDetectorsHTML.appendAscii	( "\">"												);
1257             sInvalidDetectorsHTML.append        ( aDetector.sName                                   );
1258 			sInvalidDetectorsHTML.appendAscii	( "\"</a></td></tr>\n"								);
1259 		}
1260 	}
1261 	sInvalidDetectorsHTML.appendAscii( "</table>\n"			);	// close table
1262 	sInvalidDetectorsHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1263     impl_writeFile( INVALIDDETECTORS_HTML, U2B(sInvalidDetectorsHTML.makeStringAndClear()) );
1264 }
1265 
1266 //*****************************************************************************************************************
impl_generateInvalidLoadersHTML()1267 void CFGView::impl_generateInvalidLoadersHTML()
1268 {
1269 	//-------------------------------------------------------------------------------------------------------------
1270 	// generate frameset for invalid loaders
1271 	OUStringBuffer sInvalidLoadersFramesetHTML( 10000 );
1272 
1273 	sInvalidLoadersFramesetHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Invalid Loaders\n\t\t</title>\n\t</head>\n"	);	// open html
1274 	sInvalidLoadersFramesetHTML.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"															);	// open frameset for cols
1275 	sInvalidLoadersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "list"
1276 	sInvalidLoadersFramesetHTML.appendAscii( TARGET_LIST																					);
1277 	sInvalidLoadersFramesetHTML.appendAscii( "\" src=\""																					);
1278 	sInvalidLoadersFramesetHTML.appendAscii( INVALIDLOADERS_HTML																			);
1279 	sInvalidLoadersFramesetHTML.appendAscii( "\" title=\"List\">\n"																			);
1280 	sInvalidLoadersFramesetHTML.appendAscii( "\t\t\t<frame name=\""																			);	// generate frame "properties"
1281 	sInvalidLoadersFramesetHTML.appendAscii( TARGET_PROPERTIES																				);
1282 	sInvalidLoadersFramesetHTML.appendAscii( "\" src=\""																					);
1283 	sInvalidLoadersFramesetHTML.appendAscii( LOADERPROPERTIES_HTML																			);
1284 	sInvalidLoadersFramesetHTML.appendAscii( "\" title=\"Properties\">\n"																	);
1285 	sInvalidLoadersFramesetHTML.appendAscii( "\t\t</frameset>\n"																			);	// close frameset cols
1286 	sInvalidLoadersFramesetHTML.appendAscii( "</html>\n"																					);	// close html
1287 
1288     impl_writeFile( FRAMESET_INVALIDLOADERS_HTML, U2B(sInvalidLoadersFramesetHTML.makeStringAndClear()) );
1289 
1290 	//-------------------------------------------------------------------------------------------------------------
1291 	// Search invalid registered detect services!
1292 	OUStringBuffer sInvalidLoadersHTML( 10000 );
1293 
1294 	sInvalidLoadersHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tInvalid Loader Services\n\t\t</title>\n\t</head>\n\t<body>\n"			);	// open html
1295 	sInvalidLoadersHTML.appendAscii( "\t\tPlease check follow loader service entries in configuration. They are registered for invalid types!<p>\n"	);	// write "Note"
1296 	sInvalidLoadersHTML.appendAscii( "\t\t<table border=0>\n"															 							);	// open table
1297 	sInvalidLoadersHTML.appendAscii( "\t<tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Loader</strong></td></tr>\n"	);	// generate table header
1298 
1299     css::uno::Sequence< ::rtl::OUString > lLoaders     = m_aData.pCache->getAllLoaderNames();
1300     sal_Int32                             nLoaderCount = lLoaders.getLength()               ;
1301     css::uno::Sequence< ::rtl::OUString > lTypes       = m_aData.pCache->getAllTypeNames()  ;
1302     sal_Int32                             nTypeCount   = lTypes.getLength()                 ;
1303     FileType                              aType    ;
1304     Loader                                aLoader  ;
1305     for( sal_Int32 nLoader=0; nLoader<nLoaderCount; ++nLoader )
1306 	{
1307         aLoader = m_aData.pCache->getLoader( lLoaders[nLoader] );
1308 		sal_Bool bFound = sal_False;
1309         for( sal_Int32 nType=0; nType<nTypeCount; ++nType )
1310         {
1311             aType = m_aData.pCache->getType( lTypes[nType] );
1312             for( ConstStringListIterator pTypeListEntry=aLoader.lTypes.begin(); pTypeListEntry!=aLoader.lTypes.end(); ++pTypeListEntry )
1313 			{
1314                 if( *pTypeListEntry == aType.sName )
1315 				{
1316 					bFound = sal_True;
1317 					break;
1318 				}
1319 			}
1320 		}
1321 		if( bFound == sal_False )
1322 		{
1323 			sInvalidLoadersHTML.appendAscii	( "\t<tr><td bgcolor=#ff0000 color=#00ffff>"		);	// generate row for invalid loader entry
1324             sInvalidLoadersHTML.append      ( OUString::valueOf( nLoader )                      );
1325 			sInvalidLoadersHTML.appendAscii	( "</td><td><a href=\""								);
1326 			sInvalidLoadersHTML.appendAscii	( LOADERPROPERTIES_HTML								);
1327 			sInvalidLoadersHTML.appendAscii	( "#"												);
1328             sInvalidLoadersHTML.append      ( aLoader.sName                                     );
1329 			sInvalidLoadersHTML.appendAscii	( "\" target=\""									);
1330 			sInvalidLoadersHTML.appendAscii	( TARGET_PROPERTIES									);
1331 			sInvalidLoadersHTML.appendAscii	( "\">"												);
1332             sInvalidLoadersHTML.append      ( aLoader.sName                                     );
1333 			sInvalidLoadersHTML.appendAscii	( "\"</a></td></tr>\n"								);
1334 		}
1335 	}
1336 	sInvalidLoadersHTML.appendAscii( "</table>\n"			);	// close table
1337 	sInvalidLoadersHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1338     impl_writeFile( INVALIDLOADERS_HTML, U2B(sInvalidLoadersHTML.makeStringAndClear()) );
1339 }
1340 
1341 //*****************************************************************************************************************
impl_generateFilterFlagsHTML()1342 void CFGView::impl_generateFilterFlagsHTML()
1343 {
1344 	//-------------------------------------------------------------------------------------------------------------
1345 	// Create view of all filters and his flags.
1346 	OUStringBuffer sFilterFlagsHTML( 10000 );
1347 
1348 	sFilterFlagsHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFilter and Flags\n\t\t</title>\n\t</head>\n\t<body>\n"					);	// open html
1349 	sFilterFlagsHTML.appendAscii( "\t\tThis is a list of all filters and his supported flags!<p>\n"												);	// write "Note"
1350 	sFilterFlagsHTML.appendAscii( "\t\t<table border=0>\n"															 							);	// open table
1351 	sFilterFlagsHTML.appendAscii( "\t<tr><td bgcolor=#ff8040><strong>Nr.</strong></td><td bgcolor=#ff8040><strong>Loader</strong></td></tr>\n"	);	// generate table header
1352 
1353     css::uno::Sequence< ::rtl::OUString > lNames = m_aData.pCache->getAllFilterNames();
1354     sal_Int32                             nCount = lNames.getLength();
1355     for( sal_Int32 nItem=0; nItem!=nCount; ++nItem )
1356 	{
1357         Filter aFilter = m_aData.pCache->getFilter( lNames[nItem] );
1358 
1359 		sFilterFlagsHTML.appendAscii( "\t<tr><td bgcolor=#ff0000 color=#00ffff>"		);
1360         sFilterFlagsHTML.append     ( OUString::valueOf( nItem )                        );
1361 		sFilterFlagsHTML.appendAscii( "</td><td><a href=\""								);
1362 		sFilterFlagsHTML.appendAscii( LOADERPROPERTIES_HTML								);
1363 		sFilterFlagsHTML.appendAscii( "#"												);
1364         sFilterFlagsHTML.append     ( aFilter.sName                                     );
1365 		sFilterFlagsHTML.appendAscii( "\" target=\""									);
1366 		sFilterFlagsHTML.appendAscii( TARGET_PROPERTIES									);
1367 		sFilterFlagsHTML.appendAscii( "\">"												);
1368         sFilterFlagsHTML.append     ( aFilter.sName                                     );
1369 		sFilterFlagsHTML.appendAscii( "\"</a></td><td>"									);
1370 
1371         if( aFilter.nFlags & FILTERFLAG_IMPORT          ) { sFilterFlagsHTML.append( FILTERFLAGNAME_IMPORT          ); sFilterFlagsHTML.appendAscii( " | " ); }
1372         if( aFilter.nFlags & FILTERFLAG_EXPORT          ) { sFilterFlagsHTML.append( FILTERFLAGNAME_EXPORT          ); sFilterFlagsHTML.appendAscii( " | " ); }
1373         if( aFilter.nFlags & FILTERFLAG_TEMPLATE        ) { sFilterFlagsHTML.append( FILTERFLAGNAME_TEMPLATE        ); sFilterFlagsHTML.appendAscii( " | " ); }
1374         if( aFilter.nFlags & FILTERFLAG_INTERNAL        ) { sFilterFlagsHTML.append( FILTERFLAGNAME_INTERNAL        ); sFilterFlagsHTML.appendAscii( " | " ); }
1375         if( aFilter.nFlags & FILTERFLAG_TEMPLATEPATH    ) { sFilterFlagsHTML.append( FILTERFLAGNAME_TEMPLATEPATH    ); sFilterFlagsHTML.appendAscii( " | " ); }
1376         if( aFilter.nFlags & FILTERFLAG_OWN             ) { sFilterFlagsHTML.append( FILTERFLAGNAME_OWN             ); sFilterFlagsHTML.appendAscii( " | " ); }
1377         if( aFilter.nFlags & FILTERFLAG_ALIEN           ) { sFilterFlagsHTML.append( FILTERFLAGNAME_ALIEN           ); sFilterFlagsHTML.appendAscii( " | " ); }
1378         if( aFilter.nFlags & FILTERFLAG_USESOPTIONS     ) { sFilterFlagsHTML.append( FILTERFLAGNAME_USESOPTIONS     ); sFilterFlagsHTML.appendAscii( " | " ); }
1379         if( aFilter.nFlags & FILTERFLAG_DEFAULT         ) { sFilterFlagsHTML.append( FILTERFLAGNAME_DEFAULT         ); sFilterFlagsHTML.appendAscii( " | " ); }
1380         if( aFilter.nFlags & FILTERFLAG_NOTINFILEDIALOG ) { sFilterFlagsHTML.append( FILTERFLAGNAME_NOTINFILEDIALOG ); sFilterFlagsHTML.appendAscii( " | " ); }
1381         if( aFilter.nFlags & FILTERFLAG_NOTINCHOOSER    ) { sFilterFlagsHTML.append( FILTERFLAGNAME_NOTINCHOOSER    ); sFilterFlagsHTML.appendAscii( " | " ); }
1382         if( aFilter.nFlags & FILTERFLAG_ASYNCHRON       ) { sFilterFlagsHTML.append( FILTERFLAGNAME_ASYNCHRON       ); sFilterFlagsHTML.appendAscii( " | " ); }
1383         if( aFilter.nFlags & FILTERFLAG_READONLY        ) { sFilterFlagsHTML.append( FILTERFLAGNAME_READONLY        ); sFilterFlagsHTML.appendAscii( " | " ); }
1384         if( aFilter.nFlags & FILTERFLAG_NOTINSTALLED    ) { sFilterFlagsHTML.append( FILTERFLAGNAME_NOTINSTALLED    ); sFilterFlagsHTML.appendAscii( " | " ); }
1385         if( aFilter.nFlags & FILTERFLAG_CONSULTSERVICE  ) { sFilterFlagsHTML.append( FILTERFLAGNAME_CONSULTSERVICE  ); sFilterFlagsHTML.appendAscii( " | " ); }
1386         if( aFilter.nFlags & FILTERFLAG_3RDPARTYFILTER  ) { sFilterFlagsHTML.append( FILTERFLAGNAME_3RDPARTYFILTER  ); sFilterFlagsHTML.appendAscii( " | " ); }
1387         if( aFilter.nFlags & FILTERFLAG_PACKED          ) { sFilterFlagsHTML.append( FILTERFLAGNAME_PACKED          ); sFilterFlagsHTML.appendAscii( " | " ); }
1388         if( aFilter.nFlags & FILTERFLAG_SILENTEXPORT    ) { sFilterFlagsHTML.append( FILTERFLAGNAME_SILENTEXPORT    ); sFilterFlagsHTML.appendAscii( " | " ); }
1389         if( aFilter.nFlags & FILTERFLAG_BROWSERPREFERED ) { sFilterFlagsHTML.append( FILTERFLAGNAME_BROWSERPREFERED ); sFilterFlagsHTML.appendAscii( " | " ); }
1390         if( aFilter.nFlags & FILTERFLAG_PREFERED        ) { sFilterFlagsHTML.append( FILTERFLAGNAME_PREFERED        ); }
1391 
1392 		sFilterFlagsHTML.appendAscii( "</td></tr>\n"	);
1393 	}
1394 	sFilterFlagsHTML.appendAscii( "</table>\n"			);	// close table
1395 	sFilterFlagsHTML.appendAscii( "</body>\n</html>\n"	);	// close html
1396     impl_writeFile( FILTERFLAGS_HTML, U2B(sFilterFlagsHTML.makeStringAndClear()) );
1397 }
1398 
1399 //*****************************************************************************************************************
impl_generateDefaultFiltersHTML()1400 void CFGView::impl_generateDefaultFiltersHTML()
1401 {
1402 }
1403 
1404 //*****************************************************************************************************************
impl_generateDoubleFilterUINamesHTML()1405 void CFGView::impl_generateDoubleFilterUINamesHTML()
1406 {
1407 	//-------------------------------------------------------------------------------------------------------------
1408     // generate frameset for double UINames
1409     OUStringBuffer sFrameSet( 10000 );
1410 
1411     sFrameSet.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tFrameset: Search doubl UINames\n\t\t</title>\n\t</head>\n" );  // open html
1412     sFrameSet.appendAscii( "\t\t<frameset cols=\"40%,60%\">\n"                                                              );  // open frameset for cols
1413     sFrameSet.appendAscii( "\t\t\t<frame name=\""                                                                           );  // generate frame "list"
1414     sFrameSet.appendAscii( TARGET_LIST                                                                                      );
1415     sFrameSet.appendAscii( "\" src=\""                                                                                      );
1416     sFrameSet.appendAscii( DOUBLEFILTERUINAMES_HTML                                                                         );
1417     sFrameSet.appendAscii( "\" title=\"Double UINames\">\n"                                                                 );
1418     sFrameSet.appendAscii( "\t\t\t<frame name=\""                                                                           );  // generate frame "properties"
1419     sFrameSet.appendAscii( TARGET_PROPERTIES                                                                                );
1420     sFrameSet.appendAscii( "\" src=\""                                                                                      );
1421     sFrameSet.appendAscii( FILTERPROPERTIES_HTML                                                                            );
1422     sFrameSet.appendAscii( "\" title=\"Properties\">\n"                                                                     );
1423     sFrameSet.appendAscii( "\t\t</frameset>\n"                                                                              );  // close frameset cols
1424     sFrameSet.appendAscii( "</html>\n"                                                                                      );  // close html
1425 
1426     impl_writeFile( FRAMESET_DOUBLEFILTERUINAMES_HTML, U2B(sFrameSet.makeStringAndClear()) );
1427 
1428 	//-------------------------------------------------------------------------------------------------------------
1429 	// Search invalid registered detect services!
1430     OUStringBuffer sHTML( 10000 );
1431 
1432     sHTML.appendAscii( "<html>\n\t<head>\n\t\t<title>\n\t\t\tDouble Filter UINames\n\t\t</title>\n\t</head>\n\t<body>\n"    );  // open html
1433     sHTML.appendAscii( "\t\tPlease check follow filter entries in configuration. Her UINames are registered twice!<p>\n"    );  // write "Note"
1434     sHTML.appendAscii( "\t\t<table border=0>\n"                                                                             );  // open table
1435     sHTML.appendAscii( "\t<tr><td bgcolor=#ff8040><strong>Nr.</strong></td>\n"                                              );  // generate table header
1436     sHTML.appendAscii( "\t\t<td bgcolor=#ff8040><strong>UIName</strong></td>\n"                                             );
1437     sHTML.appendAscii( "\t\t<td bgcolor=#ff8040><strong>Filters</strong></td>\n"                                            );
1438     sHTML.appendAscii( "\t</tr>\n"                                                                                          );
1439 
1440     StringHash                            lUINames                                          ;
1441     css::uno::Sequence< ::rtl::OUString > lFilters     = m_aData.pCache->getAllFilterNames();
1442     sal_Int32                             nFilterCount = lFilters.getLength()               ;
1443     Filter                                aFilter                                           ;
1444     ::rtl::OUStringBuffer                 sBuffer                                           ;
1445     ::rtl::OUString                       sUIName                                           ;
1446 
1447     for( sal_Int32 nFilter=0; nFilter<nFilterCount; ++nFilter )
1448 	{
1449         aFilter = m_aData.pCache->getFilter( lFilters[nFilter] );
1450         for( ConstStringHashIterator pUIName=aFilter.lUINames.begin(); pUIName!= aFilter.lUINames.end(); ++pUIName )
1451         {
1452             // Build key value by using localized UIName to register filter name
1453             sBuffer.appendAscii( "["             );
1454             sBuffer.append     ( pUIName->first  );
1455             sBuffer.appendAscii( "] \""          );
1456             sBuffer.append     ( pUIName->second );
1457             sBuffer.appendAscii( "\""            );
1458             sUIName = sBuffer.makeStringAndClear();
1459 
1460             // insert filter into hash table
1461             sBuffer.append     ( lUINames[ sUIName ]     );
1462             sBuffer.appendAscii ( "<a href=\""           );
1463             sBuffer.appendAscii ( FILTERPROPERTIES_HTML  );
1464             sBuffer.appendAscii ( "#"                    );
1465             sBuffer.append      ( aFilter.sName          );
1466             sBuffer.appendAscii ( "\" target=\""         );
1467             sBuffer.appendAscii ( TARGET_PROPERTIES      );
1468             sBuffer.appendAscii ( "\">"                  );
1469             sBuffer.append      ( aFilter.sName          );
1470             sBuffer.appendAscii ( "\"</a><br>\n"         );
1471             lUINames[ sUIName ] = sBuffer.makeStringAndClear();
1472         }
1473     }
1474 
1475     nFilter = 1;
1476     for( ConstStringHashIterator pIterator=lUINames.begin(); pIterator!=lUINames.end(); ++pIterator )
1477     {
1478         if( pIterator->second.indexOf( '\n' ) != pIterator->second.lastIndexOf( '\n' ) )
1479         {
1480             sHTML.appendAscii ( "\t<tr><td bgcolor=#ff0000 color=#00ffff valign=top>"   );  // generate row for uiname->filter entry
1481             sHTML.append      ( OUString::valueOf( nFilter )                            );
1482             sHTML.appendAscii ( "</td><td valign=top>"                                  );
1483             sHTML.append      ( pIterator->first                                        );
1484             sHTML.appendAscii ( "</td><td bgcolor=#f0f0f0 valign=top>"                  );
1485             sHTML.append      ( pIterator->second                                       );
1486             sHTML.appendAscii ( "</td></tr>\n"                                          );
1487 
1488             ++nFilter;
1489         }
1490     }
1491 
1492     sHTML.appendAscii( "</table>\n"           );  // close table
1493     sHTML.appendAscii( "</body>\n</html>\n"   );  // close html
1494     impl_writeFile( DOUBLEFILTERUINAMES_HTML, U2B(sHTML.makeStringAndClear()) );
1495 }
1496 
1497 //*****************************************************************************************************************
impl_writeFile(const::rtl::OString & sFile,const::rtl::OString & sContent)1498 void CFGView::impl_writeFile( const ::rtl::OString& sFile, const ::rtl::OString& sContent )
1499 {
1500     ::rtl::OUStringBuffer sFullPath( 1000 );
1501     sFullPath.append        ( m_aData.sDirectory    );
1502     sFullPath.appendAscii   ( "\\"                  );
1503     sFullPath.appendAscii   ( sFile.getStr()        );
1504 
1505     ::rtl::OUString s = sFullPath.makeStringAndClear();
1506 
1507     WRITE_LOGFILE( U2B(s), sContent )
1508 }
1509