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: formlayerexport.cxx,v $
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_xmloff.hxx"
35 #include <xmloff/formlayerexport.hxx>
36 #include "strings.hxx"
37 #include "elementexport.hxx"
38 #include "xmlnmspe.hxx"
39 #include <xmloff/xmlexp.hxx>
40 #include "layerexport.hxx"
41 #include "propertyexport.hxx"
42 #include <osl/diagnose.h>
43 #include <comphelper/extract.hxx>
44 #include <com/sun/star/lang/XServiceInfo.hpp>
45 #include <comphelper/stl_types.hxx>
46 #include "officeforms.hxx"
49 //.........................................................................
52 //.........................................................................
54 using namespace ::com::sun::star::uno
;
55 using namespace ::com::sun::star::lang
;
56 using namespace ::com::sun::star::awt
;
57 using namespace ::com::sun::star::beans
;
58 using namespace ::com::sun::star::container
;
59 using namespace ::com::sun::star::drawing
;
60 using namespace ::com::sun::star::frame
;
62 //=====================================================================
63 //= OFormLayerXMLExport
64 //=====================================================================
66 //---------------------------------------------------------------------
67 OFormLayerXMLExport::OFormLayerXMLExport(SvXMLExport
& _rContext
)
68 :m_rContext(_rContext
)
69 ,m_pImpl(new OFormLayerXMLExport_Impl(_rContext
))
73 //---------------------------------------------------------------------
74 OFormLayerXMLExport::~OFormLayerXMLExport()
80 //---------------------------------------------------------------------
81 sal_Bool
OFormLayerXMLExport::seekPage(const Reference
< XDrawPage
>& _rxDrawPage
)
83 return m_pImpl
->seekPage(_rxDrawPage
);
86 //---------------------------------------------------------------------
87 ::rtl::OUString
OFormLayerXMLExport::getControlId(const Reference
< XPropertySet
>& _rxControl
)
89 return m_pImpl
->getControlId(_rxControl
);
92 //---------------------------------------------------------------------
93 ::rtl::OUString
OFormLayerXMLExport::getControlNumberStyle( const Reference
< XPropertySet
>& _rxControl
)
95 return m_pImpl
->getControlNumberStyle(_rxControl
);
98 //---------------------------------------------------------------------
99 ::vos::ORef
< SvXMLExportPropertyMapper
> OFormLayerXMLExport::getStylePropertyMapper()
101 return m_pImpl
->getStylePropertyMapper();
104 //---------------------------------------------------------------------
105 void OFormLayerXMLExport::initialize()
110 //---------------------------------------------------------------------
111 void OFormLayerXMLExport::examineForms(const Reference
< XDrawPage
>& _rxDrawPage
)
115 m_pImpl
->examineForms(_rxDrawPage
);
119 OSL_ENSURE(sal_False
, "OFormLayerXMLExport::examine: could not examine the draw page!");
123 //---------------------------------------------------------------------
124 void OFormLayerXMLExport::exportForms(const Reference
< XDrawPage
>& _rxDrawPage
)
126 m_pImpl
->exportForms(_rxDrawPage
);
129 //---------------------------------------------------------------------
130 void OFormLayerXMLExport::exportXForms() const
132 m_pImpl
->exportXForms();
135 //---------------------------------------------------------------------
136 bool OFormLayerXMLExport::pageContainsForms( const Reference
< XDrawPage
>& _rxDrawPage
) const
138 return m_pImpl
->pageContainsForms( _rxDrawPage
);
141 //---------------------------------------------------------------------
142 bool OFormLayerXMLExport::documentContainsXForms() const
144 return m_pImpl
->documentContainsXForms();
147 //---------------------------------------------------------------------
148 void OFormLayerXMLExport::exportControlNumberStyles()
150 m_pImpl
->exportControlNumberStyles();
153 //---------------------------------------------------------------------
154 void OFormLayerXMLExport::exportAutoControlNumberStyles()
156 m_pImpl
->exportAutoControlNumberStyles();
159 //---------------------------------------------------------------------
160 void OFormLayerXMLExport::exportAutoStyles()
162 m_pImpl
->exportAutoStyles();
165 //---------------------------------------------------------------------
166 void OFormLayerXMLExport::excludeFromExport( const Reference
< XControlModel
> _rxControl
)
168 m_pImpl
->excludeFromExport( _rxControl
);
171 //=========================================================================
172 //= OOfficeFormsExport
173 //=========================================================================
174 //-------------------------------------------------------------------------
175 OOfficeFormsExport::OOfficeFormsExport( SvXMLExport
& _rExp
)
178 m_pImpl
= new OFormsRootExport(_rExp
);
181 //-------------------------------------------------------------------------
182 OOfficeFormsExport::~OOfficeFormsExport()
187 //.........................................................................
188 } // namespace xmloff
189 //.........................................................................