1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xml2xcd.cxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 // MARKER(update_precomp.py): autogen include statement, do not remove
33 #include "precompiled_framework.hxx"
35 //_________________________________________________________________________________________________________________
37 //_________________________________________________________________________________________________________________
39 #define VCL_NEED_BASETSD
40 #include <tools/presys.h>
42 #include <tools/postsys.h>
43 #include <classes/servicemanager.hxx>
44 #include <classes/filtercache.hxx>
45 #include <macros/generic.hxx>
46 #include <macros/debug.hxx>
48 #include <filterflags.h>
50 //_________________________________________________________________________________________________________________
52 //_________________________________________________________________________________________________________________
53 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
55 //_________________________________________________________________________________________________________________
57 //_________________________________________________________________________________________________________________
58 #include <comphelper/processfactory.hxx>
59 #include <unotools/processfactory.hxx>
60 #include <vos/process.hxx>
61 #include <rtl/ustring.hxx>
62 #include <rtl/ustrbuf.hxx>
64 #include <vcl/event.hxx>
65 #include <vcl/svapp.hxx>
66 #include <vcl/wrkwin.hxx>
67 #include <vcl/msgbox.hxx>
69 //_________________________________________________________________________________________________________________
71 //_________________________________________________________________________________________________________________
73 using namespace ::framework
;
75 //_________________________________________________________________________________________________________________
77 //_________________________________________________________________________________________________________________
79 //_________________________________________________________________________________________________________________
81 //_________________________________________________________________________________________________________________
84 Versions: 1) first revision
85 - one entry for every property
86 - full loclized values
87 2) new property "Order" for filters ... but not right set!
89 3) decrease size of xml file
90 - don't write full localized values
91 - use own formated string for all non localized values
92 - seperate "Installed" flag for filters
93 4) set right values for "Order" property of filters
94 5) support for ContentHandler
95 draft 6) reactivate old filter names
96 ??? draft 7) split xml into standard/optional => use DRAFT_SPLIT_VERSION till this version is well known!
98 #define DRAFT_SPLIT_VERSION 7
100 #define ARGUMENT_PACKAGE_STANDARD DECLARE_ASCII("-pas=") // argument for package name of standard filters
101 #define ARGUMENT_PACKAGE_ADDITIONAL DECLARE_ASCII("-paa=") // argument for package name of additional filters
102 #define ARGUMENT_WRITEABLE DECLARE_ASCII("-wri=") // argument for "writeable" [true|false]
103 #define ARGUMENT_VERSION_INPUT DECLARE_ASCII("-vin=") // argument for file version to read [1|2|3]
104 #define ARGUMENT_VERSION_OUTPUT DECLARE_ASCII("-vou=") // argument for file version to write [1|2|3]
106 #define ARGUMENTLENGTH 5 // All arguments should have the same lenght ... it's better to detect it!
107 #define ARGUMENTFOUND 0 // OUString::compareTo returns 0 if searched string match given one
109 #define WRITEABLE_ON DECLARE_ASCII("true" )
110 #define WRITEABLE_OFF DECLARE_ASCII("false")
112 #define MINARGUMENTCOUNT 5 // no optional arguments allowed yet!
114 #define LISTFILE_STANDARDTYPES "typelist_standard.txt"
115 #define LISTFILE_ADDITIONALTYPES "typelist_additional.txt"
116 #define LISTFILE_STANDARDFILTER "filterlist_standard.txt"
117 #define LISTFILE_ADDITIONALFILTER "filterlist_additional.txt"
118 #define SCPFILE_STANDARD "scp_standard.txt"
119 #define SCPFILE_ADDITIONAL "scp_additional.txt"
121 //_________________________________________________________________________________________________________________
123 //_________________________________________________________________________________________________________________
125 /*-***************************************************************************************************************/
128 FilterCache
* pFilterCache
; // pointer to configuration
129 StringHash aOldFilterNamesHash
; // converter tabel to restaurate old filter names
130 EFilterPackage ePackage
; // specify which package should be used => specify using of file name and buffer too!
131 // ::rtl::OUString sFileNameStandard ; // file name of our standard filter cfg
132 // ::rtl::OUString sFileNameAdditional ; // file name of our additional filter cfg
133 ::rtl::OUString sPackageStandard
; // package name of our standard filter cfg
134 ::rtl::OUString sPackageAdditional
; // package name of our additional filter cfg
135 ::rtl::OUStringBuffer sBufferStandard
; // buffer of our standard filter cfg
136 ::rtl::OUStringBuffer sBufferAdditional
; // buffer of our standard filter cfg
137 ::rtl::OUStringBuffer sNew2OldSCPStandard
; // setup script to convert new to old filternames (standard filter)
138 ::rtl::OUStringBuffer sNew2OldSCPAdditional
; // setup script to convert new to old filternames (additional filter)
139 ::rtl::OUStringBuffer sStandardFilterList
;
140 ::rtl::OUStringBuffer sAdditionalFilterList
;
141 ::rtl::OUStringBuffer sStandardTypeList
;
142 ::rtl::OUStringBuffer sAdditionalTypeList
;
143 sal_Bool bWriteable
; // enable/disable writable configuration items
144 sal_Int32 nVersionInput
; // format version of input xml file
145 sal_Int32 nVersionOutput
; // format version of output xcd file
147 sal_Int32 nOriginalTypes
;
148 sal_Int32 nOriginalFilters
;
149 sal_Int32 nOriginalDetectors
;
150 sal_Int32 nOriginalLoaders
;
151 sal_Int32 nOriginalContentHandlers
;
153 sal_Int32 nWrittenTypes
;
154 sal_Int32 nWrittenFilters
;
155 sal_Int32 nWrittenDetectors
;
156 sal_Int32 nWrittenLoaders
;
157 sal_Int32 nWrittenContentHandlers
;
160 /*-***************************************************************************************************************/
161 class XCDGenerator
: public Application
163 //*************************************************************************************************************
167 //*************************************************************************************************************
169 void impl_printCopyright ( ); // print copyright to stdout :-)
170 void impl_printSyntax ( ); // print help to stout for user
171 void impl_parseCommandLine ( AppMember
& rMember
); // parse command line arguments and fill given struct
173 void impl_generateXCD ( ); // generate all xcd files by using current configuration
174 void impl_generateCopyright ( ); // generate copyrights
175 void impl_generateTypeTemplate ( ); // generate templates ...
176 void impl_generateFilterTemplate ( );
177 void impl_generateDetectorTemplate ( );
178 void impl_generateLoaderTemplate ( );
179 void impl_generateTypeSet ( ); // generate sets
180 void impl_generateFilterSet ( );
181 void impl_generateDetectorSet ( );
182 void impl_generateLoaderSet ( );
183 void impl_generateDefaults ( ); // generate defaults
184 void impl_generateContentHandlerTemplate ( );
185 void impl_generateContentHandlerSet ( );
186 void impl_generateFilterFlagTemplate ( const ::rtl::OUString
& sName
, // helper to write atomic elements
188 const ::rtl::OString
& sDescription
= ::rtl::OString() );
189 void impl_generateIntProperty ( ::rtl::OUStringBuffer
& sXCD
,
190 const ::rtl::OUString
& sName
,
192 void impl_generateBoolProperty ( ::rtl::OUStringBuffer
& sXCD
,
193 const ::rtl::OUString
& sName
,
195 void impl_generateStringProperty ( ::rtl::OUStringBuffer
& sXCD
,
196 const ::rtl::OUString
& sName
,
197 const ::rtl::OUString
& sValue
);
198 void impl_generateStringListProperty ( ::rtl::OUStringBuffer
& sXCD
,
199 const ::rtl::OUString
& sName
,
200 const ::framework::StringList
& lValue
);
201 void impl_generateUINamesProperty ( ::rtl::OUStringBuffer
& sXCD
,
202 const ::rtl::OUString
& sName
,
203 const StringHash
& lUINames
);
204 ::rtl::OUString
impl_getOldFilterName ( const ::rtl::OUString
& sNewName
); // convert filter names to old format
206 static void impl_classifyType ( const AppMember
& rData
,
207 const ::rtl::OUString
& sTypeName
,
208 EFilterPackage
& ePackage
); // classify type as STANDARD or ADDITIONAL one
209 static void impl_classifyFilter ( const AppMember
& rData
,
210 const ::rtl::OUString
& sFilterName
,
211 EFilterPackage
& ePackage
,
212 sal_Int32
& nOrder
); // classify filter as STANDARD or ADDITIONAL filter, set order of standard filter too
213 static ::rtl::OUString
impl_encodeSpecialSigns ( const ::rtl::OUString
& sValue
); // encode strings for xml
214 static sal_Unicode
impl_defineSeperator ( const ::framework::StringList
& lList
); // search seperator for lists
215 static void impl_initFilterHashNew2Old ( StringHash
& aHash
); // initialize converter table to restaurate old filter names
216 static void impl_orderAlphabetical ( css::uno::Sequence
< ::rtl::OUString
>& lList
); // sort stringlist of internal type-, filter- ... names in alphabetical order to generate xcd files everytime in the same way
217 static sal_Bool
impl_isUsAsciiAlphaDigit ( sal_Unicode c
,
218 sal_Bool bDigitAllowed
= sal_True
);
219 static ::rtl::OUString
impl_encodeSetName ( const ::rtl::OUString
& rSource
);
221 //*************************************************************************************************************
225 }; // class XCDGenerator
227 //_________________________________________________________________________________________________________________
229 //_________________________________________________________________________________________________________________
231 XCDGenerator gGenerator
;
233 //*****************************************************************************************************************
234 void XCDGenerator::Main()
237 // impl_printCopyright();
239 // Init global servicemanager and set it.
240 // It's neccessary for other services ... e.g. configuration.
241 ServiceManager aManager
;
242 ::comphelper::setProcessServiceFactory( aManager
.getGlobalUNOServiceManager() );
243 ::utl::setProcessServiceFactory ( aManager
.getGlobalUNOServiceManager() );
245 // Get optional commands from command line.
246 impl_parseCommandLine( m_aData
);
248 // initialize converter table to match new to old filter names!
249 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
251 XCDGenerator::impl_initFilterHashNew2Old( m_aData
.aOldFilterNamesHash
);
254 // Create access to current set filter configuration.
255 // Attention: Please use it for a full fat office installation only!!
256 // We need an installation with ALL filters.
257 // Member m_pData is used in some impl-methods directly ...
258 m_aData
.pFilterCache
= new FilterCache( m_aData
.nVersionInput
, CONFIG_MODE_ALL_LOCALES
);
260 // Get some statistic informations of current filled filter cache ... (e.g. count of current activae filters)
261 // because we need it to check if all filters are converted and written to disk.
262 // May be it's possible to lose some of them during convertion!!!
263 m_aData
.nOriginalTypes
= m_aData
.pFilterCache
->getAllTypeNames().getLength() ;
264 m_aData
.nOriginalFilters
= m_aData
.pFilterCache
->getAllFilterNames().getLength() ;
265 m_aData
.nOriginalDetectors
= m_aData
.pFilterCache
->getAllDetectorNames().getLength() ;
266 m_aData
.nOriginalLoaders
= m_aData
.pFilterCache
->getAllLoaderNames().getLength() ;
267 if( m_aData
.nVersionInput
>= 5 )
269 m_aData
.nOriginalContentHandlers
= m_aData
.pFilterCache
->getAllContentHandlerNames().getLength() ;
272 // Start generation of xcd file(s).
275 // Warn programmer if some items couldn't written to file!
276 LOG_ASSERT2( m_aData
.nOriginalTypes
!= m_aData
.nWrittenTypes
, "XCDGenerator::Main()", "Generated xcd file could be invalid ... because I miss some types!" )
277 LOG_ASSERT2( m_aData
.nOriginalFilters
!= m_aData
.nWrittenFilters
, "XCDGenerator::Main()", "Generated xcd file could be invalid ... because I miss some filters!" )
278 LOG_ASSERT2( m_aData
.nOriginalDetectors
!= m_aData
.nWrittenDetectors
, "XCDGenerator::Main()", "Generated xcd file could be invalid ... because I miss some detectors!" )
279 LOG_ASSERT2( m_aData
.nOriginalLoaders
!= m_aData
.nWrittenLoaders
, "XCDGenerator::Main()", "Generated xcd file could be invalid ... because I miss some loaders!" )
282 delete m_aData
.pFilterCache
;
283 m_aData
.pFilterCache
= NULL
;
286 /*-************************************************************************************************************//**
287 @short print some info messages to stderr
288 @descr We must show an copyright or help for using this file.
289 This two methods do that.
297 *//*-*************************************************************************************************************/
298 void XCDGenerator::impl_printCopyright()
300 fprintf( stderr
, "\n(c) Copyright by Sun microsystems, 2001\n" );
303 //*****************************************************************************************************************
304 void XCDGenerator::impl_printSyntax()
306 // It's not possible to print it out to stdout in a svdem binary :-(
307 // So we show an assert.
308 ::rtl::OStringBuffer
sBuffer( 500 );
309 sBuffer
.append( "\nusing: xml2xcd -fis=<file standard filter> -fia=<file additional filter> -pas=<package standard filter> -paa=<package additional filter> -vin=<version input> -vou=<version output> [-wri=<true|false>]\n\n" );
310 sBuffer
.append( "\tneccessary parameters:\n" );
311 sBuffer
.append( "\t\t-fis\tname of output file in system notation\n" );
312 sBuffer
.append( "\t\t-fia\tname of output file in system notation\n" );
313 sBuffer
.append( "\t\t-pas\tpackage of standard filters\n" );
314 sBuffer
.append( "\t\t-paa\tpackage of additional filters\n" );
315 sBuffer
.append( "\t\t-vin\tformat version of input xml file\n" );
316 sBuffer
.append( "\t\t-vou\tformat version of generated xcd file\n\n" );
317 sBuffer
.append( "\toptional parameters:\n" );
318 sBuffer
.append( "\t\t-wri\tconfig items should be writeable ... [true|false]\n" );
319 LOG_ERROR( "", sBuffer
.makeStringAndClear() )
322 /*-************************************************************************************************************//**
323 @short analyze command line arguments
324 @descr Created binary accept different command line arguments. These parameters
325 regulate creation of xcd file. Follow arguments are supported:
326 "-fis=<filename of standard xcd>"
327 "-fia=<filename of additional xcd>"
328 "-wri=<writeable>[true|false]"
329 "-vin=<version of input file>[1|2|3]"
330 "-vou=<version of output file>[1|2|3]"
334 @param "rMember", reference to struct of global application member to fill arguments in it
335 @return right filled member struct or unchanged struct if an error occure!
337 @onerror We do nothing - or warn programmer!
338 *//*-*************************************************************************************************************/
339 void XCDGenerator::impl_parseCommandLine( AppMember
& rMember
)
341 ::vos::OStartupInfo aInfo
;
342 ::rtl::OUString sArgument
;
343 sal_Int32 nArgument
= 0 ;
344 sal_Int32 nCount
= aInfo
.getCommandArgCount();
345 sal_Int32 nMinCount
= 0 ;
347 while( nArgument
<nCount
)
349 aInfo
.getCommandArg( nArgument
, sArgument
);
351 //_____________________________________________________________________________________________________
352 // look for "-fis=..."
353 if( sArgument.compareTo( ARGUMENT_FILENAME_STANDARD, ARGUMENTLENGTH ) == ARGUMENTFOUND )
355 rMember.sFileNameStandard = sArgument.copy( ARGUMENTLENGTH, sArgument.getLength()-ARGUMENTLENGTH );
359 //_____________________________________________________________________________________________________
360 // look for "-fia=..."
361 if( sArgument.compareTo( ARGUMENT_FILENAME_ADDITIONAL, ARGUMENTLENGTH ) == ARGUMENTFOUND )
363 rMember.sFileNameAdditional = sArgument.copy( ARGUMENTLENGTH, sArgument.getLength()-ARGUMENTLENGTH );
368 //_____________________________________________________________________________________________________
369 // look for "-pas=..."
370 if( sArgument
.compareTo( ARGUMENT_PACKAGE_STANDARD
, ARGUMENTLENGTH
) == ARGUMENTFOUND
)
372 rMember
.sPackageStandard
= sArgument
.copy( ARGUMENTLENGTH
, sArgument
.getLength()-ARGUMENTLENGTH
);
376 //_____________________________________________________________________________________________________
377 // look for "-paa=..."
378 if( sArgument
.compareTo( ARGUMENT_PACKAGE_ADDITIONAL
, ARGUMENTLENGTH
) == ARGUMENTFOUND
)
380 rMember
.sPackageAdditional
= sArgument
.copy( ARGUMENTLENGTH
, sArgument
.getLength()-ARGUMENTLENGTH
);
384 //_____________________________________________________________________________________________________
385 // look for "-wri=..."
386 if( sArgument
.compareTo( ARGUMENT_WRITEABLE
, ARGUMENTLENGTH
) == ARGUMENTFOUND
)
388 ::rtl::OUString sWriteable
= sArgument
.copy( ARGUMENTLENGTH
, sArgument
.getLength()-ARGUMENTLENGTH
);
389 if( sWriteable
== WRITEABLE_ON
)
391 rMember
.bWriteable
= sal_True
;
395 rMember
.bWriteable
= sal_False
;
399 //_____________________________________________________________________________________________________
400 // look for "-vin=..."
401 if( sArgument
.compareTo( ARGUMENT_VERSION_INPUT
, ARGUMENTLENGTH
) == ARGUMENTFOUND
)
403 ::rtl::OUString sVersion
= sArgument
.copy( ARGUMENTLENGTH
, sArgument
.getLength()-ARGUMENTLENGTH
);
404 rMember
.nVersionInput
= sVersion
.toInt32();
407 //_____________________________________________________________________________________________________
408 // look for "-vou=..."
409 if( sArgument
.compareTo( ARGUMENT_VERSION_OUTPUT
, ARGUMENTLENGTH
) == ARGUMENTFOUND
)
411 ::rtl::OUString sVersion
= sArgument
.copy( ARGUMENTLENGTH
, sArgument
.getLength()-ARGUMENTLENGTH
);
412 rMember
.nVersionOutput
= sVersion
.toInt32();
419 // Show help if user don't call us right!
420 if( nMinCount
!= MINARGUMENTCOUNT
)
427 /*-************************************************************************************************************//**
428 @short regulate generation of complete xcd file(s)
429 @descr This method is the toppest one and implement the global structure of generated xcd file(s).
430 We create a unicode string buffer for complete xcd file in memory ...
431 use different helper methods to fill it ...
432 and write it to disk at the end of this method!
434 @seealso struct AppMember
440 *//*-*************************************************************************************************************/
441 void XCDGenerator::impl_generateXCD()
443 impl_generateCopyright();
446 m_aData
.sBufferStandard
.appendAscii ( "\n<!-- PLEASE DON'T CHANGE TEMPLATES OR FILE FORMAT BY HAND! USE \"XML2XCD.EXE\" TO DO THAT. THANKS. -->\n\n" );
447 m_aData
.sBufferStandard
.appendAscii ( "<!DOCTYPE schema:component SYSTEM \"../../../../schema/schema.description.dtd\">\n" );
448 m_aData
.sBufferStandard
.appendAscii ( "<schema:component cfg:name=\"" );
449 m_aData
.sBufferStandard
.append ( m_aData
.sPackageStandard
);
450 m_aData
.sBufferStandard
.appendAscii ( "\" cfg:package=\"org.openoffice.Office\" xml:lang=\"en-US\" xmlns:schema=\"http://openoffice.org/2000/registry/schema/description\" xmlns:default=\"http://openoffice.org/2000/registry/schema/default\" xmlns:cfg=\"http://openoffice.org/2000/registry/instance\">\n" );
451 m_aData
.sBufferStandard
.appendAscii ( "\t<schema:templates>\n" );
453 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
455 m_aData
.sBufferAdditional
.appendAscii ( "\n<!-- PLEASE DON'T CHANGE TEMPLATES OR FILE FORMAT BY HAND! USE \"XML2XCD.EXE\" TO DO THAT. THANKS. -->\n\n" );
456 m_aData
.sBufferAdditional
.appendAscii ( "<!DOCTYPE schema:component SYSTEM \"../../../../schema/schema.description.dtd\">\n" );
457 m_aData
.sBufferAdditional
.appendAscii ( "<schema:component cfg:name=\"" );
458 m_aData
.sBufferAdditional
.append ( m_aData
.sPackageAdditional
);
459 m_aData
.sBufferAdditional
.appendAscii ( "\" cfg:package=\"org.openoffice.Office\" xml:lang=\"en-US\" xmlns:schema=\"http://openoffice.org/2000/registry/schema/description\" xmlns:default=\"http://openoffice.org/2000/registry/schema/default\" xmlns:cfg=\"http://openoffice.org/2000/registry/instance\">\n" );
460 m_aData
.sBufferAdditional
.appendAscii ( "\t<schema:import cfg:name=\"" );
461 m_aData
.sBufferAdditional
.append ( m_aData
.sPackageStandard
);
462 m_aData
.sBufferAdditional
.appendAscii ( "\"/>\n" );
465 // Follow ...generate... methods to nothing for additional filters!
466 impl_generateTypeTemplate ();
467 impl_generateFilterTemplate ();
468 impl_generateDetectorTemplate();
469 if( m_aData
.nVersionOutput
>= 5 )
471 impl_generateContentHandlerTemplate ();
473 impl_generateLoaderTemplate ();
475 m_aData
.sBufferStandard
.appendAscii ( "\t</schema:templates>\n" );
476 m_aData
.sBufferStandard
.appendAscii ( "<schema:schema cfg:localized=\"false\">\n" );
478 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
480 m_aData
.sBufferAdditional
.appendAscii( "\t<schema:schema cfg:localized=\"false\">\n" );
483 impl_generateTypeSet ();
484 impl_generateFilterSet ();
485 impl_generateDetectorSet ();
486 if( m_aData
.nVersionInput
>= 5 )
488 impl_generateContentHandlerSet ();
490 impl_generateLoaderSet ();
491 impl_generateDefaults ();
493 m_aData
.sBufferStandard
.appendAscii ( "\t</schema:schema>\n" );
494 m_aData
.sBufferStandard
.appendAscii ( "</schema:component>\n" );
496 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
498 m_aData
.sBufferAdditional
.appendAscii ( "\t</schema:schema>\n" );
499 m_aData
.sBufferAdditional
.appendAscii ( "</schema:component>\n" );
502 ::rtl::OUString sFileName
= m_aData
.sPackageStandard
;
503 sFileName
+= DECLARE_ASCII(".xcd") ;
505 WRITE_LOGFILE( U2B( sFileName
) , U2B(m_aData
.sBufferStandard
.makeStringAndClear() ))
506 WRITE_LOGFILE( LISTFILE_STANDARDFILTER
, U2B(m_aData
.sStandardFilterList
.makeStringAndClear() ))
507 WRITE_LOGFILE( LISTFILE_STANDARDTYPES
, U2B(m_aData
.sStandardTypeList
.makeStringAndClear() ))
508 WRITE_LOGFILE( SCPFILE_STANDARD
, U2B(m_aData
.sNew2OldSCPStandard
.makeStringAndClear() ))
510 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
512 sFileName
= m_aData
.sPackageAdditional
;
513 sFileName
+= DECLARE_ASCII(".xcd") ;
515 WRITE_LOGFILE( U2B(sFileName
) , U2B(m_aData
.sBufferAdditional
.makeStringAndClear() ))
516 WRITE_LOGFILE( LISTFILE_ADDITIONALFILTER
, U2B(m_aData
.sAdditionalFilterList
.makeStringAndClear() ))
517 WRITE_LOGFILE( LISTFILE_ADDITIONALTYPES
, U2B(m_aData
.sAdditionalTypeList
.makeStringAndClear() ))
518 WRITE_LOGFILE( SCPFILE_ADDITIONAL
, U2B(m_aData
.sNew2OldSCPAdditional
.makeStringAndClear() ))
522 //*****************************************************************************************************************
523 void XCDGenerator::impl_generateCopyright()
525 m_aData
.sBufferStandard
.appendAscii( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" );
526 m_aData
.sBufferStandard
.appendAscii( "<!-- \n" );
527 m_aData
.sBufferStandard
.appendAscii( " DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n" );
528 m_aData
.sBufferStandard
.appendAscii( "\n" );
529 m_aData
.sBufferStandard
.appendAscii( " Copyright 2008 by Sun Microsystems, Inc.\n" );
530 m_aData
.sBufferStandard
.appendAscii( "\n" );
531 m_aData
.sBufferStandard
.appendAscii( " OpenOffice.org - a multi-platform office productivity suite\n" );
532 m_aData
.sBufferStandard
.appendAscii( "\n" );
533 m_aData
.sBufferStandard
.appendAscii( " $RCSfile: xml2xcd.cxx,v $\n" );
534 m_aData
.sBufferStandard
.appendAscii( "\n" );
535 m_aData
.sBufferStandard
.appendAscii( " $Revision: 1.12 $\n" );
536 m_aData
.sBufferStandard
.appendAscii( "\n" );
537 m_aData
.sBufferStandard
.appendAscii( " This file is part of OpenOffice.org.\n" );
538 m_aData
.sBufferStandard
.appendAscii( "\n" );
539 m_aData
.sBufferStandard
.appendAscii( " OpenOffice.org is free software: you can redistribute it and/or modify\n" );
540 m_aData
.sBufferStandard
.appendAscii( " it under the terms of the GNU Lesser General Public License version 3\n" );
541 m_aData
.sBufferStandard
.appendAscii( " only, as published by the Free Software Foundation.\n" );
542 m_aData
.sBufferStandard
.appendAscii( "\n" );
543 m_aData
.sBufferStandard
.appendAscii( " OpenOffice.org is distributed in the hope that it will be useful,\n" );
544 m_aData
.sBufferStandard
.appendAscii( " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" );
545 m_aData
.sBufferStandard
.appendAscii( " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" );
546 m_aData
.sBufferStandard
.appendAscii( " GNU Lesser General Public License version 3 for more details\n" );
547 m_aData
.sBufferStandard
.appendAscii( " (a copy is included in the LICENSE file that accompanied this code).\n" );
548 m_aData
.sBufferStandard
.appendAscii( "\n" );
549 m_aData
.sBufferStandard
.appendAscii( " You should have received a copy of the GNU Lesser General Public License\n");
550 m_aData
.sBufferStandard
.appendAscii( " version 3 along with OpenOffice.org. If not, see\n" );
551 m_aData
.sBufferStandard
.appendAscii( " <http://www.openoffice.org/license.html>\n" );
552 m_aData
.sBufferStandard
.appendAscii( " for a copy of the LGPLv3 License.\n" );
553 m_aData
.sBufferStandard
.appendAscii( "\n" );
554 m_aData
.sBufferStandard
.appendAscii( "-->\n" );
556 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
558 m_aData
.sBufferAdditional
.appendAscii( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" );
559 m_aData
.sBufferAdditional
.appendAscii( "<!-- \n" );
560 m_aData
.sBufferAdditional
.appendAscii( "\n" );
561 m_aData
.sBufferAdditional
.appendAscii( " DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n" );
562 m_aData
.sBufferAdditional
.appendAscii( "\n" );
563 m_aData
.sBufferAdditional
.appendAscii( " Copyright 2008 by Sun Microsystems, Inc.\n" );
564 m_aData
.sBufferAdditional
.appendAscii( "\n" );
565 m_aData
.sBufferAdditional
.appendAscii( " OpenOffice.org - a multi-platform office productivity suite\n" );
566 m_aData
.sBufferAdditional
.appendAscii( "\n" );
567 m_aData
.sBufferAdditional
.appendAscii( " $RCSfile: xml2xcd.cxx,v $\n" );
568 m_aData
.sBufferAdditional
.appendAscii( "\n" );
569 m_aData
.sBufferAdditional
.appendAscii( " $Revision: 1.12 $\n" );
570 m_aData
.sBufferAdditional
.appendAscii( "\n" );
571 m_aData
.sBufferAdditional
.appendAscii( " This file is part of OpenOffice.org.\n" );
572 m_aData
.sBufferAdditional
.appendAscii( "\n" );
573 m_aData
.sBufferAdditional
.appendAscii( " OpenOffice.org is free software: you can redistribute it and/or modify\n" );
574 m_aData
.sBufferAdditional
.appendAscii( " it under the terms of the GNU Lesser General Public License version 3\n" );
575 m_aData
.sBufferAdditional
.appendAscii( " only, as published by the Free Software Foundation.\n" );
576 m_aData
.sBufferAdditional
.appendAscii( "\n" );
577 m_aData
.sBufferAdditional
.appendAscii( " OpenOffice.org is distributed in the hope that it will be useful,\n" );
578 m_aData
.sBufferAdditional
.appendAscii( " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" );
579 m_aData
.sBufferAdditional
.appendAscii( " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" );
580 m_aData
.sBufferAdditional
.appendAscii( " GNU Lesser General Public License version 3 for more details\n" );
581 m_aData
.sBufferAdditional
.appendAscii( " (a copy is included in the LICENSE file that accompanied this code).\n" );
582 m_aData
.sBufferAdditional
.appendAscii( "\n" );
583 m_aData
.sBufferAdditional
.appendAscii( " You should have received a copy of the GNU Lesser General Public License\n");
584 m_aData
.sBufferAdditional
.appendAscii( " version 3 along with OpenOffice.org. If not, see\n" );
585 m_aData
.sBufferAdditional
.appendAscii( " <http://www.openoffice.org/license.html>\n" );
586 m_aData
.sBufferAdditional
.appendAscii( " for a copy of the LGPLv3 License.\n" );
587 m_aData
.sBufferAdditional
.appendAscii( "\n" );
588 m_aData
.sBufferAdditional
.appendAscii( "-->\n" );
592 //*****************************************************************************************************************
593 void XCDGenerator::impl_generateTypeTemplate()
595 //_________________________________________________________________________________________________________________
596 if( m_aData
.nVersionOutput
==1 || m_aData
.nVersionOutput
==2 )
598 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"Type\">\n" );
600 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Preferred\" cfg:type=\"boolean\" cfg:writable=\"" );
601 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
602 m_aData
.sBufferStandard
.appendAscii("\t\t\t\t<schema:documentation>\n" );
603 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the preferred type for an extension if more then one match given URL</schema:description>\n" );
604 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
605 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>false</default:data>\n" );
606 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
608 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"UIName\" cfg:type=\"string\" cfg:localized=\"true\" cfg:writable=\"" );
609 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
610 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
611 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the external name of this type</schema:description>\n" );
612 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
613 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
615 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"MediaType\" cfg:type=\"string\" cfg:writable=\"" );
616 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
617 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
618 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the mime type </schema:description>\n" );
619 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
620 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
622 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"ClipboardFormat\" cfg:type=\"string\" cfg:writable=\"" );
623 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
624 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
625 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the clipboard format name</schema:description>\n" );
626 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
627 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
629 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"URLPattern\" cfg:type=\"string\" cfg:derivedBy=\"list\" cfg:writable=\"" );
630 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
631 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
632 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the patterns used for URLs. This type is only relevant for HTTP, FTP etc. and is used for internal URL formats like private:factory etc.</schema:description>\n" );
633 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
634 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
636 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Extensions\" cfg:type=\"string\" cfg:derivedBy=\"list\" cfg:writable=\"" );
637 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
638 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
639 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the possible file extensions.</schema:description>\n" );
640 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
641 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
643 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"DocumentIconID\" cfg:type=\"int\" cfg:writable=\"" );
644 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
645 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
646 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the document icon ID of this type</schema:description>\n" );
647 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
648 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>0</default:data>\n" );
649 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
651 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
653 //_________________________________________________________________________________________________________________
654 else if( m_aData
.nVersionOutput
>=3 )
656 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"Type\">\n" );
658 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"UIName\" cfg:type=\"string\" cfg:localized=\"true\" cfg:writable=\"" );
659 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
660 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
661 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the external name of this type</schema:description>\n" );
662 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
663 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
665 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Data\" cfg:type=\"string\" cfg:writable=\"" );
666 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
667 m_aData
.sBufferStandard
.appendAscii("\t\t\t\t<schema:documentation>\n" );
668 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Containes all data of a type as an own formated string.{Preferred, MediaType, ClipboardFormat, URLPattern, Extensions, DocumentIconID}</schema:description>\n" );
669 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
670 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>false</default:data>\n" );
671 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
673 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
677 //*****************************************************************************************************************
678 void XCDGenerator::impl_generateFilterTemplate()
680 //_________________________________________________________________________________________________________________
681 if( m_aData
.nVersionOutput
==1 || m_aData
.nVersionOutput
==2 )
683 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"Filter\">\n" );
685 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Installed\" cfg:type=\"boolean\" cfg:writable=\"" );
686 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
687 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
688 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Make it possible to enable or disable filter by setup!</schema:description>\n" );
689 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
690 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>false</default:data>\n" );
691 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
693 if( m_aData
.nVersionOutput
==2 )
695 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Order\" cfg:type=\"int\" cfg:writable=\"" );
696 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
697 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
698 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies order of filters for relevant module; don't used for default filter!</schema:description>\n" );
699 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
700 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>0</default:data>\n" );
701 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
704 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"UIName\" cfg:type=\"string\" cfg:localized=\"true\" cfg:writable=\"" );
705 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
706 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
707 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the external name of the filter which is displayed at the user interface (dialog).</schema:description>\n" );
708 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
709 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
711 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Type\" cfg:type=\"string\" cfg:writable=\"" );
712 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
713 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
714 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the relative type key name of the filter, e.g. Type/T1</schema:description>\n" );
715 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
716 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
718 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"DocumentService\" cfg:type=\"string\" cfg:writable=\"" );
719 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
720 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
721 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the name of the UNO service to implement the document.</schema:description>\n" );
722 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
723 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
725 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"FilterService\" cfg:type=\"string\" cfg:writable=\"" );
726 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
727 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
728 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the name of the UNO service for importing the document.</schema:description>\n" );
729 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
730 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
732 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Flags\" cfg:type=\"int\" cfg:writable=\"" );
733 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
734 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
735 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the properties of the filter</schema:description>\n" );
736 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
737 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:type-info>\n" );
738 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:value-names>\n" );
739 impl_generateFilterFlagTemplate( FILTERFLAGNAME_IMPORT
, FILTERFLAG_IMPORT
, "mark filter for import" );
740 impl_generateFilterFlagTemplate( FILTERFLAGNAME_EXPORT
, FILTERFLAG_EXPORT
, "mark filter for export" );
741 impl_generateFilterFlagTemplate( FILTERFLAGNAME_TEMPLATE
, FILTERFLAG_TEMPLATE
);
742 impl_generateFilterFlagTemplate( FILTERFLAGNAME_INTERNAL
, FILTERFLAG_INTERNAL
);
743 impl_generateFilterFlagTemplate( FILTERFLAGNAME_TEMPLATEPATH
, FILTERFLAG_TEMPLATEPATH
);
744 impl_generateFilterFlagTemplate( FILTERFLAGNAME_OWN
, FILTERFLAG_OWN
);
745 impl_generateFilterFlagTemplate( FILTERFLAGNAME_ALIEN
, FILTERFLAG_ALIEN
);
746 impl_generateFilterFlagTemplate( FILTERFLAGNAME_USESOPTIONS
, FILTERFLAG_USESOPTIONS
);
747 impl_generateFilterFlagTemplate( FILTERFLAGNAME_DEFAULT
, FILTERFLAG_DEFAULT
, "most important filter, if more then ones available" );
748 impl_generateFilterFlagTemplate( FILTERFLAGNAME_NOTINFILEDIALOG
, FILTERFLAG_NOTINFILEDIALOG
, "don't show it in file dialogs!" );
749 impl_generateFilterFlagTemplate( FILTERFLAGNAME_NOTINCHOOSER
, FILTERFLAG_NOTINCHOOSER
, "don't show it in chooser!" );
750 impl_generateFilterFlagTemplate( FILTERFLAGNAME_ASYNCHRON
, FILTERFLAG_ASYNCHRON
);
751 impl_generateFilterFlagTemplate( FILTERFLAGNAME_NOTINSTALLED
, FILTERFLAG_NOTINSTALLED
, "set, if the filter is not installed, but available on CD" );
752 impl_generateFilterFlagTemplate( FILTERFLAGNAME_CONSULTSERVICE
, FILTERFLAG_CONSULTSERVICE
, "set, if the filter is not installed and not available an CD" );
753 impl_generateFilterFlagTemplate( FILTERFLAGNAME_3RDPARTYFILTER
, FILTERFLAG_3RDPARTYFILTER
, "must set, if the filter is an external one" );
754 impl_generateFilterFlagTemplate( FILTERFLAGNAME_PACKED
, FILTERFLAG_PACKED
);
755 impl_generateFilterFlagTemplate( FILTERFLAGNAME_SILENTEXPORT
, FILTERFLAG_SILENTEXPORT
);
756 impl_generateFilterFlagTemplate( FILTERFLAGNAME_PREFERED
, FILTERFLAG_PREFERED
);
757 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t</schema:value-names>\n" );
758 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:constraints xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\"/>\n" );
759 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:type-info>\n" );
760 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>0</default:data>\n" );
761 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
763 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"UserData\" cfg:type=\"string\" cfg:derivedBy=\"list\" cfg:writable=\"" );
764 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
765 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
766 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the user-defined data</schema:description>\n" );
767 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
768 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data/>\n" );
769 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
771 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"FileFormatVersion\" cfg:type=\"int\" cfg:writable=\"" );
772 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
773 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<!--This should be removed to UserData later-->\n" );
774 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
775 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the file format version of the filter</schema:description>\n" );
776 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
777 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>0</default:data>\n" );
778 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
780 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"TemplateName\" cfg:type=\"string\" cfg:writable=\"" );
781 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
782 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<!--This should be removed to UserData later-->\n" );
783 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
784 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the template used for importing the file with the specified filter.</schema:description>\n" );
785 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t</schema:documentation>\n" );
786 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
788 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
789 //_________________________________________________________________________________________________________________
791 else if( m_aData
.nVersionOutput
>=3 )
793 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"Filter\">\n" );
795 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Installed\" cfg:type=\"boolean\" cfg:writable=\"" );
796 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
797 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
798 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Make it possible to enable or disable filter by setup!</schema:description>\n" );
799 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
800 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<default:data>false</default:data>\n" );
801 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
803 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"UIName\" cfg:type=\"string\" cfg:localized=\"true\" cfg:writable=\"" );
804 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
805 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
806 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the external name of the filter which is displayed at the user interface (dialog).</schema:description>\n" );
807 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
808 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
810 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Data\" cfg:type=\"string\" cfg:writable=\"" );
811 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
812 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
813 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>All data of filter written in own format. {Order, OldName, Type, DocumentService, FilterService, Flags, UserData, FilteFormatVersion, TemplateName}</schema:description>\n" );
814 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
815 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
817 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
821 //*****************************************************************************************************************
822 void XCDGenerator::impl_generateFilterFlagTemplate( const ::rtl::OUString
& sName
, sal_Int32 nValue
, const ::rtl::OString
& sDescription
)
824 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t\t<schema:named-value name=\"" );
825 m_aData
.sBufferStandard
.append ( sName
);
826 m_aData
.sBufferStandard
.appendAscii( "\" value=\"" );
827 m_aData
.sBufferStandard
.append ( nValue
);
828 m_aData
.sBufferStandard
.appendAscii( "\"" );
830 if( sDescription
.getLength() > 0 )
832 m_aData
.sBufferStandard
.appendAscii( ">\n\t\t\t\t\t\t\t<schema:description>" );
833 m_aData
.sBufferStandard
.appendAscii( sDescription
);
834 m_aData
.sBufferStandard
.appendAscii( "</schema:description>\n" );
835 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t\t</schema:named-value>\n" );
839 m_aData
.sBufferStandard
.appendAscii( "/>\n" );
843 //*****************************************************************************************************************
844 void XCDGenerator::impl_generateDetectorTemplate()
846 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"DetectService\">\n" );
847 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Types\" cfg:type=\"string\" cfg:derivedBy=\"list\" cfg:writable=\"" );
848 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
849 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
850 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>List of types which the service has registered for.</schema:description>\n" );
851 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
852 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
853 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
856 //*****************************************************************************************************************
857 void XCDGenerator::impl_generateLoaderTemplate()
859 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"FrameLoader\">\n" );
860 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"UIName\" cfg:type=\"string\" cfg:localized=\"true\" cfg:writable=\"" );
861 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
862 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
863 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>Specifies the external name of the filter which is displayed at the user interface (dialog).</schema:description>\n" );
864 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
865 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
866 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Types\" cfg:type=\"string\" cfg:derivedBy=\"list\" cfg:writable=\"" );
867 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
868 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
869 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>List of types which the service has registered for.</schema:description>\n" );
870 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
871 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
872 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
875 //*****************************************************************************************************************
876 void XCDGenerator::impl_generateContentHandlerTemplate()
878 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:group cfg:name=\"ContentHandler\">\n" );
879 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<schema:value cfg:name=\"Types\" cfg:type=\"string\" cfg:derivedBy=\"list\" cfg:writable=\"" );
880 m_aData
.sBufferStandard
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
881 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t<schema:documentation>\n" );
882 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t\t<schema:description>List of types which could be handled by this service.</schema:description>\n" );
883 m_aData
.sBufferStandard
.appendAscii( "\t\t\t\t</schema:documentation>\n" );
884 m_aData
.sBufferStandard
.appendAscii( "\t\t\t</schema:value>\n" );
885 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:group>\n" );
888 //*****************************************************************************************************************
889 void XCDGenerator::impl_generateTypeSet()
891 if( m_aData
.pFilterCache
->hasTypes() == sal_False
)
893 // generate empty set!
894 m_aData
.sBufferStandard
.appendAscii ( "\t<schema:set cfg:name=\"Types\" cfg:element-type=\"Type\"/>\n" );
896 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
898 m_aData
.sBufferAdditional
.appendAscii( "\t<schema:set cfg:name=\"Types\" cfg:element-type=\"Type\" cfg:component=\"" );
899 m_aData
.sBufferAdditional
.append ( m_aData
.sPackageStandard
);
900 m_aData
.sBufferAdditional
.appendAscii( "\"/>\n" );
905 // generate filled set
907 m_aData
.sBufferStandard
.appendAscii ( "\t<schema:set cfg:name=\"Types\" cfg:element-type=\"Type\">\n" );
909 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
911 m_aData
.sBufferAdditional
.appendAscii( "\t<schema:set cfg:name=\"Types\" cfg:element-type=\"Type\" cfg:component=\"" );
912 m_aData
.sBufferAdditional
.append ( m_aData
.sPackageStandard
);
913 m_aData
.sBufferAdditional
.appendAscii( "\">\n" );
916 css::uno::Sequence
< ::rtl::OUString
> lNames
= m_aData
.pFilterCache
->getAllTypeNames();
917 css::uno::Sequence
< ::rtl::OUString
> lEncNames ( lNames
) ;
918 sal_Int32 nCount
= lNames
.getLength() ;
919 sal_Int32 nItem
= 0 ;
921 XCDGenerator::impl_orderAlphabetical( lNames
);
923 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
925 ::rtl::OUString sName
;
926 ::rtl::OUString sEncName
;
927 for( nItem
=0; nItem
<nCount
; ++nItem
)
929 sName
= lNames
[nItem
] ;
930 lEncNames
[nItem
] = impl_encodeSetName( sName
);
934 for( nItem
=0; nItem
<nCount
; ++nItem
)
936 ::rtl::OUString sName
= lNames
[nItem
] ;
937 FileType aItem
= m_aData
.pFilterCache
->getType( sName
);
938 EFilterPackage ePackage
;
940 ++m_aData
.nWrittenTypes
;
942 if( m_aData
.nVersionOutput
==1 || m_aData
.nVersionOutput
==2 )
944 // open set entry by using name
945 m_aData
.sBufferStandard
.appendAscii( "\t\t<default:group cfg:name=\"" );
946 m_aData
.sBufferStandard
.append ( sName
);
947 m_aData
.sBufferStandard
.appendAscii( "\">\n" );
950 impl_generateBoolProperty ( m_aData
.sBufferStandard
, SUBKEY_PREFERRED
, aItem
.bPreferred
);
951 impl_generateUINamesProperty ( m_aData
.sBufferStandard
, SUBKEY_UINAME
, aItem
.lUINames
);
952 impl_generateStringProperty ( m_aData
.sBufferStandard
, SUBKEY_MEDIATYPE
, aItem
.sMediaType
);
953 impl_generateStringProperty ( m_aData
.sBufferStandard
, SUBKEY_CLIPBOARDFORMAT
, aItem
.sClipboardFormat
);
954 impl_generateStringListProperty ( m_aData
.sBufferStandard
, SUBKEY_URLPATTERN
, aItem
.lURLPattern
);
955 impl_generateStringListProperty ( m_aData
.sBufferStandard
, SUBKEY_EXTENSIONS
, aItem
.lExtensions
);
956 impl_generateIntProperty ( m_aData
.sBufferStandard
, SUBKEY_DOCUMENTICONID
, aItem
.nDocumentIconID
);
959 m_aData
.sBufferStandard
.appendAscii( "\t\t</default:group>\n" );
961 else if( m_aData
.nVersionOutput
>= 3 )
963 ::rtl::OUString sPath
= DECLARE_ASCII("org.openoffice.Office.");
964 ::rtl::OUStringBuffer
* pXCDBuffer
= &(m_aData
.sBufferStandard
);
965 ::rtl::OUStringBuffer
* pSCPBuffer
= &(m_aData
.sNew2OldSCPStandard
);
966 ::rtl::OUStringBuffer
* pListBuffer
= &(m_aData
.sStandardTypeList
);
968 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
970 XCDGenerator::impl_classifyType( m_aData
, sName
, ePackage
);
973 case E_ADDITIONAL
: {
974 sPath
+= m_aData
.sPackageAdditional
;
975 pXCDBuffer
= &(m_aData
.sBufferAdditional
);
976 pSCPBuffer
= &(m_aData
.sNew2OldSCPAdditional
);
977 pListBuffer
= &(m_aData
.sAdditionalTypeList
);
983 sPath
+= m_aData
.sPackageStandard
;
986 sPath
+= CFG_PATH_SEPERATOR
;
987 sPath
+= DECLARE_ASCII( "Types" );
988 sPath
+= CFG_PATH_SEPERATOR
;
990 pListBuffer
->append ( sName
);
991 pListBuffer
->appendAscii( "\n" );
993 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
995 pSCPBuffer
->appendAscii( "\"" );
996 pSCPBuffer
->append ( sPath
);
997 pSCPBuffer
->append ( lNames
[nItem
] );
998 pSCPBuffer
->appendAscii( "\"\t\"" );
999 pSCPBuffer
->append ( sPath
);
1000 pSCPBuffer
->appendAscii( "Type" );
1001 pSCPBuffer
->append ( CFG_ENCODING_OPEN
);
1002 pSCPBuffer
->append ( lNames
[nItem
] );
1003 pSCPBuffer
->append ( CFG_ENCODING_CLOSE
);
1004 pSCPBuffer
->appendAscii( "\"\n" );
1006 sName
= lEncNames
[nItem
];
1007 aItem
.sName
= sName
;
1010 // open set entry by using name
1011 pXCDBuffer
->appendAscii( "\t\t<default:group cfg:name=\"" );
1012 pXCDBuffer
->append ( sName
);
1013 pXCDBuffer
->appendAscii( "\">\n" );
1016 impl_generateUINamesProperty( *pXCDBuffer
, SUBKEY_UINAME
, aItem
.lUINames
);
1017 impl_generateStringProperty ( *pXCDBuffer
, SUBKEY_DATA
, FilterCFGAccess::encodeTypeData( aItem
) );
1020 pXCDBuffer
->appendAscii( "\t\t</default:group>\n" );
1025 m_aData
.sBufferStandard
.appendAscii( "\t</schema:set>\n" );
1026 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
1028 m_aData
.sBufferAdditional
.appendAscii( "\t</schema:set>\n" );
1033 //*****************************************************************************************************************
1034 void XCDGenerator::impl_generateFilterSet()
1036 if( m_aData
.pFilterCache
->hasFilters() == sal_False
)
1038 // write empty filter set.
1039 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"Filters\" cfg:element-type=\"Filter\"/>\n" );
1040 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
1042 m_aData
.sBufferAdditional
.appendAscii( "\t<schema:set cfg:name=\"Filters\" cfg:element-type=\"Filter\" cfg:component=\"" );
1043 m_aData
.sBufferAdditional
.append ( m_aData
.sPackageStandard
);
1044 m_aData
.sBufferAdditional
.appendAscii( "\"/>\n" );
1050 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"Filters\" cfg:element-type=\"Filter\">\n" );
1051 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
1053 m_aData
.sBufferAdditional
.appendAscii( "\t<schema:set cfg:name=\"Filters\" cfg:element-type=\"Filter\" cfg:component=\"" );
1054 m_aData
.sBufferAdditional
.append ( m_aData
.sPackageStandard
);
1055 m_aData
.sBufferAdditional
.appendAscii( "\">\n" );
1058 css::uno::Sequence
< ::rtl::OUString
> lNewNames
= m_aData
.pFilterCache
->getAllFilterNames();
1059 css::uno::Sequence
< ::rtl::OUString
> lOldNames ( lNewNames
) ;
1060 css::uno::Sequence
< ::rtl::OUString
> lEncNames ( lNewNames
) ;
1061 sal_Int32 nCount
= lNewNames
.getLength() ;
1062 sal_Int32 nItem
= 0 ;
1064 XCDGenerator::impl_orderAlphabetical( lNewNames
);
1066 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1068 ::rtl::OUString sNewName
;
1069 ::rtl::OUString sOldName
;
1070 for( nItem
=0; nItem
<nCount
; ++nItem
)
1072 sNewName
= lNewNames
[nItem
] ;
1073 sOldName
= impl_getOldFilterName ( sNewName
);
1074 lOldNames
[nItem
] = sOldName
;
1075 lEncNames
[nItem
] = impl_encodeSetName ( sOldName
);
1079 for( nItem
=0; nItem
<nCount
; ++nItem
)
1081 ::rtl::OUString sName
= lNewNames
[nItem
] ;
1082 Filter aItem
= m_aData
.pFilterCache
->getFilter( lNewNames
[nItem
] ) ;
1083 EFilterPackage ePackage
;
1085 ++m_aData
.nWrittenFilters
;
1087 if( m_aData
.nVersionOutput
==1 || m_aData
.nVersionOutput
==2 )
1089 // open set node by using name
1090 m_aData
.sBufferStandard
.appendAscii( "\t\t<default:group cfg:name=\"" );
1091 m_aData
.sBufferStandard
.append ( sName
);
1092 m_aData
.sBufferStandard
.appendAscii( "\">\n" );
1096 // We generate "Installed=false" for all entries ... because it's the default for all filters.
1097 // You must work with a full office installation and change this to "true" in generated XML file!!!
1098 impl_generateBoolProperty ( m_aData
.sBufferStandard
, SUBKEY_INSTALLED
, sal_False
);
1099 impl_generateIntProperty ( m_aData
.sBufferStandard
, SUBKEY_ORDER
, aItem
.nOrder
);
1100 impl_generateStringProperty ( m_aData
.sBufferStandard
, SUBKEY_TYPE
, aItem
.sType
);
1101 impl_generateUINamesProperty ( m_aData
.sBufferStandard
, SUBKEY_UINAME
, aItem
.lUINames
);
1102 impl_generateStringProperty ( m_aData
.sBufferStandard
, SUBKEY_DOCUMENTSERVICE
, aItem
.sDocumentService
);
1103 impl_generateStringProperty ( m_aData
.sBufferStandard
, SUBKEY_FILTERSERVICE
, aItem
.sFilterService
);
1104 impl_generateIntProperty ( m_aData
.sBufferStandard
, SUBKEY_FLAGS
, aItem
.nFlags
);
1105 impl_generateStringListProperty ( m_aData
.sBufferStandard
, SUBKEY_USERDATA
, aItem
.lUserData
);
1106 impl_generateIntProperty ( m_aData
.sBufferStandard
, SUBKEY_FILEFORMATVERSION
, aItem
.nFileFormatVersion
);
1107 impl_generateStringProperty ( m_aData
.sBufferStandard
, SUBKEY_TEMPLATENAME
, aItem
.sTemplateName
);
1110 m_aData
.sBufferStandard
.appendAscii( "\t\t</default:group>\n" );
1112 else if( m_aData
.nVersionOutput
>=3 )
1114 ::rtl::OUString sPath
= DECLARE_ASCII("org.openoffice.Office.");
1115 ::rtl::OUStringBuffer
* pXCDBuffer
= &(m_aData
.sBufferStandard
);
1116 ::rtl::OUStringBuffer
* pSCPBuffer
= &(m_aData
.sNew2OldSCPStandard
);
1117 ::rtl::OUStringBuffer
* pListBuffer
= &(m_aData
.sStandardFilterList
);
1119 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
1121 XCDGenerator::impl_classifyFilter( m_aData
, sName
, ePackage
, aItem
.nOrder
);
1124 case E_ADDITIONAL
: {
1125 sPath
+= m_aData
.sPackageAdditional
;
1126 pXCDBuffer
= &(m_aData
.sBufferAdditional
);
1127 pSCPBuffer
= &(m_aData
.sNew2OldSCPAdditional
);
1128 pListBuffer
= &(m_aData
.sAdditionalFilterList
);
1134 sPath
+= m_aData
.sPackageStandard
;
1137 sPath
+= CFG_PATH_SEPERATOR
;
1138 sPath
+= DECLARE_ASCII( "Filters" );
1139 sPath
+= CFG_PATH_SEPERATOR
;
1141 pListBuffer
->append ( sName
);
1142 pListBuffer
->appendAscii( "\n" );
1144 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1146 pSCPBuffer
->appendAscii( "\"" );
1147 pSCPBuffer
->append ( sPath
);
1148 pSCPBuffer
->append ( lNewNames
[nItem
] );
1149 pSCPBuffer
->appendAscii( "\"\t\"" );
1150 pSCPBuffer
->append ( sPath
);
1151 pSCPBuffer
->appendAscii( "Filter" );
1152 pSCPBuffer
->append ( CFG_ENCODING_OPEN
);
1153 pSCPBuffer
->append ( lOldNames
[nItem
] );
1154 pSCPBuffer
->append ( CFG_ENCODING_CLOSE
);
1155 pSCPBuffer
->appendAscii( "\"\n" );
1157 sName
= lEncNames
[nItem
];
1158 aItem
.sName
= sName
;
1161 // open set node by using name
1162 pXCDBuffer
->appendAscii( "\t\t<default:group cfg:name=\"" );
1163 pXCDBuffer
->append ( sName
);
1164 pXCDBuffer
->appendAscii( "\">\n" );
1168 // We generate "Installed=false" for all entries ... because it's the default for all filters.
1169 // You must work with a full office installation and change this to "true" in generated XML file!!!
1170 impl_generateBoolProperty ( *pXCDBuffer
, SUBKEY_INSTALLED
, sal_False
);
1171 impl_generateUINamesProperty( *pXCDBuffer
, SUBKEY_UINAME
, aItem
.lUINames
);
1172 impl_generateStringProperty ( *pXCDBuffer
, SUBKEY_DATA
, FilterCFGAccess::encodeFilterData( aItem
) );
1175 pXCDBuffer
->appendAscii( "\t\t</default:group>\n" );
1180 m_aData
.sBufferStandard
.appendAscii( "\t</schema:set>\n" );
1181 if( m_aData
.nVersionOutput
>= DRAFT_SPLIT_VERSION
)
1183 m_aData
.sBufferAdditional
.appendAscii( "\t</schema:set>\n" );
1188 //*****************************************************************************************************************
1189 void XCDGenerator::impl_generateDetectorSet()
1191 if( m_aData
.pFilterCache
->hasDetectors() == sal_False
)
1193 // write empty detector set!
1194 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"DetectServices\" cfg:element-type=\"DetectService\"/>\n" );
1199 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"DetectServices\" cfg:element-type=\"DetectService\">\n" );
1201 css::uno::Sequence
< ::rtl::OUString
> lNames
= m_aData
.pFilterCache
->getAllDetectorNames();
1202 css::uno::Sequence
< ::rtl::OUString
> lEncNames ( lNames
) ;
1203 sal_Int32 nCount
= lNames
.getLength() ;
1204 sal_Int32 nItem
= 0 ;
1206 XCDGenerator::impl_orderAlphabetical( lNames
);
1208 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1210 ::rtl::OUString sName
;
1211 ::rtl::OUString sEncName
;
1212 for( nItem
=0; nItem
<nCount
; ++nItem
)
1214 sName
= lNames
[nItem
] ;
1215 lEncNames
[nItem
] = impl_encodeSetName( sName
);
1217 m_aData
.sNew2OldSCPStandard
.appendAscii ( "org.openoffice.Office." );
1218 m_aData
.sNew2OldSCPStandard
.append ( m_aData
.sPackageStandard
);
1219 m_aData
.sNew2OldSCPStandard
.append ( CFG_PATH_SEPERATOR
);
1220 m_aData
.sNew2OldSCPStandard
.append ( sName
);
1221 m_aData
.sNew2OldSCPStandard
.appendAscii ( "\torg.openoffice.Office.");
1222 m_aData
.sNew2OldSCPStandard
.append ( m_aData
.sPackageStandard
);
1223 m_aData
.sNew2OldSCPStandard
.append ( CFG_PATH_SEPERATOR
);
1224 m_aData
.sNew2OldSCPStandard
.appendAscii ( "DetectService" );
1225 m_aData
.sNew2OldSCPStandard
.append ( CFG_ENCODING_OPEN
);
1226 m_aData
.sNew2OldSCPStandard
.append ( sName
);
1227 m_aData
.sNew2OldSCPStandard
.append ( CFG_ENCODING_CLOSE
);
1228 m_aData
.sNew2OldSCPStandard
.appendAscii ( "\n" );
1232 for( nItem
=0; nItem
<nCount
; ++nItem
)
1234 ::rtl::OUString sName
= lNames
[nItem
] ;
1235 Detector aItem
= m_aData
.pFilterCache
->getDetector( sName
);
1237 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1239 sName
= lEncNames
[nItem
];
1242 ++m_aData
.nWrittenDetectors
;
1244 // open set node by using name
1245 m_aData
.sBufferStandard
.appendAscii( "\t\t<default:group cfg:name=\"" );
1246 m_aData
.sBufferStandard
.append ( sName
);
1247 m_aData
.sBufferStandard
.appendAscii( "\">\n" );
1250 impl_generateStringListProperty ( m_aData
.sBufferStandard
, SUBKEY_TYPES
, aItem
.lTypes
);
1253 m_aData
.sBufferStandard
.appendAscii( "\t\t</default:group>\n" );
1257 m_aData
.sBufferStandard
.appendAscii( "\t</schema:set>\n" );
1261 //*****************************************************************************************************************
1262 void XCDGenerator::impl_generateLoaderSet()
1264 if( m_aData
.pFilterCache
->hasLoaders() == sal_False
)
1266 // write empty loader set!
1267 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"FrameLoaders\" cfg:element-type=\"FrameLoader\"/>\n" );
1272 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"FrameLoaders\" cfg:element-type=\"FrameLoader\">\n" );
1274 css::uno::Sequence
< ::rtl::OUString
> lNames
= m_aData
.pFilterCache
->getAllLoaderNames();
1275 css::uno::Sequence
< ::rtl::OUString
> lEncNames ( lNames
) ;
1276 sal_Int32 nCount
= lNames
.getLength() ;
1277 sal_Int32 nItem
= 0 ;
1279 XCDGenerator::impl_orderAlphabetical( lNames
);
1281 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1283 ::rtl::OUString sName
;
1284 ::rtl::OUString sEncName
;
1285 for( nItem
=0; nItem
<nCount
; ++nItem
)
1287 sName
= lNames
[nItem
] ;
1288 lEncNames
[nItem
] = impl_encodeSetName( sName
);
1290 m_aData
.sNew2OldSCPStandard
.appendAscii ( "org.openoffice.Office." );
1291 m_aData
.sNew2OldSCPStandard
.append ( m_aData
.sPackageStandard
);
1292 m_aData
.sNew2OldSCPStandard
.append ( CFG_PATH_SEPERATOR
);
1293 m_aData
.sNew2OldSCPStandard
.append ( sName
);
1294 m_aData
.sNew2OldSCPStandard
.appendAscii ( "\torg.openoffice.Office.");
1295 m_aData
.sNew2OldSCPStandard
.append ( m_aData
.sPackageStandard
);
1296 m_aData
.sNew2OldSCPStandard
.append ( CFG_PATH_SEPERATOR
);
1297 m_aData
.sNew2OldSCPStandard
.appendAscii ( "FrameLoader" );
1298 m_aData
.sNew2OldSCPStandard
.append ( CFG_ENCODING_OPEN
);
1299 m_aData
.sNew2OldSCPStandard
.append ( sName
);
1300 m_aData
.sNew2OldSCPStandard
.append ( CFG_ENCODING_CLOSE
);
1301 m_aData
.sNew2OldSCPStandard
.appendAscii ( "\n" );
1305 for( nItem
=0; nItem
<nCount
; ++nItem
)
1307 ::rtl::OUString sName
= lNames
[nItem
] ;
1308 Loader aItem
= m_aData
.pFilterCache
->getLoader( sName
);
1310 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1312 sName
= lEncNames
[nItem
];
1315 ++m_aData
.nWrittenLoaders
;
1317 // open set node by using name
1318 m_aData
.sBufferStandard
.appendAscii( "\t\t<default:group cfg:name=\"" );
1319 m_aData
.sBufferStandard
.append ( sName
);
1320 m_aData
.sBufferStandard
.appendAscii( "\">\n" );
1323 impl_generateUINamesProperty ( m_aData
.sBufferStandard
, SUBKEY_UINAME
, aItem
.lUINames
);
1324 impl_generateStringListProperty ( m_aData
.sBufferStandard
, SUBKEY_TYPES
, aItem
.lTypes
);
1327 m_aData
.sBufferStandard
.appendAscii( "\t\t</default:group>\n" );
1331 m_aData
.sBufferStandard
.appendAscii( "\t</schema:set>\n" );
1335 //*****************************************************************************************************************
1336 void XCDGenerator::impl_generateDefaults()
1339 m_aData
.sBufferStandard
.appendAscii( "\t<schema:group cfg:name=\"Defaults\">\n" );
1341 // write generic loader
1342 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:value cfg:name=\"FrameLoader\" cfg:type=\"string\">\n" );
1343 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<default:data>" );
1344 m_aData
.sBufferStandard
.append ( m_aData
.pFilterCache
->getDefaultLoader() );
1345 m_aData
.sBufferStandard
.appendAscii( "</default:data>\n" );
1346 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:value>\n" );
1348 // write default detector
1349 m_aData
.sBufferStandard
.appendAscii( "\t\t<schema:value cfg:name=\"DetectService\" cfg:type=\"string\">\n" );
1350 m_aData
.sBufferStandard
.appendAscii( "\t\t\t<default:data>" );
1351 m_aData
.sBufferStandard
.append ( m_aData
.pFilterCache
->getDefaultDetector() );
1352 m_aData
.sBufferStandard
.appendAscii( "</default:data>\n" );
1353 m_aData
.sBufferStandard
.appendAscii( "\t\t</schema:value>\n" );
1356 m_aData
.sBufferStandard
.appendAscii( "\t</schema:group>\n" );
1359 //*****************************************************************************************************************
1360 void XCDGenerator::impl_generateContentHandlerSet()
1362 if( m_aData
.pFilterCache
->hasContentHandlers() == sal_False
)
1364 // write empty handler set!
1365 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"ContentHandlers\" cfg:element-type=\"ContentHandler\"/>\n" );
1370 m_aData
.sBufferStandard
.appendAscii( "\t<schema:set cfg:name=\"ContentHandlers\" cfg:element-type=\"ContentHandler\">\n" );
1372 css::uno::Sequence
< ::rtl::OUString
> lNames
= m_aData
.pFilterCache
->getAllContentHandlerNames();
1373 css::uno::Sequence
< ::rtl::OUString
> lEncNames ( lNames
) ;
1374 sal_Int32 nCount
= lNames
.getLength() ;
1375 sal_Int32 nItem
= 0 ;
1377 XCDGenerator::impl_orderAlphabetical( lNames
);
1379 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1381 ::rtl::OUString sName
;
1382 ::rtl::OUString sEncName
;
1383 for( nItem
=0; nItem
<nCount
; ++nItem
)
1385 sName
= lNames
[nItem
] ;
1386 lEncNames
[nItem
] = impl_encodeSetName( sName
);
1388 m_aData
.sNew2OldSCPStandard
.appendAscii ( "org.openoffice.Office." );
1389 m_aData
.sNew2OldSCPStandard
.append ( m_aData
.sPackageStandard
);
1390 m_aData
.sNew2OldSCPStandard
.append ( CFG_PATH_SEPERATOR
);
1391 m_aData
.sNew2OldSCPStandard
.append ( sName
);
1392 m_aData
.sNew2OldSCPStandard
.appendAscii ( "\torg.openoffice.Office.");
1393 m_aData
.sNew2OldSCPStandard
.append ( m_aData
.sPackageStandard
);
1394 m_aData
.sNew2OldSCPStandard
.append ( CFG_PATH_SEPERATOR
);
1395 m_aData
.sNew2OldSCPStandard
.appendAscii ( "ContentHandler" );
1396 m_aData
.sNew2OldSCPStandard
.append ( CFG_ENCODING_OPEN
);
1397 m_aData
.sNew2OldSCPStandard
.append ( sName
);
1398 m_aData
.sNew2OldSCPStandard
.append ( CFG_ENCODING_CLOSE
);
1399 m_aData
.sNew2OldSCPStandard
.appendAscii ( "\n" );
1403 for( nItem
=0; nItem
<nCount
; ++nItem
)
1405 ::rtl::OUString sName
= lNames
[nItem
] ;
1406 ContentHandler aItem
= m_aData
.pFilterCache
->getContentHandler( sName
);
1408 if( m_aData
.nVersionOutput
== 6 && m_aData
.nVersionInput
< 6 )
1410 sName
= lEncNames
[nItem
];
1413 ++m_aData
.nWrittenContentHandlers
;
1415 // open set node by using name
1416 m_aData
.sBufferStandard
.appendAscii( "\t\t<default:group cfg:name=\"" );
1417 m_aData
.sBufferStandard
.append ( sName
);
1418 m_aData
.sBufferStandard
.appendAscii( "\">\n" );
1421 impl_generateStringListProperty( m_aData
.sBufferStandard
, SUBKEY_TYPES
, aItem
.lTypes
);
1424 m_aData
.sBufferStandard
.appendAscii( "\t\t</default:group>\n" );
1428 m_aData
.sBufferStandard
.appendAscii( "\t</schema:set>\n" );
1432 //*****************************************************************************************************************
1433 void XCDGenerator::impl_generateIntProperty( ::rtl::OUStringBuffer
& sXCD
,
1434 const ::rtl::OUString
& sName
,
1437 sXCD
.appendAscii( "\t\t\t<default:value cfg:name=\"" );
1438 sXCD
.append ( sName
);
1439 sXCD
.appendAscii( "\" cfg:type=\"int\" cfg:writable=\"" );
1440 sXCD
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
1441 sXCD
.appendAscii( "\t\t\t\t<default:data>" );
1442 sXCD
.append ( (sal_Int32
)(nValue
) );
1443 sXCD
.appendAscii( "</default:data>\n\t\t\t</default:value>\n" );
1446 //*****************************************************************************************************************
1447 void XCDGenerator::impl_generateBoolProperty( ::rtl::OUStringBuffer
& sXCD
,
1448 const ::rtl::OUString
& sName
,
1451 sXCD
.appendAscii( "\t\t\t<default:value cfg:name=\"" );
1452 sXCD
.append ( sName
);
1453 sXCD
.appendAscii( "\" cfg:type=\"boolean\" cfg:writable=\"" );
1454 sXCD
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\">\n" : "false\">\n" );
1455 sXCD
.appendAscii( "\t\t\t\t<default:data>" );
1456 sXCD
.appendAscii( bValue
==sal_True
? "true" : "false" );
1457 sXCD
.appendAscii( "</default:data>\n\t\t\t</default:value>\n" );
1460 //*****************************************************************************************************************
1461 void XCDGenerator::impl_generateStringProperty( ::rtl::OUStringBuffer
& sXCD
,
1462 const ::rtl::OUString
& sName
,
1463 const ::rtl::OUString
& sValue
)
1465 sXCD
.appendAscii( "\t\t\t<default:value cfg:name=\"" );
1466 sXCD
.append ( sName
);
1467 sXCD
.appendAscii( "\" cfg:type=\"string\" cfg:writable=\"" );
1468 sXCD
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\"" : "false\"" );
1469 if( sValue
.getLength() > 0 )
1471 sXCD
.appendAscii( ">\n\t\t\t\t<default:data>" );
1472 sXCD
.append ( XCDGenerator::impl_encodeSpecialSigns( sValue
) );
1473 sXCD
.appendAscii( "</default:data>\n\t\t\t</default:value>\n" );
1477 sXCD
.appendAscii( "/>\n" );
1481 //*****************************************************************************************************************
1482 void XCDGenerator::impl_generateStringListProperty( ::rtl::OUStringBuffer
& sXCD
,
1483 const ::rtl::OUString
& sName
,
1484 const ::framework::StringList
& lValue
)
1486 sXCD
.appendAscii( "\t\t\t<default:value cfg:name=\"" );
1487 sXCD
.append ( sName
);
1488 sXCD
.appendAscii( "\" cfg:type=\"string\" cfg:derivedBy=\"list\"" );
1490 sal_Unicode cSeperator
= XCDGenerator::impl_defineSeperator( lValue
);
1491 if( cSeperator
!= ' ' )
1493 sXCD
.appendAscii( " cfg:separator=\"" );
1494 sXCD
.append ( cSeperator
);
1495 sXCD
.appendAscii( "\"" );
1498 sXCD
.appendAscii( " cfg:writable=\"" );
1499 sXCD
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\"" : "false\"" );
1501 sal_Int32 nCount
= (sal_Int32
)(lValue
.size());
1502 sal_Int32 nPosition
= 1;
1506 sXCD
.appendAscii( ">\n\t\t\t\t<default:data>" );
1507 for( ConstStringListIterator pEntry
=lValue
.begin(); pEntry
!=lValue
.end(); ++pEntry
)
1509 sXCD
.append( *pEntry
);
1510 if( nPosition
< nCount
)
1512 // Seperator for lists allowed only between two values!
1513 // Don't write leading or leaving seperators ...
1514 sXCD
.append( cSeperator
);
1518 sXCD
.appendAscii( "</default:data>\n\t\t\t</default:value>\n" );
1522 sXCD
.appendAscii( "/>\n" );
1526 //*****************************************************************************************************************
1527 void XCDGenerator::impl_generateUINamesProperty( ::rtl::OUStringBuffer
& sXCD
,
1528 const ::rtl::OUString
& sName
,
1529 const StringHash
& lUINames
)
1531 sXCD
.appendAscii( "\t\t\t<default:value cfg:name=\"" );
1532 sXCD
.append ( sName
);
1533 sXCD
.appendAscii( "\" cfg:type=\"string\" cfg:localized=\"true\" cfg:writable=\"" );
1534 sXCD
.appendAscii( m_aData
.bWriteable
==sal_True
? "true\"" : "false\"" );
1536 if( lUINames
.size() > 0 )
1538 sXCD
.appendAscii( ">\n" );
1540 // Search for localized values, which doesn't need full localized set ...
1541 // because all values for all locales are the same!
1542 sal_Bool bDifferent
= sal_False
;
1543 ConstStringHashIterator pUIName
= lUINames
.begin();
1544 ::rtl::OUString sUIName
= pUIName
->second
;
1545 while( pUIName
!=lUINames
.end() )
1547 if( sUIName
!= pUIName
->second
)
1549 bDifferent
= sal_True
;
1555 // Generate full localized set, if some values are realy loclaized.
1556 if( bDifferent
== sal_True
)
1558 for( ConstStringHashIterator pUIName
=lUINames
.begin(); pUIName
!=lUINames
.end(); ++pUIName
)
1560 sXCD
.appendAscii( "\t\t\t\t<default:data xml:lang=\"" );
1561 sXCD
.append ( pUIName
->first
);
1562 sXCD
.appendAscii( "\">" );
1563 sXCD
.append ( XCDGenerator::impl_encodeSpecialSigns( pUIName
->second
) );
1564 sXCD
.appendAscii( "</default:data>\n" );
1567 // Generate ONE entry as default for our configuration if all localized values are equal!
1570 sXCD
.appendAscii( "\t\t\t\t<default:data xml:lang=\"" );
1571 sXCD
.appendAscii( "en-US" );
1572 sXCD
.appendAscii( "\">" );
1573 sXCD
.append ( XCDGenerator::impl_encodeSpecialSigns( lUINames
.find(DECLARE_ASCII("en-US"))->second
));
1574 sXCD
.appendAscii( "</default:data>\n" );
1576 sXCD
.appendAscii( "\t\t\t</default:value>\n" );
1580 sXCD
.appendAscii( "/>\n" );
1584 //*****************************************************************************************************************
1585 ::rtl::OUString
XCDGenerator::impl_encodeSpecialSigns( const ::rtl::OUString
& sValue
)
1587 ::rtl::OUStringBuffer
sSource ( sValue
);
1588 ::rtl::OUStringBuffer
sDestination( 10000 );
1589 sal_Int32 nCount
= sValue
.getLength();
1592 for( i
=0; i
<nCount
; ++i
)
1594 sal_Unicode cSign
= sSource
.charAt(i
);
1597 // code &, ", ', <, > ...
1598 case '&' : sDestination
.appendAscii( "&" );
1600 case '<' : sDestination
.appendAscii( "<" );
1602 case '>' : sDestination
.appendAscii( ">" );
1604 case '\'': sDestination
.appendAscii( "’" );
1606 case '\"': sDestination
.appendAscii( """ );
1608 // copy all other letters
1609 default : sDestination
.append( cSign
);
1614 return sDestination
.makeStringAndClear();
1617 //*****************************************************************************************************************
1618 // Step over all elements of list to find one seperator, which isn't used for any value in list.
1619 // We return an empty string if list contains no elements - because we must disable writing of
1620 // "... cfg:seperator="<seperatorvalue> ..."
1621 // => Otherwise we get a Sequence< OUString > with one empty element from configuration!!!
1622 sal_Unicode
XCDGenerator::impl_defineSeperator( const ::framework::StringList
& lList
)
1624 static cSeperator1
= ' ';
1625 static cSeperator2
= ';';
1626 static cSeperator3
= '+';
1627 static cSeperator4
= '-';
1628 static cSeperator5
= '*';
1630 // Start with first seperator.
1631 // Step over all list items.
1632 // If one item contains this seperator - try next one!
1633 // If no new one avaliable (5 tests failed!) - show an error message for user.
1634 // => File will be wrong then!
1635 // If seperator was changed start search during list again ... because
1636 // new seperator could exist at already compared elements!
1638 sal_Unicode cSeperator
= cSeperator1
;
1639 sal_Bool bOK
= sal_False
;
1640 ConstStringListIterator pItem
= lList
.begin();
1642 while( bOK
== sal_False
)
1644 if( pItem
== lList
.end() )
1650 while( pItem
!=lList
.end() )
1652 if( pItem
->indexOf( cSeperator
, 0 ) != -1 )
1654 if( cSeperator
== cSeperator1
)
1656 cSeperator
= cSeperator2
;
1657 pItem
= lList
.begin();
1661 if( cSeperator
== cSeperator2
)
1663 cSeperator
= cSeperator3
;
1664 pItem
= lList
.begin();
1668 if( cSeperator
== cSeperator3
)
1670 cSeperator
= cSeperator4
;
1671 pItem
= lList
.begin();
1675 if( cSeperator
== cSeperator4
)
1677 cSeperator
= cSeperator5
;
1678 pItem
= lList
.begin();
1682 if( cSeperator
== cSeperator5
)
1684 LOG_ERROR( "XCDGenerator::impl_defineSeperator()", "Can't find seperator for given list! Generated XCD file will be wrong!" )
1699 //*****************************************************************************************************************
1700 void XCDGenerator::impl_initFilterHashNew2Old( StringHash
& aHash
)
1702 // key = new filter name, value = old name
1703 aHash
[DECLARE_ASCII("writer_StarOffice_XML_Writer" )] = DECLARE_ASCII("swriter: StarOffice XML (Writer)" );
1704 aHash
[DECLARE_ASCII("writer_StarWriter_50" )] = DECLARE_ASCII("swriter: StarWriter 5.0" );
1705 aHash
[DECLARE_ASCII("writer_StarWriter_50_VorlageTemplate" )] = DECLARE_ASCII("swriter: StarWriter 5.0 Vorlage/Template" );
1706 aHash
[DECLARE_ASCII("writer_StarWriter_40" )] = DECLARE_ASCII("swriter: StarWriter 4.0" );
1707 aHash
[DECLARE_ASCII("writer_StarWriter_40_VorlageTemplate" )] = DECLARE_ASCII("swriter: StarWriter 4.0 Vorlage/Template" );
1708 aHash
[DECLARE_ASCII("writer_StarWriter_30" )] = DECLARE_ASCII("swriter: StarWriter 3.0" );
1709 aHash
[DECLARE_ASCII("writer_StarWriter_30_VorlageTemplate" )] = DECLARE_ASCII("swriter: StarWriter 3.0 Vorlage/Template" );
1710 aHash
[DECLARE_ASCII("writer_StarWriter_20" )] = DECLARE_ASCII("swriter: StarWriter 2.0" );
1711 aHash
[DECLARE_ASCII("writer_StarWriter_10" )] = DECLARE_ASCII("swriter: StarWriter 1.0" );
1712 aHash
[DECLARE_ASCII("writer_StarWriter_DOS" )] = DECLARE_ASCII("swriter: StarWriter DOS" );
1713 aHash
[DECLARE_ASCII("writer_HTML_StarWriter" )] = DECLARE_ASCII("swriter: HTML (StarWriter)" );
1714 aHash
[DECLARE_ASCII("writer_Text" )] = DECLARE_ASCII("swriter: Text" );
1715 aHash
[DECLARE_ASCII("writer_Text_Unix" )] = DECLARE_ASCII("swriter: Text Unix" );
1716 aHash
[DECLARE_ASCII("writer_Text_Mac" )] = DECLARE_ASCII("swriter: Text Mac" );
1717 aHash
[DECLARE_ASCII("writer_Text_DOS" )] = DECLARE_ASCII("swriter: Text DOS" );
1718 aHash
[DECLARE_ASCII("writer_Rich_Text_Format" )] = DECLARE_ASCII("swriter: Rich Text Format" );
1719 aHash
[DECLARE_ASCII("writer_MS_Word_97" )] = DECLARE_ASCII("swriter: MS Word 97" );
1720 aHash
[DECLARE_ASCII("writer_MS_Word_95" )] = DECLARE_ASCII("swriter: MS Word 95" );
1721 aHash
[DECLARE_ASCII("writer_MS_Word_97_Vorlage" )] = DECLARE_ASCII("swriter: MS Word 97 Vorlage" );
1722 aHash
[DECLARE_ASCII("writer_MS_Word_95_Vorlage" )] = DECLARE_ASCII("swriter: MS Word 95 Vorlage" );
1723 aHash
[DECLARE_ASCII("writer_MS_WinWord_60" )] = DECLARE_ASCII("swriter: MS WinWord 6.0" );
1724 aHash
[DECLARE_ASCII("writer_MS_Word_6x_W4W" )] = DECLARE_ASCII("swriter: MS Word 6.x (W4W)" );
1725 aHash
[DECLARE_ASCII("writer_MS_WinWord_5" )] = DECLARE_ASCII("swriter: MS WinWord 5" );
1726 aHash
[DECLARE_ASCII("writer_MS_WinWord_2x_W4W" )] = DECLARE_ASCII("swriter: MS WinWord 2.x (W4W)" );
1727 aHash
[DECLARE_ASCII("writer_MS_MacWord_5x_W4W" )] = DECLARE_ASCII("swriter: MS MacWord 5.x (W4W)" );
1728 aHash
[DECLARE_ASCII("writer_WordPerfect_Win_61_W4W" )] = DECLARE_ASCII("swriter: WordPerfect (Win) 6.1 (W4W)" );
1729 aHash
[DECLARE_ASCII("writer_WordPerfect_Win_70_W4W" )] = DECLARE_ASCII("swriter: WordPerfect (Win) 7.0 (W4W)" );
1730 aHash
[DECLARE_ASCII("writer_WordStar_Win_1x_20_W4W" )] = DECLARE_ASCII("swriter: WordStar (Win) 1.x-2.0 (W4W)" );
1731 aHash
[DECLARE_ASCII("writer_WordStar_70_W4W" )] = DECLARE_ASCII("swriter: WordStar 7.0 (W4W)" );
1732 aHash
[DECLARE_ASCII("writer_Ami_Pro_11_12_W4W" )] = DECLARE_ASCII("swriter: Ami Pro 1.1-1.2 (W4W)" );
1733 aHash
[DECLARE_ASCII("writer_Ami_Pro_20_31_W4W" )] = DECLARE_ASCII("swriter: Ami Pro 2.0-3.1 (W4W)" );
1734 aHash
[DECLARE_ASCII("writer_MS_Excel_40_StarWriter" )] = DECLARE_ASCII("swriter: MS Excel 4.0 (StarWriter)" );
1735 aHash
[DECLARE_ASCII("writer_MS_Excel_50_StarWriter" )] = DECLARE_ASCII("swriter: MS Excel 5.0 (StarWriter)" );
1736 aHash
[DECLARE_ASCII("writer_MS_Excel_95_StarWriter" )] = DECLARE_ASCII("swriter: MS Excel 95 (StarWriter)" );
1737 aHash
[DECLARE_ASCII("writer_MS_Works_20_DOS_W4W" )] = DECLARE_ASCII("swriter: MS Works 2.0 DOS (W4W)" );
1738 aHash
[DECLARE_ASCII("writer_MS_Works_30_Win_W4W" )] = DECLARE_ASCII("swriter: MS Works 3.0 Win (W4W)" );
1739 aHash
[DECLARE_ASCII("writer_Lotus_1_2_3_10_DOS_StarWriter" )] = DECLARE_ASCII("swriter: Lotus 1-2-3 1.0 (DOS) (StarWriter)" );
1740 aHash
[DECLARE_ASCII("writer_Lotus_1_2_3_10_WIN_StarWriter" )] = DECLARE_ASCII("swriter: Lotus 1-2-3 1.0 (WIN) (StarWriter)" );
1741 aHash
[DECLARE_ASCII("writer_Frame_Maker_MIF_50_W4W" )] = DECLARE_ASCII("swriter: Frame Maker MIF 5.0 (W4W)" );
1742 aHash
[DECLARE_ASCII("writer_Win_Write_3x_W4W" )] = DECLARE_ASCII("swriter: Win Write 3.x (W4W)" );
1743 aHash
[DECLARE_ASCII("writer_Text_encoded" )] = DECLARE_ASCII("swriter: Text (encoded)" );
1744 aHash
[DECLARE_ASCII("writer_MS_WinWord_1x_W4W" )] = DECLARE_ASCII("swriter: MS WinWord 1.x (W4W)" );
1745 aHash
[DECLARE_ASCII("writer_MS_Word_5x_W4W" )] = DECLARE_ASCII("swriter: MS Word 5.x (W4W)" );
1746 aHash
[DECLARE_ASCII("writer_MS_Word_4x_W4W" )] = DECLARE_ASCII("swriter: MS Word 4.x (W4W)" );
1747 aHash
[DECLARE_ASCII("writer_MS_Word_3x_W4W" )] = DECLARE_ASCII("swriter: MS Word 3.x (W4W)" );
1748 aHash
[DECLARE_ASCII("writer_MS_MacWord_40_W4W" )] = DECLARE_ASCII("swriter: MS MacWord 4.0 (W4W)" );
1749 aHash
[DECLARE_ASCII("writer_MS_MacWord_30_W4W" )] = DECLARE_ASCII("swriter: MS MacWord 3.0 (W4W)" );
1750 aHash
[DECLARE_ASCII("writer_WordPerfect_Mac_1_W4W" )] = DECLARE_ASCII("swriter: WordPerfect Mac 1 (W4W)" );
1751 aHash
[DECLARE_ASCII("writer_WordPerfect_Mac_2_W4W" )] = DECLARE_ASCII("swriter: WordPerfect Mac 2 (W4W)" );
1752 aHash
[DECLARE_ASCII("writer_WordPerfect_Mac_3_W4W" )] = DECLARE_ASCII("swriter: WordPerfect Mac 3 (W4W)" );
1753 aHash
[DECLARE_ASCII("writer_WordPerfect_Win_51_52_W4W" )] = DECLARE_ASCII("swriter: WordPerfect (Win) 5.1-5.2 (W4W)" );
1754 aHash
[DECLARE_ASCII("writer_WordPerfect_Win_60_W4W" )] = DECLARE_ASCII("swriter: WordPerfect (Win) 6.0 (W4W)" );
1755 aHash
[DECLARE_ASCII("writer_WordPerfect_41_W4W" )] = DECLARE_ASCII("swriter: WordPerfect 4.1 (W4W)" );
1756 aHash
[DECLARE_ASCII("writer_WordPerfect_42_W4W" )] = DECLARE_ASCII("swriter: WordPerfect 4.2 (W4W)" );
1757 aHash
[DECLARE_ASCII("writer_WordPerfect_50_W4W" )] = DECLARE_ASCII("swriter: WordPerfect 5.0 (W4W)" );
1758 aHash
[DECLARE_ASCII("writer_WordPerfect_51_W4W" )] = DECLARE_ASCII("swriter: WordPerfect 5.1 (W4W)" );
1759 aHash
[DECLARE_ASCII("writer_WordPerfect_60_W4W" )] = DECLARE_ASCII("swriter: WordPerfect 6.0 (W4W)" );
1760 aHash
[DECLARE_ASCII("writer_WordPerfect_61_W4W" )] = DECLARE_ASCII("swriter: WordPerfect 6.1 (W4W)" );
1761 aHash
[DECLARE_ASCII("writer_WordStar_2000_Rel_30_W4W" )] = DECLARE_ASCII("swriter: WordStar 2000 Rel. 3.0 (W4W)" );
1762 aHash
[DECLARE_ASCII("writer_WordStar_2000_Rel_35_W4W" )] = DECLARE_ASCII("swriter: WordStar 2000 Rel. 3.5 (W4W)" );
1763 aHash
[DECLARE_ASCII("writer_WordStar_33x_W4W" )] = DECLARE_ASCII("swriter: WordStar 3.3x (W4W)" );
1764 aHash
[DECLARE_ASCII("writer_WordStar_345_W4W" )] = DECLARE_ASCII("swriter: WordStar 3.45 (W4W)" );
1765 aHash
[DECLARE_ASCII("writer_WordStar_40_W4W" )] = DECLARE_ASCII("swriter: WordStar 4.0 (W4W)" );
1766 aHash
[DECLARE_ASCII("writer_WordStar_50_W4W" )] = DECLARE_ASCII("swriter: WordStar 5.0 (W4W)" );
1767 aHash
[DECLARE_ASCII("writer_WordStar_55_W4W" )] = DECLARE_ASCII("swriter: WordStar 5.5 (W4W)" );
1768 aHash
[DECLARE_ASCII("writer_WordStar_60_W4W" )] = DECLARE_ASCII("swriter: WordStar 6.0 (W4W)" );
1769 aHash
[DECLARE_ASCII("writer_MS_Works_40_Mac_W4W" )] = DECLARE_ASCII("swriter: MS Works 4.0 Mac (W4W)" );
1770 aHash
[DECLARE_ASCII("writer_Mac_Write_4x_50_W4W" )] = DECLARE_ASCII("swriter: Mac Write 4.x 5.0 (W4W)" );
1771 aHash
[DECLARE_ASCII("writer_Mac_Write_II_W4W" )] = DECLARE_ASCII("swriter: Mac Write II (W4W)" );
1772 aHash
[DECLARE_ASCII("writer_Mac_Write_Pro_W4W" )] = DECLARE_ASCII("swriter: Mac Write Pro (W4W)" );
1773 aHash
[DECLARE_ASCII("writer_Lotus_Manuscript_W4W" )] = DECLARE_ASCII("swriter: Lotus Manuscript (W4W)" );
1774 aHash
[DECLARE_ASCII("writer_MASS_11_Rel_80_83_W4W" )] = DECLARE_ASCII("swriter: MASS 11 Rel. 8.0-8.3 (W4W)" );
1775 aHash
[DECLARE_ASCII("writer_MASS_11_Rel_85_90_W4W" )] = DECLARE_ASCII("swriter: MASS 11 Rel. 8.5-9.0 (W4W)" );
1776 aHash
[DECLARE_ASCII("writer_Claris_Works_W4W" )] = DECLARE_ASCII("swriter: Claris Works (W4W)" );
1777 aHash
[DECLARE_ASCII("writer_CTOS_DEF_W4W" )] = DECLARE_ASCII("swriter: CTOS DEF (W4W)" );
1778 aHash
[DECLARE_ASCII("writer_OfficeWriter_40_W4W" )] = DECLARE_ASCII("swriter: OfficeWriter 4.0 (W4W)" );
1779 aHash
[DECLARE_ASCII("writer_OfficeWriter_50_W4W" )] = DECLARE_ASCII("swriter: OfficeWriter 5.0 (W4W)" );
1780 aHash
[DECLARE_ASCII("writer_OfficeWriter_6x_W4W" )] = DECLARE_ASCII("swriter: OfficeWriter 6.x (W4W)" );
1781 aHash
[DECLARE_ASCII("writer_XyWrite_III_W4W" )] = DECLARE_ASCII("swriter: XyWrite III ( W4W)" );
1782 aHash
[DECLARE_ASCII("writer_XyWrite_IIIP_W4W" )] = DECLARE_ASCII("swriter: XyWrite III+ ( W4W)" );
1783 aHash
[DECLARE_ASCII("writer_XyWrite_Signature_W4W" )] = DECLARE_ASCII("swriter: XyWrite Signature (W4W)" );
1784 aHash
[DECLARE_ASCII("writer_XyWrite_Sig_Win_W4W" )] = DECLARE_ASCII("swriter: XyWrite Sig. (Win) (W4W)" );
1785 aHash
[DECLARE_ASCII("writer_XyWrite_IV_W4W" )] = DECLARE_ASCII("swriter: XyWrite IV (W4W)" );
1786 aHash
[DECLARE_ASCII("writer_XyWrite_Win_10_W4W" )] = DECLARE_ASCII("swriter: XyWrite (Win) 1.0 (W4W)" );
1787 aHash
[DECLARE_ASCII("writer_XEROX_XIF_50_W4W" )] = DECLARE_ASCII("swriter: XEROX XIF 5.0 (W4W)" );
1788 aHash
[DECLARE_ASCII("writer_XEROX_XIF_50_Illustrator_W4W" )] = DECLARE_ASCII("swriter: XEROX XIF 5.0 (Illustrator) (W4W)" );
1789 aHash
[DECLARE_ASCII("writer_XEROX_XIF_60_Color_Bitmap_W4W" )] = DECLARE_ASCII("swriter: XEROX XIF 6.0 (Color Bitmap) (W4W)" );
1790 aHash
[DECLARE_ASCII("writer_XEROX_XIF_60_Res_Graphic_W4W" )] = DECLARE_ASCII("swriter: XEROX XIF 6.0 (Res Graphic) (W4W)" );
1791 aHash
[DECLARE_ASCII("writer_WriteNow_30_Macintosh_W4W" )] = DECLARE_ASCII("swriter: WriteNow 3.0 (Macintosh) (W4W)" );
1792 aHash
[DECLARE_ASCII("writer_Writing_Assistant_W4W" )] = DECLARE_ASCII("swriter: Writing Assistant (W4W)" );
1793 aHash
[DECLARE_ASCII("writer_VolksWriter_Deluxe_W4W" )] = DECLARE_ASCII("swriter: VolksWriter Deluxe (W4W)" );
1794 aHash
[DECLARE_ASCII("writer_VolksWriter_3_and_4_W4W" )] = DECLARE_ASCII("swriter: VolksWriter 3 and 4 (W4W)" );
1795 aHash
[DECLARE_ASCII("writer_MultiMate_33_W4W" )] = DECLARE_ASCII("swriter: MultiMate 3.3 (W4W)" );
1796 aHash
[DECLARE_ASCII("writer_MultiMate_Adv_36_W4W" )] = DECLARE_ASCII("swriter: MultiMate Adv. 3.6 (W4W)" );
1797 aHash
[DECLARE_ASCII("writer_MultiMate_Adv_II_37_W4W" )] = DECLARE_ASCII("swriter: MultiMate Adv. II 3.7 (W4W)" );
1798 aHash
[DECLARE_ASCII("writer_MultiMate_4_W4W" )] = DECLARE_ASCII("swriter: MultiMate 4 (W4W)" );
1799 aHash
[DECLARE_ASCII("writer_NAVY_DIF_W4W" )] = DECLARE_ASCII("swriter: NAVY DIF (W4W)" );
1800 aHash
[DECLARE_ASCII("writer_PFS_Write_W4W" )] = DECLARE_ASCII("swriter: PFS Write (W4W)" );
1801 aHash
[DECLARE_ASCII("writer_PFS_First_Choice_10_W4W" )] = DECLARE_ASCII("swriter: PFS First Choice 1.0 (W4W)" );
1802 aHash
[DECLARE_ASCII("writer_PFS_First_Choice_20_W4W" )] = DECLARE_ASCII("swriter: PFS First Choice 2.0 (W4W)" );
1803 aHash
[DECLARE_ASCII("writer_PFS_First_Choice_30_W4W" )] = DECLARE_ASCII("swriter: PFS First Choice 3.0 (W4W)" );
1804 aHash
[DECLARE_ASCII("writer_Professional_Write_10_W4W" )] = DECLARE_ASCII("swriter: Professional Write 1.0 (W4W)" );
1805 aHash
[DECLARE_ASCII("writer_Professional_Write_2x_W4W" )] = DECLARE_ASCII("swriter: Professional Write 2.x (W4W)" );
1806 aHash
[DECLARE_ASCII("writer_Professional_Write_Plus_W4W" )] = DECLARE_ASCII("swriter: Professional Write Plus (W4W)" );
1807 aHash
[DECLARE_ASCII("writer_Peach_Text_W4W" )] = DECLARE_ASCII("swriter: Peach Text (W4W)" );
1808 aHash
[DECLARE_ASCII("writer_DCA_Revisable_Form_Text_W4W" )] = DECLARE_ASCII("swriter: DCA Revisable Form Text (W4W)" );
1809 aHash
[DECLARE_ASCII("writer_DCA_with_Display_Write_5_W4W" )] = DECLARE_ASCII("swriter: DCA with Display Write 5 (W4W)" );
1810 aHash
[DECLARE_ASCII("writer_DCAFFT_Final_Form_Text_W4W" )] = DECLARE_ASCII("swriter: DCA/FFT-Final Form Text (W4W)" );
1811 aHash
[DECLARE_ASCII("writer_DEC_DX_W4W" )] = DECLARE_ASCII("swriter: DEC DX (W4W)" );
1812 aHash
[DECLARE_ASCII("writer_DEC_WPS_PLUS_W4W" )] = DECLARE_ASCII("swriter: DEC WPS-PLUS (W4W)" );
1813 aHash
[DECLARE_ASCII("writer_DisplayWrite_20_4x_W4W" )] = DECLARE_ASCII("swriter: DisplayWrite 2.0-4.x (W4W)" );
1814 aHash
[DECLARE_ASCII("writer_DisplayWrite_5x_W4W" )] = DECLARE_ASCII("swriter: DisplayWrite 5.x (W4W)" );
1815 aHash
[DECLARE_ASCII("writer_DataGeneral_CEO_Write_W4W" )] = DECLARE_ASCII("swriter: DataGeneral CEO Write (W4W)" );
1816 aHash
[DECLARE_ASCII("writer_EBCDIC_W4W" )] = DECLARE_ASCII("swriter: EBCDIC (W4W)" );
1817 aHash
[DECLARE_ASCII("writer_Enable_W4W" )] = DECLARE_ASCII("swriter: Enable (W4W)" );
1818 aHash
[DECLARE_ASCII("writer_Frame_Maker_MIF_30_W4W" )] = DECLARE_ASCII("swriter: Frame Maker MIF 3.0 (W4W)" );
1819 aHash
[DECLARE_ASCII("writer_Frame_Maker_MIF_40_W4W" )] = DECLARE_ASCII("swriter: Frame Maker MIF 4.0 (W4W)" );
1820 aHash
[DECLARE_ASCII("writer_Frame_Work_III_W4W" )] = DECLARE_ASCII("swriter: Frame Work III (W4W)" );
1821 aHash
[DECLARE_ASCII("writer_Frame_Work_IV_W4W" )] = DECLARE_ASCII("swriter: Frame Work IV (W4W)" );
1822 aHash
[DECLARE_ASCII("writer_HP_AdvanceWrite_Plus_W4W" )] = DECLARE_ASCII("swriter: HP AdvanceWrite Plus (W4W)" );
1823 aHash
[DECLARE_ASCII("writer_ICL_Office_Power_6_W4W" )] = DECLARE_ASCII("swriter: ICL Office Power 6 (W4W)" );
1824 aHash
[DECLARE_ASCII("writer_ICL_Office_Power_7_W4W" )] = DECLARE_ASCII("swriter: ICL Office Power 7 (W4W)" );
1825 aHash
[DECLARE_ASCII("writer_Interleaf_W4W" )] = DECLARE_ASCII("swriter: Interleaf (W4W)" );
1826 aHash
[DECLARE_ASCII("writer_Interleaf_5_6_W4W" )] = DECLARE_ASCII("swriter: Interleaf 5 - 6 (W4W)" );
1827 aHash
[DECLARE_ASCII("writer_Legacy_Winstar_onGO_W4W" )] = DECLARE_ASCII("swriter: Legacy Winstar onGO (W4W)" );
1828 aHash
[DECLARE_ASCII("writer_QA_Write_10_30_W4W" )] = DECLARE_ASCII("swriter: Q&A Write 1.0-3.0 (W4W)" );
1829 aHash
[DECLARE_ASCII("writer_QA_Write_40_W4W" )] = DECLARE_ASCII("swriter: Q&A Write 4.0 (W4W)" );
1830 aHash
[DECLARE_ASCII("writer_Rapid_File_10_W4W" )] = DECLARE_ASCII("swriter: Rapid File 1.0 (W4W)" );
1831 aHash
[DECLARE_ASCII("writer_Rapid_File_12_W4W" )] = DECLARE_ASCII("swriter: Rapid File 1.2 (W4W)" );
1832 aHash
[DECLARE_ASCII("writer_Samna_Word_IV_IV_Plus_W4W" )] = DECLARE_ASCII("swriter: Samna Word IV-IV Plus (W4W)" );
1833 aHash
[DECLARE_ASCII("writer_Total_Word_W4W" )] = DECLARE_ASCII("swriter: Total Word (W4W)" );
1834 aHash
[DECLARE_ASCII("writer_Uniplex_onGO_W4W" )] = DECLARE_ASCII("swriter: Uniplex onGO (W4W)" );
1835 aHash
[DECLARE_ASCII("writer_Uniplex_V7_V8_W4W" )] = DECLARE_ASCII("swriter: Uniplex V7-V8 (W4W)" );
1836 aHash
[DECLARE_ASCII("writer_Wang_PC_W4W" )] = DECLARE_ASCII("swriter: Wang PC (W4W)" );
1837 aHash
[DECLARE_ASCII("writer_Wang_II_SWP_W4W" )] = DECLARE_ASCII("swriter: Wang II SWP (W4W)" );
1838 aHash
[DECLARE_ASCII("writer_Wang_WP_Plus_W4W" )] = DECLARE_ASCII("swriter: Wang WP Plus (W4W)" );
1839 aHash
[DECLARE_ASCII("writer_WITA_W4W" )] = DECLARE_ASCII("swriter: WITA (W4W)" );
1840 aHash
[DECLARE_ASCII("writer_WiziWord_30_W4W" )] = DECLARE_ASCII("swriter: WiziWord 3.0 (W4W)" );
1841 aHash
[DECLARE_ASCII("writer_web_HTML" )] = DECLARE_ASCII("swriter/web: HTML" );
1842 aHash
[DECLARE_ASCII("writer_web_StarWriterWeb_50_VorlageTemplate" )] = DECLARE_ASCII("swriter/web: StarWriter/Web 5.0 Vorlage/Template" );
1843 aHash
[DECLARE_ASCII("writer_web_StarWriterWeb_40_VorlageTemplate" )] = DECLARE_ASCII("swriter/web: StarWriter/Web 4.0 Vorlage/Template" );
1844 aHash
[DECLARE_ASCII("writer_web_Text_StarWriterWeb" )] = DECLARE_ASCII("swriter/web: Text (StarWriter/Web)" );
1845 aHash
[DECLARE_ASCII("writer_web_Text_DOS_StarWriterWeb" )] = DECLARE_ASCII("swriter/web: Text DOS (StarWriter/Web)" );
1846 aHash
[DECLARE_ASCII("writer_web_Text_Mac_StarWriterWeb" )] = DECLARE_ASCII("swriter/web: Text Mac (StarWriter/Web)" );
1847 aHash
[DECLARE_ASCII("writer_web_Text_Unix_StarWriterWeb" )] = DECLARE_ASCII("swriter/web: Text Unix (StarWriter/Web)" );
1848 aHash
[DECLARE_ASCII("writer_web_StarWriter_50" )] = DECLARE_ASCII("swriter/web: StarWriter 5.0" );
1849 aHash
[DECLARE_ASCII("writer_web_StarWriter_40" )] = DECLARE_ASCII("swriter/web: StarWriter 4.0" );
1850 aHash
[DECLARE_ASCII("writer_web_StarWriter_30" )] = DECLARE_ASCII("swriter/web: StarWriter 3.0" );
1851 aHash
[DECLARE_ASCII("writer_web_Text_encoded" )] = DECLARE_ASCII("swriter/web: Text (encoded)" );
1852 aHash
[DECLARE_ASCII("writer_globaldocument_StarWriter_60GlobalDocument" )] = DECLARE_ASCII("swriter/GlobalDocument: StarOffice XML (GlobalDocument)" );
1853 aHash
[DECLARE_ASCII("writer_globaldocument_StarWriter_50GlobalDocument" )] = DECLARE_ASCII("swriter/GlobalDocument: StarWriter 5.0/GlobalDocument" );
1854 aHash
[DECLARE_ASCII("writer_globaldocument_StarWriter_40GlobalDocument" )] = DECLARE_ASCII("swriter/GlobalDocument: StarWriter 4.0/GlobalDocument" );
1855 aHash
[DECLARE_ASCII("writer_globaldocument_StarWriter_50" )] = DECLARE_ASCII("swriter/GlobalDocument: StarWriter 5.0" );
1856 aHash
[DECLARE_ASCII("writer_globaldocument_StarWriter_40" )] = DECLARE_ASCII("swriter/GlobalDocument: StarWriter 4.0" );
1857 aHash
[DECLARE_ASCII("writer_globaldocument_StarWriter_30" )] = DECLARE_ASCII("swriter/GlobalDocument: StarWriter 3.0" );
1858 aHash
[DECLARE_ASCII("writer_globaldocument_Text_encoded" )] = DECLARE_ASCII("swriter/GlobalDocument: Text (encoded)" );
1859 aHash
[DECLARE_ASCII("chart_StarOffice_XML_Chart" )] = DECLARE_ASCII("schart: StarOffice XML (Chart)" );
1860 aHash
[DECLARE_ASCII("chart_StarChart_50" )] = DECLARE_ASCII("schart: StarChart 5.0" );
1861 aHash
[DECLARE_ASCII("chart_StarChart_40" )] = DECLARE_ASCII("schart: StarChart 4.0" );
1862 aHash
[DECLARE_ASCII("chart_StarChart_30" )] = DECLARE_ASCII("schart: StarChart 3.0" );
1863 aHash
[DECLARE_ASCII("calc_StarOffice_XML_Calc" )] = DECLARE_ASCII("scalc: StarOffice XML (Calc)" );
1864 aHash
[DECLARE_ASCII("calc_StarCalc_50" )] = DECLARE_ASCII("scalc: StarCalc 5.0" );
1865 aHash
[DECLARE_ASCII("calc_StarCalc_50_VorlageTemplate" )] = DECLARE_ASCII("scalc: StarCalc 5.0 Vorlage/Template" );
1866 aHash
[DECLARE_ASCII("calc_StarCalc_40" )] = DECLARE_ASCII("scalc: StarCalc 4.0" );
1867 aHash
[DECLARE_ASCII("calc_StarCalc_40_VorlageTemplate" )] = DECLARE_ASCII("scalc: StarCalc 4.0 Vorlage/Template" );
1868 aHash
[DECLARE_ASCII("calc_StarCalc_30" )] = DECLARE_ASCII("scalc: StarCalc 3.0" );
1869 aHash
[DECLARE_ASCII("calc_StarCalc_30_VorlageTemplate" )] = DECLARE_ASCII("scalc: StarCalc 3.0 Vorlage/Template" );
1870 aHash
[DECLARE_ASCII("calc_MS_Excel_97" )] = DECLARE_ASCII("scalc: MS Excel 97" );
1871 aHash
[DECLARE_ASCII("calc_MS_Excel_97_VorlageTemplate" )] = DECLARE_ASCII("scalc: MS Excel 97 Vorlage/Template" );
1872 aHash
[DECLARE_ASCII("calc_MS_Excel_95" )] = DECLARE_ASCII("scalc: MS Excel 95" );
1873 aHash
[DECLARE_ASCII("calc_MS_Excel_95_VorlageTemplate" )] = DECLARE_ASCII("scalc: MS Excel 95 Vorlage/Template" );
1874 aHash
[DECLARE_ASCII("calc_MS_Excel_5095" )] = DECLARE_ASCII("scalc: MS Excel 5.0/95" );
1875 aHash
[DECLARE_ASCII("calc_MS_Excel_5095_VorlageTemplate" )] = DECLARE_ASCII("scalc: MS Excel 5.0/95 Vorlage/Template" );
1876 aHash
[DECLARE_ASCII("calc_MS_Excel_40" )] = DECLARE_ASCII("scalc: MS Excel 4.0" );
1877 aHash
[DECLARE_ASCII("calc_MS_Excel_40_VorlageTemplate" )] = DECLARE_ASCII("scalc: MS Excel 4.0 Vorlage/Template" );
1878 aHash
[DECLARE_ASCII("calc_Rich_Text_Format_StarCalc" )] = DECLARE_ASCII("scalc: Rich Text Format (StarCalc)" );
1879 aHash
[DECLARE_ASCII("calc_SYLK" )] = DECLARE_ASCII("scalc: SYLK" );
1880 aHash
[DECLARE_ASCII("calc_DIF" )] = DECLARE_ASCII("scalc: DIF" );
1881 aHash
[DECLARE_ASCII("calc_HTML_StarCalc" )] = DECLARE_ASCII("scalc: HTML (StarCalc)" );
1882 aHash
[DECLARE_ASCII("calc_dBase" )] = DECLARE_ASCII("scalc: dBase" );
1883 aHash
[DECLARE_ASCII("calc_Lotus" )] = DECLARE_ASCII("scalc: Lotus" );
1884 aHash
[DECLARE_ASCII("calc_StarCalc_10" )] = DECLARE_ASCII("scalc: StarCalc 1.0" );
1885 aHash
[DECLARE_ASCII("calc_Text_txt_csv_StarCalc" )] = DECLARE_ASCII("scalc: Text - txt - csv (StarCalc)" );
1886 aHash
[DECLARE_ASCII("impress_StarOffice_XML_Impress" )] = DECLARE_ASCII("simpress: StarOffice XML (Impress)" );
1887 aHash
[DECLARE_ASCII("impress_StarImpress_50" )] = DECLARE_ASCII("simpress: StarImpress 5.0" );
1888 aHash
[DECLARE_ASCII("impress_StarImpress_50_Vorlage" )] = DECLARE_ASCII("simpress: StarImpress 5.0 Vorlage" );
1889 aHash
[DECLARE_ASCII("impress_StarImpress_40" )] = DECLARE_ASCII("simpress: StarImpress 4.0" );
1890 aHash
[DECLARE_ASCII("impress_StarImpress_40_Vorlage" )] = DECLARE_ASCII("simpress: StarImpress 4.0 Vorlage" );
1891 aHash
[DECLARE_ASCII("impress_StarDraw_50_StarImpress" )] = DECLARE_ASCII("simpress: StarDraw 5.0 (StarImpress)" );
1892 aHash
[DECLARE_ASCII("impress_StarDraw_50_Vorlage_StarImpress" )] = DECLARE_ASCII("simpress: StarDraw 5.0 Vorlage (StarImpress)" );
1893 aHash
[DECLARE_ASCII("impress_StarDraw_30_StarImpress" )] = DECLARE_ASCII("simpress: StarDraw 3.0 (StarImpress)" );
1894 aHash
[DECLARE_ASCII("impress_StarDraw_30_Vorlage_StarImpress" )] = DECLARE_ASCII("simpress: StarDraw 3.0 Vorlage (StarImpress)" );
1895 aHash
[DECLARE_ASCII("impress_MS_PowerPoint_97" )] = DECLARE_ASCII("simpress: MS PowerPoint 97" );
1896 aHash
[DECLARE_ASCII("impress_MS_PowerPoint_97_Vorlage" )] = DECLARE_ASCII("simpress: MS PowerPoint 97 Vorlage" );
1897 aHash
[DECLARE_ASCII("impress_CGM_Computer_Graphics_Metafile" )] = DECLARE_ASCII("simpress: CGM - Computer Graphics Metafile" );
1898 aHash
[DECLARE_ASCII("impress_StarImpress_50_packed" )] = DECLARE_ASCII("simpress: StarImpress 5.0 (packed)" );
1899 aHash
[DECLARE_ASCII("draw_StarOffice_XML_Draw" )] = DECLARE_ASCII("sdraw: StarOffice XML (Draw)" );
1900 aHash
[DECLARE_ASCII("draw_GIF_Graphics_Interchange" )] = DECLARE_ASCII("sdraw: GIF - Graphics Interchange" );
1901 aHash
[DECLARE_ASCII("draw_PCD_Photo_CD" )] = DECLARE_ASCII("sdraw: PCD - Photo CD" );
1902 aHash
[DECLARE_ASCII("draw_PCX_Zsoft_Paintbrush" )] = DECLARE_ASCII("sdraw: PCX - Zsoft Paintbrush" );
1903 aHash
[DECLARE_ASCII("draw_PSD_Adobe_Photoshop" )] = DECLARE_ASCII("sdraw: PSD - Adobe Photoshop" );
1904 aHash
[DECLARE_ASCII("draw_PNG_Portable_Network_Graphic" )] = DECLARE_ASCII("sdraw: PNG - Portable Network Graphic" );
1905 aHash
[DECLARE_ASCII("draw_StarDraw_50" )] = DECLARE_ASCII("sdraw: StarDraw 5.0" );
1906 aHash
[DECLARE_ASCII("draw_PBM_Portable_Bitmap" )] = DECLARE_ASCII("sdraw: PBM - Portable Bitmap" );
1907 aHash
[DECLARE_ASCII("draw_PGM_Portable_Graymap" )] = DECLARE_ASCII("sdraw: PGM - Portable Graymap" );
1908 aHash
[DECLARE_ASCII("draw_PPM_Portable_Pixelmap" )] = DECLARE_ASCII("sdraw: PPM - Portable Pixelmap" );
1909 aHash
[DECLARE_ASCII("draw_RAS_Sun_Rasterfile" )] = DECLARE_ASCII("sdraw: RAS - Sun Rasterfile" );
1910 aHash
[DECLARE_ASCII("draw_TGA_Truevision_TARGA" )] = DECLARE_ASCII("sdraw: TGA - Truevision TARGA" );
1911 aHash
[DECLARE_ASCII("draw_SGV_StarDraw_20" )] = DECLARE_ASCII("sdraw: SGV - StarDraw 2.0" );
1912 aHash
[DECLARE_ASCII("draw_TIF_Tag_Image_File" )] = DECLARE_ASCII("sdraw: TIF - Tag Image File" );
1913 aHash
[DECLARE_ASCII("draw_SGF_StarOffice_Writer_SGF" )] = DECLARE_ASCII("sdraw: SGF - StarOffice Writer SGF" );
1914 aHash
[DECLARE_ASCII("draw_XPM" )] = DECLARE_ASCII("sdraw: XPM" );
1915 aHash
[DECLARE_ASCII("gif_Graphics_Interchange" )] = DECLARE_ASCII("sdraw: GIF - Graphics Interchange" );
1916 aHash
[DECLARE_ASCII("pcd_Photo_CD" )] = DECLARE_ASCII("sdraw: PCD - Photo CD" );
1917 aHash
[DECLARE_ASCII("pcx_Zsoft_Paintbrush" )] = DECLARE_ASCII("sdraw: PCX - Zsoft Paintbrush" );
1918 aHash
[DECLARE_ASCII("psd_Adobe_Photoshop" )] = DECLARE_ASCII("sdraw: PSD - Adobe Photoshop" );
1919 aHash
[DECLARE_ASCII("png_Portable_Network_Graphic" )] = DECLARE_ASCII("sdraw: PNG - Portable Network Graphic" );
1920 aHash
[DECLARE_ASCII("pbm_Portable_Bitmap" )] = DECLARE_ASCII("sdraw: PBM - Portable Bitmap" );
1921 aHash
[DECLARE_ASCII("pgm_Portable_Graymap" )] = DECLARE_ASCII("sdraw: PGM - Portable Graymap" );
1922 aHash
[DECLARE_ASCII("ppm_Portable_Pixelmap" )] = DECLARE_ASCII("sdraw: PPM - Portable Pixelmap" );
1923 aHash
[DECLARE_ASCII("ras_Sun_Rasterfile" )] = DECLARE_ASCII("sdraw: RAS - Sun Rasterfile" );
1924 aHash
[DECLARE_ASCII("tga_Truevision_TARGA" )] = DECLARE_ASCII("sdraw: TGA - Truevision TARGA" );
1925 aHash
[DECLARE_ASCII("sgv_StarDraw_20" )] = DECLARE_ASCII("sdraw: SGV - StarDraw 2.0" );
1926 aHash
[DECLARE_ASCII("tif_Tag_Image_File" )] = DECLARE_ASCII("sdraw: TIF - Tag Image File" );
1927 aHash
[DECLARE_ASCII("sgf_StarOffice_Writer_SGF" )] = DECLARE_ASCII("sdraw: SGF - StarOffice Writer SGF" );
1928 aHash
[DECLARE_ASCII("xpm_XPM" )] = DECLARE_ASCII("sdraw: XPM" );
1929 aHash
[DECLARE_ASCII("draw_StarDraw_50_Vorlage" )] = DECLARE_ASCII("sdraw: StarDraw 5.0 Vorlage" );
1930 aHash
[DECLARE_ASCII("draw_StarImpress_50_StarDraw" )] = DECLARE_ASCII("sdraw: StarImpress 5.0 (StarDraw)" );
1931 aHash
[DECLARE_ASCII("draw_StarImpress_50_Vorlage_StarDraw" )] = DECLARE_ASCII("sdraw: StarImpress 5.0 Vorlage (StarDraw)" );
1932 aHash
[DECLARE_ASCII("draw_StarImpress_40_StarDraw" )] = DECLARE_ASCII("sdraw: StarImpress 4.0 (StarDraw)" );
1933 aHash
[DECLARE_ASCII("draw_StarImpress_40_Vorlage_StarDraw" )] = DECLARE_ASCII("sdraw: StarImpress 4.0 Vorlage (StarDraw)" );
1934 aHash
[DECLARE_ASCII("draw_StarDraw_30" )] = DECLARE_ASCII("sdraw: StarDraw 3.0" );
1935 aHash
[DECLARE_ASCII("draw_StarDraw_30_Vorlage" )] = DECLARE_ASCII("sdraw: StarDraw 3.0 Vorlage" );
1936 aHash
[DECLARE_ASCII("draw_EMF_MS_Windows_Metafile" )] = DECLARE_ASCII("sdraw: EMF - MS Windows Metafile" );
1937 aHash
[DECLARE_ASCII("draw_MET_OS2_Metafile" )] = DECLARE_ASCII("sdraw: MET - OS/2 Metafile" );
1938 aHash
[DECLARE_ASCII("draw_DXF_AutoCAD_Interchange" )] = DECLARE_ASCII("sdraw: DXF - AutoCAD Interchange" );
1939 aHash
[DECLARE_ASCII("draw_EPS_Encapsulated_PostScript" )] = DECLARE_ASCII("sdraw: EPS - Encapsulated PostScript" );
1940 aHash
[DECLARE_ASCII("draw_WMF_MS_Windows_Metafile" )] = DECLARE_ASCII("sdraw: WMF - MS Windows Metafile" );
1941 aHash
[DECLARE_ASCII("draw_PCT_Mac_Pict" )] = DECLARE_ASCII("sdraw: PCT - Mac Pict" );
1942 aHash
[DECLARE_ASCII("draw_SVM_StarView_Metafile" )] = DECLARE_ASCII("sdraw: SVM - StarView Metafile" );
1943 aHash
[DECLARE_ASCII("draw_BMP_MS_Windows" )] = DECLARE_ASCII("sdraw: BMP - MS Windows" );
1944 aHash
[DECLARE_ASCII("draw_JPG_JPEG" )] = DECLARE_ASCII("sdraw: JPG - JPEG" );
1945 aHash
[DECLARE_ASCII("draw_XBM_X_Consortium" )] = DECLARE_ASCII("sdraw: XBM - X-Consortium" );
1946 aHash
[DECLARE_ASCII("emf_MS_Windows_Metafile" )] = DECLARE_ASCII("sdraw: EMF - MS Windows Metafile" );
1947 aHash
[DECLARE_ASCII("met_OS2_Metafile" )] = DECLARE_ASCII("sdraw: MET - OS/2 Metafile" );
1948 aHash
[DECLARE_ASCII("dxf_AutoCAD_Interchange" )] = DECLARE_ASCII("sdraw: DXF - AutoCAD Interchange" );
1949 aHash
[DECLARE_ASCII("eps_Encapsulated_PostScript" )] = DECLARE_ASCII("sdraw: EPS - Encapsulated PostScript" );
1950 aHash
[DECLARE_ASCII("wmf_MS_Windows_Metafile" )] = DECLARE_ASCII("sdraw: WMF - MS Windows Metafile" );
1951 aHash
[DECLARE_ASCII("pct_Mac_Pict" )] = DECLARE_ASCII("sdraw: PCT - Mac Pict" );
1952 aHash
[DECLARE_ASCII("svm_StarView_Metafile" )] = DECLARE_ASCII("sdraw: SVM - StarView Metafile" );
1953 aHash
[DECLARE_ASCII("bmp_MS_Windows" )] = DECLARE_ASCII("sdraw: BMP - MS Windows" );
1954 aHash
[DECLARE_ASCII("jpg_JPEG" )] = DECLARE_ASCII("sdraw: JPG - JPEG" );
1955 aHash
[DECLARE_ASCII("xbm_X_Consortium" )] = DECLARE_ASCII("sdraw: XBM - X-Consortium" );
1956 aHash
[DECLARE_ASCII("math_StarOffice_XML_Math" )] = DECLARE_ASCII("smath: StarOffice XML (Math)" );
1957 aHash
[DECLARE_ASCII("math_MathML_XML_Math" )] = DECLARE_ASCII("smath: MathML XML (Math)" );
1958 aHash
[DECLARE_ASCII("math_StarMath_50" )] = DECLARE_ASCII("smath: StarMath 5.0" );
1959 aHash
[DECLARE_ASCII("math_StarMath_40" )] = DECLARE_ASCII("smath: StarMath 4.0" );
1960 aHash
[DECLARE_ASCII("math_StarMath_30" )] = DECLARE_ASCII("smath: StarMath 3.0" );
1961 aHash
[DECLARE_ASCII("math_StarMath_20" )] = DECLARE_ASCII("smath: StarMath 2.0" );
1962 aHash
[DECLARE_ASCII("math_MathType_3x" )] = DECLARE_ASCII("smath: MathType 3.x" );
1965 //*****************************************************************************************************************
1966 ::rtl::OUString
XCDGenerator::impl_getOldFilterName( const ::rtl::OUString
& sNewName
)
1968 ::rtl::OUString sOldName
;
1969 ConstStringHashIterator pEntry
= m_aData
.aOldFilterNamesHash
.find(sNewName
);
1970 if( pEntry
==m_aData
.aOldFilterNamesHash
.end() )
1972 sOldName
= sNewName
;
1976 sOldName
= m_aData
.aOldFilterNamesHash
[sNewName
];
1981 //*****************************************************************************************************************
1982 void XCDGenerator::impl_classifyType( const AppMember
& rData
, const ::rtl::OUString
& sTypeName
, EFilterPackage
& ePackage
)
1984 ePackage
= E_STANDARD
;
1986 // Step over all registered filters for this type ...
1987 // Classify all of these filters. If one of them a standard filter ...
1988 // type must be a standard type too - otherwise not!
1990 CheckedStringListIterator pIterator
;
1991 ::rtl::OUString sFilterName
;
1993 while( rData
.pFilterCache
->searchFilterForType( sTypeName
, pIterator
, sFilterName
) == sal_True
)
1995 EFilterPackage eFilterPackage
;
1996 XCDGenerator::impl_classifyFilter( rData
, sFilterName
, eFilterPackage
, nOrder
);
1997 if( eFilterPackage
== E_STANDARD
)
1999 ePackage
= E_STANDARD
;
2005 //*****************************************************************************************************************
2006 void XCDGenerator::impl_classifyFilter( const AppMember
& rData
, const ::rtl::OUString
& sFilterName
, EFilterPackage
& ePackage
, sal_Int32
& nOrder
)
2008 // a) For versions less then 4 => use hard coded list of filter names to differ between standard or additional filters.
2009 // Why? This version don't support the order flag or hasn't set it right!
2010 // b) For version greater then 3 => use order of currently cached types in FilterCache!
2012 ePackage
= E_STANDARD
;
2016 if( sFilterName
== DECLARE_ASCII("writer_StarOffice_XML_Writer" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2017 if( sFilterName
== DECLARE_ASCII("writer_StarOffice_XML_Writer_Template" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2018 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2019 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_50_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2020 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2021 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_40_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2022 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2023 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_30_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; } else
2024 if( sFilterName
== DECLARE_ASCII("writer_StarWriter_20" ) ) { ePackage
= E_STANDARD
; nOrder
= 9; } else
2025 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_97" ) ) { ePackage
= E_STANDARD
; nOrder
= 10; } else
2026 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_97_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 11; } else
2027 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_95" ) ) { ePackage
= E_STANDARD
; nOrder
= 12; } else
2028 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_95_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 13; } else
2029 if( sFilterName
== DECLARE_ASCII("writer_MS_WinWord_2x_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 14; } else
2030 if( sFilterName
== DECLARE_ASCII("writer_MS_WinWord_1x_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 15; } else
2031 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_6x_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 16; } else
2032 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_5x_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 17; } else
2033 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_4x_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 18; } else
2034 if( sFilterName
== DECLARE_ASCII("writer_MS_Word_3x_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 19; } else
2035 if( sFilterName
== DECLARE_ASCII("writer_WordPerfect_Win_70_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 20; } else
2036 if( sFilterName
== DECLARE_ASCII("writer_WordPerfect_Win_61_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 21; } else
2037 if( sFilterName
== DECLARE_ASCII("writer_WordPerfect_Win_60_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 22; } else
2038 if( sFilterName
== DECLARE_ASCII("writer_WordPerfect_Win_51_52_W4W" ) ) { ePackage
= E_STANDARD
; nOrder
= 23; } else
2039 if( sFilterName
== DECLARE_ASCII("writer_HTML_StarWriter" ) ) { ePackage
= E_STANDARD
; nOrder
= 24; } else
2040 if( sFilterName
== DECLARE_ASCII("writer_Text" ) ) { ePackage
= E_STANDARD
; nOrder
= 25; } else
2041 if( sFilterName
== DECLARE_ASCII("writer_Text_encoded" ) ) { ePackage
= E_STANDARD
; nOrder
= 26; } else
2042 if( sFilterName
== DECLARE_ASCII("writer_Text_DOS" ) ) { ePackage
= E_STANDARD
; nOrder
= 27; } else
2043 if( sFilterName
== DECLARE_ASCII("writer_Text_Unix" ) ) { ePackage
= E_STANDARD
; nOrder
= 28; } else
2044 if( sFilterName
== DECLARE_ASCII("writer_Text_Mac" ) ) { ePackage
= E_STANDARD
; nOrder
= 29; } else
2045 if( sFilterName
== DECLARE_ASCII("writer_Rich_Text_Format" ) ) { ePackage
= E_STANDARD
; nOrder
= 30; }
2048 if( sFilterName
== DECLARE_ASCII("writer_web_HTML" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2049 if( sFilterName
== DECLARE_ASCII("writer_web_StarOffice_XML_Writer" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2050 if( sFilterName
== DECLARE_ASCII("writer_web_StarOffice_XML_Writer_Web_Template" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2051 if( sFilterName
== DECLARE_ASCII("writer_web_StarWriter_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2052 if( sFilterName
== DECLARE_ASCII("writer_web_StarWriterWeb_50_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2053 if( sFilterName
== DECLARE_ASCII("writer_web_StarWriter_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2054 if( sFilterName
== DECLARE_ASCII("writer_web_StarWriterWeb_40_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2055 if( sFilterName
== DECLARE_ASCII("writer_web_StarWriter_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; } else
2056 if( sFilterName
== DECLARE_ASCII("writer_web_Text_StarWriterWeb" ) ) { ePackage
= E_STANDARD
; nOrder
= 9; } else
2057 if( sFilterName
== DECLARE_ASCII("writer_web_Text_encoded" ) ) { ePackage
= E_STANDARD
; nOrder
= 10; } else
2058 if( sFilterName
== DECLARE_ASCII("writer_web_Text_DOS_StarWriterWeb" ) ) { ePackage
= E_STANDARD
; nOrder
= 11; } else
2059 if( sFilterName
== DECLARE_ASCII("writer_web_Text_Unix_StarWriterWeb" ) ) { ePackage
= E_STANDARD
; nOrder
= 12; } else
2060 if( sFilterName
== DECLARE_ASCII("writer_web_Text_Mac_StarWriterWeb" ) ) { ePackage
= E_STANDARD
; nOrder
= 13; }
2063 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarOffice_XML_Writer_GlobalDocument" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2064 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarOffice_XML_Writer" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2065 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarWriter_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2066 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarWriter_50GlobalDocument" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2067 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarWriter_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2068 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarWriter_40GlobalDocument" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2069 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_StarWriter_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2070 if( sFilterName
== DECLARE_ASCII("writer_globaldocument_Text_encoded" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; }
2073 if( sFilterName
== DECLARE_ASCII("calc_StarOffice_XML_Calc" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2074 if( sFilterName
== DECLARE_ASCII("calc_StarOffice_XML_Calc_Template" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2075 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2076 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_50_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2077 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2078 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_40_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2079 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2080 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_30_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; } else
2081 if( sFilterName
== DECLARE_ASCII("calc_StarCalc_10" ) ) { ePackage
= E_STANDARD
; nOrder
= 9; } else
2082 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_97" ) ) { ePackage
= E_STANDARD
; nOrder
= 10; } else
2083 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_97_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 11; } else
2084 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_95" ) ) { ePackage
= E_STANDARD
; nOrder
= 12; } else
2085 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_95_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 13; } else
2086 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_5095" ) ) { ePackage
= E_STANDARD
; nOrder
= 14; } else
2087 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_5095_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 15; } else
2088 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 16; } else
2089 if( sFilterName
== DECLARE_ASCII("calc_MS_Excel_40_VorlageTemplate" ) ) { ePackage
= E_STANDARD
; nOrder
= 17; } else
2090 if( sFilterName
== DECLARE_ASCII("calc_HTML_StarCalc" ) ) { ePackage
= E_STANDARD
; nOrder
= 18; } else
2091 if( sFilterName
== DECLARE_ASCII("calc_HTML_WebQuery" ) ) { ePackage
= E_STANDARD
; nOrder
= 19; } else
2092 if( sFilterName
== DECLARE_ASCII("calc_Rich_Text_Format_StarCalc" ) ) { ePackage
= E_STANDARD
; nOrder
= 20; } else
2093 if( sFilterName
== DECLARE_ASCII("calc_Text_txt_csv_StarCalc" ) ) { ePackage
= E_STANDARD
; nOrder
= 21; } else
2094 if( sFilterName
== DECLARE_ASCII("calc_dBase" ) ) { ePackage
= E_STANDARD
; nOrder
= 22; } else
2095 if( sFilterName
== DECLARE_ASCII("calc_Lotus" ) ) { ePackage
= E_STANDARD
; nOrder
= 23; } else
2096 if( sFilterName
== DECLARE_ASCII("calc_SYLK" ) ) { ePackage
= E_STANDARD
; nOrder
= 24; } else
2097 if( sFilterName
== DECLARE_ASCII("calc_DIF" ) ) { ePackage
= E_STANDARD
; nOrder
= 25; }
2100 if( sFilterName
== DECLARE_ASCII("impress_StarOffice_XML_Impress" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2101 if( sFilterName
== DECLARE_ASCII("impress_StarOffice_XML_Impress_Template" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2102 if( sFilterName
== DECLARE_ASCII("impress_StarImpress_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2103 if( sFilterName
== DECLARE_ASCII("impress_StarImpress_50_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2104 if( sFilterName
== DECLARE_ASCII("impress_StarImpress_50_packed" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2105 if( sFilterName
== DECLARE_ASCII("impress_StarImpress_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2106 if( sFilterName
== DECLARE_ASCII("impress_StarImpress_40_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2107 if( sFilterName
== DECLARE_ASCII("impress_MS_PowerPoint_97" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; } else
2108 if( sFilterName
== DECLARE_ASCII("impress_MS_PowerPoint_97_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 9; } else
2109 if( sFilterName
== DECLARE_ASCII("impress_StarOffice_XML_Draw" ) ) { ePackage
= E_STANDARD
; nOrder
= 10; } else
2110 if( sFilterName
== DECLARE_ASCII("impress_StarDraw_50_StarImpress" ) ) { ePackage
= E_STANDARD
; nOrder
= 11; } else
2111 if( sFilterName
== DECLARE_ASCII("impress_StarDraw_50_Vorlage_StarImpress" ) ) { ePackage
= E_STANDARD
; nOrder
= 12; } else
2112 if( sFilterName
== DECLARE_ASCII("impress_StarDraw_30_StarImpress" ) ) { ePackage
= E_STANDARD
; nOrder
= 13; } else
2113 if( sFilterName
== DECLARE_ASCII("impress_StarDraw_30_Vorlage_StarImpress" ) ) { ePackage
= E_STANDARD
; nOrder
= 14; } else
2114 if( sFilterName
== DECLARE_ASCII("impress_CGM_Computer_Graphics_Metafile" ) ) { ePackage
= E_STANDARD
; nOrder
= 15; }
2117 if( sFilterName
== DECLARE_ASCII("draw_StarOffice_XML_Draw" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2118 if( sFilterName
== DECLARE_ASCII("draw_StarOffice_XML_Draw_Template" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2119 if( sFilterName
== DECLARE_ASCII("draw_StarDraw_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2120 if( sFilterName
== DECLARE_ASCII("draw_StarDraw_50_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2121 if( sFilterName
== DECLARE_ASCII("draw_StarDraw_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2122 if( sFilterName
== DECLARE_ASCII("draw_StarDraw_30_Vorlage" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2123 if( sFilterName
== DECLARE_ASCII("draw_StarOffice_XML_Impress" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2124 if( sFilterName
== DECLARE_ASCII("draw_StarImpress_50_StarDraw" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; } else
2125 if( sFilterName
== DECLARE_ASCII("draw_StarImpress_50_Vorlage_StarDraw" ) ) { ePackage
= E_STANDARD
; nOrder
= 9; } else
2126 if( sFilterName
== DECLARE_ASCII("draw_StarImpress_40_StarDraw" ) ) { ePackage
= E_STANDARD
; nOrder
= 10; } else
2127 if( sFilterName
== DECLARE_ASCII("draw_StarImpress_40_Vorlage_StarDraw" ) ) { ePackage
= E_STANDARD
; nOrder
= 11; } else
2128 if( sFilterName
== DECLARE_ASCII("draw_SGV_StarDraw_20" ) ) { ePackage
= E_STANDARD
; nOrder
= 12; } else
2129 if( sFilterName
== DECLARE_ASCII("draw_SGF_StarOffice_Writer_SGF" ) ) { ePackage
= E_STANDARD
; nOrder
= 13; } else
2130 if( sFilterName
== DECLARE_ASCII("draw_SVM_StarView_Metafile" ) ) { ePackage
= E_STANDARD
; nOrder
= 14; } else
2131 if( sFilterName
== DECLARE_ASCII("draw_WMF_MS_Windows_Metafile" ) ) { ePackage
= E_STANDARD
; nOrder
= 15; } else
2132 if( sFilterName
== DECLARE_ASCII("draw_EMF_MS_Windows_Metafile" ) ) { ePackage
= E_STANDARD
; nOrder
= 16; } else
2133 if( sFilterName
== DECLARE_ASCII("draw_EPS_Encapsulated_PostScript" ) ) { ePackage
= E_STANDARD
; nOrder
= 17; } else
2134 if( sFilterName
== DECLARE_ASCII("draw_DXF_AutoCAD_Interchange" ) ) { ePackage
= E_STANDARD
; nOrder
= 18; } else
2135 if( sFilterName
== DECLARE_ASCII("draw_BMP_MS_Windows" ) ) { ePackage
= E_STANDARD
; nOrder
= 19; } else
2136 if( sFilterName
== DECLARE_ASCII("draw_GIF_Graphics_Interchange" ) ) { ePackage
= E_STANDARD
; nOrder
= 20; } else
2137 if( sFilterName
== DECLARE_ASCII("draw_JPG_JPEG" ) ) { ePackage
= E_STANDARD
; nOrder
= 21; } else
2138 if( sFilterName
== DECLARE_ASCII("draw_MET_OS2_Metafile" ) ) { ePackage
= E_STANDARD
; nOrder
= 22; } else
2139 if( sFilterName
== DECLARE_ASCII("draw_PBM_Portable_Bitmap" ) ) { ePackage
= E_STANDARD
; nOrder
= 23; } else
2140 if( sFilterName
== DECLARE_ASCII("draw_PCD_Photo_CD_Base" ) ) { ePackage
= E_STANDARD
; nOrder
= 24; } else
2141 if( sFilterName
== DECLARE_ASCII("draw_PCD_Photo_CD_Base4" ) ) { ePackage
= E_STANDARD
; nOrder
= 25; } else
2142 if( sFilterName
== DECLARE_ASCII("draw_PCD_Photo_CD_Base16" ) ) { ePackage
= E_STANDARD
; nOrder
= 26; } else
2143 if( sFilterName
== DECLARE_ASCII("draw_PCT_Mac_Pict" ) ) { ePackage
= E_STANDARD
; nOrder
= 27; } else
2144 if( sFilterName
== DECLARE_ASCII("draw_PCX_Zsoft_Paintbrush" ) ) { ePackage
= E_STANDARD
; nOrder
= 28; } else
2145 if( sFilterName
== DECLARE_ASCII("draw_PGM_Portable_Graymap" ) ) { ePackage
= E_STANDARD
; nOrder
= 29; } else
2146 if( sFilterName
== DECLARE_ASCII("draw_PNG_Portable_Network_Graphic" ) ) { ePackage
= E_STANDARD
; nOrder
= 30; } else
2147 if( sFilterName
== DECLARE_ASCII("draw_PPM_Portable_Pixelmap" ) ) { ePackage
= E_STANDARD
; nOrder
= 31; } else
2148 if( sFilterName
== DECLARE_ASCII("draw_PSD_Adobe_Photoshop" ) ) { ePackage
= E_STANDARD
; nOrder
= 32; } else
2149 if( sFilterName
== DECLARE_ASCII("draw_RAS_Sun_Rasterfile" ) ) { ePackage
= E_STANDARD
; nOrder
= 33; } else
2150 if( sFilterName
== DECLARE_ASCII("draw_TGA_Truevision_TARGA" ) ) { ePackage
= E_STANDARD
; nOrder
= 34; } else
2151 if( sFilterName
== DECLARE_ASCII("draw_TIF_Tag_Image_File" ) ) { ePackage
= E_STANDARD
; nOrder
= 35; } else
2152 if( sFilterName
== DECLARE_ASCII("draw_XBM_X_Consortium" ) ) { ePackage
= E_STANDARD
; nOrder
= 36; } else
2153 if( sFilterName
== DECLARE_ASCII("draw_XPM" ) ) { ePackage
= E_STANDARD
; nOrder
= 37; }
2156 if( sFilterName
== DECLARE_ASCII("chart_StarOffice_XML_Chart" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2157 if( sFilterName
== DECLARE_ASCII("chart_StarChart_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2158 if( sFilterName
== DECLARE_ASCII("chart_StarChart_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2159 if( sFilterName
== DECLARE_ASCII("chart_StarChart_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; }
2162 if( sFilterName
== DECLARE_ASCII("math_StarOffice_XML_Math" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2163 if( sFilterName
== DECLARE_ASCII("math_StarMath_50" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2164 if( sFilterName
== DECLARE_ASCII("math_StarMath_40" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2165 if( sFilterName
== DECLARE_ASCII("math_StarMath_30" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2166 if( sFilterName
== DECLARE_ASCII("math_StarMath_20" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2167 if( sFilterName
== DECLARE_ASCII("math_MathML_XML_Math" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2168 if( sFilterName
== DECLARE_ASCII("math_MathType_3x" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; }
2171 if( sFilterName
== DECLARE_ASCII("bmp_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 1; } else
2172 if( sFilterName
== DECLARE_ASCII("bmp_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 2; } else
2173 if( sFilterName
== DECLARE_ASCII("dxf_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 3; } else
2174 if( sFilterName
== DECLARE_ASCII("emf_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 4; } else
2175 if( sFilterName
== DECLARE_ASCII("emf_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 5; } else
2176 if( sFilterName
== DECLARE_ASCII("eps_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 6; } else
2177 if( sFilterName
== DECLARE_ASCII("eps_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 7; } else
2178 if( sFilterName
== DECLARE_ASCII("gif_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 8; } else
2179 if( sFilterName
== DECLARE_ASCII("gif_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 9; } else
2180 if( sFilterName
== DECLARE_ASCII("jpg_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 10; } else
2181 if( sFilterName
== DECLARE_ASCII("jpg_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 11; } else
2182 if( sFilterName
== DECLARE_ASCII("met_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 12; } else
2183 if( sFilterName
== DECLARE_ASCII("met_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 13; } else
2184 if( sFilterName
== DECLARE_ASCII("pbm_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 14; } else
2185 if( sFilterName
== DECLARE_ASCII("pbm_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 15; } else
2186 if( sFilterName
== DECLARE_ASCII("pcd_Import_Base16" ) ) { ePackage
= E_STANDARD
; nOrder
= 16; } else
2187 if( sFilterName
== DECLARE_ASCII("pcd_Import_Base4" ) ) { ePackage
= E_STANDARD
; nOrder
= 17; } else
2188 if( sFilterName
== DECLARE_ASCII("pcd_Import_Base" ) ) { ePackage
= E_STANDARD
; nOrder
= 18; } else
2189 if( sFilterName
== DECLARE_ASCII("pct_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 19; } else
2190 if( sFilterName
== DECLARE_ASCII("pct_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 20; } else
2191 if( sFilterName
== DECLARE_ASCII("pcx_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 21; } else
2192 if( sFilterName
== DECLARE_ASCII("pgm_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 22; } else
2193 if( sFilterName
== DECLARE_ASCII("pgm_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 23; } else
2194 if( sFilterName
== DECLARE_ASCII("png_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 24; } else
2195 if( sFilterName
== DECLARE_ASCII("png_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 25; } else
2196 if( sFilterName
== DECLARE_ASCII("ppm_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 26; } else
2197 if( sFilterName
== DECLARE_ASCII("ppm_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 27; } else
2198 if( sFilterName
== DECLARE_ASCII("psd_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 28; } else
2199 if( sFilterName
== DECLARE_ASCII("ras_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 29; } else
2200 if( sFilterName
== DECLARE_ASCII("ras_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 30; } else
2201 if( sFilterName
== DECLARE_ASCII("sgf_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 31; } else
2202 if( sFilterName
== DECLARE_ASCII("sgv_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 32; } else
2203 if( sFilterName
== DECLARE_ASCII("svg_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 33; } else
2204 if( sFilterName
== DECLARE_ASCII("svm_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 34; } else
2205 if( sFilterName
== DECLARE_ASCII("svm_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 35; } else
2206 if( sFilterName
== DECLARE_ASCII("tga_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 36; } else
2207 if( sFilterName
== DECLARE_ASCII("tif_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 37; } else
2208 if( sFilterName
== DECLARE_ASCII("tif_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 38; } else
2209 if( sFilterName
== DECLARE_ASCII("wmf_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 39; } else
2210 if( sFilterName
== DECLARE_ASCII("wmf_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 40; } else
2211 if( sFilterName
== DECLARE_ASCII("xbm_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 41; } else
2212 if( sFilterName
== DECLARE_ASCII("xpm_Import" ) ) { ePackage
= E_STANDARD
; nOrder
= 42; } else
2213 if( sFilterName
== DECLARE_ASCII("xpm_Export" ) ) { ePackage
= E_STANDARD
; nOrder
= 43; }
2216 //*****************************************************************************************************************
2217 void XCDGenerator::impl_orderAlphabetical( css::uno::Sequence
< ::rtl::OUString
>& lList
)
2219 ::std::vector
< ::rtl::OUString
> lSortedList
;
2223 // Copy sequence to vector
2224 nCount
= lList
.getLength();
2225 for( nItem
=0; nItem
<nCount
; ++nItem
)
2227 lSortedList
.push_back( lList
[nItem
] );
2230 // sort in a alphabetical order
2231 ::std::sort( lSortedList
.begin(), lSortedList
.end() );
2233 // copy sorted list back to sequence
2235 for( ::std::vector
< ::rtl::OUString
>::iterator pIterator
=lSortedList
.begin(); pIterator
!=lSortedList
.end(); ++pIterator
)
2237 lList
[nItem
] = *pIterator
;
2242 //*****************************************************************************************************************
2243 class ModifiedUTF7Buffer
2245 rtl::OUStringBuffer
& m_rBuffer
;
2246 sal_uInt32 m_nValue
;
2250 ModifiedUTF7Buffer(rtl::OUStringBuffer
* pTheBuffer
):
2251 m_rBuffer(*pTheBuffer
), m_nFilled(0) {}
2253 inline void write(sal_Unicode c
);
2258 inline void ModifiedUTF7Buffer::write(sal_Unicode c
)
2263 m_nValue
= sal_uInt32(c
) << 8;
2268 m_nValue
|= sal_uInt32(c
);
2274 m_nValue
|= sal_uInt32(c
) >> 8;
2277 m_nValue
= (sal_uInt32(c
) & 0xFF) << 16;
2283 void ModifiedUTF7Buffer::flush()
2285 static sal_Unicode
const aModifiedBase64
[64]
2286 = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
2287 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
2288 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
2289 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
2290 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '.' };
2294 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 18]);
2295 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 12 & 63]);
2299 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 18]);
2300 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 12 & 63]);
2301 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 6 & 63]);
2305 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 18]);
2306 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 12 & 63]);
2307 m_rBuffer
.append(aModifiedBase64
[m_nValue
>> 6 & 63]);
2308 m_rBuffer
.append(aModifiedBase64
[m_nValue
& 63]);
2316 sal_Bool
XCDGenerator::impl_isUsAsciiAlphaDigit(sal_Unicode c
, sal_Bool bDigitAllowed
)
2318 return c
>= 'A' && c
<= 'Z' || c
>= 'a' && c
<= 'z'
2319 || bDigitAllowed
&& c
>= '0' && c
<= '9';
2322 ::rtl::OUString
XCDGenerator::impl_encodeSetName( const ::rtl::OUString
& rSource
)
2324 return impl_encodeSpecialSigns( rSource
);
2326 rtl::OUStringBuffer aTarget;
2328 sal_Unicode const * pBegin = rSource.getStr();
2329 sal_Unicode const * pEnd = pBegin + rSource.getLength();
2330 sal_Unicode const * pCopyEnd = pBegin;
2331 sal_Unicode const * p = pBegin;
2335 if (!impl_isUsAsciiAlphaDigit(c,p != pBegin))
2343 aTarget.append(pCopyEnd, p - pCopyEnd);
2344 aTarget.append(sal_Unicode('_'));
2345 ModifiedUTF7Buffer aBuffer(&aTarget);
2353 if (impl_isUsAsciiAlphaDigit(c) || c == '-' || c == '.')
2357 aTarget.append(sal_Unicode('_'));
2364 if (pCopyEnd == pBegin)
2368 aTarget.append(pCopyEnd, pEnd - pCopyEnd);
2369 return aTarget.makeStringAndClear();