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