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_sd.hxx"
26 
27 #include <unotools/localfilehelper.hxx>
28 #include <tools/errinf.hxx>
29 #include <tools/urlobj.hxx>
30 #include <vcl/msgbox.hxx>
31 #include <vcl/metaact.hxx>
32 #include <vcl/virdev.hxx>
33 #include <svtools/FilterConfigItem.hxx>
34 #include <sfx2/docfile.hxx>
35 #include <sfx2/docfilt.hxx>
36 #include <sfx2/frame.hxx>
37 #include <svx/svdograf.hxx>
38 #include <svx/svdpagv.hxx>
39 #include <svx/xoutbmp.hxx>
40 #include <osl/file.hxx>
41 
42 #include "sdpage.hxx"
43 #include "drawdoc.hxx"
44 #include "sdresid.hxx"
45 #include "sdattr.hxx"
46 #include "htmlex.hxx"
47 #include "sdhtmlfilter.hxx"
48 
49 // ---------------
50 // - SdPPTFilter -
51 // ---------------
52 
SdHTMLFilter(SfxMedium & rMedium,::sd::DrawDocShell & rDocShell,sal_Bool bShowProgress)53 SdHTMLFilter::SdHTMLFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, sal_Bool bShowProgress ) :
54 	SdFilter( rMedium, rDocShell, bShowProgress )
55 {
56 }
57 
58 // -----------------------------------------------------------------------------
59 
~SdHTMLFilter()60 SdHTMLFilter::~SdHTMLFilter()
61 {
62 }
63 
64 // -----------------------------------------------------------------------------
65 
Export()66 sal_Bool SdHTMLFilter::Export()
67 {
68 	mrMedium.Close();
69 	mrMedium.Commit();
70 
71 	SfxItemSet *pSet = mrMedium.GetItemSet();
72 
73 	::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aParams;
74 
75 	const SfxPoolItem* pItem;
76     if ( pSet->GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
77 		((SfxUnoAnyItem*)pItem)->GetValue() >>= aParams;
78 
79 	delete( new HtmlExport( mrMedium.GetName(), aParams, &mrDocument, &mrDocShell ) );
80 
81 	return true;
82 }
83