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 
20 #include <sal/config.h>
21 
22 #include <com/sun/star/beans/PropertyValue.hpp>
23 
25 #include "layerimport.hxx"
26 
27 namespace xmloff
28 {
29 
30  using namespace ::com::sun::star::uno;
31  using namespace ::com::sun::star::lang;
32  using namespace ::com::sun::star::beans;
33  using namespace ::com::sun::star::container;
34  using namespace ::com::sun::star::drawing;
35  using namespace ::com::sun::star;
36 
38  : m_pImpl( new OFormLayerXMLImport_Impl(_rImporter) )
39  {
40  }
41 
43  {
44  }
45 
47  {
48  m_pImpl->setAutoStyleContext(_pNewContext);
49  }
50 
51  void OFormLayerXMLImport::startPage(const Reference< XDrawPage >& _rxDrawPage)
52  {
53  m_pImpl->startPage(_rxDrawPage);
54  }
55 
57  {
58  m_pImpl->endPage();
59  }
60 
62  {
63  return m_pImpl->lookupControlId(_rId);
64  }
65 
67  SvXMLImport& _rImport)
68  {
70  }
71 
73  const Reference< xml::sax::XFastAttributeList >& _rxAttribs)
74  {
75  return m_pImpl->createContext(nElement, _rxAttribs);
76  }
77 
78  void OFormLayerXMLImport::applyControlNumberStyle(const Reference< XPropertySet >& _rxControlModel, const OUString& _rControlNumberStyleName)
79  {
80  m_pImpl->applyControlNumberStyle(_rxControlModel, _rControlNumberStyleName);
81  }
82 
84  {
85  m_pImpl->documentDone( );
86  }
87 
88 } // namespace xmloff
89 
90 /* 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
SvXMLImportContext * createContext(const sal_Int32 _nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttribs)
create an SvXMLImportContext instance which is able to import the 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
static SvXMLImportContext * createOfficeFormsContext(SvXMLImport &_rImport)
creates an import context for the office:forms element
void endPage()
end importing the forms of the current page
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:45
css::uno::Reference< css::beans::XPropertySet > lookupControl(const OUString &_rId)
lookup a control given by id.
static SvXMLImportContext * createOfficeFormsContext(SvXMLImport &_rImport)
creates an import context for the office:forms element
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)