1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef INCLUDED_FFDataHandler_HXX
24 #define INCLUDED_FFDataHandler_HXX
25 #include <resourcemodel/LoggedResources.hxx>
26 #include <rtl/ustring.hxx>
27 namespace writerfilter {
28 namespace dmapper {
29 class FFDataHandler : public LoggedProperties
30 {
31 public:
32     // typedefs
33     typedef ::boost::shared_ptr<FFDataHandler> Pointer_t;
34     typedef ::std::vector<rtl::OUString> DropDownEntries_t;
35 
36     // constructor
37     FFDataHandler();
38     // destructor
39     virtual ~FFDataHandler();
40 
41     // member: name
42     void setName(const rtl::OUString & r_sName);
43     const rtl::OUString & getName() const;
44 
45     // member: enabled
46     void setEnabled(bool r_enabled);
47     bool getEnabled() const;
48 
49     // member: calcOnExit
50     void setCalcOnExit(bool r_calcOnExit);
51     bool getCalcOnExit() const;
52 
53     // member: entryMacro
54     void setEntryMacro(const rtl::OUString & r_sEntryMacro);
55     const rtl::OUString & getEntryMacro() const;
56 
57     // member: exitMacro
58     void setExitMacro(const rtl::OUString & r_sExitMacro);
59     const rtl::OUString & getExitMacro() const;
60 
61     // member: helpTextType
62     void setHelpTextType(sal_uInt32 r_helpTextType);
63     sal_uInt32 getHelpTextType() const;
64 
65     // member: helpText
66     void setHelpText(const rtl::OUString & r_sHelpText);
67     const rtl::OUString & getHelpText() const;
68 
69     // member: statusTextType
70     void setStatusTextType(sal_uInt32 r_statusTextType);
71     sal_uInt32 getStatusTextType() const;
72 
73     // member: statusText
74     void setStatusText(const rtl::OUString & r_sStatusText);
75     const rtl::OUString & getStatusText() const;
76 
77     // member: checkboxHeight
78     void setCheckboxHeight(sal_uInt32 r_checkboxHeight);
79     sal_uInt32 getCheckboxHeight() const;
80 
81     // member: checkboxAutoHeight
82     void setCheckboxAutoHeight(bool r_checkboxAutoHeight);
83     bool getCheckboxAutoHeight() const;
84 
85     // member: checkboxDefault
86     void setCheckboxDefault(bool r_checkboxDefault);
87     bool getCheckboxDefault() const;
88 
89     // member: checkboxChecked
90     void setCheckboxChecked(bool r_checkboxChecked);
91     bool getCheckboxChecked() const;
92 
93     // member: dropDownResult
94     void setDropDownResult(const rtl::OUString & r_sDropDownResult);
95     const rtl::OUString & getDropDownResult() const;
96 
97     // member: dropDownDefault
98     void setDropDownDefault(const rtl::OUString & r_sDropDownDefault);
99     const rtl::OUString & getDropDownDefault() const;
100 
101     // member: dropDownEntries
102     void setDropDownEntries(const DropDownEntries_t & r_dropDownEntries);
103     const DropDownEntries_t & getDropDownEntries() const;
104     void dropDownEntriesPushBack(const rtl::OUString & r_Element);
105 
106     // member: textType
107     void setTextType(sal_uInt32 r_textType);
108     sal_uInt32 getTextType() const;
109 
110     // member: textMaxLength
111     void setTextMaxLength(sal_uInt32 r_textMaxLength);
112     sal_uInt32 getTextMaxLength() const;
113 
114     // member: textDefault
115     void setTextDefault(const rtl::OUString & r_sTextDefault);
116     const rtl::OUString & getTextDefault() const;
117 
118     // member: textFormat
119     void setTextFormat(const rtl::OUString & r_sTextFormat);
120     const rtl::OUString & getTextFormat() const;
121 
122     // sprm
123     void resolveSprm(Sprm & r_sprm);
124 
125 private:
126     rtl::OUString m_sName;
127     bool m_bEnabled;
128     bool m_bCalcOnExit;
129     rtl::OUString m_sEntryMacro;
130     rtl::OUString m_sExitMacro;
131     sal_uInt32 m_nHelpTextType;
132     rtl::OUString m_sHelpText;
133     sal_uInt32 m_nStatusTextType;
134     rtl::OUString m_sStatusText;
135     sal_uInt32 m_nCheckboxHeight;
136     bool m_bCheckboxAutoHeight;
137     bool m_bCheckboxDefault;
138     bool m_bCheckboxChecked;
139     rtl::OUString m_sDropDownResult;
140     rtl::OUString m_sDropDownDefault;
141     DropDownEntries_t m_DropDownEntries;
142     sal_uInt32 m_nTextType;
143     sal_uInt32 m_nTextMaxLength;
144     rtl::OUString m_sTextDefault;
145     rtl::OUString m_sTextFormat;
146 
147     // sprm
148     void lcl_sprm(Sprm & r_sprm);
149 
150     // attribute
151     void lcl_attribute(Id name, Value & val);
152 };
153 
154 
155 }}
156 #endif //INCLUDED_FFDataHandler_HXX
157