Line data Source code
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 : #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8FFDATA_HXX
21 : #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8FFDATA_HXX
22 :
23 : #include <vector>
24 : #include <rtl/ustring.hxx>
25 :
26 : class SvStream;
27 :
28 : namespace sw
29 : {
30 :
31 : class WW8FFData
32 : {
33 : private:
34 : // offset 0x4
35 : sal_uInt8 mnType; // :2 0x3
36 : sal_uInt8 mnResult; // :5 0x7c
37 : bool mbOwnHelp; // :1 0x80
38 :
39 : // offset 5
40 : bool mbOwnStat; // :1 0x01
41 : bool mbProtected; // :1 0x02
42 : bool mbSize; // :1 0x04
43 : sal_uInt8 mnTextType; // :3 0x38
44 : bool mbRecalc; // :1 0x4
45 : bool mbListBox; // :1 0x80
46 :
47 : // offset 6
48 : sal_uInt16 mnMaxLen; // :15 0x7fff maximum length of text field, 0 <=> no limit
49 :
50 : // offset 8
51 : sal_uInt16 mnCheckboxHeight;
52 :
53 : // offset 10 and beyond
54 : OUString msName;
55 : OUString msDefault; // only for type == 0
56 : sal_uInt16 mnDefault; // only for type != 0
57 : OUString msFormat;
58 : OUString msHelp;
59 : OUString msStatus;
60 : OUString msMacroEnter;
61 : OUString msMacroExit;
62 :
63 : ::std::vector< OUString > msListEntries;
64 :
65 : protected:
66 : void WriteOUString(SvStream * pStream, const OUString & rStr, bool bAddZero);
67 :
68 : public:
69 : WW8FFData();
70 : ~WW8FFData();
71 :
72 0 : void setType(sal_uInt8 nType) { mnType = nType; }
73 : sal_uInt8 getType() const { return mnType; }
74 0 : void setResult(sal_uInt8 nResult) { mnResult = nResult; }
75 : sal_uInt8 getResult() const { return mnResult; }
76 : void setProptexted(bool bProtected) { mbProtected = bProtected; }
77 : bool getProtected() const { return mbProtected; }
78 : void setSize(bool bSize) { mbSize = bSize; }
79 : bool getSize() const { return mbSize; }
80 : void setTextType(sal_uInt8 nTextType) { mnTextType = nTextType; }
81 : sal_uInt8 getTextType() const { return mnTextType; }
82 : void setRecalc(bool bRecalc) { mbRecalc = bRecalc; }
83 : bool getRecalc() const { return mbRecalc; }
84 : void setListBox(bool bListBox) { mbListBox = bListBox; }
85 : bool getListBox() const { return mbListBox; }
86 : void setMaxLen(sal_uInt16 nMaxLen) { mnMaxLen = nMaxLen; }
87 : sal_uInt16 getMaxLen() const { return mnMaxLen; }
88 0 : void setCheckboxHeight(sal_uInt16 nCheckboxHeight) { mnCheckboxHeight = nCheckboxHeight; }
89 : sal_uInt16 getCheckboxHeight() const { return mnCheckboxHeight; }
90 0 : void setName(const OUString & rName) { msName = rName; }
91 : const OUString & getName() const { return msName; }
92 : void setDefaultString(const OUString & rDefault) { msDefault = rDefault; }
93 : const OUString & getDefaultString() const { return msDefault; }
94 0 : void setDefaultResult(sal_uInt16 nDefault) { mnDefault = nDefault; }
95 : sal_uInt16 getDefaultResult() const { return mnDefault; }
96 : void setFormat(const OUString & rFormat) { msFormat = rFormat; }
97 : const OUString & getFormat() const { return msFormat; }
98 : void setHelp(const OUString & rHelp);
99 : const OUString getHelp() const { return msHelp; }
100 : void setStatus(const OUString & rStatus);
101 : const OUString & getStatus() const { return msStatus; }
102 : void setMacroEnter(const OUString & rMacroEnter) { msMacroEnter = rMacroEnter; }
103 : const OUString & getMacroEnter() const { return msMacroEnter; }
104 : void setMacroExit(const OUString & rMacroExit) { msMacroExit = rMacroExit; }
105 : const OUString & getMacroExit() const { return msMacroExit; }
106 :
107 : void addListboxEntry(const OUString & rEntry);
108 :
109 : void Write(SvStream * pDataStrm);
110 : };
111 : }
112 :
113 : #endif // INCLUDED_SW_SOURCE_FILTER_WW8_WW8FFDATA_HXX
114 :
115 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|