build fix
[LibreOffice.git] / include / editeng / swafopt.hxx
blobad295254c5506cf017a7fe382157a7303170a263
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_EDITENG_SWAFOPT_HXX
21 #define INCLUDED_EDITENG_SWAFOPT_HXX
23 #include <editeng/editengdllapi.h>
24 #include <o3tl/sorted_vector.hxx>
25 #include <rtl/ustring.hxx>
26 #include <vcl/font.hxx>
28 class SmartTagMgr;
30 namespace editeng {
32 class EDITENG_DLLPUBLIC IAutoCompleteString
34 private:
35 OUString m_String;
36 public:
37 explicit IAutoCompleteString(OUString const& rString) : m_String(rString) {}
38 virtual ~IAutoCompleteString() {}
39 OUString const& GetAutoCompleteString() const { return m_String; }
42 struct CompareAutoCompleteString
44 bool operator()(IAutoCompleteString *const& lhs,
45 IAutoCompleteString *const& rhs) const
47 return lhs->GetAutoCompleteString().compareToIgnoreAsciiCase(
48 rhs->GetAutoCompleteString()) < 0;
52 class SortedAutoCompleteStrings
53 : public o3tl::sorted_vector<IAutoCompleteString*, CompareAutoCompleteString>
55 public:
56 ~SortedAutoCompleteStrings() { DeleteAndDestroyAll(); }
59 } // namespace editeng
61 // Class of options for AutoFormat
62 struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
64 vcl::Font aBulletFont;
65 vcl::Font aByInputBulletFont;
66 /// only valid inside the Dialog!!!
67 const editeng::SortedAutoCompleteStrings * m_pAutoCompleteList;
68 SmartTagMgr* pSmartTagMgr;
70 sal_Unicode cBullet;
71 sal_Unicode cByInputBullet;
73 sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen;
74 sal_uInt16 nAutoCmpltExpandKey;
76 sal_uInt8 nRightMargin;
78 bool bAutoCorrect : 1;
79 bool bCapitalStartSentence : 1;
80 bool bCapitalStartWord : 1;
81 bool bChkFontAttr : 1;
83 bool bChgUserColl : 1;
84 bool bChgEnumNum : 1;
86 bool bAFormatByInput : 1;
87 bool bDelEmptyNode : 1;
88 bool bSetNumRule : 1;
90 bool bChgOrdinalNumber : 1;
91 bool bChgToEnEmDash : 1;
92 bool bAddNonBrkSpace : 1;
93 bool bChgWeightUnderl : 1;
94 bool bSetINetAttr : 1;
96 bool bSetBorder : 1;
97 bool bCreateTable : 1;
98 bool bReplaceStyles : 1;
99 bool bDummy : 1;
101 bool bWithRedlining : 1;
103 bool bRightMargin : 1;
105 bool bAutoCompleteWords : 1;
106 bool bAutoCmpltCollectWords : 1;
107 bool bAutoCmpltEndless : 1;
108 // -- under NT here starts a new long
109 bool bAutoCmpltAppendBlanc : 1;
110 bool bAutoCmpltShowAsTip : 1;
112 bool bAFormatDelSpacesAtSttEnd : 1;
113 bool bAFormatDelSpacesBetweenLines : 1;
114 bool bAFormatByInpDelSpacesAtSttEnd : 1;
115 bool bAFormatByInpDelSpacesBetweenLines : 1;
117 bool bAutoCmpltKeepList : 1;
119 // some dummies for any new options
120 bool bDummy6 : 1,
121 bDummy7 : 1,
122 bDummy8 : 1
125 SvxSwAutoFormatFlags();
126 SvxSwAutoFormatFlags( const SvxSwAutoFormatFlags& rAFFlags ) { *this = rAFFlags; }
127 SvxSwAutoFormatFlags& operator=( const SvxSwAutoFormatFlags& );
130 #endif
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */