lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / writerfilter / source / dmapper / FormControlHelper.hxx
blobb167a65df24f1b4dd49acfdb4193d8bd61fe7bd8
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 .
19 #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FORMCONTROLHELPER_HXX
20 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FORMCONTROLHELPER_HXX
22 #include "FFDataHandler.hxx"
23 #include <com/sun/star/text/XTextDocument.hpp>
24 #include <com/sun/star/text/XFormField.hpp>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include "FieldTypes.hxx"
28 namespace writerfilter {
29 namespace dmapper {
31 class FormControlHelper : public virtual SvRefBase
33 public:
34 typedef tools::SvRef<FormControlHelper> Pointer_t;
35 FormControlHelper(FieldId eFieldId,
36 css::uno::Reference<css::text::XTextDocument> const& rTextDocument,
37 FFDataHandler::Pointer_t const & pFFData);
38 ~FormControlHelper() override;
40 void insertControl(css::uno::Reference<css::text::XTextRange> const& xTextRange);
41 void processField(css::uno::Reference<css::text::XFormField> const& xFormField);
42 bool hasFFDataHandler() const { return (m_pFFData != nullptr); }
43 private:
44 FFDataHandler::Pointer_t const m_pFFData;
45 struct FormControlHelper_Impl;
46 tools::SvRef<FormControlHelper_Impl> m_pImpl;
48 bool createCheckbox(css::uno::Reference<css::text::XTextRange> const& xTextRange,
49 const OUString & rControlName);
55 #endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FORMCONTROLHELPER_HXX
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */