LibreOffice Module xmloff (master)  1
formlayerimport.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 "layerimport.hxx"
22 
23 namespace xmloff
24 {
25 
26  using namespace ::com::sun::star::uno;
27  using namespace ::com::sun::star::lang;
28  using namespace ::com::sun::star::beans;
29  using namespace ::com::sun::star::container;
30  using namespace ::com::sun::star::drawing;
31  using namespace ::com::sun::star;
32 
34  : m_pImpl( new OFormLayerXMLImport_Impl(_rImporter) )
35  {
36  }
37 
39  {
40  }
41 
43  {
44  m_pImpl->setAutoStyleContext(_pNewContext);
45  }
46 
47  void OFormLayerXMLImport::startPage(const Reference< XDrawPage >& _rxDrawPage)
48  {
49  m_pImpl->startPage(_rxDrawPage);
50  }
51 
53  {
54  m_pImpl->endPage();
55  }
56 
58  {
59  return m_pImpl->lookupControlId(_rId);
60  }
61 
63  SvXMLImport& _rImport,
64  sal_uInt16 _nPrefix,
65  const OUString& _rLocalName)
66  {
67  return OFormLayerXMLImport_Impl::createOfficeFormsContext(_rImport, _nPrefix, _rLocalName);
68  }
69 
70  SvXMLImportContext* OFormLayerXMLImport::createContext(const sal_uInt16 _nPrefix, const OUString& _rLocalName,
71  const Reference< xml::sax::XAttributeList >& _rxAttribs)
72  {
73  return m_pImpl->createContext(_nPrefix, _rLocalName, _rxAttribs);
74  }
75 
76  void OFormLayerXMLImport::applyControlNumberStyle(const Reference< XPropertySet >& _rxControlModel, const OUString& _rControlNumberStyleName)
77  {
78  m_pImpl->applyControlNumberStyle(_rxControlModel, _rControlNumberStyleName);
79  }
80 
82  {
83  m_pImpl->documentDone( );
84  }
85 
86 } // namespace xmloff
87 
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void setAutoStyleContext(SvXMLStylesContext *_pNewContext)
announces the auto-style context to the form importer
void documentDone()
to be called when the document has been completely imported
static SvXMLImportContext * createOfficeFormsContext(SvXMLImport &_rImport, sal_uInt16 _nPrefix, const OUString &_rLocalName)
creates an import context for the office:forms element
std::unique_ptr< OFormLayerXMLImport_Impl > m_pImpl
void applyControlNumberStyle(const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rControlNumberStyleName)
sets the given number style on the given control
SvXMLImportContext * createContext(const sal_uInt16 _nPrefix, const OUString &_rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &_rxAttribs)
create an SvXMLImportContext instance which is able to import the element.
void endPage()
end importing the forms of the current page
static SvXMLImportContext * createOfficeFormsContext(SvXMLImport &_rImport, sal_uInt16 _nPrefix, const OUString &_rLocalName)
creates an import context for the office:forms element
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
css::uno::Reference< css::beans::XPropertySet > lookupControl(const OUString &_rId)
lookup a control given by id.
virtual ~OFormLayerXMLImport() override
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
void startPage(const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
start importing the forms of the given page
OFormLayerXMLImport(SvXMLImport &_rImporter)