1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: WW8FFData.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #include <rtl/ustring.hxx>
43 sal_uInt8 mnType
; // :2 0x3
44 sal_uInt8 mnResult
; // :5 0x7c
45 bool mbOwnHelp
; // :1 0x80
48 bool mbOwnStat
; // :1 0x01
49 bool mbProtected
; // :1 0x02
50 bool mbSize
; // :1 0x04
51 sal_uInt8 mnTextType
; // :3 0x38
52 bool mbRecalc
; // :1 0x4
53 bool mbListBox
; // :1 0x80
56 sal_uInt16 mnMaxLen
; // :15 0x7fff maximum length of text field, 0 <=> no limit
59 sal_uInt16 mnCheckboxHeight
;
61 // offset 10 and beyond
62 ::rtl::OUString msName
;
63 ::rtl::OUString msDefault
; // only for type == 0
64 sal_uInt16 mnDefault
; // only for type != 0
65 ::rtl::OUString msFormat
;
66 ::rtl::OUString msHelp
;
67 ::rtl::OUString msStatus
;
68 ::rtl::OUString msMacroEnter
;
69 ::rtl::OUString msMacroExit
;
71 ::std::vector
< ::rtl::OUString
> msListEntries
;
74 void WriteOUString(SvStream
* pStream
, const ::rtl::OUString
& rStr
, bool bAddZero
);
80 void setType(sal_uInt8 nType
) { mnType
= nType
; }
81 sal_uInt8
getType() const { return mnType
; }
82 void setResult(sal_uInt8 nResult
) { mnResult
= nResult
; }
83 sal_uInt8
getResult() const { return mnResult
; }
84 void setProptexted(bool bProtected
) { mbProtected
= bProtected
; }
85 bool getProtected() const { return mbProtected
; }
86 void setSize(bool bSize
) { mbSize
= bSize
; }
87 bool getSize() const { return mbSize
; }
88 void setTextType(sal_uInt8 nTextType
) { mnTextType
= nTextType
; }
89 sal_uInt8
getTextType() const { return mnTextType
; }
90 void setRecalc(bool bRecalc
) { mbRecalc
= bRecalc
; }
91 bool getRecalc() const { return mbRecalc
; }
92 void setListBox(bool bListBox
) { mbListBox
= bListBox
; }
93 bool getListBox() const { return mbListBox
; }
94 void setMaxLen(sal_uInt16 nMaxLen
) { mnMaxLen
= nMaxLen
; }
95 sal_uInt16
getMaxLen() const { return mnMaxLen
; }
96 void setCheckboxHeight(sal_uInt16 nCheckboxHeight
) { mnCheckboxHeight
= nCheckboxHeight
; }
97 sal_uInt16
getCheckboxHeight() const { return mnCheckboxHeight
; }
98 void setName(const ::rtl::OUString
& rName
) { msName
= rName
; }
99 const ::rtl::OUString
& getName() const { return msName
; }
100 void setDefaultString(const ::rtl::OUString
& rDefault
) { msDefault
= rDefault
; }
101 const ::rtl::OUString
& getDefaultString() const { return msDefault
; }
102 void setDefaultResult(sal_uInt16 nDefault
) { mnDefault
= nDefault
; }
103 sal_uInt16
getDefaultResult() const { return mnDefault
; }
104 void setFormat(const ::rtl::OUString
& rFormat
) { msFormat
= rFormat
; }
105 const ::rtl::OUString
& getFormat() const { return msFormat
; }
106 void setHelp(const ::rtl::OUString
& rHelp
);
107 const ::rtl::OUString
getHelp() const { return msHelp
; }
108 void setStatus(const ::rtl::OUString
& rStatus
);
109 const ::rtl::OUString
& getStatus() const { return msStatus
; }
110 void setMacroEnter(const ::rtl::OUString
& rMacroEnter
) { msMacroEnter
= rMacroEnter
; }
111 const ::rtl::OUString
& getMacroEnter() const { return msMacroEnter
; }
112 void setMacroExit(const ::rtl::OUString
& rMacroExit
) { msMacroExit
= rMacroExit
; }
113 const ::rtl::OUString
& getMacroExit() const { return msMacroExit
; }
115 void addListboxEntry(const ::rtl::OUString
& rEntry
);
117 void Write(SvStream
* pDataStrm
);