Don't loose scanned image's resolution precision
[LibreOffice.git] / include / xmloff / formlayerimport.hxx
blob984e0081e111b37630ea92a79c1b36e042a5f645
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_XMLOFF_FORMLAYERIMPORT_HXX
21 #define INCLUDED_XMLOFF_FORMLAYERIMPORT_HXX
23 #include <sal/config.h>
24 #include <xmloff/dllapi.h>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <salhelper/simplereferenceobject.hxx>
27 #include <memory>
29 namespace com::sun::star::beans { class XPropertySet; }
30 namespace com::sun::star::drawing { class XDrawPage; }
31 namespace com::sun::star::xml::sax { class XAttributeList; }
32 namespace com::sun::star::xml::sax { class XFastAttributeList; }
34 class SvXMLImport;
35 class SvXMLImportContext;
36 class SvXMLStylesContext;
39 namespace xmloff
43 //= OFormLayerXMLImport
45 class OFormLayerXMLImport_Impl;
46 /** allows you to import a &lt;form:form&gt; element
48 class XMLOFF_DLLPUBLIC OFormLayerXMLImport final
49 :public ::salhelper::SimpleReferenceObject
51 std::unique_ptr<OFormLayerXMLImport_Impl> m_pImpl;
53 public:
54 OFormLayerXMLImport(SvXMLImport& _rImporter);
55 virtual ~OFormLayerXMLImport() override;
57 /** start importing the forms of the given page
59 <p>starting the import of a new page (by using this method) invalidates the current page position.</p>
61 @see endPage
63 void startPage(
64 const css::uno::Reference< css::drawing::XDrawPage >& _rxDrawPage);
66 /** creates an import context for the office:forms element
68 static SvXMLImportContext* createOfficeFormsContext(
69 SvXMLImport& _rImport);
71 /** create an SvXMLImportContext instance which is able to import the &lt;form:form&gt;
72 element.
74 <p>You must have called <method>startPage</method> before you can create such an import context.</p>
76 @see startPage
77 @see endPage
79 SvXMLImportContext* createContext(
80 const sal_Int32 _nElement,
81 const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttribs);
83 /** lookup a control given by id.
85 <p>The control must be part of the page which is currently being imported.</p>
87 <p>(And, of course, the control must have been imported already at the moment you call this.)</p>
89 @see startPage
91 css::uno::Reference< css::beans::XPropertySet >
92 lookupControl(const OUString& _rId);
94 /** end importing the forms of the current page
96 <p>You must call this method if you want the import to be finished correctly. Without calling
97 it, you will lose information.</p>
99 @see startPage
101 void endPage();
103 /** announces the auto-style context to the form importer
105 void setAutoStyleContext(SvXMLStylesContext* _pNewContext);
107 /** sets the given number style on the given control
108 @param _rxControlModel
109 the control model which's style is to be set
110 @param _rControlNumberStyleName
111 the style name for the control's number style
113 void applyControlNumberStyle(
114 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
115 const OUString& _rControlNumberStyleName
118 /** to be called when the document has been completely imported
120 <p>For some documents (currently: only some spreadsheet documents) it's necessary
121 do to a post processing, since not all information from the file can be processed
122 if the document is not completed, yet.</p>
124 void documentDone( );
128 } // namespace xmloff
131 #endif // INCLUDED_XMLOFF_FORMLAYERIMPORT_HXX
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */