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