tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / sw / source / filter / ww8 / WW8FFData.hxx
blob120f80cf463899dacce2882f90ca1537bc420594
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 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8FFDATA_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8FFDATA_HXX
23 #include <vector>
24 #include <rtl/ustring.hxx>
26 class SvStream;
28 namespace sw
30 class WW8FFData final
32 private:
33 // offset 0x4
34 sal_uInt8 mnType; // :2 0x3
35 sal_uInt8 mnResult; // :5 0x7c
36 bool mbOwnHelp; // :1 0x80
38 // offset 5
39 bool mbOwnStat; // :1 0x01
40 bool mbProtected; // :1 0x02
41 bool mbSize; // :1 0x04
42 sal_uInt8 mnTextType; // :3 0x38
43 bool mbRecalc; // :1 0x4
44 bool mbListBox; // :1 0x80
46 // offset 6
47 sal_uInt16 mnMaxLen; // :15 0x7fff maximum length of text field, 0 <=> no limit
49 // offset 8
50 sal_uInt16 mnCheckboxHeight;
52 // offset 10 and beyond
53 OUString msName;
54 OUString msDefault; // only for type == 0
55 sal_uInt16 mnDefault; // only for type != 0
56 OUString msFormat;
57 OUString msHelp;
58 OUString msStatus;
59 OUString msMacroEnter;
60 OUString msMacroExit;
62 std::vector<OUString> msListEntries;
64 static void WriteOUString(SvStream* pStream, const OUString& rStr, bool bAddZero);
66 public:
67 WW8FFData();
68 ~WW8FFData();
70 void setType(sal_uInt8 nType) { mnType = nType; }
72 void setResult(sal_uInt8 nResult) { mnResult = nResult; }
74 void setName(const OUString& rName) { msName = rName; }
76 void setHelp(const OUString& rHelp);
78 void setStatus(const OUString& rStatus);
80 void addListboxEntry(const OUString& rEntry);
82 void Write(SvStream* pDataStrm);
86 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_WW8FFDATA_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */