merge the formfield patch from ooo-build
[ooovba.git] / sd / source / filter / html / sdhtmlfilter.cxx
blob3ac07b9f7593267476f04062e2d324f02379274f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: sdhtmlfilter.cxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
34 #include <unotools/localfilehelper.hxx>
35 #include <tools/errinf.hxx>
36 #include <tools/urlobj.hxx>
37 #include <vcl/msgbox.hxx>
38 #include <vcl/metaact.hxx>
39 #include <vcl/virdev.hxx>
40 #include <svtools/FilterConfigItem.hxx>
41 #include <sfx2/docfile.hxx>
42 #include <sfx2/docfilt.hxx>
43 #include <sfx2/frame.hxx>
44 #include <svx/impgrf.hxx>
45 #include <svx/svdograf.hxx>
46 #include <svx/svdpagv.hxx>
47 #include <svx/xoutbmp.hxx>
48 #include <osl/file.hxx>
50 #include "sdpage.hxx"
51 #include "drawdoc.hxx"
52 #include "sdresid.hxx"
53 #include "sdattr.hxx"
54 #include "htmlex.hxx"
55 #include "sdhtmlfilter.hxx"
57 // ---------------
58 // - SdPPTFilter -
59 // ---------------
61 SdHTMLFilter::SdHTMLFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, sal_Bool bShowProgress ) :
62 SdFilter( rMedium, rDocShell, bShowProgress )
66 // -----------------------------------------------------------------------------
68 SdHTMLFilter::~SdHTMLFilter()
72 // -----------------------------------------------------------------------------
74 sal_Bool SdHTMLFilter::Export()
76 mrMedium.Close();
77 mrMedium.Commit();
79 SfxItemSet *pSet = mrMedium.GetItemSet();
81 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aParams;
83 const SfxPoolItem* pItem;
84 if ( pSet->GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
85 ((SfxUnoAnyItem*)pItem)->GetValue() >>= aParams;
87 delete( new HtmlExport( mrMedium.GetName(), aParams, &mrDocument, &mrDocShell ) );
89 return true;