Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <stdio.h>
31 : : #include <xmloff/formlayerexport.hxx>
32 : : #include "strings.hxx"
33 : : #include "elementexport.hxx"
34 : : #include "xmloff/xmlnmspe.hxx"
35 : : #include <xmloff/xmlexp.hxx>
36 : : #include "layerexport.hxx"
37 : : #include "propertyexport.hxx"
38 : : #include <osl/diagnose.h>
39 : : #include <comphelper/extract.hxx>
40 : : #include <com/sun/star/lang/XServiceInfo.hpp>
41 : : #include <comphelper/stl_types.hxx>
42 : : #include "officeforms.hxx"
43 : :
44 : :
45 : : //.........................................................................
46 : : namespace xmloff
47 : : {
48 : : //.........................................................................
49 : :
50 : : using namespace ::com::sun::star::uno;
51 : : using namespace ::com::sun::star::lang;
52 : : using namespace ::com::sun::star::awt;
53 : : using namespace ::com::sun::star::beans;
54 : : using namespace ::com::sun::star::container;
55 : : using namespace ::com::sun::star::drawing;
56 : : using namespace ::com::sun::star::frame;
57 : :
58 : : //=====================================================================
59 : : //= OFormLayerXMLExport
60 : : //=====================================================================
61 : :
62 : : //---------------------------------------------------------------------
63 : 43 : OFormLayerXMLExport::OFormLayerXMLExport(SvXMLExport& _rContext)
64 : : :m_rContext(_rContext)
65 [ + - ][ + - ]: 43 : ,m_pImpl(new OFormLayerXMLExport_Impl(_rContext))
66 : : {
67 : 43 : }
68 : :
69 : : //---------------------------------------------------------------------
70 : 43 : OFormLayerXMLExport::~OFormLayerXMLExport()
71 : : {
72 [ + - ][ + - ]: 43 : delete m_pImpl;
73 : 43 : m_pImpl = NULL;
74 [ - + ]: 86 : }
75 : :
76 : : //---------------------------------------------------------------------
77 : 36 : sal_Bool OFormLayerXMLExport::seekPage(const Reference< XDrawPage >& _rxDrawPage)
78 : : {
79 : 36 : return m_pImpl->seekPage(_rxDrawPage);
80 : : }
81 : :
82 : : //---------------------------------------------------------------------
83 : 0 : ::rtl::OUString OFormLayerXMLExport::getControlId(const Reference< XPropertySet >& _rxControl)
84 : : {
85 : 0 : return m_pImpl->getControlId(_rxControl);
86 : : }
87 : :
88 : : //---------------------------------------------------------------------
89 : 0 : ::rtl::OUString OFormLayerXMLExport::getControlNumberStyle( const Reference< XPropertySet >& _rxControl )
90 : : {
91 : 0 : return m_pImpl->getControlNumberStyle(_rxControl);
92 : : }
93 : :
94 : : //---------------------------------------------------------------------
95 : 57 : void OFormLayerXMLExport::examineForms(const Reference< XDrawPage >& _rxDrawPage)
96 : : {
97 : : try
98 : : {
99 [ + - ]: 57 : m_pImpl->examineForms(_rxDrawPage);
100 : : }
101 : 0 : catch(Exception&)
102 : : {
103 : : OSL_FAIL("OFormLayerXMLExport::examine: could not examine the draw page!");
104 : : }
105 [ # # ]: 57 : }
106 : :
107 : : //---------------------------------------------------------------------
108 : 0 : void OFormLayerXMLExport::exportForms(const Reference< XDrawPage >& _rxDrawPage)
109 : : {
110 : 0 : m_pImpl->exportForms(_rxDrawPage);
111 : 0 : }
112 : :
113 : : //---------------------------------------------------------------------
114 : 0 : void OFormLayerXMLExport::exportXForms() const
115 : : {
116 : 0 : m_pImpl->exportXForms();
117 : 0 : }
118 : :
119 : : //---------------------------------------------------------------------
120 : 21 : bool OFormLayerXMLExport::pageContainsForms( const Reference< XDrawPage >& _rxDrawPage ) const
121 : : {
122 : 21 : return m_pImpl->pageContainsForms( _rxDrawPage );
123 : : }
124 : :
125 : : //---------------------------------------------------------------------
126 : 21 : bool OFormLayerXMLExport::documentContainsXForms() const
127 : : {
128 : 21 : return m_pImpl->documentContainsXForms();
129 : : }
130 : :
131 : : //---------------------------------------------------------------------
132 : 41 : void OFormLayerXMLExport::exportAutoControlNumberStyles()
133 : : {
134 : 41 : m_pImpl->exportAutoControlNumberStyles();
135 : 41 : }
136 : :
137 : : //---------------------------------------------------------------------
138 : 37 : void OFormLayerXMLExport::exportAutoStyles()
139 : : {
140 : 37 : m_pImpl->exportAutoStyles();
141 : 37 : }
142 : :
143 : : //---------------------------------------------------------------------
144 : 0 : void OFormLayerXMLExport::excludeFromExport( const Reference< XControlModel > _rxControl )
145 : : {
146 [ # # ]: 0 : m_pImpl->excludeFromExport( _rxControl );
147 : 0 : }
148 : :
149 : : //=========================================================================
150 : : //= OOfficeFormsExport
151 : : //=========================================================================
152 : : //-------------------------------------------------------------------------
153 : 0 : OOfficeFormsExport::OOfficeFormsExport( SvXMLExport& _rExp )
154 : 0 : :m_pImpl(NULL)
155 : : {
156 [ # # ]: 0 : m_pImpl = new OFormsRootExport(_rExp);
157 : 0 : }
158 : :
159 : : //-------------------------------------------------------------------------
160 : 0 : OOfficeFormsExport::~OOfficeFormsExport()
161 : : {
162 [ # # ]: 0 : delete m_pImpl;
163 : 0 : }
164 : :
165 : : //.........................................................................
166 : : } // namespace xmloff
167 : : //.........................................................................
168 : :
169 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|