1 --- lotuswordpro/source/filter/LotusWordProImportFilter.cxx.old 1970-01-01 00:00:00.000000000 +0000
2 +++ lotuswordpro/source/filter/LotusWordProImportFilter.cxx 2009-04-06 16:41:57.000000000 +0000
4 +#include <osl/diagnose.h>
5 +#include <rtl/tencinfo.h>
6 +#include <com/sun/star/lang/XMultiServiceFactory.hpp>
7 +#include <com/sun/star/io/XInputStream.hpp>
8 +#include <com/sun/star/xml/sax/XAttributeList.hpp>
9 +#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
10 +#include <com/sun/star/xml/sax/XParser.hpp>
11 +#include <com/sun/star/ucb/XCommandEnvironment.hpp>
12 +#include <com/sun/star/io/XInputStream.hpp>
13 +#include <com/sun/star/uno/Reference.hxx>
14 +#include <xmloff/attrlist.hxx>
15 +#include <xmloff/xmlkywd.hxx>
17 +#include <ucbhelper/content.hxx>
19 +#include <tools/stream.hxx>
21 +#include "LotusWordProImportFilter.hxx"
25 +using namespace ::rtl;
26 +using namespace com::sun::star;
28 +using rtl::OUStringBuffer;
30 +using com::sun::star::uno::Sequence;
31 +using com::sun::star::lang::XComponent;
32 +using com::sun::star::uno::Any;
33 +using com::sun::star::uno::UNO_QUERY;
34 +using com::sun::star::uno::XInterface;
35 +using com::sun::star::uno::Exception;
36 +using com::sun::star::uno::RuntimeException;
37 +using com::sun::star::io::XInputStream;
38 +using com::sun::star::lang::XMultiServiceFactory;
39 +using com::sun::star::beans::PropertyValue;
40 +using com::sun::star::document::XFilter;
41 +using com::sun::star::document::XExtendedFilterDetection;
42 +using com::sun::star::ucb::XCommandEnvironment;
44 +using com::sun::star::document::XImporter;
45 +using com::sun::star::xml::sax::XAttributeList;
46 +using com::sun::star::xml::sax::XDocumentHandler;
47 +using com::sun::star::xml::sax::XParser;
50 +static const sal_Int8 header[] = { 0x57, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f };
52 +const sal_Int32 MAXCHARS = 65534;
54 + // Simple xml importer, currently the importer is very very simple
55 + // it only extracts pure text from the wordpro file. Absolutely no formating
56 + // information is currently imported.
57 + // To reflect the current state of this importer the sax events sent
58 + // to the document handler are also the simplest possible. In addition to
59 + // the the basic attributes set up for the 'office:document' element
60 + // all the imported text is inserted into 'text:p' elements.
61 + // The parser extracts the pure text and creates simple a simple 'text:p'
62 + // element to contain that text. In the event of the text exceeding
63 + // MAXCHARS new 'text:p' elements are created as needed
64 +class SimpleXMLImporter
68 + uno::Reference< XDocumentHandler > m_xDocHandler;
69 + std::vector< OUString > m_vStringChunks;
70 + SvStream& m_InputStream;
72 + bool CheckValidData( sal_Int8 nChar )
74 + if( ( nChar >= 0x20 && nChar <= 0x7E ) && ( nChar != 0X40 ) )
79 + void addAttribute( SvXMLAttributeList* pAttrList, const char* key, const char* val )
81 + pAttrList->AddAttribute( OUString::createFromAscii( key ), OUString::createFromAscii( val ) );
84 + void writeTextChunk( const OUString& sChunk )
86 + SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
87 + uno::Reference < XAttributeList > xAttrList(pAttrList);
89 + pAttrList->AddAttribute( OUString(RTL_CONSTASCII_USTRINGPARAM("text:style-name")), OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")));
91 + m_xDocHandler->startElement( OUString(RTL_CONSTASCII_USTRINGPARAM("text:p")), xAttrList );
92 + m_xDocHandler->characters( sChunk );
93 + m_xDocHandler->endElement( OUString(RTL_CONSTASCII_USTRINGPARAM("text:p") ) );
96 + void writeDocContentPreamble()
98 + SvXMLAttributeList *pDocContentPropList = new SvXMLAttributeList();
99 + uno::Reference < XAttributeList > xDocContentList(pDocContentPropList);
100 + addAttribute( pDocContentPropList, "xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
101 + addAttribute( pDocContentPropList, "xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
102 + addAttribute( pDocContentPropList, "xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
103 + addAttribute( pDocContentPropList, "xmlns:table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
104 + addAttribute( pDocContentPropList, "xmlns:draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" );
105 + addAttribute( pDocContentPropList, "xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
106 + addAttribute( pDocContentPropList, "xmlns:xlink", "http://www.w3.org/1999/xlink" );
107 + addAttribute( pDocContentPropList, "xmlns:dc", "http://purl.org/dc/elements/1.1/" );
108 + addAttribute( pDocContentPropList, "xmlns:meta", "urn:oasis:names:tc:opendocument:xmlns:meta:1.0" );
109 + addAttribute( pDocContentPropList, "xmlns:number", "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
110 + addAttribute( pDocContentPropList, "xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" );
111 + addAttribute( pDocContentPropList, "xmlns:chart", "urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
112 + addAttribute( pDocContentPropList, "xmlns:dr3d", "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
113 + addAttribute( pDocContentPropList, "xmlns:math", "http://www.w3.org/1998/Math/MathML" );
114 + addAttribute( pDocContentPropList, "xmlns:form", "urn:oasis:names:tc:opendocument:xmlns:form:1.0" );
115 + addAttribute( pDocContentPropList, "xmlns:script", "urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
116 + addAttribute( pDocContentPropList, "xmlns:ooo", "http://openoffice.org/2004/office" );
117 + addAttribute( pDocContentPropList, "xmlns:ooow", "http://openoffice.org/2004/writer" );
118 + addAttribute( pDocContentPropList, "xmlns:oooc", "http://openoffice.org/2004/calc" );
119 + addAttribute( pDocContentPropList, "xmlns:dom", "http://www.w3.org/2001/xml-events" );
120 + addAttribute( pDocContentPropList, "xmlns:xforms", "http://www.w3.org/2002/xforms" );
121 + addAttribute( pDocContentPropList, "xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
122 + addAttribute( pDocContentPropList, "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" );
123 + addAttribute( pDocContentPropList, "office:version", "1.0");
124 + m_xDocHandler->startElement(OUString(RTL_CONSTASCII_USTRINGPARAM("office:document-content" ) ), xDocContentList );
129 + UINT8 nDelim, nDummy, nLen, nData;
132 + OUStringBuffer sBuf( MAXCHARS );
133 + sal_Int32 nChars = 0;
135 + while( !m_InputStream.IsEof())
137 + m_InputStream >> nDelim;
138 + if( nDelim == 0x40 )
140 + m_InputStream >> nDummy >> nOpcode;
143 + case 0xC00B: // Dictionary Word
144 + m_InputStream >> nLen >> nDummy;
145 + while( nLen > 0 && !m_InputStream.IsEof() )
148 + m_InputStream >> nChar;
149 + if( CheckValidData( nChar ) )
151 + sBuf.appendAscii( (sal_Char*)(&nChar),1 );
152 + if ( ++nChars >= MAXCHARS )
154 + m_vStringChunks.push_back( sBuf.makeStringAndClear() );
162 + case 0x0242: // Non Dictionary word
163 + m_InputStream >> nData;
164 + if( nData == 0x02 )
166 + m_InputStream >> nLen >> nDummy;
167 + while( nLen > 0 && !m_InputStream.IsEof() )
169 + m_InputStream >> nData;
170 + if( CheckValidData( nData ) )
172 + sBuf.appendAscii( (sal_Char*)(&nData),1 );
173 + if ( ++nChars >= MAXCHARS )
175 + m_vStringChunks.push_back( sBuf.makeStringAndClear() );
187 + m_vStringChunks.push_back( sBuf.makeStringAndClear() );
192 + if ( m_vStringChunks.size() )
194 + m_xDocHandler->startDocument();
195 + SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
196 + writeDocContentPreamble(); // writes "office:document-content" elem
197 + uno::Reference < XAttributeList > xAttrList(pAttrList);
199 + m_xDocHandler->startElement( OUString(RTL_CONSTASCII_USTRINGPARAM("office:body")), xAttrList );
201 + // process strings imported
202 + std::vector< OUString >::const_iterator it = m_vStringChunks.begin();
203 + std::vector< OUString >::const_iterator it_end = m_vStringChunks.end();
204 + for ( ; it!=it_end; ++it )
205 + writeTextChunk( *it );
207 + m_xDocHandler->endElement( OUString(RTL_CONSTASCII_USTRINGPARAM("office:body") ) );
208 + m_xDocHandler->endElement( OUString(RTL_CONSTASCII_USTRINGPARAM("office:document-content")));
209 + m_xDocHandler->endDocument();
214 + SimpleXMLImporter( const uno::Reference< XDocumentHandler >& xDocHandler, SvStream& rStream ) : m_xDocHandler( xDocHandler ), m_InputStream( rStream ) {}
223 +sal_Bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
224 + throw (RuntimeException)
227 + sal_Int32 nLength = aDescriptor.getLength();
228 + const PropertyValue * pValue = aDescriptor.getConstArray();
230 + uno::Reference < XInputStream > xInputStream;
231 + for ( sal_Int32 i = 0 ; i < nLength; i++)
233 + if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
234 + pValue[i].Value >>= xInputStream;
235 + else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
236 + pValue[i].Value >>= sURL;
237 + rtl_TextEncoding encoding = RTL_TEXTENCODING_INFO_ASCII;
239 + if ( !xInputStream.is() )
246 + sFileName = OUStringToOString(sURL, RTL_TEXTENCODING_INFO_ASCII);
248 + SvFileStream inputStream( sURL, STREAM_READ );
249 + if ( inputStream.IsEof() || ( inputStream.GetError() != SVSTREAM_OK ) )
252 + // An XML import service: what we push sax messages to..
253 + OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLImporter" ) );
255 + uno::Reference< XDocumentHandler > xInternalHandler( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
256 + uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
257 + xImporter->setTargetDocument(mxDoc);
259 + SimpleXMLImporter xmlImporter( xInternalHandler, inputStream );
260 + xmlImporter.import();
265 +sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
266 + throw (RuntimeException)
268 + return importImpl ( aDescriptor );
270 +void SAL_CALL LotusWordProImportFilter::cancel( )
271 + throw (RuntimeException)
276 +void SAL_CALL LotusWordProImportFilter::setTargetDocument( const uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
277 + throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
279 + meType = FILTER_IMPORT;
283 +// XExtendedFilterDetection
284 +OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
285 + throw( com::sun::star::uno::RuntimeException )
288 + OUString sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "" ) );
289 + sal_Int32 nLength = Descriptor.getLength();
290 + sal_Int32 location = nLength;
292 + const PropertyValue * pValue = Descriptor.getConstArray();
293 + uno::Reference < XInputStream > xInputStream;
294 + for ( sal_Int32 i = 0 ; i < nLength; i++)
296 + if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "TypeName" ) ) )
298 + else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
299 + pValue[i].Value >>= xInputStream;
300 + else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
301 + pValue[i].Value >>= sURL;
303 + rtl_TextEncoding encoding = RTL_TEXTENCODING_INFO_ASCII;
306 + uno::Reference< com::sun::star::ucb::XCommandEnvironment > xEnv;
307 + if (!xInputStream.is())
311 + ::ucbhelper::Content aContent(sURL, xEnv);
312 + xInputStream = aContent.openStream();
314 + catch ( Exception& )
316 + return ::rtl::OUString();
319 + if (!xInputStream.is())
320 + return ::rtl::OUString();
323 + Sequence< ::sal_Int8 > aData;
324 + sal_Int32 nLen = sizeof( header ) / sizeof( header[0] );
325 + if ( ( nLen == xInputStream->readBytes( aData, nLen ) ) )
326 + if ( memcmp( ( void* )header, (void*) aData.getConstArray(), nLen ) == 0 )
327 + sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_LotusWordPro_Document" ) );
333 +void SAL_CALL LotusWordProImportFilter::initialize( const Sequence< Any >& aArguments )
334 + throw (Exception, RuntimeException)
336 + Sequence < PropertyValue > aAnySeq;
337 + sal_Int32 nLength = aArguments.getLength();
338 + if ( nLength && ( aArguments[0] >>= aAnySeq ) )
340 + const PropertyValue * pValue = aAnySeq.getConstArray();
341 + nLength = aAnySeq.getLength();
342 + for ( sal_Int32 i = 0 ; i < nLength; i++)
344 + if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "Type" ) ) )
346 + pValue[i].Value >>= msFilterName;
352 +OUString LotusWordProImportFilter_getImplementationName ()
353 + throw (RuntimeException)
355 + return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.LotusWordProImportFilter" ) );
358 +#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
359 +#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
360 +sal_Bool SAL_CALL LotusWordProImportFilter_supportsService( const OUString& ServiceName )
361 + throw (RuntimeException)
363 + return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
364 + ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
366 +Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
367 + throw (RuntimeException)
369 + Sequence < OUString > aRet(2);
370 +// Sequence < OUString > aRet(1);
371 + OUString* pArray = aRet.getArray();
372 + pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
373 + pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
376 +#undef SERVICE_NAME2
377 +#undef SERVICE_NAME1
379 +uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
382 + return (cppu::OWeakObject*) new LotusWordProImportFilter( rSMgr );
386 +OUString SAL_CALL LotusWordProImportFilter::getImplementationName( )
387 + throw (RuntimeException)
389 + return LotusWordProImportFilter_getImplementationName();
391 +sal_Bool SAL_CALL LotusWordProImportFilter::supportsService( const OUString& rServiceName )
392 + throw (RuntimeException)
394 + return LotusWordProImportFilter_supportsService( rServiceName );
396 +Sequence< OUString > SAL_CALL LotusWordProImportFilter::getSupportedServiceNames( )
397 + throw (RuntimeException)
399 + return LotusWordProImportFilter_getSupportedServiceNames();
401 --- lotuswordpro/source/filter/LotusWordProImportFilter.hxx.old 1970-01-01 00:00:00.000000000 +0000
402 +++ lotuswordpro/source/filter/LotusWordProImportFilter.hxx 2009-04-06 16:41:57.000000000 +0000
404 +#ifndef _WORDPERFECTIMPORTFILTER_HXX
405 +#define _WORDPERFECTIMPORTFILTER_HXX
407 +#include <com/sun/star/document/XFilter.hpp>
408 +#include <com/sun/star/document/XImporter.hpp>
409 +#include <com/sun/star/document/XExtendedFilterDetection.hpp>
410 +#include <com/sun/star/lang/XInitialization.hpp>
411 +#include <com/sun/star/lang/XServiceInfo.hpp>
412 +#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
413 +#include <cppuhelper/implbase5.hxx>
414 +#include <rtl/ustrbuf.hxx>
421 +/* This component will be instantiated for both import or export. Whether it calls
422 + * setSourceDocument or setTargetDocument determines which Impl function the filter
424 +class LotusWordProImportFilter : public cppu::WeakImplHelper5
426 + com::sun::star::document::XFilter,
427 + com::sun::star::document::XImporter,
428 + com::sun::star::document::XExtendedFilterDetection,
429 + com::sun::star::lang::XInitialization,
430 + com::sun::star::lang::XServiceInfo
437 + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
438 + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
439 + ::rtl::OUString msFilterName;
440 + ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
444 + sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
445 + throw (::com::sun::star::uno::RuntimeException);
448 + LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
449 + : mxMSF( rxMSF ) {}
450 + virtual ~LotusWordProImportFilter() {}
453 + virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
454 + throw (::com::sun::star::uno::RuntimeException);
455 + virtual void SAL_CALL cancel( )
456 + throw (::com::sun::star::uno::RuntimeException);
459 + virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
460 + throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
462 + //XExtendedFilterDetection
463 + virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
464 + throw( com::sun::star::uno::RuntimeException );
467 + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
468 + throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
471 + virtual ::rtl::OUString SAL_CALL getImplementationName( )
472 + throw (::com::sun::star::uno::RuntimeException);
473 + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
474 + throw (::com::sun::star::uno::RuntimeException);
475 + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
476 + throw (::com::sun::star::uno::RuntimeException);
480 +::rtl::OUString LotusWordProImportFilter_getImplementationName()
481 + throw ( ::com::sun::star::uno::RuntimeException );
483 +sal_Bool SAL_CALL LotusWordProImportFilter_supportsService( const ::rtl::OUString& ServiceName )
484 + throw ( ::com::sun::star::uno::RuntimeException );
486 +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
487 + throw ( ::com::sun::star::uno::RuntimeException );
489 +::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
490 +SAL_CALL LotusWordProImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
491 + throw ( ::com::sun::star::uno::Exception );
494 --- lotuswordpro/prj/build.lst.old 1970-01-01 00:00:00.000000000 +0000
495 +++ lotuswordpro/prj/build.lst 2009-04-06 16:41:57.000000000 +0000
497 +wp lotuswordpro : sfx2 sot svx comphelper NULL
498 +wp lotuswordpro usr1 - all lwp_mkout NULL
499 +wp lotuswordpro\source\filter nmake - all lwp_filter NULL
500 +wp lotuswordpro\util nmake - all lwp_util lwp_filter NULL
501 --- lotuswordpro/prj/d.lst.old 1970-01-01 00:00:00.000000000 +0000
502 +++ lotuswordpro/prj/d.lst 2009-04-06 16:41:57.000000000 +0000
504 +..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
505 +..\%__SRC%\bin\*.dll %_DEST%\lib%_EXT%\*.dll
506 +..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
507 --- lotuswordpro/source/filter/genericfilter.cxx.old 1970-01-01 00:00:00.000000000 +0000
508 +++ lotuswordpro/source/filter/genericfilter.cxx 2009-04-06 16:41:57.000000000 +0000
512 +#include <osl/mutex.hxx>
513 +#include <osl/thread.h>
514 +#include <cppuhelper/factory.hxx>
516 +#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
517 +#include <com/sun/star/lang/XSingleServiceFactory.hpp>
520 +#include "LotusWordProImportFilter.hxx"
522 +using namespace ::rtl;
523 +using namespace ::cppu;
524 +using namespace ::com::sun::star::uno;
525 +using namespace ::com::sun::star::lang;
526 +using namespace ::com::sun::star::registry;
530 +//==================================================================================================
531 +void SAL_CALL component_getImplementationEnvironment(
532 + const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
534 + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
536 +//==================================================================================================
537 +sal_Bool SAL_CALL component_writeInfo(
538 + void * pServiceManager, void * pRegistryKey )
544 + sal_Int32 nPos = 0;
545 + Reference< XRegistryKey > xNewKey(
546 + reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( LotusWordProImportFilter_getImplementationName() ) );
547 + xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
549 + const Sequence< OUString > & rSNL = LotusWordProImportFilter_getSupportedServiceNames();
550 + const OUString * pArray = rSNL.getConstArray();
551 + for ( nPos = rSNL.getLength(); nPos--; )
552 + xNewKey->createKey( pArray[nPos] );
556 + catch (InvalidRegistryException &)
558 + OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
563 +//==================================================================================================
564 +void * SAL_CALL component_getFactory(
565 + const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
569 + OUString implName = OUString::createFromAscii( pImplName );
570 + if ( pServiceManager && implName.equals(LotusWordProImportFilter_getImplementationName()) )
572 + Reference< XSingleServiceFactory > xFactory( createSingleFactory(
573 + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
574 + OUString::createFromAscii( pImplName ),
575 + LotusWordProImportFilter_createInstance, LotusWordProImportFilter_getSupportedServiceNames() ) );
579 + xFactory->acquire();
580 + pRet = xFactory.get();
587 --- lotuswordpro/source/filter/makefile.mk.old 1970-01-01 00:00:00.000000000 +0000
588 +++ lotuswordpro/source/filter/makefile.mk 2009-04-06 16:41:57.000000000 +0000
594 +ENABLE_EXCEPTIONS=true
596 +.INCLUDE : settings.mk
599 + $(SLO)$/LotusWordProImportFilter.obj \
600 + $(SLO)$/genericfilter.obj
602 +.INCLUDE : target.mk
603 --- lotuswordpro/util/lwpft.map.old 1970-01-01 00:00:00.000000000 +0000
604 +++ lotuswordpro/util/lwpft.map 2009-04-06 16:41:57.000000000 +0000
608 + component_getImplementationEnvironment;
609 + component_writeInfo;
610 + component_getFactory;
614 --- lotuswordpro/util/makefile.mk.old 1970-01-01 00:00:00.000000000 +0000
615 +++ lotuswordpro/util/makefile.mk 2009-04-06 16:41:57.000000000 +0000
622 +.INCLUDE : settings.mk
624 +LIB1TARGET= $(SLB)$/$(TARGET).lib
627 +SHL1LIBS=$(LIB1TARGET)
637 +SHL1TARGET = $(TARGET)$(DLLPOSTFIX)
638 +SHL1IMPLIB = i$(SHL1TARGET)
639 +SHL1LIBS = $(LIB1TARGET)
640 +SHL1VERSIONMAP=$(TARGET).map
641 +DEF1NAME=$(SHL1TARGET)
643 +.INCLUDE : target.mk
644 --- filter/source/config/fragments/fcfg_writer.mk.old 2009-04-06 16:41:41.000000000 +0000
645 +++ filter/source/config/fragments/fcfg_writer.mk 2009-04-06 16:41:57.000000000 +0000
646 @@ -20,6 +20,7 @@ T4_WRITER = \
647 writer_WordPerfect_Document \
648 writer_MS_Works_Document \
649 writer_T602_Document \
650 + writer_LotusWordPro_Document \
652 writer_Text_encoded \
654 @@ -52,6 +53,7 @@ F4_WRITER = \
662 --- filter/source/config/fragments/filters/LotusWordPro.xcu.old 1970-01-01 00:00:00.000000000 +0000
663 +++ filter/source/config/fragments/filters/LotusWordPro.xcu 2009-04-06 16:41:57.000000000 +0000
665 + <node oor:name="LotusWordPro" oor:op="replace">
666 + <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
667 + <prop oor:name="UIComponent"/>
668 + <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.LotusWordProImportFilter</value></prop>
669 + <prop oor:name="UserData"><value>WPD</value></prop>
670 + <prop oor:name="UIName">
671 + <value xml:lang="x-default">Lotus WordPro Document</value>
673 + <prop oor:name="FileFormatVersion"><value>0</value></prop>
674 + <prop oor:name="Type"><value>writer_LotusWordPro_Document</value></prop>
675 + <prop oor:name="TemplateName"/>
676 + <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
678 --- filter/source/config/fragments/types/writer_LotusWordPro_Document.xcu.old 1970-01-01 00:00:00.000000000 +0000
679 +++ filter/source/config/fragments/types/writer_LotusWordPro_Document.xcu 2009-04-06 16:41:57.000000000 +0000
681 + <node oor:name="writer_LotusWordPro_Document" oor:op="replace" >
682 + <prop oor:name="DetectService"><value>com.sun.star.comp.Writer.LotusWordProImportFilter</value></prop>
683 + <prop oor:name="URLPattern"/>
684 + <prop oor:name="Extensions"><value>lwp</value></prop>
685 + <prop oor:name="MediaType"/>
686 + <prop oor:name="Preferred"><value>false</value></prop>
687 + <prop oor:name="PreferredFilter"><value>LotusWordPro</value></prop>
688 + <prop oor:name="UIName">
689 + <value>LotusWordPro Document</value>
691 + <prop oor:name="ClipboardFormat"/>
693 --- officecfg/registry/data/org/openoffice/Office/UI.xcu.old 2009-04-02 11:02:04.000000000 +0000
694 +++ officecfg/registry/data/org/openoffice/Office/UI.xcu 2009-04-06 16:41:57.000000000 +0000
696 <value xml:lang="en-US">Text documents</value>
698 <prop oor:name="Filters">
699 - <value oor:separator=";">HTML (StarWriter);MS WinWord 2.x (W4W);MS WinWord 6.0;MS Word 95;MS Word 95 Vorlage;MS Word 97;MS Word 97 Vorlage;StarOffice XML (Writer);StarWriter 3.0;StarWriter 3.0 Vorlage/Template;StarWriter 4.0;StarWriter 4.0 Vorlage/Template;StarWriter 5.0;StarWriter 5.0 Vorlage/Template;writer_StarOffice_XML_Writer_Template;Text;WordPerfect;writer8;writer8_template</value>
700 + <value oor:separator=";">HTML (StarWriter);MS WinWord 2.x (W4W);MS WinWord 6.0;MS Word 95;MS Word 95 Vorlage;MS Word 97;MS Word 97 Vorlage;StarOffice XML (Writer);StarWriter 3.0;StarWriter 3.0 Vorlage/Template;StarWriter 4.0;StarWriter 4.0 Vorlage/Template;StarWriter 5.0;StarWriter 5.0 Vorlage/Template;writer_StarOffice_XML_Writer_Template;Text;WordPerfect;writer8;writer8_template;LotusWordPro</value>
703 <node oor:name="com.sun.star.sheet.SpreadsheetDocument" oor:op="replace">
704 --- scp2/source/ooo/file_library_ooo.scp.old 2009-04-06 16:41:56.000000000 +0000
705 +++ scp2/source/ooo/file_library_ooo.scp 2009-04-06 16:41:57.000000000 +0000
706 @@ -953,6 +953,8 @@ STD_UNO_LIB_FILE(gid_File_Lib_Msworks,ms
708 STD_UNO_LIB_FILE(gid_File_Lib_T602Filter,t602filter)
710 +STD_UNO_LIB_FILE(gid_File_Lib_Wlwp,lwpft)
712 STD_UNO_LIB_FILE(gid_File_Lib_Writerfilter,writerfilter)
715 --- scp2/source/writer/module_writer.scp.old 2009-04-06 16:41:41.000000000 +0000
716 +++ scp2/source/writer/module_writer.scp 2009-04-06 16:41:57.000000000 +0000
717 @@ -54,6 +54,7 @@ Module gid_Module_Prg_Wrt_Bin
719 gid_File_Lib_Msworks,
720 gid_File_Lib_T602Filter,
722 gid_File_Share_Config_Sofficecfg_Writer_Menubar_Xml,
723 gid_File_Share_Config_Sofficecfg_Writerweb_Menubar_Xml,
724 gid_File_Share_Config_Sofficecfg_Writerglobal_Menubar_Xml,
728 -sw sw : l10n connectivity OOo:writerperfect svx stoc uui writerfilter NULL
729 +sw sw : l10n connectivity OOo:writerperfect OOo:lotuswordpro svx stoc uui writerfilter NULL
730 sw sw usr1 - all sw_mkout NULL
731 sw sw\inc nmake - all sw_inc NULL
732 sw sw\uiconfig\layout nmake - all sw_layout NULL