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 #pragma once
20 #include "LoggedResources.hxx"
21 #include <rtl/ustring.hxx>
22 #include <vector>
23 namespace writerfilter::dmapper
24 {
25 class FFDataHandler : public LoggedProperties
26 {
27 public:
28     // typedefs
29     typedef ::tools::SvRef<FFDataHandler> Pointer_t;
30     typedef ::std::vector<OUString> DropDownEntries_t;
31 
32     // constructor
33     FFDataHandler();
34     // destructor
35     virtual ~FFDataHandler() override;
36 
37     // member: name
getName() const38     const OUString& getName() const { return m_sName; }
39 
40     // member: helpText
getHelpText() const41     const OUString& getHelpText() const { return m_sHelpText; }
42 
43     // member: statusText
getStatusText() const44     const OUString& getStatusText() const { return m_sStatusText; }
45 
getEntryMacro() const46     const OUString& getEntryMacro() const { return m_sEntryMacro; }
getExitMacro() const47     const OUString& getExitMacro() const { return m_sExitMacro; }
48 
49     // member: checkboxHeight
getCheckboxHeight() const50     sal_uInt32 getCheckboxHeight() const { return m_nCheckboxHeight; }
51 
52     // member: checkboxAutoHeight
getCheckboxAutoHeight() const53     bool getCheckboxAutoHeight() const { return m_bCheckboxAutoHeight; }
54 
55     // member: checkboxChecked or checkboxDefault (if the previous is not set)
56     bool getCheckboxChecked() const;
57 
58     // member: dropDownResult
getDropDownResult() const59     const OUString& getDropDownResult() const { return m_sDropDownResult; }
60 
61     // member: dropDownEntries
getDropDownEntries() const62     const DropDownEntries_t& getDropDownEntries() const { return m_DropDownEntries; }
63 
64     // member: textDefault
getTextDefault() const65     const OUString& getTextDefault() const { return m_sTextDefault; }
66 
getTextType() const67     const OUString& getTextType() const { return m_sTextType; }
getTextFormat() const68     const OUString& getTextFormat() const { return m_sTextFormat; }
getTextMaxLength() const69     sal_uInt16 getTextMaxLength() const { return m_nTextMaxLength; }
70 
71     // sprm
72     void resolveSprm(Sprm& r_sprm);
73 
74 private:
75     OUString m_sName;
76     OUString m_sHelpText;
77     OUString m_sStatusText;
78     OUString m_sEntryMacro;
79     OUString m_sExitMacro;
80     sal_uInt32 m_nCheckboxHeight;
81     bool m_bCheckboxAutoHeight;
82     int m_nCheckboxChecked;
83     int m_nCheckboxDefault;
84     OUString m_sDropDownResult;
85     DropDownEntries_t m_DropDownEntries;
86     OUString m_sTextDefault;
87     OUString m_sTextType;
88     OUString m_sTextFormat;
89     sal_uInt16 m_nTextMaxLength;
90 
91     // sprm
92     void lcl_sprm(Sprm& r_sprm) override;
93 
94     // attribute
95     void lcl_attribute(Id name, Value& val) override;
96 };
97 }
98 
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
100