LibreOffice Module xmloff (master) 1
formlayerexport.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
21#include <xmloff/xmlexp.hxx>
22#include "layerexport.hxx"
23#include <osl/diagnose.h>
24#include "officeforms.hxx"
25
26namespace xmloff
27{
28
29 using namespace ::com::sun::star::uno;
30 using namespace ::com::sun::star::lang;
31 using namespace ::com::sun::star::awt;
32 using namespace ::com::sun::star::beans;
33 using namespace ::com::sun::star::container;
34 using namespace ::com::sun::star::drawing;
35
36 //= OFormLayerXMLExport
37
39 :m_pImpl(new OFormLayerXMLExport_Impl(_rContext))
40 {
41 }
42
44 {
45 }
46
47 bool OFormLayerXMLExport::seekPage(const Reference< XDrawPage >& _rxDrawPage)
48 {
49 return m_pImpl->seekPage(_rxDrawPage);
50 }
51
52 OUString OFormLayerXMLExport::getControlId(const Reference< XPropertySet >& _rxControl)
53 {
54 return m_pImpl->getControlId(_rxControl);
55 }
56
57 OUString OFormLayerXMLExport::getControlNumberStyle( const Reference< XPropertySet >& _rxControl )
58 {
59 return m_pImpl->getControlNumberStyle(_rxControl);
60 }
61
62 void OFormLayerXMLExport::examineForms(const Reference< XDrawPage >& _rxDrawPage)
63 {
64 try
65 {
66 m_pImpl->examineForms(_rxDrawPage);
67 }
68 catch(Exception&)
69 {
70 OSL_FAIL("OFormLayerXMLExport::examine: could not examine the draw page!");
71 }
72 }
73
74 void OFormLayerXMLExport::exportForms(const Reference< XDrawPage >& _rxDrawPage)
75 {
76 m_pImpl->exportForms(_rxDrawPage);
77 }
78
80 {
81 m_pImpl->exportXForms();
82 }
83
84 bool OFormLayerXMLExport::pageContainsForms( const Reference< XDrawPage >& _rxDrawPage )
85 {
87 }
88
90 {
91 return m_pImpl->documentContainsXForms();
92 }
93
95 {
96 m_pImpl->exportAutoControlNumberStyles();
97 }
98
100 {
101 m_pImpl->exportAutoStyles();
102 }
103
104 void OFormLayerXMLExport::excludeFromExport( const Reference< XControlModel >& _rxControl )
105 {
106 m_pImpl->excludeFromExport( _rxControl );
107 }
108
109 //= OOfficeFormsExport
111 :m_pImpl( new OFormsRootExport(_rExp) )
112 {
113 }
114
116 {
117 }
118
119} // namespace xmloff
120
121/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
the implementation class for OFormLayerXMLExport
Definition: layerexport.hxx:60
static bool pageContainsForms(const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
determines whether the given page contains logical forms
SAL_DLLPRIVATE void exportAutoControlNumberStyles()
exports the automatic controls number styles
virtual SAL_DLLPRIVATE ~OFormLayerXMLExport() override
static bool pageContainsForms(const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
determines whether the given page contains logical forms
void examineForms(const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
examines the forms collection given.
void exportAutoStyles()
exports the auto-styles collected during the examineForms calls
std::unique_ptr< OFormLayerXMLExport_Impl > m_pImpl
bool seekPage(const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
initializes some internal structures for fast access to the given page
bool documentContainsXForms() const
determines whether the given page contains XForm instances
SAL_DLLPRIVATE OUString getControlNumberStyle(const css::uno::Reference< css::beans::XPropertySet > &_rxControl)
retrieves the style name for the control's number style.
void exportXForms() const
exports the XForms model data
void exportForms(const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
exports the structure of a form layer
SAL_DLLPRIVATE OUString getControlId(const css::uno::Reference< css::beans::XPropertySet > &_rxControl)
get the id for the given control
SAL_DLLPRIVATE void excludeFromExport(const css::uno::Reference< css::awt::XControlModel > &_rxControl)
exclude the given control (model) from export.
SAL_DLLPRIVATE OFormLayerXMLExport(SvXMLExport &_rContext)
OOfficeFormsExport(SvXMLExport &_rExp)
@ Exception