xref: /trunk/main/filter/source/flash/swffilter.cxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_filter.hxx"
26 #include <com/sun/star/frame/XDesktop.hpp>
27 #include <com/sun/star/frame/XStorable.hpp>
28 #include <com/sun/star/document/XFilter.hpp>
29 #include <com/sun/star/document/XExporter.hpp>
30 #include <com/sun/star/lang/XInitialization.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
33 #include <com/sun/star/drawing/XDrawView.hpp>
34 #include <com/sun/star/container/XIndexAccess.hpp>
35 #include <com/sun/star/frame/XModel.hpp>
36 #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
37 #include <com/sun/star/io/XOutputStream.hpp>
38 
39 #include <com/sun/star/drawing/XDrawPage.hpp>
40 #include <com/sun/star/drawing/XShapes.hpp>
41 #include <com/sun/star/frame/XDesktop.hdl>
42 #include <com/sun/star/frame/XController.hdl>
43 #include <com/sun/star/view/XSelectionSupplier.hpp>
44 
45 #include <cppuhelper/implbase1.hxx>
46 #include <cppuhelper/implbase4.hxx>
47 #include <osl/file.hxx>
48 
49 #include "swfexporter.hxx"
50 
51 //#include <stdlib.h>
52 //#include <windows.h>
53 #include <string.h>
54 
55 using namespace ::com::sun::star::uno;
56 using namespace ::com::sun::star::frame;
57 using namespace ::com::sun::star::lang;
58 using namespace ::com::sun::star::drawing;
59 using namespace ::com::sun::star::presentation;
60 using namespace ::com::sun::star::task;
61 using namespace ::com::sun::star::view;
62 
63 using ::rtl::OUString;
64 using ::rtl::OString;
65 using ::com::sun::star::lang::XComponent;
66 using ::com::sun::star::beans::PropertyValue;
67 using ::com::sun::star::io::XOutputStream;
68 using ::com::sun::star::container::XIndexAccess;
69 using ::osl::FileBase;
70 using ::com::sun::star::frame::XModel;
71 
72 namespace swf {
73 
74 typedef ::cppu::WeakImplHelper1<com::sun::star::io::XOutputStream> OslOutputStreamWrapper_Base;
75     // needed for some compilers
76 class OslOutputStreamWrapper : public OslOutputStreamWrapper_Base
77 {
78     osl::File   mrFile;
79 
80 public:
OslOutputStreamWrapper(const OUString & sFileName)81     OslOutputStreamWrapper(const OUString& sFileName) : mrFile(sFileName)
82     {
83         osl_removeFile(sFileName.pData);
84         mrFile.open(OpenFlag_Create|OpenFlag_Write);
85     }
86 
87     // stario::XOutputStream
88     virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& aData );
89     virtual void SAL_CALL flush(  );
90     virtual void SAL_CALL closeOutput(  );
91 };
92 
writeBytes(const::com::sun::star::uno::Sequence<sal_Int8> & aData)93 void SAL_CALL OslOutputStreamWrapper::writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& aData )
94 {
95     sal_uInt64 uBytesToWrite = aData.getLength();
96     sal_uInt64 uBytesWritten = 0;
97 
98     sal_Int8 const * pBuffer = aData.getConstArray();
99 
100     while( uBytesToWrite )
101     {
102         osl::File::RC eRC = mrFile.write( pBuffer, uBytesToWrite, uBytesWritten);
103 
104         switch( eRC )
105         {
106         case osl::File::E_INVAL:    // the format of the parameters was not valid
107         case osl::File::E_FBIG:        // File too large
108 
109         case osl::File::E_AGAIN:    // Operation would block
110         case osl::File::E_BADF:        // Bad file
111         case osl::File::E_FAULT:    // Bad address
112         case osl::File::E_INTR:        // function call was interrupted
113         case osl::File::E_IO:        // I/O error
114         case osl::File::E_NOLCK:    // No record locks available
115         case osl::File::E_NOLINK:    // Link has been severed
116         case osl::File::E_NOSPC:    // No space left on device
117         case osl::File::E_NXIO:        // No such device or address
118             throw com::sun::star::io::IOException();    // TODO: Better error handling
119         default: break;
120         }
121 
122         uBytesToWrite -= uBytesWritten;
123         pBuffer += uBytesWritten;
124     }
125 }
126 
flush()127 void SAL_CALL OslOutputStreamWrapper::flush(  )
128 {
129 }
130 
closeOutput()131 void SAL_CALL OslOutputStreamWrapper::closeOutput(  )
132 {
133     osl::File::RC eRC = mrFile.close();
134 
135     switch( eRC )
136     {
137     case osl::File::E_INVAL:    // the format of the parameters was not valid
138 
139     case osl::File::E_BADF:        // Bad file
140     case osl::File::E_INTR:        // function call was interrupted
141     case osl::File::E_NOLINK:    // Link has been severed
142     case osl::File::E_NOSPC:    // No space left on device
143     case osl::File::E_IO:        // I/O error
144         throw com::sun::star::io::IOException();    // TODO: Better error handling
145     default: break;
146     }
147 }
148 
149 // -----------------------------------------------------------------------------
150 
151 class FlashExportFilter : public cppu::WeakImplHelper4
152 <
153     com::sun::star::document::XFilter,
154     com::sun::star::document::XExporter,
155     com::sun::star::lang::XInitialization,
156     com::sun::star::lang::XServiceInfo
157 >
158 {
159     Reference< XComponent > mxDoc;
160     Reference< XMultiServiceFactory > mxMSF;
161     Reference< XStatusIndicator> mxStatusIndicator;
162 
163     // #56084# variables for selection export
164     Reference< XShapes > mxSelectedShapes;
165     Reference< XDrawPage > mxSelectedDrawPage;
166     bool mbExportSelection;
167 
168     osl::File* mpFile;
169 
170 public:
171     FlashExportFilter( const Reference< XMultiServiceFactory > &rxMSF);
172 
173     // XFilter
174     virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& aDescriptor );
175 
176     sal_Bool ExportAsMultipleFiles( const Sequence< PropertyValue >& aDescriptor );
177     sal_Bool ExportAsSingleFile( const Sequence< PropertyValue >& aDescriptor );
178 
179     virtual void SAL_CALL cancel( );
180 
181     // XExporter
182     virtual void SAL_CALL setSourceDocument( const Reference< XComponent >& xDoc );
183 
184     // XInitialization
185     virtual void SAL_CALL initialize( const Sequence< Any >& aArguments );
186 
187     // XServiceInfo
188     virtual OUString SAL_CALL getImplementationName();
189     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName );
190     virtual Sequence< OUString > SAL_CALL getSupportedServiceNames();
191 };
192 
193 // -----------------------------------------------------------------------------
194 
FlashExportFilter(const Reference<XMultiServiceFactory> & rxMSF)195 FlashExportFilter::FlashExportFilter(const Reference< XMultiServiceFactory > &rxMSF)
196 :   mxDoc(),
197     mxMSF( rxMSF ),
198     mxStatusIndicator(),
199     mxSelectedShapes(),
200     mxSelectedDrawPage(),
201     mbExportSelection(false),
202     mpFile(0)
203 {
204 }
205 
206 
207 // -----------------------------------------------------------------------------
208 
exportBackground(FlashExporter & aFlashExporter,Reference<XDrawPage> xDrawPage,OUString sPath,sal_uInt32 nPage,const char * suffix)209 OUString exportBackground(FlashExporter &aFlashExporter, Reference< XDrawPage > xDrawPage, OUString sPath, sal_uInt32 nPage, const char* suffix)
210 {
211     OUString filename = STR("slide") + VAL(nPage+1) + STR(suffix) + STR(".swf");
212     OUString fullpath = sPath + STR("/") + filename;
213 
214     // AS: If suffix is "o" then the last parameter is true (for exporting objects).
215     Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY);
216     sal_uInt16 nCached = aFlashExporter.exportBackgrounds( xDrawPage, xOutputStreamWrap, sal::static_int_cast<sal_uInt16>( nPage ), *suffix == 'o' );
217     aFlashExporter.Flush();
218     xOutputStreamWrap.clear();
219 
220     if (nCached != nPage)
221     {
222         osl_removeFile(fullpath.pData);
223         if ( 0xffff == nCached )
224             return STR("NULL");
225         else
226             return STR("slide") + VAL(nCached+1) + STR(suffix) + STR(".swf");
227     }
228 
229     return filename;
230 }
231 
232 template <typename TYPE>
findPropertyValue(const Sequence<PropertyValue> & aPropertySequence,const sal_Char * name,TYPE def)233 TYPE findPropertyValue(const Sequence< PropertyValue >& aPropertySequence, const sal_Char* name, TYPE def)
234 {
235     TYPE temp = TYPE();
236 
237     sal_Int32 nLength = aPropertySequence.getLength();
238     const PropertyValue * pValue = aPropertySequence.getConstArray();
239 
240     for ( sal_Int32 i = 0 ; i < nLength; i++)
241     {
242         if ( pValue[i].Name.equalsAsciiL ( name, strlen(name) ) )
243         {
244             pValue[i].Value >>= temp;
245             return temp;
246         }
247     }
248 
249     return def;
250 }
251 
filter(const::com::sun::star::uno::Sequence<::com::sun::star::beans::PropertyValue> & aDescriptor)252 sal_Bool SAL_CALL FlashExportFilter::filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
253 {
254     mxStatusIndicator = findPropertyValue<Reference<XStatusIndicator> >(aDescriptor, "StatusIndicator", mxStatusIndicator);
255 
256     Sequence< PropertyValue > aFilterData;
257     aFilterData = findPropertyValue<Sequence< PropertyValue > >(aDescriptor, "FilterData", aFilterData);
258 
259     // #56084# check if selection shall be exported only; if yes, get the selected page and the selection itself
260     if(findPropertyValue<sal_Bool>(aDescriptor, "SelectionOnly", sal_False))
261     {
262         Reference< XDesktop > xDesktop(mxMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY);
263 
264         if(xDesktop.is())
265         {
266             Reference< XFrame > xFrame(xDesktop->getCurrentFrame());
267 
268             if(xFrame.is())
269             {
270                 Reference< XController > xController(xFrame->getController());
271 
272                 if(xController.is())
273                 {
274                     Reference< XDrawView > xDrawView(xController, UNO_QUERY);
275 
276                     if(xDrawView.is())
277                     {
278                         mxSelectedDrawPage = xDrawView->getCurrentPage();
279                     }
280 
281                     if(mxSelectedDrawPage.is())
282                     {
283                         Reference< XSelectionSupplier > xSelection(xController, UNO_QUERY);
284 
285                         if(xSelection.is())
286                         {
287                             Any aSelection;
288 
289                             if(xSelection->getSelection() >>= aSelection)
290                             {
291                                 aSelection >>= mxSelectedShapes;
292                             }
293                         }
294                     }
295                 }
296             }
297         }
298     }
299 
300     if(mxSelectedDrawPage.is() && mxSelectedShapes.is() && mxSelectedShapes->getCount())
301     {
302         // #56084# to export selection we need the selected page and the selected shapes.
303         // There must be shapes selected, else fallback to regular export (export all)
304         mbExportSelection = true;
305     }
306 
307     // #56084# no multiple files (suppress) when selection since selection can only export a single page
308     if (!mbExportSelection && findPropertyValue<sal_Bool>(aFilterData, "ExportMultipleFiles", false ))
309     {
310         ExportAsMultipleFiles(aDescriptor);
311     }
312     else
313     {
314         ExportAsSingleFile(aDescriptor);
315     }
316 
317     if( mxStatusIndicator.is() )
318         mxStatusIndicator->end();
319 
320     return sal_True;
321 }
322 
323 
324 // AS: When exporting as multiple files, each background, object layer, and slide gets its own
325 //  file.  Additionally, a file called BackgroundConfig.txt is generated, indicating which
326 //  background and objects (if any) go with each slide.  The files are named slideNb.swf,
327 //  slideNo.swf, and slideNp.swf, where N is the slide number, and b=background, o=objects, and
328 //  p=slide contents.  Note that under normal circumstances, there will be very few b and o files.
329 
330 // AS: HACK!  Right now, I create a directory as a sibling to the swf file selected in the Export
331 //  dialog.  This directory is called presentation.sxi-swf-files.  The name of the swf file selected
332 //  in the Export dialog has no impact on this.  All files created are placed in this directory.
ExportAsMultipleFiles(const Sequence<PropertyValue> & aDescriptor)333 sal_Bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& aDescriptor)
334 {
335     Reference< XDrawPagesSupplier > xDrawPagesSupplier(mxDoc, UNO_QUERY);
336     if(!xDrawPagesSupplier.is())
337         return sal_False;
338 
339     Reference< XIndexAccess > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY );
340     if(!xDrawPages.is())
341         return sal_False;
342 
343     Reference< XDesktop > rDesktop( mxMSF->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY);
344     if (!rDesktop.is())
345         return sal_False;
346 
347     Reference< XStorable > xStorable(rDesktop->getCurrentComponent(), UNO_QUERY);
348     if (!xStorable.is())
349         return sal_False;
350 
351     Reference< XDrawPage > xDrawPage;
352 
353     Reference< XFrame > rFrame = rDesktop->getCurrentFrame();
354     Reference< XDrawView > rDrawView = Reference< XDrawView >( rFrame->getController(), UNO_QUERY );
355 
356     Reference< XDrawPage > rCurrentPage = rDrawView->getCurrentPage();
357 
358     Sequence< PropertyValue > aFilterData;
359 
360     aFilterData = findPropertyValue<Sequence< PropertyValue > >(aDescriptor, "FilterData", aFilterData);
361 
362     //AS: Do a bunch of path mangling to figure out where to put the files.
363 
364     OUString sOriginalPath = findPropertyValue<OUString>(aDescriptor, "URL", OUString());
365 
366     // AS: sPath is the parent directory, where everything else exists (like the sxi,
367     //  the -swf-files folder, the -audio files, etc.
368     int lastslash = sOriginalPath.lastIndexOf('/');
369     OUString sPath( sOriginalPath.copy(0, lastslash) );
370 
371     OUString sPresentation(xStorable->getLocation());
372 
373     lastslash = sPresentation.lastIndexOf('/') + 1;
374     int lastdot = sPresentation.lastIndexOf('.');
375 
376     // AS: The name of the presentation, without 3 character extension.
377     OUString sPresentationName = sPresentation.copy(lastslash, lastdot - lastslash);
378 
379     OUString fullpath, swfdirpath, backgroundfilename, objectsfilename;
380 
381     swfdirpath = sPath + STR("/") + sPresentationName + STR(".sxi-swf-files");
382 
383     oslFileError err;
384     err = osl_createDirectory( swfdirpath.pData );
385 
386     fullpath = swfdirpath + STR("/backgroundconfig.txt");
387 
388     oslFileHandle xBackgroundConfig( 0 );
389 
390     // AS: Only export the background config if we're exporting all of the pages, otherwise we'll
391     //  screw it up.
392     sal_Bool bExportAll = findPropertyValue<sal_Bool>(aFilterData, "ExportAll", true);
393     if (bExportAll)
394     {
395         osl_removeFile(fullpath.pData);
396         osl_openFile( fullpath.pData, &xBackgroundConfig, osl_File_OpenFlag_Create | osl_File_OpenFlag_Write );
397 
398         sal_uInt64 bytesWritten;
399         err = osl_writeFile(xBackgroundConfig, "slides=", strlen("slides="), &bytesWritten);
400     }
401 
402     FlashExporter aFlashExporter(
403         mxMSF,
404         mxSelectedShapes,
405         mxSelectedDrawPage,
406         findPropertyValue<sal_Int32>(aFilterData, "CompressMode", 75),
407         findPropertyValue<sal_Bool>(aFilterData, "ExportOLEAsJPEG", false));
408 
409     const sal_Int32 nPageCount = xDrawPages->getCount();
410     if ( mxStatusIndicator.is() )
411         mxStatusIndicator->start(OUString( RTL_CONSTASCII_USTRINGPARAM( "Saving :" )), nPageCount);
412 
413     for(sal_Int32 nPage = 0; nPage < nPageCount; nPage++)
414     {
415         if ( mxStatusIndicator.is() )
416             mxStatusIndicator->setValue( nPage );
417         xDrawPages->getByIndex(nPage) >>= xDrawPage;
418 
419         // AS: If we're only exporting the current page, then skip the rest.
420         if (!bExportAll && xDrawPage != rCurrentPage)
421             continue;
422 
423         // AS: Export the background, the background objects, and then the slide contents.
424         if (bExportAll || findPropertyValue<sal_Bool>(aFilterData, "ExportBackgrounds", true))
425         {
426             backgroundfilename = exportBackground(aFlashExporter, xDrawPage, swfdirpath, nPage, "b");
427         }
428 
429         if (bExportAll || findPropertyValue<sal_Bool>(aFilterData, "ExportBackgroundObjects", true))
430         {
431             objectsfilename = exportBackground(aFlashExporter, xDrawPage, swfdirpath, nPage, "o");
432         }
433 
434         if (bExportAll || findPropertyValue<sal_Bool>(aFilterData, "ExportSlideContents", true))
435         {
436             fullpath = swfdirpath + STR("/slide") + VAL(nPage+1) + STR("p.swf");
437 
438             Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY);
439             sal_Bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap, sal::static_int_cast<sal_uInt16>( nPage ) );
440             aFlashExporter.Flush();
441             xOutputStreamWrap.clear();
442 
443             if (!ret)
444                 osl_removeFile(fullpath.pData);
445         }
446 
447         // AS: Write out to the background config what backgrounds and objects this
448         //  slide used.
449         if (bExportAll)
450         {
451             OUString temp = backgroundfilename + STR("|") + objectsfilename;
452             OString ASCIItemp(temp.getStr(), temp.getLength(), RTL_TEXTENCODING_ASCII_US);
453 
454             sal_uInt64 bytesWritten;
455             osl_writeFile(xBackgroundConfig, ASCIItemp.getStr(), ASCIItemp.getLength(), &bytesWritten);
456 
457             if (nPage < nPageCount - 1)
458                 osl_writeFile(xBackgroundConfig, "|", 1, &bytesWritten);
459         }
460 
461 #ifdef AUGUSTUS
462         if (findPropertyValue<sal_Bool>(aFilterData, "ExportSound", true))
463         {
464             fullpath = swfdirpath + STR("/slide") + VAL(nPage+1) + STR("s.swf");
465 
466             OUString wavpath = sPath + STR("/") + sPresentationName + STR(".ppt-audio/slide") + VAL(nPage+1) + STR(".wav");
467             FileBase::getSystemPathFromFileURL(wavpath, wavpath);
468             OString sASCIIPath(wavpath.getStr(), wavpath.getLength(), RTL_TEXTENCODING_ASCII_US);
469 
470             Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY);
471             sal_Bool ret = aFlashExporter.exportSound(xOutputStreamWrap, sASCIIPath.getStr());
472             aFlashExporter.Flush();
473             xOutputStreamWrap.clear();
474 
475             if (!ret)
476                 osl_removeFile(fullpath.pData);
477         }
478 #endif // defined AUGUSTUS
479     }
480 
481     if (bExportAll)
482         osl_closeFile(xBackgroundConfig);
483 
484     return sal_True;
485 }
486 
ExportAsSingleFile(const Sequence<PropertyValue> & aDescriptor)487 sal_Bool FlashExportFilter::ExportAsSingleFile(const Sequence< PropertyValue >& aDescriptor)
488 {
489     Reference < XOutputStream > xOutputStream = findPropertyValue<Reference<XOutputStream> >(aDescriptor, "OutputStream", 0);
490     Sequence< PropertyValue > aFilterData;
491 
492     if (!xOutputStream.is() )
493     {
494         OSL_ASSERT ( 0 );
495         return sal_False;
496     }
497 
498     FlashExporter aFlashExporter(
499         mxMSF,
500         mxSelectedShapes,
501         mxSelectedDrawPage,
502         findPropertyValue<sal_Int32>(aFilterData, "CompressMode", 75),
503         findPropertyValue<sal_Bool>(aFilterData, "ExportOLEAsJPEG", false));
504 
505     return aFlashExporter.exportAll( mxDoc, xOutputStream, mxStatusIndicator );
506 }
507 
508 // -----------------------------------------------------------------------------
509 
cancel()510 void SAL_CALL FlashExportFilter::cancel(  )
511 {
512 }
513 
514 // -----------------------------------------------------------------------------
515 
516 // XExporter
setSourceDocument(const::com::sun::star::uno::Reference<::com::sun::star::lang::XComponent> & xDoc)517 void SAL_CALL FlashExportFilter::setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
518 {
519     mxDoc = xDoc;
520 }
521 
522 // -----------------------------------------------------------------------------
523 
524 // XInitialization
initialize(const::com::sun::star::uno::Sequence<::com::sun::star::uno::Any> &)525 void SAL_CALL FlashExportFilter::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& /* aArguments */ )
526 {
527 }
528 
529 // -----------------------------------------------------------------------------
530 
FlashExportFilter_getImplementationName()531 OUString FlashExportFilter_getImplementationName ()
532 {
533     return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Impress.FlashExportFilter" ) );
534 }
535 
536 // -----------------------------------------------------------------------------
537 
538 #define SERVICE_NAME "com.sun.star.document.ExportFilter"
539 
FlashExportFilter_supportsService(const OUString & ServiceName)540 sal_Bool SAL_CALL FlashExportFilter_supportsService( const OUString& ServiceName )
541 {
542     return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
543 }
544 
545 // -----------------------------------------------------------------------------
546 
FlashExportFilter_getSupportedServiceNames()547 Sequence< OUString > SAL_CALL FlashExportFilter_getSupportedServiceNames(  )
548 {
549     Sequence < OUString > aRet(1);
550     OUString* pArray = aRet.getArray();
551     pArray[0] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
552     return aRet;
553 }
554 #undef SERVICE_NAME
555 
556 // -----------------------------------------------------------------------------
557 
FlashExportFilter_createInstance(const Reference<XMultiServiceFactory> & rSMgr)558 Reference< XInterface > SAL_CALL FlashExportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
559 {
560     return (cppu::OWeakObject*) new FlashExportFilter( rSMgr );
561 }
562 
563 // -----------------------------------------------------------------------------
564 
565 // XServiceInfo
getImplementationName()566 OUString SAL_CALL FlashExportFilter::getImplementationName(  )
567 {
568     return FlashExportFilter_getImplementationName();
569 }
570 
571 // -----------------------------------------------------------------------------
572 
supportsService(const OUString & rServiceName)573 sal_Bool SAL_CALL FlashExportFilter::supportsService( const OUString& rServiceName )
574 {
575     return FlashExportFilter_supportsService( rServiceName );
576 }
577 
578 // -----------------------------------------------------------------------------
579 
getSupportedServiceNames()580 ::com::sun::star::uno::Sequence< OUString > SAL_CALL FlashExportFilter::getSupportedServiceNames(  )
581 {
582     return FlashExportFilter_getSupportedServiceNames();
583 }
584 
585 // -----------------------------------------------------------------------------
586 
587 }
588